@ionivetech/mugiwara 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.kimi-plugin/plugin.json +1 -1
- package/.opencode/mugiwara-helpers.mjs +2 -2
- package/README.md +194 -328
- package/content/agents/franky-gates.md +1 -1
- package/content/agents/luffy-orchestrator.md +2 -2
- package/content/skills/mugiwara-backend/SKILL.md +52 -43
- package/content/skills/mugiwara-checkpoint/SKILL.md +19 -8
- package/content/skills/mugiwara-contract-first/SKILL.md +46 -1
- package/content/skills/mugiwara-execution/SKILL.md +32 -32
- package/content/skills/mugiwara-execution/references/execution-phase-flows.md +18 -0
- package/content/skills/mugiwara-frontend/SKILL.md +44 -44
- package/content/skills/mugiwara-gates/SKILL.md +22 -16
- package/content/skills/mugiwara-healing/SKILL.md +26 -25
- package/content/skills/mugiwara-orchestration/SKILL.md +6 -6
- package/content/skills/mugiwara-orchestration/references/control-commands.md +14 -0
- package/content/skills/mugiwara-planning/SKILL.md +26 -14
- package/content/skills/mugiwara-planning/references/large-campaign-subplan.md +41 -0
- package/content/skills/mugiwara-planning/references/plan-template.md +22 -0
- package/content/skills/mugiwara-quality/SKILL.md +19 -13
- package/content/skills/mugiwara-resume/SKILL.md +6 -1
- package/content/skills/mugiwara-review/SKILL.md +17 -12
- package/content/skills/mugiwara-security/SKILL.md +46 -35
- package/content/skills/mugiwara-workflow/SKILL.md +6 -9
- package/content/skills/mugiwara-workflow/references/adaptive-budget-governor.md +5 -0
- package/content/skills/mugiwara-workflow/references/benchmark-governor.md +53 -0
- package/content/skills/mugiwara-workflow/references/cognitive-output-governor.md +5 -0
- package/content/skills/mugiwara-workflow/references/large-campaign-subplan.md +29 -0
- package/content/skills/mugiwara-workflow/references/scope-code-governor.md +14 -0
- package/content/skills/mugiwara-workflow/references/stop-slop-governor.md +14 -0
- package/content/skills/mugiwara-workflow/references/workspace-layout.md +6 -3
- package/dist/mugiwara.js +925 -253
- package/gemini-extension.json +1 -1
- package/hooks/pipeline-guard.js +1 -1
- package/hooks/pipeline-guard.ts +2 -1
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/references/multi-actor.md +21 -0
- package/references/posture-routing.md +31 -0
- package/scripts/benchmark-governor.ts +516 -0
- package/scripts/benchmark-thresholds.json +47 -0
- package/scripts/check-doc-links.ts +8 -2
- package/scripts/gate-selftest.ts +20 -0
- package/scripts/lib/lane-base.sh +4 -4
- package/scripts/retrieval-eval.ts +9 -3
- package/scripts/savepoint.sh +20 -1
- package/scripts/validate-content.ts +22 -3
- package/src/adaptive-budget.ts +178 -0
- package/src/args.ts +3 -2
- package/src/budget.ts +7 -16
- package/src/check-artifacts.ts +45 -0
- package/src/cli.ts +102 -4
- package/src/cognition.ts +234 -0
- package/src/config.ts +107 -0
- package/src/context.ts +72 -0
- package/src/cost.ts +186 -0
- package/src/evidence.ts +160 -0
- package/src/installer.ts +2 -16
- package/src/integrity.ts +1 -1
- package/src/investigation.ts +72 -0
- package/src/mission.ts +124 -10
- package/src/posture.ts +86 -0
- package/src/reporting.ts +225 -0
- package/src/scope.ts +321 -0
- package/src/sign.ts +194 -20
- package/src/slop.ts +306 -0
- package/src/work.ts +273 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-frontend
|
|
3
3
|
description: Use for frontend component, CSS styling, responsive layout, accessible — matching standards, extraction.
|
|
4
|
+
gate_artifact: flows/01-execution.md — frontend evidence (tokens.css + component evidence)
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Frontend (Anti-Slop)
|
|
@@ -9,41 +10,52 @@ description: Use for frontend component, CSS styling, responsive layout, accessi
|
|
|
9
10
|
|
|
10
11
|
- Diff touches no UI code: backend, docs, config, or CLI-only change.
|
|
11
12
|
- No visual change, markup, styling, or frontend behavior in the mission.
|
|
12
|
-
|
|
13
13
|
Interfaces built under this skill must not look templated.
|
|
14
14
|
|
|
15
15
|
## Source-backed code
|
|
16
16
|
|
|
17
17
|
Framework code from docs, not memory — `_shared/references/source-grounding.md`.
|
|
18
|
-
|
|
18
|
+
- React Server Actions: `useActionState` for form pending/error state — https://react.dev/reference/react/useActionState
|
|
19
|
+
- Tailwind class scanning: `content` purge paths — https://v3.tailwindcss.com/docs/content-configuration
|
|
19
20
|
## Existing repo standard first
|
|
20
21
|
|
|
21
22
|
Match the repo's standard before writing anything new; reuse its components and patterns. Greenfield with no UI: skip to design-system extraction.
|
|
22
23
|
- Component library (MUI/Tailwind/shadcn/etc) — a new button looks like the repo's buttons, not the internet's.
|
|
23
24
|
- File conventions, naming, folder structure, CSS strategy; lint/format/test scripts.
|
|
24
25
|
- Tokens already in the theme/config; existing page patterns — how pages compose sections and state.
|
|
25
|
-
|
|
26
26
|
## Redesigns: audit first
|
|
27
27
|
|
|
28
28
|
Capture current layout, spacing/type scales, palette, and component inventory before changing existing UI. Fix real problems; do not restyle what works.
|
|
29
29
|
|
|
30
30
|
## Design-system extraction (before markup)
|
|
31
|
-
Extract tokens from the stack's design system BEFORE markup — spacing scale, type scale, role-based palette, radii, shadows, motion language. Name them semantically (`surface-muted`, not `c3`); store where the stack keeps tokens. No tokens extracted, no markup written; token set and naming: `references/design-tokens.md`. Then turn tokens into a small primitive set (button, input, card, icon, layout helpers) before composing screens — reuse primitives everywhere; every bespoke component is debt on every screen.
|
|
32
31
|
|
|
32
|
+
Tokens BEFORE markup — no tokens, no markup. Write `tokens.css` (CSS custom properties on `:root`) unless the stack keeps tokens elsewhere:
|
|
33
|
+
- Spacing: 4/8 grid — 4, 8, 12, 16, 24, 32, 48, 64 (`space-xs`…`space-3xl`).
|
|
34
|
+
- Type: 12/14/16/18/24/32/48 scale, 1.5 line-height, 45–75ch measure (`text-sm`…`text-display`).
|
|
35
|
+
- Role palette: `surface-muted`, `text-primary`, `border-default`, `accent` — semantic, not color names.
|
|
36
|
+
- Radii: 2/4/8/12/full; shadows sm–xl; motion: duration + easing (`duration-fast`, `ease-in-out`).
|
|
37
|
+
Semantic names only (`surface-muted`, never `gray-100`). Full rules: `references/design-tokens.md`.
|
|
38
|
+
|
|
39
|
+
## Primitives (reuse, 100%)
|
|
40
|
+
|
|
41
|
+
Build `Button`, `Input`, `Card`, `Stack` from tokens; compose every screen from them. A bespoke component is debt on every screen — reuse primitives or justify the exception.
|
|
42
|
+
- Storybook story per primitive as behavior reference, not a build harness — https://storybook.js.org/docs
|
|
43
|
+
- Tailwind: `content: ['./src/**/*.{ts,tsx}']` purge in `tailwind.config.ts`; `prettier-plugin-tailwindcss` for stable class order.
|
|
44
|
+
- Variants over props soup: 3+ boolean props = split the component; children/slots over config flags.
|
|
45
|
+
## Server Actions (React)
|
|
46
|
+
|
|
47
|
+
`useActionState(fn, initial)` returns `[state, formAction, isPending]`; pass `formAction` to `<form action>`. Progressive enhancement works even before hydration.
|
|
48
|
+
- Disable submit while `isPending` (`useFormStatus` for nested buttons).
|
|
49
|
+
- Render `state.error` into a `role="alert"`/`aria-live` region; every async region gets a `data-testid`.
|
|
50
|
+
- Keyboard path asserted: tab order, focus, Enter/Escape; no focus trap without escape.
|
|
33
51
|
## Component architecture
|
|
34
52
|
|
|
35
|
-
Compose, don't inherit.
|
|
36
|
-
- Boundaries: one component = one responsibility; extract on reuse; leaves stay presentational (no data fetching).
|
|
53
|
+
Compose, don't inherit. One responsibility per component; extract on reuse; leaves presentational (no data fetching).
|
|
37
54
|
- Composition over configuration: children/slots beat dozens of props.
|
|
38
|
-
- Props: primitives and plain callbacks over object-shaped flags; 3+ boolean props = split the component.
|
|
39
55
|
- Naming by role (`ProductCard`, not `CardA`); variants over copy-paste.
|
|
40
|
-
|
|
41
56
|
## State management
|
|
42
57
|
|
|
43
|
-
Minimal state, local first; lift only what is shared.
|
|
44
|
-
- Server vs client state: never store a per-screen copy of API data; cache/refetch at a data layer; derive on render.
|
|
45
|
-
- Single source of truth per state, no duplicate mirrors; lift only when siblings share — context/store for app-wide state, not one screen.
|
|
46
|
-
- Loading, error, empty, success states designed, not an afterthought.
|
|
58
|
+
Minimal state, local first; lift only what is shared. Server vs client: cache/refetch at a data layer, derive on render; no per-screen copies of API data. Loading/error/empty/success designed, not an afterthought.
|
|
47
59
|
|
|
48
60
|
## From Figma / image references
|
|
49
61
|
|
|
@@ -53,61 +65,48 @@ Extract tokens first, then reproduce structure faithfully: hierarchy, alignment,
|
|
|
53
65
|
|
|
54
66
|
- Hierarchy and rhythm: one primary action per view, one focal point, consistent spacing.
|
|
55
67
|
- Restraint: fewer, more considered elements; whitespace is a tool.
|
|
56
|
-
- Typography: 1-2 typefaces, deliberate scale, weight for emphasis
|
|
57
|
-
- Color: role-based palette, contrast AA minimum, never pure-black-on-pure-white for text
|
|
58
|
-
- Consistency: the same thing looks the same everywhere
|
|
68
|
+
- Typography: 1-2 typefaces, deliberate scale, weight for emphasis, 45-75ch lines.
|
|
69
|
+
- Color: role-based palette, contrast AA minimum, never pure-black-on-pure-white for text.
|
|
70
|
+
- Consistency: the same thing looks the same everywhere.
|
|
59
71
|
- Intentionality: every element earns its place; if you cannot say why, remove it.
|
|
60
|
-
- State design: hover, focus, active, disabled, loading, error, empty — designed
|
|
61
|
-
- Craft:
|
|
62
|
-
|
|
72
|
+
- State design: hover, focus, active, disabled, loading, error, empty — designed.
|
|
73
|
+
- Craft: spacing grids; motion respecting `prefers-reduced-motion`; verified at breakpoints.
|
|
63
74
|
## Responsive behavior
|
|
64
75
|
|
|
65
|
-
Mobile-first
|
|
76
|
+
Mobile-first; default full-width stacked, columns only when there is room. Use the stack's breakpoints, not a parallel scale; fluid containers, type, and spacing. Verify at every breakpoint, including between them — 3 widths checked is not 12 checked.
|
|
66
77
|
|
|
67
|
-
##
|
|
68
|
-
- Centered hero trio: headline + subtitle + two buttons, dead center, gradient text.
|
|
69
|
-
- Row of 3-4 identical feature cards with icon-circle + title + two lines.
|
|
70
|
-
- Purple/indigo gradient everything; glassmorphism everywhere; emoji as icons.
|
|
71
|
-
- Placeholder content where real product copy exists.
|
|
72
|
-
- Stock hero illustrations when the design specifies otherwise.
|
|
78
|
+
## Performance budgets
|
|
73
79
|
|
|
74
|
-
|
|
80
|
+
- LCP <2.5s, CLS <0.1, INP <200ms. Images carry width/height or aspect-ratio; LCP asset preloaded; fonts `font-display`; input handlers off the main thread.
|
|
81
|
+
- No layout thrash; animate only transform/opacity; lazy-load below the fold; no whole icon library for two icons; no re-render storms (stable keys, no work in render).
|
|
82
|
+
- Lighthouse/lighthouse-ci in repo? Run it; scores meet budgets, deltas explained. Measure before optimizing.
|
|
83
|
+
## Banned AI-default patterns (the slop list)
|
|
75
84
|
|
|
85
|
+
- Centered hero trio; row of 3-4 identical feature cards; purple/indigo gradient everything; glassmorphism; emoji as icons; placeholder copy; stock hero illustrations.
|
|
86
|
+
- Full catalog with the tell for each: `references/slop-catalog.md`. Brief genuinely calls for one? Execute it well — but default is don't.
|
|
76
87
|
## WCAG 2.1 AA accessibility
|
|
77
88
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
- Semantics: native elements over ARIA; landmarks; logical heading order; buttons for actions, links for navigation.
|
|
89
|
+
Full checklist: `references/checklist.md`.
|
|
90
|
+
- Keyboard: operable alone; logical tab order; visible focus; no trap without escape.
|
|
91
|
+
- Semantics: native elements over ARIA; landmarks; logical heading order.
|
|
82
92
|
- Contrast: 4.5:1 text, 3:1 large text/UI; never color-only meaning.
|
|
83
|
-
- Forms: every input labeled (placeholder is not a label);
|
|
84
|
-
- Dynamic content: `aria-live
|
|
85
|
-
|
|
93
|
+
- Forms: every input labeled (placeholder is not a label); `aria-describedby` help.
|
|
94
|
+
- Dynamic content: `aria-live`; reduced-motion respected.
|
|
86
95
|
## Testability and verification
|
|
87
96
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## Performance
|
|
91
|
-
|
|
92
|
-
- Core Web Vitals are the bar: LCP <2.5s, CLS <0.1, INP <200ms. Images carry width/height or aspect-ratio (CLS); the LCP asset is preloaded and fonts ship `font-display` (LCP); input handlers stay off the main thread (INP).
|
|
93
|
-
- No layout thrash: batch DOM reads/writes; heavy work off the scroll path; animate only transform/opacity.
|
|
94
|
-
- Assets: no giant images/font payloads; lazy-load below the fold; no whole icon library for two icons.
|
|
95
|
-
- No re-render storms: memoize heavy computation, stable keys, no work in render.
|
|
96
|
-
- Repo has Lighthouse or lighthouse-ci? Run it — performance and accessibility scores meet the repo's budgets, deltas explained. Measure before optimizing; do not guess the bottleneck.
|
|
97
|
+
Stable `data-testid` on every interactive element and every async state (loading/error/empty). Never test by CSS class or by text that changes. Prefer `getByRole` — accessible name doubles as an a11y assertion. Keyboard paths asserted for menu/modal/form. Compare result against reference; list remaining deltas before done.
|
|
97
98
|
|
|
98
99
|
## Frontend security
|
|
99
100
|
|
|
100
101
|
- Never render user content via `dangerouslySetInnerHTML`/`v-html` unless sanitized.
|
|
101
102
|
- Escape user input in every template; no secrets in client code; validate URL params/storage/API input.
|
|
102
103
|
- `rel="noopener"` on `target="_blank"`; validate URLs before navigating.
|
|
103
|
-
|
|
104
104
|
## Red flags
|
|
105
105
|
|
|
106
106
|
- "Optimize when it's slow" — perf regressions ship measured later, rarely.
|
|
107
107
|
- "It's client-side, so no security review" — client is public by definition.
|
|
108
108
|
- "New screen, new components" — primitives are default; bespoke is exception.
|
|
109
109
|
- "Global store for everything" — local state first; lift only what's shared.
|
|
110
|
-
|
|
111
110
|
## Common Rationalizations
|
|
112
111
|
|
|
113
112
|
| Excuse | Reality |
|
|
@@ -120,3 +119,4 @@ Add stable `data-testid` to every interactive element per the repo's testing con
|
|
|
120
119
|
| "Our repo is messy, I'll use my own style." | Match the repo standard first, then propose raising it. |
|
|
121
120
|
|
|
122
121
|
If a rationalization wins, name it in the report as a known delta — not as silence.
|
|
122
|
+
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-gates
|
|
3
3
|
description: Use after quality checks — sonar-style gate, coverage thresholds, build exit 0, Definition of Done. Binary verdicts with evidence, no negotiation.
|
|
4
|
+
gate_artifact: flows/04-gates.md verdict — coverage + build + DoD evidence
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Gates (Franky)
|
|
@@ -15,37 +16,42 @@ Gates are binary: pass or fail, with evidence. No negotiation, no "almost passes
|
|
|
15
16
|
## Coverage gate
|
|
16
17
|
|
|
17
18
|
1. Measure coverage with the project's existing tooling.
|
|
18
|
-
2. Read thresholds from `.mugiwara/config` then `~/.mugiwara/config` for `coverage_new` and `coverage_modified`. Defaults: new ≥
|
|
19
|
+
2. Read thresholds from `.mugiwara/config` then `~/.mugiwara/config` for `coverage_new` and `coverage_modified`. Defaults: new ≥ 85%, modified ≥ 90%. Policy may raise, never lower. Missing key or 0 = no threshold. Identify new/modified via git diff.
|
|
19
20
|
3. No coverage tooling or no test suite → record a SKIP with its reason. Never a fake pass; propose minimal tooling, ask user to add or waive.
|
|
20
21
|
4. In this repo the gate is executable: `bun run coverage-gate` (`scripts/coverage-gate.ts`) does all three against the mission's `base_sha`, and runs as the last step of `bun run gate`. Never lower a threshold or exclude a file to make it green — add the missing tests.
|
|
21
22
|
5. User-AC declared (per `mugiwara-testcases`): config thresholds apply to unit-level code only; user-AC verdict governs ship-readiness.
|
|
22
23
|
|
|
23
24
|
## Sonar-style quality gate
|
|
24
25
|
|
|
25
|
-
Franky reads evidence from prior flow-stage reports (never re-runs
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Evaluated
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
Franky reads evidence from prior flow-stage reports (never re-runs checks): Jinbe (`.mugiwara/missions/<mission>/security.md`), Robin (`.mugiwara/missions/<mission>/review.md`), Sanji (`.mugiwara/missions/<mission>/flows/03-quality.md`).
|
|
27
|
+
|
|
28
|
+
Grounding (quality gate = conditions measured against new code during analysis): https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates.md — Sonar way: no new issues, all new hotspots reviewed, coverage ≥ 80%, duplication ≤ 3%. Agentic-AI variant thresholds: https://docs.sonarsource.com/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md
|
|
29
|
+
|
|
30
|
+
Evaluated against these fixed numbers (policy may raise, never lower):
|
|
31
|
+
- Vulnerabilities (new) = 0
|
|
32
|
+
- Bugs (new) = 0
|
|
33
|
+
- Code smells (new) ≤ project threshold
|
|
34
|
+
- Coverage (new code) ≥ config threshold (default 90%)
|
|
35
|
+
- Duplications (new code) < 3%
|
|
36
|
+
- Security hotspots reviewed ≥ 80%
|
|
37
|
+
|
|
38
|
+
PASS only when ALL pass — list each with actual + threshold. Missing data → CANNOT pass: report the gap, do not fake.
|
|
37
39
|
|
|
38
40
|
## Build gate
|
|
39
41
|
|
|
40
42
|
Run the project's build (or typecheck for interpreted stacks). Must exit 0. Capture the tail of output. Skip when `flows/03-quality.md` already recorded an exit-0 build on an unchanged diff.
|
|
41
43
|
|
|
44
|
+
## Diff size gate (reviewability)
|
|
45
|
+
|
|
46
|
+
The change diff against `base_sha` must be ≤ 400 LOC (via `git diff --numstat`). Larger → FAIL with the count; split into smaller changes before re-checking. An oversized diff is not reviewable regardless of other green gates.
|
|
47
|
+
|
|
42
48
|
## Optional e2e gate (per `mugiwara-quality`)
|
|
43
49
|
|
|
44
50
|
Runs only when quality flow stage triggered it (repo e2e setup + changed-file e2e patterns, user consent). Skipped/unrun is logged, never blocks PASS. Final verdict: coverage + sonar + build + DoD.
|
|
45
51
|
|
|
46
52
|
## Definition of Done standing gate
|
|
47
53
|
|
|
48
|
-
A fixed cross-project bar. Full definitions: `_shared/references/definition-of-done.md`. PASS only when all hold:
|
|
54
|
+
A fixed cross-project bar. Full definitions: `_shared/references/definition-of-done.md`. PASS only when all five axes hold:
|
|
49
55
|
- Correctness — work does what plan specifies.
|
|
50
56
|
- Quality — lint/format/unit clean, configs unweakened.
|
|
51
57
|
- Integration — fits existing system (build/typecheck green).
|
|
@@ -54,8 +60,7 @@ A fixed cross-project bar. Full definitions: `_shared/references/definition-of-d
|
|
|
54
60
|
|
|
55
61
|
## Verdict
|
|
56
62
|
|
|
57
|
-
PASS only when coverage AND sonar AND build AND DoD all pass with evidence. Write verdict to `.mugiwara/missions/<mission>/flows/04-gates.md
|
|
58
|
-
PASS → return to Luffy (routes to Robin/Jinbe). FAIL → list files under threshold + by how much → return to Luffy (routes to Brook). Never dispatch the next flow stage yourself.
|
|
63
|
+
PASS only when coverage AND sonar AND build AND diff-size AND DoD all pass with evidence. Write verdict to `.mugiwara/missions/<mission>/flows/04-gates.md` — each criterion with actual + threshold (see `gate_artifact`). PASS → return to Luffy (routes to Robin/Jinbe). FAIL → list files under threshold + by how much → return to Luffy (routes to Brook). Never dispatch the next flow stage yourself.
|
|
59
64
|
|
|
60
65
|
## Red flags
|
|
61
66
|
|
|
@@ -66,5 +71,6 @@ PASS → return to Luffy (routes to Robin/Jinbe). FAIL → list files under thre
|
|
|
66
71
|
- Gate waived without explicit user decision.
|
|
67
72
|
- PASS on coverage/build while DoD fails.
|
|
68
73
|
- Sonar PASS with unverified or faked data.
|
|
74
|
+
- Diff > 400 LOC passed without split.
|
|
69
75
|
- Echoing raw output when `verbosity=normal` — summarize and cite the evidence path.
|
|
70
76
|
All mean: the gate has not actually run. Report the gap or the fail, honestly.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-healing
|
|
3
3
|
description: Use when an execution flow stage failed, earlier flow stages produced failures, broken things to fix — reads blocker ledger, stop-the-line triage, root-cause fixes, prove-it before fixing. Max 3 cycles.
|
|
4
|
+
gate_artifact: flows/05-healing.md — root-cause + guard test evidence
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Healing (Brook)
|
|
@@ -9,37 +10,39 @@ description: Use when an execution flow stage failed, earlier flow stages produc
|
|
|
9
10
|
|
|
10
11
|
- No failures recorded: blocker ledger empty, all gates and reviews passed.
|
|
11
12
|
- User explicitly accepts a failure as-is and recorded the decision.
|
|
13
|
+
- Failure reproduces only outside a clean checkout — proven `env`, not code.
|
|
12
14
|
|
|
13
|
-
Fix what failed, minimally, and prove it. One clean retry per cycle.
|
|
15
|
+
Fix what failed, minimally, and prove it. One clean retry per cycle; `heal_halt` at 3.
|
|
14
16
|
|
|
15
17
|
## Read the ledger first
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Inputs: `.mugiwara/missions/<mission>/blockers.md` rows + quality report, gate verdict, review findings, security report. Every row is one healing unit; rows are appended by any agent that hit a blocker — never skip a row. Row fields: flow stage, task, symptom, attempted, help-needed. Full taxonomy: `references/failure-taxonomy.md`.
|
|
18
20
|
|
|
19
|
-
## Stop-the-
|
|
21
|
+
## Stop-the-line triage (per failure)
|
|
20
22
|
|
|
21
|
-
1. PRESERVE evidence
|
|
22
|
-
2. Reproduce
|
|
23
|
-
3. Localize
|
|
24
|
-
4. Reduce
|
|
25
|
-
5. Diagnose before
|
|
26
|
-
6. Test one theory at a time. State it, try the smallest change that could confirm it, and check. A failed theory → a new one; never pile a second fix on top of the first.
|
|
27
|
-
7. Guard with a regression test that fails without the fix.
|
|
28
|
-
8. Verify end-to-end: run the failed check, capture output.
|
|
23
|
+
1. PRESERVE evidence — save the failing output/state verbatim before touching anything.
|
|
24
|
+
2. Reproduce — re-run the failure; confirm it is real and current.
|
|
25
|
+
3. Localize — layer map (config/test/code/env); `git bisect` when the regression window is unclear.
|
|
26
|
+
4. Reduce — shrink to the minimal case that still fails.
|
|
27
|
+
5. Diagnose before touching code — read the full error (line, file, code), ask what changed recently (`git diff`, new deps, config), chase the bad value upstream to its origin. Grep every caller before patching — a fix aimed only at the visible symptom leaves its siblings broken.
|
|
29
28
|
|
|
30
|
-
Never push past a failing test — a red test stops the line until
|
|
29
|
+
Never push past a failing test — a red test stops the line until green or escalated.
|
|
31
30
|
|
|
32
|
-
##
|
|
31
|
+
## Root-cause, not symptom
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
Fix at the shared function, not the caller that surfaced. One fix = smallest diff resolving the finding. No drive-by refactors. Test one theory at a time: state it, try the smallest change that could confirm it, check. A failed theory → a new one; never pile a second fix on top of the first.
|
|
35
34
|
|
|
36
|
-
## Prove-It
|
|
35
|
+
## Prove-It (red → green)
|
|
37
36
|
|
|
38
|
-
Before fixing a bug: write the failing test that reproduces it, watch it fail, then fix until green. Red → code → green, in that order. A fix with no reproducing test is unproven.
|
|
37
|
+
Before fixing a bug: write the failing test that reproduces it, watch it fail, then fix until green. Red → code → green, in that order. A fix with no reproducing test is unproven. Every code fix ships with the failed check now passing — run it, capture output.
|
|
38
|
+
|
|
39
|
+
## Two-or-three-signal foundation check
|
|
40
|
+
|
|
41
|
+
Two or three different fixes that each uncover a fresh dependency elsewhere = symptom-patching. Stop, lay out the pattern to Luffy and the human, argue about the architecture before attempting another fix.
|
|
39
42
|
|
|
40
43
|
## Triage matrix
|
|
41
44
|
|
|
42
|
-
Full taxonomy
|
|
45
|
+
Full taxonomy: `references/failure-taxonomy.md`.
|
|
43
46
|
|
|
44
47
|
| Failure | Action |
|
|
45
48
|
|---------|--------|
|
|
@@ -49,13 +52,11 @@ Full taxonomy behind the matrix: `references/failure-taxonomy.md`.
|
|
|
49
52
|
| blocker security/review finding | smallest safe diff; add or extend the test that catches it |
|
|
50
53
|
| architectural finding / high-risk change | DO NOT auto-fix — prepare fix/rollback plan, escalate to Luffy → human |
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
Env rule: `env` must reproduce on a clean checkout in the same environment, or fail only on one OS/CI. "Probably env" is not proof — it stays a code failure until proven otherwise.
|
|
56
|
+
|
|
57
|
+
## Cycle counter (`heal_halt`)
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
2. Every code fix ships with the failed check now passing (run it, capture output).
|
|
56
|
-
3. Never delete or weaken tests/configs to make a failure disappear.
|
|
57
|
-
4. After healing: update the ledger — mark each healed row with evidence; keep unfixed rows for escalation.
|
|
58
|
-
5. Cycle counter: read `heal_halt` from `.mugiwara/missions/<mission>/state.json | <member>.json` (savepoint writes it as `heal_cycle ≥ heal_max_cycles`, config default 3). After this flow stage the flow returns to Flow 4 (Chopper) for re-audit. **When `heal_halt` reads `true`, STOP and escalate to the user with full history — a halt, not a red flag.** Red flags are prose; the counter is state. Never re-run past `heal_max_cycles`.
|
|
59
|
+
Read `heal_halt` from `.mugiwara/missions/<mission>/state.json | <member>.json` — savepoint writes it as `heal_cycle ≥ heal_max_cycles`, config default 3. After this flow stage, flow returns to Flow 4 (Chopper) for re-audit. **When `heal_halt` reads `true`, STOP and escalate to the user with full history — a halt, not a red flag.** Red flags are prose; the counter is state. Never re-run past `heal_max_cycles`.
|
|
59
60
|
|
|
60
61
|
## Worker subagents
|
|
61
62
|
|
|
@@ -63,7 +64,7 @@ Brook runs inline for triage + ledger reading; parallel fixes use disposable WOR
|
|
|
63
64
|
|
|
64
65
|
## Output
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
Write `.mugiwara/missions/<mission>/flows/05-healing.md`: fixed list (finding → commit → evidence), escalated list (finding → plan → owner), updated ledger. After healing: update the ledger — mark each healed row with evidence; keep unfixed rows for escalation. Then back to Flow 4 (Chopper) for re-audit.
|
|
67
68
|
|
|
68
69
|
## Red flags
|
|
69
70
|
|
|
@@ -71,7 +72,7 @@ Fixed list (finding → commit → evidence), escalated list (finding → plan
|
|
|
71
72
|
- A fix shipped without a reproducing test (Prove-It skipped).
|
|
72
73
|
- A test or config deleted or weakened to silence a failure.
|
|
73
74
|
- A drive-by refactor riding along with a fix.
|
|
74
|
-
- A code failure marked `env`
|
|
75
|
+
- A code failure marked `env` without clean-checkout proof.
|
|
75
76
|
- A ledger row processed with no evidence recorded.
|
|
76
77
|
- The same failure healing past 3 cycles without escalation.
|
|
77
78
|
- Several failed fixes on one failure without taking the architecture question to Luffy.
|
|
@@ -22,6 +22,10 @@ Every flow stage returns to Luffy — no crew member hands off directly to anoth
|
|
|
22
22
|
- Franky → return gates → Luffy routes pass/fail
|
|
23
23
|
- Robin/Jinbe → return findings → Luffy routes to Brook/Zoro/defer
|
|
24
24
|
|
|
25
|
+
**Control commands (pre-flow):** `mugiwara continue`/`status` are read-only,
|
|
26
|
+
pre-flow — never create config, never start a flow stage; exit 2 = user selects.
|
|
27
|
+
Full: `references/control-commands.md`.
|
|
28
|
+
|
|
25
29
|
## Coordination files
|
|
26
30
|
|
|
27
31
|
Team repos — per-(mission, member) isolation, no collisions: `_shared/references/multi-actor.md`.
|
|
@@ -45,7 +49,7 @@ Classify every incoming request. 5-way table (Trivial/Explicit/Exploratory/Open-
|
|
|
45
49
|
|
|
46
50
|
## Lane routing + precedence (Flow 0, size before process)
|
|
47
51
|
|
|
48
|
-
Alongside the class, size the mission and pick a lane (0 Direct / 1 Lean / 2 Standard / 3 Full / 4 Spike). **Precedence: class decides whether there is work; lane decides how much process — class first, lane second, record both.** A pasted Explicit spec still sizes the lane from its file list before Flow 2 (40-file spec → Lane 3). Escalation only: a lane may rise mid-mission, never drop. Full table: `references/triage-escalation.md`. Small tasks: read-only investigation → host `explore` agent or inline read — NOT a Luffy subagent (~5k inline vs ~132k measured per dispatch); explicit implement → Lane 1 Zoro inline. Review only when risky — full pipeline.
|
|
52
|
+
Alongside the class, size the mission and pick a lane (0 Direct / 1 Lean / 2 Standard / 3 Full / 4 Spike). **Precedence: class decides whether there is work; lane decides how much process — class first, lane second, record both.** Record the initial execution posture + rationale (default `inline-sequential`) per `_shared/references/posture-routing.md`. A pasted Explicit spec still sizes the lane from its file list before Flow 2 (40-file spec → Lane 3). Escalation only: a lane may rise mid-mission, never drop. Full table: `references/triage-escalation.md`. Small tasks: read-only investigation → host `explore` agent or inline read — NOT a Luffy subagent (~5k inline vs ~132k measured per dispatch); explicit implement → Lane 1 Zoro inline. Review only when risky — full pipeline.
|
|
49
53
|
|
|
50
54
|
## Spec bridge (Flow 0 → Flow 2)
|
|
51
55
|
|
|
@@ -91,17 +95,13 @@ Rendered examples: `references/output-contract.md` — match the shape.
|
|
|
91
95
|
|
|
92
96
|
When a flow stage has many independent tasks, instruct Zoro to parallelize — one task per WORKER subagent — and may split the mission into parallel tracks. Only `[PARALLEL]` sets are dispatched; sequential work stays inline. Never run more parallelism than the plan proves safe (check the dependency graph, no shared files). A `[PARALLEL]` task set with a hidden dependency edge is a red flag.
|
|
93
97
|
|
|
94
|
-
## Q&A hub
|
|
95
|
-
|
|
96
|
-
Any agent routes a question to Luffy (via the main thread). Answer with: decision + reason + impact on the plan. Log every decision to `.mugiwara/missions/<mission>/decisions.md`; do NOT touch the plan doc.
|
|
97
|
-
|
|
98
98
|
## Override (in-session)
|
|
99
99
|
|
|
100
100
|
Recognize the in-session phrase `mugiwara mode <guided|semi|auto>`: write the project `.mugiwara/config`, append a decision-log row (level, requester, timestamp), and apply from the next flow stage. No CLI flag. The mode is read once per flow stage — a flip never applies mid-flow-stage.
|
|
101
101
|
|
|
102
102
|
## Closure (Flow 9)
|
|
103
103
|
|
|
104
|
-
Gate — every task's acceptance criteria verified, every gate passed, findings resolved or deferred with an owner, blocker ledger reviewed. Write the closure summary to `.mugiwara/missions/<mission>/report.md` (seeded from `flows/06-closure.md`); report and summary prose follow `_shared/references/prose-style.md`. Run `mugiwara savepoint <mission>` for final state, then `mugiwara archive <mission>` — waves, review, security, blockers, decisions fold into report.md; plan.md stays. The mission dir ends as
|
|
104
|
+
Gate — every task's acceptance criteria verified, every gate passed, findings resolved or deferred with an owner, blocker ledger reviewed. Write the closure summary to `.mugiwara/missions/<mission>/report.md` (seeded from `flows/06-closure.md`); report and summary prose follow `_shared/references/prose-style.md`. Run `mugiwara savepoint <mission>` for final state, then `mugiwara archive <mission>` — waves, review, security, blockers, decisions fold into report.md; plan.md stays; the PR material (`flows/07-pr-verdict.md`) survives as `pr-verdict.md` at the mission root. The mission dir ends as plan.md + report.md + pr-verdict.md. Full detail: `references/closure.md`. With `auto_commit=off` (guided/semi): skip the save-point commit and push — hand the uncommitted tree + verdict to the user; auto always pushes.
|
|
105
105
|
|
|
106
106
|
## Spirit vs letter
|
|
107
107
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Control Commands (pre-flow)
|
|
2
|
+
|
|
3
|
+
`mugiwara continue` / `mugiwara status` are read-only control commands, not flow
|
|
4
|
+
work. They:
|
|
5
|
+
|
|
6
|
+
- Dispatch before Flow 0 and crew dispatch — the CLI is the deterministic half
|
|
7
|
+
of resume (directory scan + solo-vs-team rule), no reasoning turn needed.
|
|
8
|
+
- Never create `.mugiwara/config` and never print setup chatter — a fresh
|
|
9
|
+
project stays clean.
|
|
10
|
+
- Never start a flow stage.
|
|
11
|
+
|
|
12
|
+
Exit codes: 0 = a single resume point printed; 2 = ambiguous/absent — stop and
|
|
13
|
+
let the user select. Only after the CLI resolves the resume point does Flow 0
|
|
14
|
+
re-entry (or plan verification) begin.
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mugiwara-planning
|
|
3
3
|
description: Use for turning an approved spec into an implementation plan — interview-first, full context scan, scaled Quick/Standard/Full plans, parallel-proof waves.
|
|
4
|
+
gate_artifact: plan.md Waves/Task index — planning evidence
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# Planning
|
|
7
|
+
# Planning
|
|
7
8
|
|
|
8
9
|
## Skip when
|
|
9
10
|
|
|
10
11
|
- Lane 0 direct work: no plan needed for a typo or single-file fix.
|
|
11
12
|
- A plan already exists and is approved — execute, don't re-plan.
|
|
12
13
|
|
|
13
|
-
Classify the mission by size first — after
|
|
14
|
+
Classify the mission by size first — after the route decision — then write the plan at the matching level. Quality bar: a zero-context senior engineer executes every task without asking one question. Rule: never plan above or below the measured size (file count + days from the spec) — a 40-file spec is never Quick.
|
|
14
15
|
|
|
15
16
|
## Classify mission size
|
|
16
17
|
|
|
@@ -27,17 +28,23 @@ Batch blocking ambiguities into ONE question round; never assume silently. Mode
|
|
|
27
28
|
|
|
28
29
|
## Full context scan
|
|
29
30
|
|
|
30
|
-
Scan the whole codebase the mission touches before writing: structure, entry points, existing patterns, tests, tooling.
|
|
31
|
-
|
|
32
|
-
**User AC mapping (per `mugiwara-testcases`).** In the context scan, read the declared test source (none = no user tests) and map each user AC to ≥1 per-task criterion: executable user test → the project test command scoped to that file; declarative AC → "translate to a project test file + run" or a literal command check. Cross-cutting user ACs (an e2e flow spanning tasks) become plan-level criteria re-run at the checkpoint against the whole diff; never invent an integration test as a criterion — user tests are the only integration-class criteria.
|
|
31
|
+
Scan the whole codebase the mission touches before writing: structure, entry points, existing patterns, tests, tooling. Ground every file path in what exists; confirm tooling, do not assume. Trust-sort sources: `references/plan-template.md`. Rule: every file path must be verified — unverified path fails.
|
|
33
32
|
|
|
34
33
|
## Zero-question standard
|
|
35
34
|
|
|
36
|
-
A senior principal's plan leaves nothing to the executor's judgment. Every task specifies: exact file paths (never "the component"), the exact commands to run (TDD steps with the test command), an acceptance criterion that is a literal command or file check ("works correctly" is banned), and the dependency edge. If you cannot write it that specifically, scan again before the task goes in.
|
|
35
|
+
A senior principal's plan leaves nothing to the executor's judgment. Every task specifies: exact file paths (never "the component"), the exact commands to run (TDD steps with the test command), an acceptance criterion that is a literal command or file check ("works correctly" is banned), and the dependency edge. If you cannot write it that specifically, scan again before the task goes in. Rule: a stranger must read each task once and run the acceptance verbatim.
|
|
36
|
+
|
|
37
|
+
## CODEOWNERS per area
|
|
38
|
+
|
|
39
|
+
Map every task to a codebase area before parallelizing. Each area (e.g. `src/auth/`, `api/`, `docs/`) lists the task(s) that own it; two tasks in the SAME area are never `[PARALLEL]`, disjoint areas are the only parallel proof. Route review per area from the same table. Rule: every task in the task index appears in exactly one area row of its wave — an unowned file is a planning defect.
|
|
40
|
+
|
|
41
|
+
| Area | Owner task(s) |
|
|
42
|
+
|------|---------------|
|
|
43
|
+
| <path prefix> | T1, T2 |
|
|
37
44
|
|
|
38
45
|
## Plan tables (wave + task index)
|
|
39
46
|
|
|
40
|
-
Before the detail blocks, add two markdown tables so
|
|
47
|
+
Before the detail blocks, add two markdown tables so the executor can read the shape at a glance and parallelize safely:
|
|
41
48
|
|
|
42
49
|
| Wave | Focus | Tasks | Gate |
|
|
43
50
|
|------|-------|-------|------|
|
|
@@ -60,10 +67,13 @@ Before the detail blocks, add two markdown tables so Zoro can read the shape at
|
|
|
60
67
|
- Risk: none | <rollback plan>
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
**Task size = commit granularity.**
|
|
70
|
+
**Task size = commit granularity.** The executor commits per LOGICAL task, not per micro-step. Size tasks as meaningful units of work (a feature, a fix, a refactor), not keystrokes — a "fix typo" or "rename variable" task folds into its neighboring logical task, never standalone. A plan full of XS tasks is a history-littering plan; merge them up before writing. Rule: one task = one commit, no exceptions.
|
|
64
71
|
|
|
65
72
|
## Waves
|
|
66
|
-
|
|
73
|
+
|
|
74
|
+
Group tasks into waves; each wave ends in a verified, reviewable state. `[PARALLEL]` ONLY when tasks share no file AND no interface dependency AND no shared CODEOWNERS area (state the proof); otherwise `[SEQUENTIAL, depends-on: Task M (file: <path>)].` Never mark parallel on assumption. Per-wave gate: acceptance checks run with evidence; a wave starts only when its dependencies are proven done.
|
|
75
|
+
|
|
76
|
+
**Rollback per wave.** Every wave names its rollback point — a tag at the last proven-good commit — in the wave table. Rule: wave N starts only when wave N-1's rollback point is recorded; a failed wave gate means revert (`git revert <wave-N-tag>`), fix, re-run the gate. A wave with no named rollback point is a planning defect.
|
|
67
77
|
|
|
68
78
|
## Implementation graph
|
|
69
79
|
|
|
@@ -88,20 +98,22 @@ Any anti-pattern fails the quality bar — fix the plan before handoff. Never sh
|
|
|
88
98
|
|
|
89
99
|
## Full-level skeleton
|
|
90
100
|
|
|
91
|
-
Full plan at `.mugiwara/missions/<mission>/plan.md`: `# <mission>`, `## Key decisions`, `## Architecture overview`, `## Project structure`, `## Waves`, `## Implementation graph`, `## Task index`, `## Detail tasks`, `## Risk & rollback`, `## Mission split`. Route reasons, check-ins, closure go to `logs/`/`results/`.
|
|
101
|
+
Full plan at `.mugiwara/missions/<mission>/plan.md`: `# <mission>`, `## Key decisions`, `## Architecture overview`, `## Project structure`, `## Waves`, `## CODEOWNERS`, `## Implementation graph`, `## Task index`, `## Detail tasks`, `## Risk & rollback`, `## Mission split`. Route reasons, check-ins, closure go to `logs/`/`results/`.
|
|
92
102
|
|
|
93
103
|
## Mission split (very large) — Lane 3
|
|
94
104
|
|
|
95
|
-
Very-large missions (>2 days, multi-PR) split into sub-missions, never one giant plan. Each sub-mission: own PR, done-criteria, continuation pointer, and its own wave table; every sub-mission ends mergeable. Continuation flows through `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` — next sub-mission resumes from the pointer, never restarts.
|
|
105
|
+
Very-large missions (>2 days, multi-PR) split into sub-missions, never one giant plan. Each sub-mission: own PR, done-criteria, continuation pointer, and its own wave table; every sub-mission ends mergeable. Continuation flows through `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` — next sub-mission resumes from the pointer, never restarts. The planner writes the split before any task detail.
|
|
96
106
|
|
|
107
|
+
## Large campaign — sub-plan
|
|
108
|
+
Full checklist: `references/large-campaign-subplan.md` — 6 items; trigger `>3 phases` or `>1500 lines`, `sub-plan/NN-phaseNN-<slug>.md`, master index pattern.
|
|
97
109
|
## Handoff
|
|
98
110
|
|
|
99
|
-
STOP after writing. The plan is written to `.mugiwara/missions/<mission>/plan.md` and it is clean — no agent names, no coordination log, no closure (that lives in `logs/` and `results/`). **Return to
|
|
111
|
+
STOP after writing. The plan is written to `.mugiwara/missions/<mission>/plan.md` and it is clean — no agent names, no coordination log, no closure (that lives in `logs/` and `results/`). **Return to the orchestrator.** Present a 2-3 line summary (waves, task count, key risks) and hand off for the GO decision. The orchestrator decides: approve → executor, revise → back to you, or escalate.
|
|
100
112
|
|
|
101
|
-
Never hand to
|
|
113
|
+
Never hand to the executor without a GO. In `guided` mode, the orchestrator asks the user before delegating. In `semi`/`auto`, the orchestrator may auto-go unless the task carries high risk (deploy, migration, DB, public API). You do not decide — you present, the orchestrator routes.
|
|
102
114
|
|
|
103
115
|
## Red flags
|
|
104
116
|
- Shipping a plan with a known anti-pattern (TBD, "works correctly", assumed tooling).
|
|
105
117
|
- Marking [PARALLEL] without file- AND interface-disjoint proof.
|
|
106
118
|
- Missing file-level dependency edges or a Break point on an 8+ file task.
|
|
107
|
-
- Handing the plan to
|
|
119
|
+
- Handing the plan to the executor without a GO.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Large Campaign — Sub-Plan Governance (Planning)
|
|
2
|
+
|
|
3
|
+
Trigger: `phase count >3` or `plan.md >1500 lines` (`wc -l`). When triggered, Nami auto-splits.
|
|
4
|
+
|
|
5
|
+
## Naming
|
|
6
|
+
|
|
7
|
+
- `sub-plan/NN-phaseNN-<slug>.md` (zero-padded, slug from `Phase N: Title` lowercased, `[^a-z0-9]+` → `-`)
|
|
8
|
+
- Master `plan.md` holds Mission split table (index) + DoD + how-to-start; detail lives in `sub-plan/`
|
|
9
|
+
- Example: `sub-plan/01-phase01-cost-governor-foundation.md`
|
|
10
|
+
|
|
11
|
+
## Master index
|
|
12
|
+
|
|
13
|
+
Master `plan.md` never exceeds 1500 lines — detail lives in sub-plan slices.
|
|
14
|
+
|
|
15
|
+
## Phase isolation vs true sub-mission
|
|
16
|
+
|
|
17
|
+
Two distinct decisions — do not conflate:
|
|
18
|
+
|
|
19
|
+
- **Phase isolation** (sub-plan) = ONE mission, one plan. `sub-plan/NN-phaseNN-*.md`
|
|
20
|
+
slices detail; `flows/phase-NN/` owns evidence; archive folds the
|
|
21
|
+
trail. Phase-local posture lives in the slice.
|
|
22
|
+
- **True sub-mission** = a SEPARATE, independently mergeable unit: own branch,
|
|
23
|
+
done-criteria, continuation pointer, and mergeable end state. Only Nami
|
|
24
|
+
creates it explicitly.
|
|
25
|
+
|
|
26
|
+
## Dependency / write conflicts
|
|
27
|
+
|
|
28
|
+
Each slice's task index makes write-conflict groups explicit: tasks that write
|
|
29
|
+
the same file/area are never parallel. `[PARALLEL]` requires file- AND
|
|
30
|
+
interface-disjoint proof (shared CODEOWNERS area is a conflict). Speculative
|
|
31
|
+
parallelization is prohibited — every parallel set traces to an evidence-backed
|
|
32
|
+
dependency map.
|
|
33
|
+
|
|
34
|
+
## Skill body rule
|
|
35
|
+
|
|
36
|
+
If body would exceed 120 lines, move checklist here; SKILL.md keeps one-line pointer.
|
|
37
|
+
|
|
38
|
+
## Acceptance
|
|
39
|
+
|
|
40
|
+
- `grep -c "sub-plan" content/skills/mugiwara-planning/SKILL.md` ≥1
|
|
41
|
+
- `validate-content --check-manifest --check-docs` 0
|
|
@@ -46,6 +46,28 @@ Multi-PR scope (>2 days). Split into sub-missions — never one giant plan:
|
|
|
46
46
|
- Continuation via `.mugiwara/missions/<mission>/continue.json | continue-<member>.json` — next sub-mission resumes from the pointer, never restarts.
|
|
47
47
|
- Each sub-mission needs its own wave table.
|
|
48
48
|
|
|
49
|
+
## Execution posture (Standard+, proportional smaller on Quick/Lane 0-1)
|
|
50
|
+
|
|
51
|
+
Expose the adaptive contract before execution without turning plan.md into a
|
|
52
|
+
decision log:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
## Execution posture
|
|
56
|
+
Control mode: semi
|
|
57
|
+
Initial model: inline-sequential
|
|
58
|
+
Re-evaluate at: before Flow 3; after each execution batch; Flow 4/6/7
|
|
59
|
+
|
|
60
|
+
## Dependency and ownership map
|
|
61
|
+
| Task | Depends on | Writes | Member | Parallel eligible | Evidence |
|
|
62
|
+
|
|
63
|
+
## Cost-aware operating assumptions
|
|
64
|
+
| Decision | Governor evidence | Constraint | Fallback |
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Large campaigns index these sections in the master plan; each `sub-plan/` slice
|
|
68
|
+
owns its local detail. Parallel eligibility requires file- AND interface-disjoint
|
|
69
|
+
proof.
|
|
70
|
+
|
|
49
71
|
## Interview-first & mode (prose detail)
|
|
50
72
|
|
|
51
73
|
Batch ALL blocking ambiguities into ONE question round before writing. If a
|