@ikon85/agent-workflow-kit 0.10.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/.agents/skills/ask-matt/SKILL.md +139 -0
- package/.agents/skills/ask-matt/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/audit-skills/SKILL.md +145 -0
- package/.agents/skills/board-to-waves/SKILL.md +135 -0
- package/.agents/skills/code-review/SKILL.md +64 -0
- package/.agents/skills/codebase-design/DEEPENING.md +37 -0
- package/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/.agents/skills/codebase-design/SKILL.md +114 -0
- package/.agents/skills/codebase-design/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/codex-adapter-sync/SKILL.md +151 -0
- package/.agents/skills/decision-gate/SKILL.md +67 -0
- package/.agents/skills/diagnose/SKILL.md +136 -0
- package/.agents/skills/diagnose/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/domain-modeling/SKILL.md +76 -0
- package/.agents/skills/domain-modeling/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/git-worktree-recover/SKILL.md +176 -0
- package/.agents/skills/grill-me/SKILL.md +54 -0
- package/.agents/skills/grill-me/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/.agents/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/grill-with-docs/SKILL.md +137 -0
- package/.agents/skills/grill-with-docs/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/implement/SKILL.md +15 -0
- package/.agents/skills/implement/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/improve-codebase-architecture/ADR-FORMAT.md +47 -0
- package/.agents/skills/improve-codebase-architecture/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +46 -0
- package/.agents/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/.agents/skills/improve-codebase-architecture/SKILL.md +88 -0
- package/.agents/skills/improve-codebase-architecture/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/kit-release/SKILL.md +56 -0
- package/.agents/skills/local-ci/SKILL.md +94 -0
- package/.agents/skills/orchestrate-wave/SKILL.md +261 -0
- package/.agents/skills/orchestrate-wave/references/builder-contract.md +67 -0
- package/.agents/skills/prototype/LOGIC.md +79 -0
- package/.agents/skills/prototype/SKILL.md +30 -0
- package/.agents/skills/prototype/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/prototype/UI.md +112 -0
- package/.agents/skills/research/SKILL.md +12 -0
- package/.agents/skills/research/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/.agents/skills/resolving-merge-conflicts/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/retro/SKILL.md +209 -0
- package/.agents/skills/scale-check/SKILL.md +141 -0
- package/.agents/skills/security-audit/SKILL.md +67 -0
- package/.agents/skills/setup-workflow/SKILL.md +187 -0
- package/.agents/skills/setup-workflow/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/setup-workflow/board-sync.md +111 -0
- package/.agents/skills/setup-workflow/code-review.md +26 -0
- package/.agents/skills/setup-workflow/domain.md +51 -0
- package/.agents/skills/setup-workflow/issue-tracker-github.md +35 -0
- package/.agents/skills/setup-workflow/issue-tracker-gitlab.md +34 -0
- package/.agents/skills/setup-workflow/issue-tracker-local.md +30 -0
- package/.agents/skills/setup-workflow/orchestrate-wave-seed.md +44 -0
- package/.agents/skills/setup-workflow/spec-completeness-seed.md +44 -0
- package/.agents/skills/setup-workflow/spec-self-critique-seed.md +43 -0
- package/.agents/skills/setup-workflow/triage-labels.md +18 -0
- package/.agents/skills/setup-workflow/workflow-overview.md +33 -0
- package/.agents/skills/spec-self-critique/SKILL.md +152 -0
- package/.agents/skills/spec-self-critique/scenarios.md +82 -0
- package/.agents/skills/tdd/SKILL.md +120 -0
- package/.agents/skills/tdd/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/tdd/deep-modules.md +33 -0
- package/.agents/skills/tdd/interface-design.md +31 -0
- package/.agents/skills/tdd/mocking.md +59 -0
- package/.agents/skills/tdd/refactoring.md +10 -0
- package/.agents/skills/tdd/tests.md +61 -0
- package/.agents/skills/to-issues/SKILL.md +325 -0
- package/.agents/skills/to-issues/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/to-prd/PROGRAM-PRD-FORMAT.md +162 -0
- package/.agents/skills/to-prd/SKILL.md +180 -0
- package/.agents/skills/to-prd/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/to-waves/SKILL.md +260 -0
- package/.agents/skills/to-waves/SLICE-METADATA-FORMAT.md +74 -0
- package/.agents/skills/triage/AGENT-BRIEF.md +168 -0
- package/.agents/skills/triage/OUT-OF-SCOPE.md +101 -0
- package/.agents/skills/triage/SKILL.md +122 -0
- package/.agents/skills/triage/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/verify-spike/SKILL.md +39 -0
- package/.agents/skills/wayfinder/SKILL.md +127 -0
- package/.agents/skills/wayfinder/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/wrapup/SKILL.md +71 -0
- package/.agents/skills/wrapup/SOURCES.txt +6 -0
- package/.agents/skills/zoom-out/SKILL.md +7 -0
- package/.agents/skills/zoom-out/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/hooks/_hook_utils.py +184 -0
- package/.claude/hooks/drift-guard.py +176 -0
- package/.claude/hooks/skill-drift-hint.py +122 -0
- package/.claude/hooks/sync-board-status.py +191 -0
- package/.claude/skills/ask-matt/SKILL.md +139 -0
- package/.claude/skills/ask-matt/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/audit-skills/SKILL.md +145 -0
- package/.claude/skills/board-to-waves/SKILL.md +148 -0
- package/.claude/skills/code-review/SKILL.md +64 -0
- package/.claude/skills/codebase-design/DEEPENING.md +37 -0
- package/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/.claude/skills/codebase-design/SKILL.md +114 -0
- package/.claude/skills/codebase-design/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/codex-build/SKILL.md +126 -0
- package/.claude/skills/codex-build/THIRD-PARTY-NOTICES.md +35 -0
- package/.claude/skills/codex-review/SKILL.md +145 -0
- package/.claude/skills/codex-review/THIRD-PARTY-NOTICES.md +31 -0
- package/.claude/skills/decision-gate/SKILL.md +67 -0
- package/.claude/skills/diagnose/SKILL.md +136 -0
- package/.claude/skills/diagnose/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/.claude/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/domain-modeling/SKILL.md +76 -0
- package/.claude/skills/domain-modeling/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/git-guardrails-claude-code/SKILL.md +96 -0
- package/.claude/skills/git-guardrails-claude-code/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +28 -0
- package/.claude/skills/git-worktree-recover/SKILL.md +182 -0
- package/.claude/skills/grill-me/SKILL.md +54 -0
- package/.claude/skills/grill-me/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/grill-me-codex/SKILL.md +158 -0
- package/.claude/skills/grill-me-codex/THIRD-PARTY-NOTICES.md +32 -0
- package/.claude/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/.claude/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/grill-with-docs/SKILL.md +137 -0
- package/.claude/skills/grill-with-docs/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/grill-with-docs-codex/ADR-FORMAT.md +47 -0
- package/.claude/skills/grill-with-docs-codex/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/grill-with-docs-codex/SKILL.md +233 -0
- package/.claude/skills/grill-with-docs-codex/THIRD-PARTY-NOTICES.md +33 -0
- package/.claude/skills/implement/SKILL.md +15 -0
- package/.claude/skills/implement/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/improve-codebase-architecture/ADR-FORMAT.md +47 -0
- package/.claude/skills/improve-codebase-architecture/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/.claude/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/.claude/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +46 -0
- package/.claude/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/.claude/skills/improve-codebase-architecture/SKILL.md +88 -0
- package/.claude/skills/improve-codebase-architecture/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/kit-release/SKILL.md +56 -0
- package/.claude/skills/local-ci/SKILL.md +94 -0
- package/.claude/skills/orchestrate-wave/SKILL.md +269 -0
- package/.claude/skills/orchestrate-wave/references/builder-contract.md +67 -0
- package/.claude/skills/prototype/LOGIC.md +79 -0
- package/.claude/skills/prototype/SKILL.md +30 -0
- package/.claude/skills/prototype/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/prototype/UI.md +112 -0
- package/.claude/skills/research/SKILL.md +12 -0
- package/.claude/skills/research/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/.claude/skills/resolving-merge-conflicts/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/retro/SKILL.md +209 -0
- package/.claude/skills/scale-check/SKILL.md +141 -0
- package/.claude/skills/security-audit/SKILL.md +67 -0
- package/.claude/skills/setup-pre-commit/SKILL.md +104 -0
- package/.claude/skills/setup-pre-commit/scripts/pre-commit.template.sh +35 -0
- package/.claude/skills/setup-workflow/SKILL.md +187 -0
- package/.claude/skills/setup-workflow/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/setup-workflow/board-sync.md +111 -0
- package/.claude/skills/setup-workflow/code-review.md +26 -0
- package/.claude/skills/setup-workflow/domain.md +51 -0
- package/.claude/skills/setup-workflow/issue-tracker-github.md +35 -0
- package/.claude/skills/setup-workflow/issue-tracker-gitlab.md +34 -0
- package/.claude/skills/setup-workflow/issue-tracker-local.md +30 -0
- package/.claude/skills/setup-workflow/orchestrate-wave-seed.md +44 -0
- package/.claude/skills/setup-workflow/spec-completeness-seed.md +44 -0
- package/.claude/skills/setup-workflow/spec-self-critique-seed.md +43 -0
- package/.claude/skills/setup-workflow/triage-labels.md +18 -0
- package/.claude/skills/setup-workflow/workflow-overview.md +33 -0
- package/.claude/skills/skill-manifest.json +389 -0
- package/.claude/skills/spec-self-critique/SKILL.md +152 -0
- package/.claude/skills/spec-self-critique/scenarios.md +82 -0
- package/.claude/skills/tdd/SKILL.md +120 -0
- package/.claude/skills/tdd/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/tdd/deep-modules.md +33 -0
- package/.claude/skills/tdd/interface-design.md +31 -0
- package/.claude/skills/tdd/mocking.md +59 -0
- package/.claude/skills/tdd/refactoring.md +10 -0
- package/.claude/skills/tdd/tests.md +61 -0
- package/.claude/skills/to-issues/SKILL.md +325 -0
- package/.claude/skills/to-issues/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/to-prd/PROGRAM-PRD-FORMAT.md +162 -0
- package/.claude/skills/to-prd/SKILL.md +180 -0
- package/.claude/skills/to-prd/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/to-waves/SKILL.md +260 -0
- package/.claude/skills/to-waves/SLICE-METADATA-FORMAT.md +74 -0
- package/.claude/skills/triage/AGENT-BRIEF.md +168 -0
- package/.claude/skills/triage/OUT-OF-SCOPE.md +101 -0
- package/.claude/skills/triage/SKILL.md +122 -0
- package/.claude/skills/triage/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/verify-spike/SKILL.md +39 -0
- package/.claude/skills/wayfinder/SKILL.md +127 -0
- package/.claude/skills/wayfinder/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/wrapup/SKILL.md +81 -0
- package/.claude/skills/wrapup/SOURCES.txt +6 -0
- package/.claude/skills/write-a-skill/GLOSSARY.md +201 -0
- package/.claude/skills/write-a-skill/SKILL.md +88 -0
- package/.claude/skills/write-a-skill/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/zoom-out/SKILL.md +7 -0
- package/.claude/skills/zoom-out/THIRD-PARTY-NOTICES.md +29 -0
- package/LICENSE +28 -0
- package/PROVENANCE.md +39 -0
- package/README.md +619 -0
- package/agent-workflow-kit.package.json +1939 -0
- package/docs/agents/board-sync.md +71 -0
- package/docs/agents/code-review.md +14 -0
- package/docs/agents/domain.md +7 -0
- package/docs/agents/issue-tracker.md +12 -0
- package/docs/agents/security-audit-runbook-template.md +205 -0
- package/docs/agents/skills/orchestrate-wave.md +13 -0
- package/docs/agents/skills/spec-self-critique.md +18 -0
- package/docs/agents/triage-labels.md +10 -0
- package/docs/agents/wave-anchor-template.md +88 -0
- package/docs/conventions/spec-completeness.md +23 -0
- package/docs/index.html +56 -0
- package/docs/methodology.html +488 -0
- package/docs/methodology.svg +93 -0
- package/docs/workflow.png +0 -0
- package/package.json +40 -0
- package/scripts/anchor_table.py +343 -0
- package/scripts/board-sync.py +1232 -0
- package/scripts/board_config.py +147 -0
- package/scripts/board_fields.py +192 -0
- package/scripts/build-kit.mjs +116 -0
- package/scripts/build-kit.test.mjs +59 -0
- package/scripts/check-kit-staleness.mjs +45 -0
- package/scripts/check-kit-staleness.test.mjs +19 -0
- package/scripts/execute-ready-check.py +516 -0
- package/scripts/issue_deps.py +79 -0
- package/scripts/kit-release.mjs +100 -0
- package/scripts/kit-release.test.mjs +67 -0
- package/scripts/lib/audit-refs.mjs +146 -0
- package/scripts/lib/scrub.mjs +113 -0
- package/scripts/lib/scrub.test.mjs +187 -0
- package/scripts/loc_offender_core.py +196 -0
- package/scripts/loc_offender_gate.py +182 -0
- package/scripts/node_kind.py +68 -0
- package/scripts/portability_profile_scan.py +53 -0
- package/scripts/pr-body-check.py +263 -0
- package/scripts/program_graph.py +125 -0
- package/scripts/program_graph_parse.py +275 -0
- package/scripts/program_graph_validate.py +256 -0
- package/scripts/program_sync.py +160 -0
- package/scripts/release-delta-guard.mjs +96 -0
- package/scripts/release-delta-guard.test.mjs +53 -0
- package/scripts/test_board_sync_create_idempotency.py +104 -0
- package/scripts/test_dist_kit_smoke.py +199 -0
- package/scripts/test_kit_docs_language_census.py +178 -0
- package/scripts/test_skill_code_review_seed.py +89 -0
- package/scripts/test_skill_frontmatter_lint.py +226 -0
- package/scripts/test_skill_gh_lint.py +124 -0
- package/scripts/test_skill_language_census.py +254 -0
- package/scripts/test_skill_portability_lint.py +773 -0
- package/scripts/test_skill_publish_audit.py +300 -0
- package/scripts/test_skill_selfcontainment_lint.py +255 -0
- package/scripts/test_skill_setup_workflow_seeds.py +200 -0
- package/scripts/test_skill_stale_name_lint.py +126 -0
- package/scripts/test_skill_surface_refs.py +300 -0
- package/scripts/test_skill_trailing_artifact_lint.py +71 -0
- package/scripts/wrapup-land.py +573 -0
- package/src/cli.mjs +70 -0
- package/src/commands/diff.mjs +6 -0
- package/src/commands/init.mjs +59 -0
- package/src/commands/uninstall.mjs +43 -0
- package/src/commands/update.mjs +95 -0
- package/src/lib/atomicWrite.mjs +49 -0
- package/src/lib/bundle.mjs +133 -0
- package/src/lib/hash.mjs +13 -0
- package/src/lib/manifest.mjs +58 -0
- package/src/lib/sentinel.mjs +20 -0
- package/src/lib/settings.mjs +23 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: improve-codebase-architecture
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
description: "Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Improve Codebase Architecture
|
|
8
|
+
|
|
9
|
+
Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
|
|
10
|
+
|
|
11
|
+
For a quick one-off map of an unfamiliar area without the report/grilling loop below, use `zoom-out` instead.
|
|
12
|
+
|
|
13
|
+
## Glossary
|
|
14
|
+
|
|
15
|
+
Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in [LANGUAGE.md](LANGUAGE.md).
|
|
16
|
+
|
|
17
|
+
- **Module** — anything with an interface and an implementation (function, class, package, slice).
|
|
18
|
+
- **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
|
|
19
|
+
- **Implementation** — the code inside.
|
|
20
|
+
- **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
|
|
21
|
+
- **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
|
|
22
|
+
- **Adapter** — a concrete thing satisfying an interface at a seam.
|
|
23
|
+
- **Leverage** — what callers get from depth.
|
|
24
|
+
- **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
|
|
25
|
+
|
|
26
|
+
Key principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):
|
|
27
|
+
|
|
28
|
+
- **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
|
|
29
|
+
- **The interface is the test surface.**
|
|
30
|
+
- **One adapter = hypothetical seam. Two adapters = real seam.**
|
|
31
|
+
|
|
32
|
+
This skill is _informed_ by the project's domain model. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### 1. Explore
|
|
37
|
+
|
|
38
|
+
Read the project's domain glossary and any ADRs in the area you're touching first.
|
|
39
|
+
|
|
40
|
+
<!-- mirror-xform:start codex-explorer-dispatch -->
|
|
41
|
+
When the user has authorized subagent delegation, use `spawn_agent` with `agent_type: explorer` to walk the codebase; otherwise explore locally. Don't follow rigid heuristics — explore organically and note where you experience friction:
|
|
42
|
+
<!-- mirror-xform:end -->
|
|
43
|
+
|
|
44
|
+
- Where does understanding one concept require bouncing between many small modules?
|
|
45
|
+
- Where are modules **shallow** — interface nearly as complex as the implementation?
|
|
46
|
+
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?
|
|
47
|
+
- Where do tightly-coupled modules leak across their seams?
|
|
48
|
+
- Which parts of the codebase are untested, or hard to test through their current interface?
|
|
49
|
+
|
|
50
|
+
Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
|
|
51
|
+
|
|
52
|
+
### 2. Present candidates as an HTML report
|
|
53
|
+
|
|
54
|
+
Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and write to `<tmpdir>/architecture-review-<timestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open <path>` on Linux, `open <path>` on macOS, `start <path>` on Windows — and tell them the absolute path.
|
|
55
|
+
|
|
56
|
+
The report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before/after visualisation**. Be visual.
|
|
57
|
+
|
|
58
|
+
For each candidate, the same template as before, but rendered as a card:
|
|
59
|
+
|
|
60
|
+
- **Files** — which files/modules are involved
|
|
61
|
+
- **Problem** — why the current architecture is causing friction
|
|
62
|
+
- **Solution** — plain English description of what would change
|
|
63
|
+
- **Benefits** — explained in terms of locality and leverage, and how tests would improve
|
|
64
|
+
- **Before / After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening
|
|
65
|
+
- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge
|
|
66
|
+
|
|
67
|
+
End the report with a **Top recommendation** section: which candidate you'd tackle first and why.
|
|
68
|
+
|
|
69
|
+
**Use CONTEXT.md vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
|
|
70
|
+
|
|
71
|
+
**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
|
|
72
|
+
|
|
73
|
+
See [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.
|
|
74
|
+
|
|
75
|
+
Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"
|
|
76
|
+
|
|
77
|
+
### 3. Grilling loop
|
|
78
|
+
|
|
79
|
+
Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
|
|
80
|
+
|
|
81
|
+
Side effects happen inline as decisions crystallize:
|
|
82
|
+
|
|
83
|
+
- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `/grill-with-docs` (see [CONTEXT-FORMAT.md](CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
|
|
84
|
+
- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.
|
|
85
|
+
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. See [ADR-FORMAT.md](ADR-FORMAT.md).
|
|
86
|
+
- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).
|
|
87
|
+
|
|
88
|
+
> `ADR-FORMAT.md` / `CONTEXT-FORMAT.md` in this skill dir are **vendored snapshots** of the canonical `grill-with-docs` versions (self-containment: no sibling-skill reach; **no sync promise** —).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This skill is adapted from **Matt Pocock's skills**
|
|
4
|
+
(https://github.com/mattpocock/skills), `skills/engineering/improve-codebase-architecture` @ d574778, Copyright (c) 2026 Matt Pocock,
|
|
5
|
+
used under the MIT License. Locally adapted (fork-and-own); see PROVENANCE.md.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Matt Pocock
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-release
|
|
3
|
+
description: "Prepare a verified release PR for agent-workflow-kit with an explicit Semver confirmation, regenerated manifest, full tests, and pack audit, then delegate landing to wrapup."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kit Release
|
|
7
|
+
|
|
8
|
+
Prepare a release deterministically. This skill owns the shipped-delta decision,
|
|
9
|
+
metadata preparation, and verification. It does not implement commit, push, PR,
|
|
10
|
+
merge, registry publishing, tags, or release creation.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Run the read-only plan:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm run release:prepare
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Report every added, removed, and changed shipped path plus the recommended
|
|
21
|
+
Patch, Minor, or Major bump. The recommendation is deterministic: removals
|
|
22
|
+
recommend Major, additions recommend Minor, and changed content recommends
|
|
23
|
+
Patch.
|
|
24
|
+
|
|
25
|
+
2. Ask the user to confirm exactly one target Semver. Do not change release
|
|
26
|
+
metadata before confirmation. A recommendation is advice; the confirmed
|
|
27
|
+
target is authority.
|
|
28
|
+
|
|
29
|
+
3. Prepare that exact version:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm run release:prepare -- --version <confirmed-version>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The script updates `package.json`, adds the release-notes section,
|
|
36
|
+
regenerates `agent-workflow-kit.package.json`, runs the full test gate, and
|
|
37
|
+
performs `npm pack --dry-run`. If a gate fails, report the error and keep the
|
|
38
|
+
prepared tree. Re-running the same target resumes that state without another
|
|
39
|
+
bump or duplicate release notes.
|
|
40
|
+
|
|
41
|
+
4. Inspect the resulting delta and invoke **`$wrapup`**. Wrapup and
|
|
42
|
+
`scripts/wrapup-land.py` exclusively own commit, push, PR creation, merge,
|
|
43
|
+
and cleanup. Do not reproduce those operations here.
|
|
44
|
+
|
|
45
|
+
5. After merge, the release is not complete until the repository's configured
|
|
46
|
+
publishing flow has produced the matching registry package and GitHub
|
|
47
|
+
tag/release and verified their parity. If that flow is not configured, stop
|
|
48
|
+
and report the missing post-merge capability; never publish ad hoc.
|
|
49
|
+
|
|
50
|
+
## Guard contract
|
|
51
|
+
|
|
52
|
+
`npm run release:guard -- --base <base-ref>` freshly builds the shipped
|
|
53
|
+
manifest and compares it with both the base and the checked-in manifest. It
|
|
54
|
+
blocks an unbumped shipped delta, a stale manifest, a too-small Semver bump, or
|
|
55
|
+
a dead manifest entry and prints the concrete paths. CI runs the same command;
|
|
56
|
+
there is no separately remembered shipped-file list.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: local-ci
|
|
3
|
+
"description": "Run the repo's local CI gate before opening a PR — the stand-in for GitHub required status checks when your plan or repo visibility can't enforce them (a Free-plan private repo has no branch protection). Use before every PR, when a guard/test red is suspected on a branch, or when wiring/repairing the pre-push guard backstop. Triggers — \"local ci\", \"run local ci\", \"pre-PR check\", \"why is main red\", \"did a guard land red\"."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Local CI
|
|
7
|
+
|
|
8
|
+
A guard only protects if it runs on a **gate**. When your host can't enforce a
|
|
9
|
+
required status check at merge — **GitHub Free + Private has no branch protection
|
|
10
|
+
and no rulesets** ([GitHub Docs: protected
|
|
11
|
+
branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches))
|
|
12
|
+
— the gate has to be **local**. This skill is that gate.
|
|
13
|
+
|
|
14
|
+
> Fault class: *Detection without Enforcement.* A guard that runs only in a
|
|
15
|
+
> manual, opt-in step is not a gate — the drift it catches still merges. Fix the
|
|
16
|
+
> gate class, not the one field that slipped through.
|
|
17
|
+
|
|
18
|
+
The exact commands, guard names, hook wiring and the project's own incident lore
|
|
19
|
+
live in the **project layer** for this skill (its `docs/agents/skills/local-ci.md`,
|
|
20
|
+
seeded as an empty stub by `/setup-workflow` and filled per project). This
|
|
21
|
+
skeleton names the two profiles generically; run the two your project layer names.
|
|
22
|
+
|
|
23
|
+
## When
|
|
24
|
+
|
|
25
|
+
- **Before opening ANY PR** → run the full local gate. Red → fix it, or defer a
|
|
26
|
+
*single* failure ONLY with an explicit written reason in the PR body (never
|
|
27
|
+
silently — a skipped gate framed as done is a fake quality gate).
|
|
28
|
+
- A guard/test red is suspected on a branch ("why is main red").
|
|
29
|
+
- Wiring or repairing the pre-push backstop / adding a new guard.
|
|
30
|
+
|
|
31
|
+
## The two profiles
|
|
32
|
+
|
|
33
|
+
Two commands, one fast and one full — your project layer names the exact
|
|
34
|
+
invocations:
|
|
35
|
+
|
|
36
|
+
- **Fast static guards** — no DB, ~seconds. Run automatically at **pre-push** so a
|
|
37
|
+
red drift guard cannot leave the machine.
|
|
38
|
+
- **Full gate** — typecheck + lint + the test suites a CI job would run, ~a minute.
|
|
39
|
+
Too slow for a hook → the **agent's named pre-PR step**, explicit not automatic.
|
|
40
|
+
|
|
41
|
+
## Enforcement model
|
|
42
|
+
|
|
43
|
+
- **pre-push** runs the fast guards automatically → a red drift guard cannot be
|
|
44
|
+
pushed. Keep any emergency escape hatch explicit and logged — never a silent one.
|
|
45
|
+
- **pre-commit** gates typecheck + lint, and should block a committed focused-test
|
|
46
|
+
marker (`.only` / `fit` / `fdescribe`) so a focused test can't silently gut a
|
|
47
|
+
file's coverage (green-but-empty).
|
|
48
|
+
- The **full gate** is the agent's named pre-PR step: the full suite is too slow
|
|
49
|
+
for a hook, so it is explicit, not automatic. Run it; report the result honestly.
|
|
50
|
+
|
|
51
|
+
## Contention — stop the dev server before the full gate
|
|
52
|
+
|
|
53
|
+
The full gate runs several test runners at once. A dev server running in parallel
|
|
54
|
+
oversubscribes the cores → **boot-contention false reds**: hook/boot timeouts in
|
|
55
|
+
*unrelated* tests that are green in isolation. Symptom = "Hook timed out" in tests
|
|
56
|
+
that pass on their own.
|
|
57
|
+
|
|
58
|
+
- Stop the dev server before the full gate. Verify a suspicious red as a false red
|
|
59
|
+
by running that one test in isolation — green in isolation = contention, not a
|
|
60
|
+
real red.
|
|
61
|
+
- Kill the dev server by **PID-via-port, not a process-name match**. A name match
|
|
62
|
+
(`vite`) also hits the test runner (`vitest`), and matching your own command line
|
|
63
|
+
kills the running command. Resolve the PID from the listening port instead.
|
|
64
|
+
|
|
65
|
+
## On a red
|
|
66
|
+
|
|
67
|
+
1. Read the failing test's message — a good guard prints the exact drift
|
|
68
|
+
(`file:line`, the offending token, the missing allowlist key).
|
|
69
|
+
2. Fix the source. If a guard legitimately can't be satisfied yet, add its
|
|
70
|
+
**documented allowlist entry with a reason** — never widen a guard silently
|
|
71
|
+
(that re-opens the blind spot the guard exists to close).
|
|
72
|
+
3. Iterate on the single file, then the full gate for sign-off.
|
|
73
|
+
|
|
74
|
+
## Adding a new guard
|
|
75
|
+
|
|
76
|
+
Prefer a **glob-discovered** guard config so a new fast static guard joins the
|
|
77
|
+
pre-push set automatically — no hand-maintained list. Name it to match the include
|
|
78
|
+
glob and keep it **DB-free** (pre-push must stay ~seconds); DB-bound tests belong
|
|
79
|
+
to the full gate, not the fast pre-push set.
|
|
80
|
+
|
|
81
|
+
## Baseline-green first
|
|
82
|
+
|
|
83
|
+
If your success criterion is "gate green" and you do NOT know the base's green
|
|
84
|
+
status — you are **hardening the gate itself**, or building against a `main` that a
|
|
85
|
+
rename/schema cascade is landing on piecemeal — run the relevant gate part ONCE on
|
|
86
|
+
the **unmodified base** before your first edit. It separates pre-existing breakage
|
|
87
|
+
from your work; otherwise foreign reds surface one at a time as you build (an abort
|
|
88
|
+
+ scope question each).
|
|
89
|
+
|
|
90
|
+
## When the host CAN enforce
|
|
91
|
+
|
|
92
|
+
If the repo moves to a plan/visibility with required checks: add a CI workflow
|
|
93
|
+
running the full gate on PR and make it a **required status check** — then the gate
|
|
94
|
+
is machine-enforced at merge, not just local. Until then, local is the gate.
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrate-wave
|
|
3
|
+
"description": "Use when the user hands you a whole WAVE / cluster of pre-planned, file-disjoint slices and wants you to ORCHESTRATE building, verifying AND landing it end-to-end — often AFK / \"ultracode\". Triggers: \"orchestriere Welle #N\" (or any wording that delegates wave-landing responsibility to you), \"ultracode diese Welle / diesen Cluster\", or a wave-anchor issue (a cluster/umbrella issue with file-disjoint sub-issues whose specs are already locked) handed over to land. NOT for a single slice (just `tdd` it), NOT for finding/clustering a wave (that's `board-to-waves`), NOT for planning specs (that's `grill-with-docs`/`to-issues`)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Orchestrate Wave
|
|
7
|
+
|
|
8
|
+
You are the orchestrator. The user gives you a wave anchor (a cluster/umbrella
|
|
9
|
+
issue with file-disjoint sub-issues whose specs/decisions are already locked) and
|
|
10
|
+
says "land it". You decide inline-vs-delegate; you are responsible for it landing
|
|
11
|
+
correctly, AFK. Subagents BUILD; **you** integrate + verify + land.
|
|
12
|
+
|
|
13
|
+
The anchor, its sub-issues and the locked plan doc contain the verbatim contracts
|
|
14
|
+
you must NOT paraphrase.
|
|
15
|
+
|
|
16
|
+
> **Phase 0 probes a project layer.** Concrete tooling — exact test/verify
|
|
17
|
+
> commands, a DB/tunnel setup, a headless login recipe, brand checks, deploy
|
|
18
|
+
> lockstep — is project-specific and lives in a **project layer** this skill reads
|
|
19
|
+
> at runtime, not in this skeleton. The skeleton names the layer's sections
|
|
20
|
+
> (`§Setup`, `§Builder Commands`, `§Builder Hard Rules`, `§Integration Suites`,
|
|
21
|
+
> `§Verify Recipe`, `§Headless Login`, `§Landing`) and falls back to generic
|
|
22
|
+
> instructions when the layer is absent. See **Phase 0**.
|
|
23
|
+
|
|
24
|
+
## Standing rules (all phases)
|
|
25
|
+
|
|
26
|
+
- **AFK heartbeat.** A wave run may take time but must never look stuck: during any
|
|
27
|
+
long-running gate (dispatch wait, integration suite, full verify, browser/E2E,
|
|
28
|
+
migration) send a short status update at least every ~30 s and on every phase
|
|
29
|
+
change — current gate, last green milestone, next step, visible blocker/risk. A
|
|
30
|
+
still-running tool session is stated as such; never wait silently for the final
|
|
31
|
+
result.
|
|
32
|
+
- **Degrade by subtraction, never by improvisation.** The defined failure paths:
|
|
33
|
+
- **Slice stays red after escalation** (2-strikes rule, see Routing): pull the
|
|
34
|
+
slice — do not merge it (or revert its merge), pull every dependent that
|
|
35
|
+
consumes its artifacts (Phase-1 graph), land the remaining green subset, create
|
|
36
|
+
a tracking issue, leave its anchor row open, report the pull prominently.
|
|
37
|
+
- **Schema wave degraded:** if a pulled slice owns a migration/schema that a
|
|
38
|
+
remaining slice reads, the ONE-lockstep-window premise no longer holds → STOP,
|
|
39
|
+
land nothing schema-dependent, report.
|
|
40
|
+
- **Plan-level error** (integration/verify reveals a wrong LOCKED decision, not a
|
|
41
|
+
slice bug): STOP the wave. No improvised redesign AFK — keep worktrees intact,
|
|
42
|
+
report findings + options.
|
|
43
|
+
- **Routing = one axis: how expensive is a wrong result to catch?** Mechanically
|
|
44
|
+
caught (test/screenshot/lint) → default tier at medium/low effort; plausible-but-
|
|
45
|
+
wrong / subtle logic / architecture → top tier at high effort + main-thread
|
|
46
|
+
re-verify; review/verify verdicts never below high. Concrete tier→model mapping
|
|
47
|
+
lives in your dispatch/model doctrine, if present — no model names here.
|
|
48
|
+
Escalate a repeatedly-failing slice one tier/effort up on the 2-strikes rule (2×
|
|
49
|
+
same problem despite concrete feedback, or structurally wrong approach — NOT the
|
|
50
|
+
first red test). The same axis sets how hard you re-verify. Borderline → default
|
|
51
|
+
tier + re-verify beats blanket top tier.
|
|
52
|
+
|
|
53
|
+
## Phase 0 — Setup
|
|
54
|
+
|
|
55
|
+
1. **Read everything**: the anchor body, every sub-issue body (each has a Handoff
|
|
56
|
+
block: scope, blast-radius, live-verify, PR line), and the locked plan /
|
|
57
|
+
plan-review doc in the planning worktree (file-exact).
|
|
58
|
+
2. **Probe the project layer.** Read the project layer doc for this skill (the
|
|
59
|
+
consumer's `docs/agents/skills/orchestrate-wave.md` or the path your project
|
|
60
|
+
uses). If its `§`-sections carry **filled** content, follow the project recipe
|
|
61
|
+
wherever a phase below points at a `§`-section. If the file is only a
|
|
62
|
+
`setup-workflow` sentinel stub (empty headings, no real content) or absent,
|
|
63
|
+
treat the layer as **ABSENT** → use the generic fallback in each phase and warn
|
|
64
|
+
**once** that `/setup-workflow` plus project maintenance fill the layer (the
|
|
65
|
+
commands/tunnel/login can't be guessed). Never treat an empty heading as a
|
|
66
|
+
verify recipe.
|
|
67
|
+
3. **Wave worktree**: reuse the planning worktree (never re-create; the handoff
|
|
68
|
+
points there). Bring its branch to current `main`:
|
|
69
|
+
`git -C <wave> merge --ff-only origin/main` (if your repo guards destructive
|
|
70
|
+
git, ff-merge is the safe path — not `reset --hard`). Install dependencies with
|
|
71
|
+
your package manager after (the lockfile may have moved). A gitignored plan doc
|
|
72
|
+
survives the merge.
|
|
73
|
+
4. **Run project setup steps (`§Setup`)** the later verify needs — e.g. a DB
|
|
74
|
+
tunnel or service the live-verify depends on. Absent layer → start whatever your
|
|
75
|
+
live-verify environment requires before Phase 4.
|
|
76
|
+
|
|
77
|
+
**Done when:** anchor + every sub-issue + plan read · project layer probed
|
|
78
|
+
(filled → project recipe; stub/absent → generic + one-time warning) · wave branch
|
|
79
|
+
ff'd to `origin/main` + deps installed · project setup steps running.
|
|
80
|
+
|
|
81
|
+
## Phase 1 — Disjointness recon (the load-bearing step)
|
|
82
|
+
|
|
83
|
+
Zero merge conflicts later depends entirely on getting this right.
|
|
84
|
+
|
|
85
|
+
- Delegate to a read-only investigator agent: for EACH slice the exact file path of
|
|
86
|
+
every named component + resolve ambiguous targets, then a **FILE → SLICES** table
|
|
87
|
+
listing every file that appears in ≥2 slices.
|
|
88
|
+
- Build the **overlap graph**. Identify the **conflict hub** (the slice whose new
|
|
89
|
+
artifacts other slices reuse). **Build the hub first**, merge it, THEN the
|
|
90
|
+
dependents stop conflicting.
|
|
91
|
+
- Cut into **waves of fully file-disjoint slices**. Edited-by-≥2 = serialize across
|
|
92
|
+
waves; only-shared-via-import = safe. A new primitive edited by one slice but
|
|
93
|
+
*consumed* by others is NOT a conflict.
|
|
94
|
+
- **Native blocking edges are the frontier authority.** Read the anchor's
|
|
95
|
+
buildable frontier from the tracker's native issue dependencies:
|
|
96
|
+
`python3 scripts/board-sync.py frontier <anchor#>` → `FREI` / `BLOCKED by #…` /
|
|
97
|
+
`done` per sub-issue. A body `## Blocked by` section is only the machine-written
|
|
98
|
+
MIRROR of those edges (on conflict the API wins) — never derive build order from
|
|
99
|
+
body text or table order alone. The frontier must AGREE with your Phase-1
|
|
100
|
+
dependency order; a contradiction is a plan finding to reconcile before dispatch,
|
|
101
|
+
not a detail.
|
|
102
|
+
- **Reconcile contradictory sub-issue ACs against the plan BEFORE dispatch — the
|
|
103
|
+
plan is authority.** `to-issues` cuts slices independently, so a shared
|
|
104
|
+
append-only file (a query-key registry, a barrel, a shared types module) is often
|
|
105
|
+
claimed by *every* slice, with duplicate/clashing adds. **The hub slice OWNS the
|
|
106
|
+
shared-mutable file: it pre-adds ALL the wave's keys/types/helpers; dependents
|
|
107
|
+
CONSUME only and never touch it.** Embed verbatim in each dependent's contract:
|
|
108
|
+
"X already exists in `<file>` — do NOT add it, consume only." (Real case: all 14
|
|
109
|
+
sub-issues claimed the same registry adds + 4 contradictions — hub expanded to
|
|
110
|
+
own all 20 keys, batch merged conflict-free.)
|
|
111
|
+
|
|
112
|
+
**Done when:** FILE→SLICES table exists · every ≥2-slice file has exactly ONE
|
|
113
|
+
owning slice · disjoint waves cut in dependency order · every dependent contract
|
|
114
|
+
carries its verbatim consume-only lines.
|
|
115
|
+
|
|
116
|
+
## Phase 2 — Dispatch one wave in parallel (isolated worktree per implementer)
|
|
117
|
+
|
|
118
|
+
Phase 2+3 repeat **per disjoint wave** from Phase 1 — the conflict-hub wave first.
|
|
119
|
+
Within ONE wave, all slices dispatch at once. **Dispatch only `FREI` slices** —
|
|
120
|
+
re-read the native frontier (`frontier <anchor#>`) before each wave; a
|
|
121
|
+
gate-before-build edge clears only when its blocker actually lands (never
|
|
122
|
+
"unblock" by editing body text — remove the edge via `dep-remove` if the plan
|
|
123
|
+
genuinely changed). Two per-slice calls first: **(a)
|
|
124
|
+
inline vs delegate** — a tiny mechanical bit (a rename, a 1-2-line tweak) you do
|
|
125
|
+
yourself — and **(b) tier + effort** (Standing rules → Routing). For each
|
|
126
|
+
delegated slice:
|
|
127
|
+
|
|
128
|
+
- **One worktree per agent** off the wave-branch HEAD, own index so parallel agents
|
|
129
|
+
never share a git index. Use your project's worktree-setup command (`§Setup`),
|
|
130
|
+
else plain `git worktree add <path> -b feat/<anchor>-<slug>`.
|
|
131
|
+
- **Build the prompt from [`references/builder-contract.md`](references/builder-contract.md)**
|
|
132
|
+
— fill the slots with the slice's VERBATIM What+AC, plan decision, recon
|
|
133
|
+
file:line map and consume-only lines; never paraphrase (paraphrase drift has
|
|
134
|
+
produced real contract errors). The template is the SSOT for the builder's hard
|
|
135
|
+
rules, test/typecheck commands, workflow order and report format.
|
|
136
|
+
- **Capture reusable names** from the hub agent's report (the new component/helper
|
|
137
|
+
paths) and embed them into the dependent slices' contracts.
|
|
138
|
+
|
|
139
|
+
**Done when:** every dispatched slice reported back with commit SHA + green
|
|
140
|
+
package tests + green fast gate (`§Builder Commands`) — or a STOP item you resolved
|
|
141
|
+
(answered / re-dispatched) before integration.
|
|
142
|
+
|
|
143
|
+
## Phase 3 — Serial integration
|
|
144
|
+
|
|
145
|
+
In the wave worktree: `git merge --no-ff <slice-branch>` per slice (disjoint →
|
|
146
|
+
conflict-free). After EACH wave, on the integrated branch:
|
|
147
|
+
|
|
148
|
+
- Typecheck both packages + the **FULL suite** — catches sibling/consumer test
|
|
149
|
+
breaks the agent ownership didn't cover (hardcoded count/tab asserts). Exact
|
|
150
|
+
commands = `§Integration Suites` (absent layer → your project's full test +
|
|
151
|
+
typecheck for every package the wave touched).
|
|
152
|
+
- **Run EVERY test framework the wave's files belong to**, not just the primary
|
|
153
|
+
one: a kit/tooling/scripts wave may also have a separate unit-test runner and a
|
|
154
|
+
separate script-test runner the main suite does NOT cover (real case: a
|
|
155
|
+
second-framework red rode 3 integrations before surfacing). `§Integration Suites`
|
|
156
|
+
names each framework for this project.
|
|
157
|
+
|
|
158
|
+
**Done when:** every framework green on the integrated branch — before dispatching
|
|
159
|
+
the next wave.
|
|
160
|
+
|
|
161
|
+
## Phase 4 — Central verify (YOURS, serial — the user explicitly wants this)
|
|
162
|
+
|
|
163
|
+
Live-verify asserts USER OUTCOME (a DB-/UI value compared), not a tech metric.
|
|
164
|
+
A single browser + single dev DB ⇒ verify is serial and yours. **A subagent's
|
|
165
|
+
"PASS" is a hypothesis, not a gate** — implementers repeatedly mis-report green
|
|
166
|
+
(real case: "gate PASS" while a size gate was red; files declared missing that
|
|
167
|
+
existed). Never merge on the subagent's word.
|
|
168
|
+
|
|
169
|
+
- **Re-run your project's full CI/verify gate CENTRALLY yourself** (`§Verify
|
|
170
|
+
Recipe`). On an integrated verify/coordinator branch (no per-slice issue number)
|
|
171
|
+
a branch-name-derived guard can BLOCK with no matching baseline — a branch-naming
|
|
172
|
+
artifact, not a coverage gap (each slice branch carried its own); `§Verify
|
|
173
|
+
Recipe` names the skip/override for that. Absent layer → run your project's
|
|
174
|
+
verification command or a project-provided verification skill (e.g. the kit's
|
|
175
|
+
**`/local-ci`** gate), if one exists; if the project has neither, run its full
|
|
176
|
+
test + typecheck and assert each slice's AC as a user-visible outcome by hand.
|
|
177
|
+
- **Schema-/reader-changing waves** additionally run the COMBINED integration suite
|
|
178
|
+
against the refreshed snapshot before merge (`§Verify Recipe`) — per-slice-
|
|
179
|
+
isolated runs miss cross-slice seed/reader breaks.
|
|
180
|
+
- **ONE dev server / one shared dev DB only.** ⚠ A second backend against a shared
|
|
181
|
+
dev DB can reaper-kill a live job (`§Verify Recipe` names the project's gotcha).
|
|
182
|
+
Stop the first dev server before starting another worktree's, or verify in the
|
|
183
|
+
same worktree.
|
|
184
|
+
- **Headless login into the session-MCP profile** (AFK, no password in the
|
|
185
|
+
transcript). First navigate the MCP browser to the app root: no `/login`
|
|
186
|
+
redirect = already authenticated → skip the login (an authed profile makes a
|
|
187
|
+
login script time out on the e-mail field — looks like a selector bug, is not).
|
|
188
|
+
Otherwise: full recipe, profile-resolution lore + script = `§Headless Login`.
|
|
189
|
+
- **Per surface**: browser snapshot + screenshot; assert each slice's AC visibly
|
|
190
|
+
gone/fixed + no regression. Run the project's design/brand checks (tokens, no
|
|
191
|
+
hardcoded values, formatters, chart-axis rules — `§Verify Recipe`) +
|
|
192
|
+
cross-surface consistency.
|
|
193
|
+
- **Standardisation wave → CROSS-CONSUMER uniformity assert, NOT just per-slice
|
|
194
|
+
ACs.** If the wave unifies a shared pattern across ≥2 consumers, per-slice-green
|
|
195
|
+
is NOT enough — measure the standardised property on ALL N consumers and assert
|
|
196
|
+
they are EQUAL (e.g. `table.left - card.left` identical across every table;
|
|
197
|
+
export column-set identical), not just "present on each". Divergence only shows
|
|
198
|
+
in the cross-consumer diff. The shared component must OWN the standardised
|
|
199
|
+
property; this verify proves it actually does.
|
|
200
|
+
- **DB-compare** the outcome value against the SQL source of truth. Watch
|
|
201
|
+
type-coercion traps your project layer flags (`§Verify Recipe`) — e.g. a `date`
|
|
202
|
+
column that shifts a day through a naive ISO round-trip.
|
|
203
|
+
- **Console-clean** where required: read the browser console at warning level → 0
|
|
204
|
+
errors / 0 warnings.
|
|
205
|
+
- **Gap the agents missed?** 1-file mechanical → fix inline; else **freshly
|
|
206
|
+
re-dispatch** a new agent into the existing slice worktree/branch with the prior
|
|
207
|
+
findings embedded — a continuation is NOT available in the parallel-wave flow;
|
|
208
|
+
stopped/background agents are re-dispatched, not resumed.
|
|
209
|
+
|
|
210
|
+
**Done when — count it, don't remember it:** own central gate green (+ combined
|
|
211
|
+
integration where schema/reader) · **N/N slice ACs** visually asserted with
|
|
212
|
+
screenshot · cross-consumer equality measured (standardisation wave) · brand/design
|
|
213
|
+
checks pass · console 0/0 · DB outcome value compared.
|
|
214
|
+
|
|
215
|
+
## Phase 5 — Land
|
|
216
|
+
|
|
217
|
+
- **One PR** for the whole wave (one merge for the user) OR per-slice — your call;
|
|
218
|
+
one PR with per-slice commits is usually kindest AFK.
|
|
219
|
+
- **Schema-/migration waves: land as ONE combined PR — NOT incremental
|
|
220
|
+
auto-merge.** If merges to the main branch auto-deploy, per-slice merges race a
|
|
221
|
+
manually-gated prod migration → prod errors ×N slices. One combined PR = ONE
|
|
222
|
+
deploy = ONE prod-migration lockstep window. Incremental merge only for
|
|
223
|
+
byte-neutral waves (no new schema the deployed code reads). Project specifics
|
|
224
|
+
(deploy trigger, migration command, done-signal) = `§Landing`.
|
|
225
|
+
- **`Closes #N` needs the keyword before EACH issue, one per line** — `Closes #a,
|
|
226
|
+
#b` only closes the first. Anchor → `Part of #<anchor>`, never `closes`
|
|
227
|
+
(premature close).
|
|
228
|
+
- **Anchor tracker: `python3 scripts/board-sync.py anchor-sync <anchor#>`** — first
|
|
229
|
+
`--dry-run`, review the diff, then write; gate symbol + stable cells of freshly
|
|
230
|
+
appended rows by hand. Mandatory at EVERY slice event: PR-create AND merge.
|
|
231
|
+
- **Stacked follow-up PRs** that build on the unmerged wave: base on the **wave
|
|
232
|
+
branch** (not main) — the platform auto-retargets them when the wave PR merges.
|
|
233
|
+
Note the merge order in the body.
|
|
234
|
+
- New issues via `scripts/board-sync.py` (never bare `gh issue create`); write
|
|
235
|
+
multi-paragraph PR/issue bodies via `--body-file` (an inline body with backticks
|
|
236
|
+
can crash the shell).
|
|
237
|
+
|
|
238
|
+
**Done when:** PR(s) open with correct `Closes`/`Part of` lines · anchor-sync
|
|
239
|
+
written · merge order documented.
|
|
240
|
+
|
|
241
|
+
## Phase 6 — Cleanup + close
|
|
242
|
+
|
|
243
|
+
- Stop the dev server(s) you started, by port (`lsof -ti:<port> | xargs kill` —
|
|
244
|
+
your own processes, targeted by the worktree's assigned ports, never blind).
|
|
245
|
+
Remove temp verify scripts (a login helper, DB-check scripts).
|
|
246
|
+
- **Before removing any slice worktree, read its `ANNAHMEN.md`** (an assumptions
|
|
247
|
+
log, gitignored at worktree-root) and propagate each build-time assumption marker
|
|
248
|
+
to the sibling issue it carries. A hand-driven multi-PR / migration landing does
|
|
249
|
+
NOT run `wrapup`'s assumption-propagation step — this is the only place it
|
|
250
|
+
happens; `worktree remove` deletes the log.
|
|
251
|
+
- **Post-merge:** run `anchor-sync` again; verify every leaf issue actually closed
|
|
252
|
+
(the same checks `wrapup` runs, by hand when landing outside `wrapup`). The
|
|
253
|
+
anchor closes manually — a parent is not auto-closed on sub-issue completion.
|
|
254
|
+
- A skill edited during the wave → run `codex-adapter-sync` (lives in
|
|
255
|
+
`.agents/skills/`) in the SAME PR — the mirror-presence-parity lint is a
|
|
256
|
+
pre-PR gate and blocks a dual-surface skill PR without its mirror.
|
|
257
|
+
- Leave slice worktrees for the user to inspect, or note they're
|
|
258
|
+
post-merge-removable.
|
|
259
|
+
|
|
260
|
+
**Done when:** no orphan process · ANNAHMEN propagated · anchor reconciled + leaf
|
|
261
|
+
closes verified · final report lists landed/pulled slices as **X of Y**.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Builder Contract — template (fill slots, embed VERBATIM)
|
|
2
|
+
|
|
3
|
+
SSOT for every delegated slice prompt in `orchestrate-wave` Phase 2. The
|
|
4
|
+
orchestrator copies the block below and fills the `{{SLOTS}}` with verbatim
|
|
5
|
+
material from the locked plan/issue — never paraphrased (paraphrase drift has
|
|
6
|
+
produced real contract errors). Tier + effort per SKILL.md §Standing rules →
|
|
7
|
+
Routing.
|
|
8
|
+
|
|
9
|
+
The **Hard rules** and **Commands** sections below carry generic defaults so the
|
|
10
|
+
template is never shipped with an unresolved project slot. When a project layer
|
|
11
|
+
is present (`orchestrate-wave` Phase 0 probe → `§Builder Hard Rules` /
|
|
12
|
+
`§Builder Commands`), the orchestrator REPLACES the generic lines with the
|
|
13
|
+
project's exact rules and commands before dispatch — the builder must see exact
|
|
14
|
+
commands, not "your project's tests".
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
You are the implementer for slice #{{ISSUE}} of wave #{{ANCHOR}}.
|
|
18
|
+
Worktree: {{WORKTREE_PATH}} (branch {{BRANCH}}) — work ONLY here.
|
|
19
|
+
|
|
20
|
+
## Scope (verbatim from issue/plan — do not reinterpret)
|
|
21
|
+
{{WHAT_AND_AC_VERBATIM}}
|
|
22
|
+
|
|
23
|
+
## Plan decisions that bind you
|
|
24
|
+
{{PLAN_DECISIONS_VERBATIM}}
|
|
25
|
+
|
|
26
|
+
## File map (recon)
|
|
27
|
+
{{FILE_LINE_MAP}}
|
|
28
|
+
{{CONSUME_ONLY_LINES}}
|
|
29
|
+
|
|
30
|
+
## Hard rules
|
|
31
|
+
- Follow this project's UI/content conventions (from the project layer
|
|
32
|
+
§Builder Hard Rules — e.g. UI-text language, design tokens, formatters).
|
|
33
|
+
Absent a project layer: match the surrounding code's conventions exactly.
|
|
34
|
+
- Size gates (recommended default): no new file >300 lines, no function >50
|
|
35
|
+
lines — unless the project sets its own limit.
|
|
36
|
+
- If your slice adds a guard/helper/auth-check: WIRE it into its consumer + add a
|
|
37
|
+
negative test — an unwired helper is dead code.
|
|
38
|
+
- STOP + report on any contract ambiguity — do NOT guess (this discipline has
|
|
39
|
+
caught real contract errors).
|
|
40
|
+
- Do NOT run a browser/E2E or a dev server — the orchestrator verifies centrally.
|
|
41
|
+
|
|
42
|
+
## Commands (exact — deviations produce false reds)
|
|
43
|
+
Run, for EVERY package you edit: your package's unit tests for the files you
|
|
44
|
+
touched, a typecheck, and the project's fast pre-PR gate. State the EXACT
|
|
45
|
+
commands here from the project layer §Builder Commands. Absent a project layer,
|
|
46
|
+
use: run your package tests + typecheck + fast gate, and name the exact
|
|
47
|
+
invocation for each in this prompt so the builder cannot guess a wrong one.
|
|
48
|
+
|
|
49
|
+
## Workflow order (non-negotiable)
|
|
50
|
+
1. Implement (red→green test-first where the slice has logic).
|
|
51
|
+
2. Commit your ONE commit on the slice branch FIRST — before any longer verify
|
|
52
|
+
(verify-then-forget-to-commit leaves the orchestrator hand-committing your
|
|
53
|
+
worktree). Do NOT push. Do NOT `--no-verify` (pre-commit hooks must pass).
|
|
54
|
+
3. Run the commands above. Never end your turn with a background command still
|
|
55
|
+
running.
|
|
56
|
+
|
|
57
|
+
## Report back (concise)
|
|
58
|
+
Files touched · decisions taken · test results (exact output) · commit SHA ·
|
|
59
|
+
STOP items · what the orchestrator should visually verify.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Orchestrator notes:
|
|
63
|
+
|
|
64
|
+
- `{{CONSUME_ONLY_LINES}}` come from the Phase-1 reconciliation, e.g.
|
|
65
|
+
"X already exists in `<file>` — do NOT add it, consume only."
|
|
66
|
+
- For dependent slices, fill hub artifact paths from the hub agent's report
|
|
67
|
+
(Phase 2 "capture reusable names"), not from the plan's guesses.
|