You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testers, reviewers) inherit that state. The Agent tool's `mode: "acceptEdits"`
59
+
parameter does NOT override the inherited plan-mode state on the current Claude
60
+
Code build — sub-agents will respect the `<system-reminder>` that declares plan
61
+
mode and refuse to apply any edits, even though their prompts tell them to.
62
+
63
+
Symptom: every sub-agent reports "ready to execute on exit from plan mode" and
64
+
writes its work to its own per-agent plan file at
65
+
`C:\Users\<user>\.claude\plans\<plan-name>-agent-<id>.md` instead of to the
66
+
target file.
67
+
68
+
Before spawning any sub-agent, check whether plan mode is active in the
69
+
orchestrator session. If it is:
70
+
71
+
1.**Stop** and surface the situation to the user with `AskUserQuestion`. Two
72
+
options:
73
+
-**Exit plan mode first** (user toggles their harness off plan mode, then
74
+
re-invokes the command). Cleanest.
75
+
-**Proceed in degraded mode**: spawn researchers as normal (they only need
76
+
to write to `.team-notes/`, which the orchestrator can copy into place
77
+
from their per-agent plan files if blocked). For Phase IT (implementers +
78
+
testers) and Phase RV (reviewers), the orchestrator applies the
79
+
production / test edits itself, reading each implementer's plan file to
80
+
extract the verbatim code. Reviewers can still run read-only.
81
+
82
+
2. If the user picks degraded mode, set an internal `PLAN_MODE_DEGRADED=true`
83
+
flag for the run and follow the per-phase divergences in the **Notes for
84
+
the orchestrator** block below.
85
+
54
86
## Workflow
55
87
56
88
### 1. Parse `$ARGUMENTS` and validate the batch
@@ -310,6 +342,8 @@ Print to the user:
310
342
| Sibling test failure in regression sweep | Step 11 | Dispatch a regression-sweep tester per touched fixture; in scope. |
311
343
| Reviewer NEEDS FIX | Step 12 | Re-dispatch implementer or tester for that file only; other files' results still reported. |
312
344
| One file's implementation fails after branch + assignment | Any step ≥ 6 | Keep the branch; surface in final summary; user decides whether to retry via `/implement-extensions` for that single file or revert. |
345
+
| Sub-agent inherits orchestrator plan mode and refuses to edit | Phases R / IT / RV | Surface to user via `AskUserQuestion`. Either exit plan mode and retry, or proceed in degraded mode (orchestrator copies researcher specs from agent plan files into `.team-notes/`, applies implementer + tester code from agent plan files, runs reviewers as read-only). |
346
+
| Agent's `mode: "acceptEdits"` parameter does not override inherited plan mode | Phases IT / RV | Known limitation of this Claude Code build. The orchestrator must apply the edits itself in degraded mode (see "Pre-flight: detect orchestrator plan mode"). |
313
347
314
348
## Parallelism caps (orchestrator self-enforced)
315
349
@@ -339,3 +373,25 @@ Print to the user:
339
373
- If the user supplies a single file, route them to `/implement-extensions`
340
374
with the same filename rather than creating a degenerate 1-file "batch"
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@ Auto-generated DTOs use structured namespaces reflecting the KerML/SysML package
154
154
- Use 'StringBuilder.Append(char)' instead of 'StringBuilder.Append(string)' when the input is a constant unit string
155
155
- Prefer 'string.IsNullOrWhiteSpace' over 'string.IsNullOrEmpty' when checking the non-nullable value of a string
156
156
- Prefer switch expressions/statements over if-else chains when applicable
157
-
- Prefer indexer syntax (e.g., 'list[^1]') and range syntax (e.g., 'array[1..^1]') over LINQ methods (e.g., 'list.Last()', 'list.Skip(1).Take(n)') when applicable
157
+
- Prefer LINQ as much as possible — including for projection / filter / aggregation over collections (`items.Where(...).Select(...).ToList()`, `result.AddRange(items.Select(...))`, `items.Any(predicate)`, etc.) instead of hand-rolled `foreach` + `if` + `.Add()` loops. The ONE exception is straightforward positional or range access on a concrete `List`/array: `list[^1]` beats `list.Last()`, `array[1..^1]` beats `array.Skip(1).SkipLast(1)` — indexer/range syntax is more performant there. Outside that narrow exception, LINQ wins for clarity AND maintainability.
158
158
- Prefer C# collection expressions (`[a, b, c]`, `[..xs]`, `[]`) over `new[] { ... }`, `new List<T> { ... }`, `new T[] { ... }` when constructing a collection. Applies to both production code AND tests (e.g. `Is.EqualTo([classifier1, classifier2])` not `Is.EqualTo(new[] { classifier1, classifier2 })`, `return [];` not `return new List<T>();`). Fall back to explicit construction only when type inference cannot pick the right collection type.
159
159
- Use meaningful variable names instead of single-letter names in any context (e.g., 'charIndex' instead of 'i', 'currentChar' instead of 'c', 'element' instead of 'e')
160
160
- Use 'NotSupportedException' (not 'NotImplementedException') for placeholder/stub methods that require manual implementation
0 commit comments