Skip to content

Commit 976c7f5

Browse files
committed
refactor: rename config options (verify→caution, effort→curiosity, patience→perfection)
1 parent 3215e3c commit 976c7f5

43 files changed

Lines changed: 965 additions & 624 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"status": "open", "dependencies": ["2.1-rename-config-options"]}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Plan
2+
3+
## Goal
4+
5+
Implement the caution level test execution tiers so each level determines how much verification runs
6+
before the approval gate. Currently caution maps to the old `verify` level (NONE/CHANGED/ALL) which
7+
controlled file scope, not test depth. This issue redefines the behavior in terms of test depth:
8+
9+
## Caution Level Definitions
10+
11+
### low — compile only (fastest feedback)
12+
13+
Verification runs:
14+
1. Pre/post condition checks (plan.md post-conditions evaluated against implementation)
15+
2. Compilation: `mvn -f client/pom.xml compile` — confirms the code builds without errors
16+
17+
Unit tests and E2E tests are skipped. Suitable for simple refactors and documentation changes where
18+
the user prioritizes speed over coverage confidence.
19+
20+
### medium — compile + unit tests (current default behavior)
21+
22+
Verification runs:
23+
1. Pre/post condition checks
24+
2. Compilation: `mvn -f client/pom.xml compile`
25+
3. Unit tests: `mvn -f client/pom.xml test` — runs the full unit test suite
26+
27+
E2E tests are skipped. This is the current behavior and matches what most issues need.
28+
29+
### high — compile + unit tests + E2E tests (maximum confidence)
30+
31+
Verification runs:
32+
1. Pre/post condition checks
33+
2. Compilation: `mvn -f client/pom.xml compile`
34+
3. Unit tests: `mvn -f client/pom.xml test`
35+
4. E2E tests: invoke the built jlink artifacts against a real worktree scenario to confirm the change
36+
works end-to-end in its actual runtime context (not just unit-level)
37+
38+
The E2E invocation runs the same verification described in each issue's E2E post-condition. The verify
39+
subagent is responsible for determining the appropriate E2E command from the issue's plan.md.
40+
41+
## Pre-conditions
42+
43+
(none)
44+
45+
## Post-conditions
46+
47+
- [ ] caution=low: verify phase runs pre/post condition checks and `mvn compile`; `mvn test` skipped
48+
- [ ] caution=medium: verify phase runs pre/post condition checks, `mvn compile`, and `mvn test` (current behavior)
49+
- [ ] caution=high: verify phase runs pre/post condition checks, `mvn compile`, `mvn test`, and E2E tests
50+
- [ ] Compilation step (`mvn compile`) added as an explicit verify step (currently absent)
51+
- [ ] E2E test execution is gated on caution=high
52+
- [ ] Verify subagent reads caution level from effective config before deciding which steps to run
53+
- [ ] Unit tests for caution level routing logic in the verify subagent/handler
54+
- [ ] No regressions in existing caution=medium workflows
55+
- [ ] E2E: run /cat:work at caution=low and confirm only compile runs; caution=medium confirm unit tests run; caution=high confirm E2E step executes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"status": "open", "dependencies": ["2.1-rename-config-options"]}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Plan
2+
3+
## Goal
4+
5+
Implement the curiosity level review scope so each level determines how broadly stakeholder review and
6+
research considers system context when evaluating an issue. Currently curiosity maps to the old `effort`
7+
level which controlled planning depth, not review scope. This issue redefines behavior in terms of
8+
automatic vs. manual triggering and narrow vs. holistic analysis scope.
9+
10+
## Curiosity Level Definitions
11+
12+
### low — skip automatic review (user-triggered only)
13+
14+
Stakeholder review and research do NOT run automatically as part of `/cat:work`.
15+
They only run if the user explicitly invokes them (e.g., `/cat:stakeholder-review-agent` directly).
16+
17+
Suitable for highly-trusted teams with established code review processes who find the automated review
18+
cycle adds friction without value.
19+
20+
### medium — automatic, scoped to immediate issue (current default behavior)
21+
22+
Stakeholder review and research run automatically as part of `/cat:work`.
23+
24+
Scope is limited to:
25+
- Files changed in the implementation
26+
- Direct dependencies referenced in the changed files
27+
- The issue's own plan.md post-conditions and goal
28+
29+
Reviewers are instructed to focus on: "Does this change correctly and completely implement its stated
30+
goal without introducing regressions in the changed files and their direct dependencies?"
31+
32+
This is the current behavior.
33+
34+
### high — automatic, holistic system integration
35+
36+
Stakeholder review and research run automatically as part of `/cat:work`.
37+
38+
Scope is expanded to consider the broader system:
39+
- How does this change interact with other open issues in the same version?
40+
- Are there architectural patterns in the rest of the codebase that this change should follow or
41+
that this change might inadvertently break?
42+
- Are there cross-cutting concerns (security, performance, accessibility) that need validation
43+
beyond the immediately changed files?
44+
45+
Reviewer prompts include explicit instructions to read surrounding code context (not just the diff)
46+
and consider downstream impact on consumers of changed APIs or interfaces.
47+
48+
Research (`cat:research-agent`) also runs with broader context:
49+
- Surveys existing patterns in the codebase before proposing an approach
50+
- Checks whether similar problems have been solved elsewhere in the repo
51+
52+
## Pre-conditions
53+
54+
(none)
55+
56+
## Post-conditions
57+
58+
- [ ] curiosity=low: stakeholder review and research are skipped in /cat:work; no automatic invocation
59+
- [ ] curiosity=low: user can still manually trigger review via explicit skill invocation
60+
- [ ] curiosity=medium: stakeholder review runs automatically, scoped to changed files and direct deps (current behavior preserved)
61+
- [ ] curiosity=high: stakeholder review runs with expanded scope; reviewer prompts include explicit instructions to consider broader system context
62+
- [ ] curiosity=high: research skill (cat:research-agent) is invoked with broader codebase survey context
63+
- [ ] curiosity=high reviewer prompts: each stakeholder receives instructions to read surrounding files and consider downstream impact
64+
- [ ] curiosity level read from effective config in work-with-issue orchestration before spawning reviewers
65+
- [ ] Unit tests for curiosity level routing logic
66+
- [ ] No regressions in existing curiosity=medium workflows
67+
- [ ] E2E: run /cat:work at curiosity=low and verify no review runs; curiosity=medium verify scoped review; curiosity=high verify holistic reviewer prompt is used
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"status": "open", "dependencies": ["2.1-rename-config-options"]}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Plan
2+
3+
## Goal
4+
5+
Implement the trust level approval gate model so each level maps to a qualitatively distinct number of
6+
checkpoints. Currently all three levels only differ in whether the merge gate is shown; this issue
7+
introduces a pre-implementation gate for `low` and removes all gates for `high`.
8+
9+
## Trust Level Definitions
10+
11+
### low — 2 checkpoints (maximum control)
12+
13+
**Gate 1: Pre-implementation review**
14+
15+
Before the implementation subagent is spawned, present the user with:
16+
- Issue goal (from plan.md `## Goal`)
17+
- Post-conditions (from plan.md `## Post-conditions`)
18+
- Estimated token cost
19+
20+
Options: `Approve and start`, `Request changes`, `Abort`
21+
22+
Only on `Approve and start` does implementation proceed. On `Request changes`, pause for user to
23+
revise the plan. On `Abort`, release lock and exit.
24+
25+
**Gate 2: Pre-merge review (standard approval gate)**
26+
27+
After implementation, confirm, and review phases: present the diff, stakeholder concerns, and commit
28+
summary, then ask for merge approval as today.
29+
30+
### medium — 1 checkpoint (current default behavior)
31+
32+
No pre-implementation gate. Only the standard pre-merge approval gate after implementation completes.
33+
Behavior is identical to the current `trust=medium` workflow.
34+
35+
### high — 0 checkpoints (auto-merge on clean review)
36+
37+
No user approval gates at all. After stakeholder review:
38+
39+
| Stakeholder verdict | Action |
40+
|---------------------|--------|
41+
| APPROVED (no concerns) | Auto-merge immediately |
42+
| CONCERNS (medium/low only) | Auto-merge immediately |
43+
| CONCERNS (high severity) | Pause — present concerns to user, ask: `Approve and merge` / `Fix concerns` / `Abort` |
44+
| REJECTED | Pause — present rejection reasons, ask: `Fix issues` / `Abort` |
45+
46+
The auto-merge path still runs squash and rebase onto the target branch before merging.
47+
48+
## Pre-conditions
49+
50+
(none)
51+
52+
## Post-conditions
53+
54+
- [ ] trust=low: pre-implementation gate shown with issue goal, post-conditions, and estimated tokens
55+
- [ ] trust=low: implementation does not start until user selects `Approve and start`
56+
- [ ] trust=low: `Request changes` at pre-implementation gate returns control to user without starting work
57+
- [ ] trust=low: standard pre-merge gate shown after implementation (unchanged)
58+
- [ ] trust=medium: no pre-implementation gate; only standard pre-merge gate (current behavior preserved)
59+
- [ ] trust=high: no approval gates when stakeholder verdict is APPROVED or CONCERNS (low/medium severity only)
60+
- [ ] trust=high with HIGH severity CONCERNS: pauses and presents concerns before proceeding
61+
- [ ] trust=high with REJECTED verdict: pauses and presents rejection reasons before proceeding
62+
- [ ] trust=high auto-merge path: squash and rebase onto target branch execute before merge
63+
- [ ] Unit tests covering gate routing logic for each trust level
64+
- [ ] No regressions in existing trust=medium workflows
65+
- [ ] E2E: run /cat:work at trust=low and verify two gates appear; trust=medium verify one gate; trust=high verify auto-merge on APPROVED
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"status" : "open"
3-
}
2+
"status" : "closed",
3+
"resolution" : "implemented",
4+
"target_branch" : "v2.1"
5+
}

.cat/issues/v2/v2.1/rename-config-options/plan.md

Lines changed: 164 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,63 @@ as part of a broader UX redesign that models user personality/style. A companion
1616
## Scope
1717

1818
All files under `plugin/` that read or document `effort`, `verify`, or `patience` config keys, plus the
19-
config template and migration infrastructure.
19+
config template, Java source in `client/`, and migration infrastructure.
20+
21+
## Research Findings
22+
23+
### Files Requiring Changes
24+
25+
**Config template:**
26+
- `plugin/templates/config.json` — JSON keys `verify`, `effort`, `patience`
27+
28+
**Java source (production):**
29+
- `client/src/main/java/io/github/cowwoc/cat/hooks/Config.java` — accessors `getVerify()`, `getEffort()`,
30+
`getPatience()` with string literals `"verify"`, `"effort"`, `"patience"` and default values in DEFAULTS map
31+
- `client/src/main/java/io/github/cowwoc/cat/hooks/util/VerifyLevel.java` — rename to `CautionLevel.java`
32+
- `client/src/main/java/io/github/cowwoc/cat/hooks/util/EffortLevel.java` — rename to `CuriosityLevel.java`
33+
- `client/src/main/java/io/github/cowwoc/cat/hooks/util/PatienceLevel.java` — rename to `PerfectionLevel.java`
34+
- `client/src/main/java/io/github/cowwoc/cat/hooks/skills/GetInitOutput.java` — references `effort patience`
35+
in argument parsing
36+
37+
**Java source (tests):**
38+
- `client/src/test/java/io/github/cowwoc/cat/hooks/test/ConfigTest.java` — references to all three keys
39+
- `client/src/test/java/io/github/cowwoc/cat/hooks/test/HandlerOutputTest.java` — may reference config keys
40+
- `client/src/test/java/io/github/cowwoc/cat/hooks/test/CheckDataMigrationTest.java` — migration validation
41+
42+
**Plugin skills reading config via grep/sed:**
43+
- `plugin/skills/work-review-agent/first-use.md` — greps for `"verify"` and `"patience"`
44+
- `plugin/skills/work-implement-agent/first-use.md` — greps for `"effort"`
45+
- `plugin/skills/stakeholder-review-agent/first-use.md` — greps for `"effort"`
46+
- `plugin/skills/add-agent/first-use.md` — reads config via get-config-output
47+
48+
**Plugin skills with config documentation/menus:**
49+
- `plugin/skills/config/first-use.md` — config wizard menus for verify, effort, patience
50+
- `plugin/skills/init/first-use.md` — config template documentation
51+
52+
**Migration:**
53+
- `plugin/migrations/2.1.sh` — existing migration has `curiosity → effort` rename (lines 483-497) that
54+
needs reversal; also references `verify` in session migration (lines 908-910)
55+
- `plugin/migrations/registry.json` — migration descriptions reference old names
56+
57+
**Concepts and rules referencing config keys:**
58+
- Various `plugin/concepts/*.md` and `plugin/rules/*.md` files that document `verify`, `effort`, `patience`
59+
- `plugin/agents/work-verify.md` — references verify level
60+
61+
### Scale Inversion for perfection
62+
63+
The `patience` config controlled "how long to wait" (high=wait long, low=act fast). The replacement
64+
`perfection` controls "how immediately to act on improvements" (high=act immediately, low=defer). This is
65+
a semantic inversion: `patience: high` maps to `perfection: low` and vice versa. The migration script must
66+
invert the value during conversion.
67+
68+
### Existing Migration Context
69+
70+
The `2.1.sh` migration already contains a `curiosity → effort` rename (Phase 6, lines 483-497). Since this
71+
issue renames `effort → curiosity` (reversing that), the migration phase needs to be removed or updated to
72+
be a no-op for this key. The migration must now handle:
73+
- `verify → caution`
74+
- `effort → curiosity`
75+
- `patience → perfection` (with value inversion: high↔low, medium stays medium)
2076

2177
## Post-conditions
2278

@@ -31,3 +87,110 @@ config template and migration infrastructure.
3187
- `plugin/skills/config/first-use.md` updated to use new names in all menus and descriptions
3288
- `plugin/skills/init/first-use.md` updated to use new names
3389
- Config documentation reflects new names and their meanings
90+
91+
## Sub-Agent Waves
92+
93+
### Wave 1
94+
95+
1. **Rename Java enum classes** (file renames + content updates):
96+
- Rename `client/src/main/java/io/github/cowwoc/cat/hooks/util/VerifyLevel.java` to `CautionLevel.java`:
97+
change class name `VerifyLevel``CautionLevel`, update Javadoc from "verify level" to "caution level",
98+
update method name `fromString` Javadoc, keep same enum values (NONE, CHANGED, ALL)
99+
- Rename `client/src/main/java/io/github/cowwoc/cat/hooks/util/EffortLevel.java` to `CuriosityLevel.java`:
100+
change class name `EffortLevel``CuriosityLevel`, update Javadoc from "effort level" to
101+
"curiosity level", keep same enum values (LOW, MEDIUM, HIGH)
102+
- Rename `client/src/main/java/io/github/cowwoc/cat/hooks/util/PatienceLevel.java` to
103+
`PerfectionLevel.java`: change class name `PatienceLevel``PerfectionLevel`, update Javadoc from
104+
"patience level" to "perfection level" with note about inverted scale (high=act immediately, low=defer),
105+
keep same enum values (LOW, MEDIUM, HIGH)
106+
107+
2. **Update Config.java**:
108+
- In DEFAULTS map: change keys `"verify"``"caution"`, `"effort"``"curiosity"`,
109+
`"patience"``"perfection"`
110+
- Rename accessor `getVerify()``getCaution()`, return type `VerifyLevel``CautionLevel`,
111+
string literal `"verify"``"caution"`
112+
- Rename accessor `getEffort()``getCuriosity()`, return type `EffortLevel``CuriosityLevel`,
113+
string literal `"effort"``"curiosity"`
114+
- Rename accessor `getPatience()``getPerfection()`, return type `PatienceLevel``PerfectionLevel`,
115+
string literal `"patience"``"perfection"`
116+
- Update all import statements for renamed enum classes
117+
118+
3. **Update GetInitOutput.java**:
119+
- Change argument references from `effort patience` to `curiosity perfection`
120+
- Update any string literals referencing old names
121+
122+
4. **Update all Java files that import or reference the old enum classes**:
123+
- Search for `import.*VerifyLevel`, `import.*EffortLevel`, `import.*PatienceLevel` across all Java files
124+
- Update imports and usages to new class names
125+
- Search for `getVerify()`, `getEffort()`, `getPatience()` across all Java files and update to new names
126+
127+
5. **Update Java tests**:
128+
- `ConfigTest.java`: update all references to old key names (`"verify"`, `"effort"`, `"patience"`) to new
129+
names, update enum class references, update method call names
130+
- `HandlerOutputTest.java`: update any references to old config keys or enum classes
131+
- `CheckDataMigrationTest.java`: update migration test expectations
132+
- Any other test files that reference the old names
133+
134+
6. **Run `mvn -f client/pom.xml verify -e`** to ensure all Java changes compile and tests pass
135+
136+
7. **Commit Java changes**:
137+
`refactor: rename config option types verify→caution, effort→curiosity, patience→perfection`
138+
139+
### Wave 2
140+
141+
1. **Update config template**:
142+
- In `plugin/templates/config.json`: rename keys `"verify"``"caution"`, `"effort"``"curiosity"`,
143+
`"patience"``"perfection"`
144+
145+
2. **Update plugin skills that grep config values** (change grep patterns from old to new key names):
146+
- `plugin/skills/work-review-agent/first-use.md`: change `'"verify"'` grep to `'"caution"'`,
147+
change `'"patience"'` grep to `'"perfection"'`
148+
- `plugin/skills/work-implement-agent/first-use.md`: change `'"effort"'` grep to `'"curiosity"'`
149+
- `plugin/skills/stakeholder-review-agent/first-use.md`: change `'"effort"'` grep to `'"curiosity"'`
150+
- `plugin/skills/add-agent/first-use.md`: update any config key references
151+
152+
3. **Update config wizard skill**:
153+
- `plugin/skills/config/first-use.md`: rename all menu items and descriptions from
154+
`verify``caution`, `effort``curiosity`, `patience``perfection`.
155+
Update the step names and emoji descriptions to match new personality-oriented naming.
156+
For perfection, update the scale description to: high=act immediately on improvements, low=defer.
157+
158+
4. **Update init skill**:
159+
- `plugin/skills/init/first-use.md`: update config template documentation to use new key names
160+
161+
5. **Update migration script** (`plugin/migrations/2.1.sh`):
162+
- Remove or update the existing `curiosity → effort` Phase 6 migration (lines 483-497) since the rename
163+
is now reversed
164+
- Add new migration phase that renames: `verify → caution`, `effort → curiosity`, `patience → perfection`
165+
- For `patience → perfection`, invert the value: `high``low`, `low``high`, `medium``medium`
166+
- Make the migration idempotent: check if old keys exist before renaming, skip if already renamed
167+
- Update `plugin/migrations/registry.json` descriptions if needed
168+
169+
6. **Update concept and rule files** that reference config keys:
170+
- Search `plugin/concepts/` and `plugin/rules/` for references to `verify` (as config key), `effort`,
171+
`patience` and update to new names
172+
- Be careful to only change config-key references, NOT the English word "verify" when used as a verb
173+
(e.g., "verify implementation" should NOT be changed)
174+
175+
7. **Commit plugin changes**:
176+
`refactor: rename config keys verify→caution, effort→curiosity, patience→perfection in plugin`
177+
178+
8. **Fix work-agent config field reference**:
179+
- In `plugin/skills/work-agent/first-use.md` line 69: change the `"verify"` field name reference to `"caution"`
180+
so the documentation correctly identifies the config key that VERIFY/CAUTION is read from
181+
182+
9. **Fix work-review-agent documentation references**:
183+
- In `plugin/skills/work-review-agent/first-use.md` lines 174, 176, 186, 188: change all occurrences of
184+
`verify=none` to `caution=none` so the documentation about the config setting uses the renamed key
185+
186+
10. **Update index.json**: set status to `closed`, progress to 100%
187+
188+
## Success Criteria
189+
190+
- `mvn -f client/pom.xml verify -e` passes with zero errors
191+
- `plugin/templates/config.json` contains only `caution`, `curiosity`, `perfection` (not the old names)
192+
- No Java file references `VerifyLevel`, `EffortLevel`, or `PatienceLevel` class names
193+
- No skill file greps for `"verify"`, `"effort"`, or `"patience"` as config keys
194+
- Migration script in `plugin/migrations/2.1.sh` handles old→new key conversion with value inversion for
195+
perfection
196+
- Migration is idempotent (running twice produces same result)

0 commit comments

Comments
 (0)