@gtrabanco/pi-agentic-workflow 0.1.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.
Files changed (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.es.md +154 -0
  3. package/README.md +148 -0
  4. package/dist/config/defaults.d.ts +8 -0
  5. package/dist/config/defaults.js +11 -0
  6. package/dist/config/load.d.ts +19 -0
  7. package/dist/config/load.js +76 -0
  8. package/dist/config/merge.d.ts +4 -0
  9. package/dist/config/merge.js +43 -0
  10. package/dist/config/schema.d.ts +21 -0
  11. package/dist/config/schema.js +144 -0
  12. package/dist/config/types.d.ts +53 -0
  13. package/dist/config/types.js +12 -0
  14. package/dist/extension/factory.d.ts +47 -0
  15. package/dist/extension/factory.js +49 -0
  16. package/dist/extension/index.d.ts +4 -0
  17. package/dist/extension/index.js +84 -0
  18. package/dist/routing/catalogue.d.ts +35 -0
  19. package/dist/routing/catalogue.js +79 -0
  20. package/dist/routing/dispatch.d.ts +34 -0
  21. package/dist/routing/dispatch.js +191 -0
  22. package/dist/routing/state.d.ts +13 -0
  23. package/dist/routing/state.js +65 -0
  24. package/dist/routing/types.d.ts +90 -0
  25. package/dist/routing/types.js +3 -0
  26. package/dist/settings/console.d.ts +55 -0
  27. package/dist/settings/console.js +266 -0
  28. package/dist/settings/store.d.ts +3 -0
  29. package/dist/settings/store.js +24 -0
  30. package/dist/settings/view.d.ts +11 -0
  31. package/dist/settings/view.js +46 -0
  32. package/package.json +59 -0
  33. package/skills/audit-docs/SKILL.md +171 -0
  34. package/skills/audit-pr/SKILL.md +201 -0
  35. package/skills/audit-pr/references/01_MERGE_GATES.md +24 -0
  36. package/skills/audit-pr/references/02_CLOSURE_AND_SCOPE_GATES.md +83 -0
  37. package/skills/audit-pr/references/03_AUDIT_PROCESS.md +69 -0
  38. package/skills/audit-pr/references/04_VERDICT.md +69 -0
  39. package/skills/audit-pr/references/05_ROUTING_AND_GUARDRAILS.md +58 -0
  40. package/skills/audit-pr/references/PORTABILITY.md +17 -0
  41. package/skills/design-feature/SKILL.md +162 -0
  42. package/skills/design-feature/references/INTERVIEW.md +52 -0
  43. package/skills/design-feature/references/PORTABILITY.md +15 -0
  44. package/skills/design-feature/references/UPSERT_EXAMPLE.md +8 -0
  45. package/skills/design-feature/references/WRITE_AND_UPSERT.md +92 -0
  46. package/skills/discover-repository-state/SKILL.md +83 -0
  47. package/skills/execute-phase/SKILL.md +115 -0
  48. package/skills/execute-phase/references/BATCH_AND_PORTABILITY.md +54 -0
  49. package/skills/execute-phase/references/CLOSEOUT.md +74 -0
  50. package/skills/execute-phase/references/DESCOPE.md +35 -0
  51. package/skills/execute-phase/references/EXECUTION_CONTRACT.md +147 -0
  52. package/skills/execute-phase/references/FOLDING.md +73 -0
  53. package/skills/execute-phase/references/FORGE_BODY.md +24 -0
  54. package/skills/execute-phase/references/HANDOFF.md +21 -0
  55. package/skills/execute-phase/references/OPPORTUNISTIC_FINDING.md +45 -0
  56. package/skills/execute-phase/references/PREFLIGHT.md +152 -0
  57. package/skills/execute-phase/references/UNIT_LOOP.md +88 -0
  58. package/skills/execute-phase/references/WORKFLOWS_FEATURE.md +37 -0
  59. package/skills/execute-phase/references/WORKFLOWS_FIX.md +43 -0
  60. package/skills/execute-phase/references/WORKFLOWS_LEGACY.md +26 -0
  61. package/skills/execute-phase/references/WORKFLOWS_SMALL_PHASED.md +38 -0
  62. package/skills/fold-findings/SKILL.md +141 -0
  63. package/skills/fold-findings/references/FOLD_POLICY.md +43 -0
  64. package/skills/fold-findings/references/FOLD_PROCESS.md +41 -0
  65. package/skills/generate-docs/SKILL.md +145 -0
  66. package/skills/generate-docs/references/ADAPTERS.md +15 -0
  67. package/skills/generate-docs/references/ADAPTER_DISCOVERY.md +33 -0
  68. package/skills/generate-docs/references/GENERATION_PROCESS.md +90 -0
  69. package/skills/init-workspace/SKILL.md +152 -0
  70. package/skills/init-workspace/references/BOOTSTRAP_DISCOVERY.md +70 -0
  71. package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +58 -0
  72. package/skills/init-workspace/references/PORTABILITY.md +16 -0
  73. package/skills/init-workspace/references/UPGRADE.md +83 -0
  74. package/skills/log-session/SKILL.md +159 -0
  75. package/skills/loop-review-fold/SKILL.md +168 -0
  76. package/skills/orchestration-envelope/SKILL.md +81 -0
  77. package/skills/orchestration-envelope/references/TURN_CONTRACT.md +21 -0
  78. package/skills/phase-contract/SKILL.md +82 -0
  79. package/skills/plan-feature/SKILL.md +179 -0
  80. package/skills/plan-feature/references/ROUTING.md +83 -0
  81. package/skills/plan-feature-from-issue/SKILL.md +140 -0
  82. package/skills/plan-feature-scaffold/SKILL.md +93 -0
  83. package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +76 -0
  84. package/skills/plan-fix/SKILL.md +115 -0
  85. package/skills/plan-fix/references/PLANNING_PROCESS.md +118 -0
  86. package/skills/plan-fix/references/SPEC_CONTRACT.md +22 -0
  87. package/skills/planning-preflight/SKILL.md +130 -0
  88. package/skills/product-audit/SKILL.md +225 -0
  89. package/skills/product-audit/references/AUDIT_DIMENSIONS.md +24 -0
  90. package/skills/product-audit/references/AUDIT_PROCESS.md +85 -0
  91. package/skills/resolve-repository-state/SKILL.md +79 -0
  92. package/skills/review-a11y/SKILL.md +60 -0
  93. package/skills/review-brand/SKILL.md +65 -0
  94. package/skills/review-change/SKILL.md +156 -0
  95. package/skills/review-change/references/ADVERSARIAL_RECOMMENDATION.md +31 -0
  96. package/skills/review-change/references/ADVERSARIAL_SETUP.md +86 -0
  97. package/skills/review-change/references/ADVERSARIAL_SYNTHESIS.md +53 -0
  98. package/skills/review-change/references/OUTPUT_AND_GUARDRAILS.md +85 -0
  99. package/skills/review-change/references/PERSIST_AND_DECIDE.md +151 -0
  100. package/skills/review-change/references/PORTABILITY.md +74 -0
  101. package/skills/review-change/references/REVIEW_PROCESS.md +86 -0
  102. package/skills/review-code/SKILL.md +69 -0
  103. package/skills/review-debt/SKILL.md +72 -0
  104. package/skills/review-design/SKILL.md +60 -0
  105. package/skills/review-implementation/SKILL.md +108 -0
  106. package/skills/review-implementation/references/CLASSIFY.md +96 -0
  107. package/skills/review-implementation/references/FIND.md +35 -0
  108. package/skills/review-perf/SKILL.md +79 -0
  109. package/skills/review-security/SKILL.md +65 -0
  110. package/skills/review-seo/SKILL.md +65 -0
  111. package/skills/review-verify/SKILL.md +66 -0
  112. package/skills/ship-roadmap/SKILL.md +120 -0
  113. package/skills/ship-roadmap/references/ADVANCE.md +90 -0
  114. package/skills/ship-roadmap/references/AUDIT_AND_MERGE.md +64 -0
  115. package/skills/ship-roadmap/references/CLOSEOUT_AND_LOG.md +26 -0
  116. package/skills/ship-roadmap/references/FOUNDING.md +101 -0
  117. package/skills/ship-roadmap/references/GUARDRAILS.md +56 -0
  118. package/skills/ship-roadmap/references/MODEL_ROUTING.md +14 -0
  119. package/skills/ship-roadmap/references/PORTABILITY.md +34 -0
  120. package/skills/ship-roadmap/references/RECOVERY_AND_SELECTION.md +93 -0
  121. package/skills/ship-roadmap/references/STOP_CONDITIONS.md +9 -0
  122. package/skills/ship-roadmap/references/TERMINAL_REPORT.md +34 -0
  123. package/skills/triage-issue/SKILL.md +148 -0
  124. package/skills/triage-issue/references/AUDIT_FINDINGS.md +35 -0
  125. package/skills/triage-issue/references/FOLD_LEDGER.md +32 -0
  126. package/skills/triage-issue/references/ISSUE_PROCESS.md +101 -0
  127. package/skills/triage-issue/references/LABELS.md +83 -0
  128. package/skills/triage-issue/references/REVIEW_FINDING_PROCESS.md +41 -0
  129. package/skills/verification-contract/SKILL.md +77 -0
  130. package/skills/workflow-status/SKILL.md +143 -0
  131. package/skills/workflow-status/references/CRASH_RECOVERY.md +66 -0
  132. package/skills/workflow-status/references/ENVELOPE_CORE.md +107 -0
  133. package/skills/workflow-status/references/ENVELOPE_FIELDS.md +77 -0
  134. package/skills/workflow-status/references/GUARDRAILS.md +17 -0
  135. package/skills/workflow-status/references/PORTABILITY.md +14 -0
  136. package/skills/workflow-status/references/SENSOR_CORE.md +95 -0
  137. package/skills/workflow-status/references/SENSOR_SIGNALS.md +128 -0
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: review-security
3
+ user-invocable: false
4
+ version: 1.0.1
5
+ author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ license: MIT
7
+ description: >
8
+ Internal security review pass of the agentic-workflow review pack — composed
9
+ in-turn by review-change and product-audit; not a menu entry. Checks secrets,
10
+ input validation, injection, authn/authz, PII exposure, and dependency risk
11
+ on the changed surface. Findings only; never edits code.
12
+ ---
13
+
14
+ # Review Security (internal)
15
+
16
+ Composed by `review-change` / `product-audit` within their conversation — on any
17
+ agent, follow this file inline as the routed step. **Findings only; never edits,
18
+ never refactors.**
19
+
20
+ ## Scope
21
+
22
+ The diff or path/glob the caller passes; default the current change vs the
23
+ default branch. State the scope at the top of the returned table.
24
+
25
+ ## Checklist (evaluate EVERY item — none is optional; n/a must be stated)
26
+
27
+ ✓ No secrets/credentials/tokens in code, config, tests, or fixtures (grep the
28
+ diff for key-like strings)
29
+ ✓ Every external input on the changed paths is validated/sanitized before use
30
+ ✓ No injection vectors (SQL/command/path/template) — parameterized/escaped,
31
+ never concatenated
32
+ ✓ AuthN/AuthZ enforced on every new/changed endpoint or entry point (cite
33
+ where)
34
+ ✓ No PII or secrets written to logs/error messages on the changed paths
35
+ ✓ Webhooks/callbacks verify signatures before processing
36
+ ✓ Rate limiting / abuse controls considered where a new public surface appears
37
+ (n/a if none)
38
+ ✓ New/updated dependencies pinned and free of known-critical advisories (state
39
+ how you checked)
40
+ ✓ Error responses don't leak stack traces or internal paths
41
+ ✓ Unsafe deserialization / dynamic evaluation of untrusted data absent
42
+
43
+ ## Return exactly
44
+
45
+ ```
46
+ REVIEW SECURITY — scope: <scope>
47
+
48
+ | # | Finding | Sev | Evidence | Suggested fix |
49
+ |---|---------|-----|----------|---------------|
50
+ | 1 | <what> | critical|major|minor | <file:line> | <smallest action> |
51
+
52
+ Checklist: <n> evaluated, <n> pass, <n> findings, <n> n/a (<which + why>)
53
+ Summary: <1-2 sentences>
54
+ Decision: PASS | FAIL
55
+ ```
56
+
57
+ FAIL if any critical or major finding is open; PASS otherwise. Minor findings
58
+ never block — they route to the caller's triage step.
59
+
60
+ ## Done when
61
+
62
+ - Every checklist item was evaluated with evidence (file:line or command output)
63
+ or explicitly marked n/a with the reason.
64
+ - The fixed-format block above is returned — nothing more, nothing less — and
65
+ no code was changed.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: review-seo
3
+ user-invocable: false
4
+ version: 1.0.1
5
+ author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ license: MIT
7
+ description: >
8
+ Internal SEO review pass of the agentic-workflow review pack — composed
9
+ in-turn by review-change and product-audit; not a menu entry. Checks changed
10
+ web pages/routes for indexability, metadata, and structured data — applies
11
+ only to public web surfaces. Findings only; never edits code.
12
+ ---
13
+
14
+ # Review SEO (internal)
15
+
16
+ Composed by `review-change` / `product-audit` within their conversation — on any
17
+ agent, follow this file inline as the routed step. **Findings only; never edits,
18
+ never refactors.**
19
+
20
+ ## Scope
21
+
22
+ The diff or path/glob the caller passes; default the current change vs the
23
+ default branch. State the scope at the top of the returned table.
24
+
25
+ ## Checklist (evaluate EVERY item — none is optional; n/a must be stated)
26
+
27
+ - ✓ Read the project's SEO doc first (e.g. `docs/frontend/SEO.md`) — n/a all
28
+ items with the reason if the product has no public web surface
29
+ - ✓ Every new/changed public page has a unique title and meta description
30
+ within the project's declared lengths
31
+ - ✓ Canonical URL correct on new/changed routes (no accidental duplicates)
32
+ - ✓ Indexability intended = indexability actual (robots/noindex/sitemap state
33
+ matches the page's purpose)
34
+ - ✓ One h1 per page; heading levels don't skip
35
+ - ✓ Structured data valid for the content type the project declares (cite the
36
+ validator output when run)
37
+ - ✓ Links crawlable (real hrefs, not click handlers) on changed navigation
38
+ - ✓ Images on changed pages have descriptive filenames/alt where the SEO doc
39
+ requires
40
+ - ✓ No render-blocking regression for primary content (content present without
41
+ JS where the project declares SSR/SSG)
42
+
43
+ ## Return exactly
44
+
45
+ ```
46
+ REVIEW SEO — scope: <scope>
47
+
48
+ | # | Finding | Sev | Evidence | Suggested fix |
49
+ |---|---------|-----|----------|---------------|
50
+ | 1 | <what> | critical|major|minor | <file:line> | <smallest action> |
51
+
52
+ Checklist: <n> evaluated, <n> pass, <n> findings, <n> n/a (<which + why>)
53
+ Summary: <1-2 sentences>
54
+ Decision: PASS | FAIL
55
+ ```
56
+
57
+ FAIL if any critical or major finding is open; PASS otherwise. Minor findings
58
+ never block — they route to the caller's triage step.
59
+
60
+ ## Done when
61
+
62
+ - Every checklist item was evaluated with evidence (file:line or command output)
63
+ or explicitly marked n/a with the reason.
64
+ - The fixed-format block above is returned — nothing more, nothing less — and
65
+ no code was changed.
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: review-verify
3
+ user-invocable: false
4
+ version: 1.0.1
5
+ author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ license: MIT
7
+ description: >
8
+ Internal run-it verification review pass of the agentic-workflow review pack —
9
+ composed in-turn by review-change and product-audit; not a menu entry. Runs
10
+ the project's gate and the changed behavior for real — commands, exit codes,
11
+ observed output — instead of assuming; what cannot be executed goes to the
12
+ manual checklist. Findings only; never edits code.
13
+ ---
14
+
15
+ # Review Verify (internal)
16
+
17
+ Composed by `review-change` / `product-audit` within their conversation — on any
18
+ agent, follow this file inline as the routed step. **Findings only; never edits,
19
+ never refactors.**
20
+
21
+ ## Scope
22
+
23
+ The diff or path/glob the caller passes; default the current change vs the
24
+ default branch. State the scope at the top of the returned table.
25
+
26
+ ## Checklist (evaluate EVERY item — none is optional; n/a must be stated)
27
+
28
+ ✓ The project's verification gate ran in THIS review (type-check, tests, build
29
+ per the project's declared commands) — paste exit status per command
30
+ ✓ The change's primary claimed behavior was exercised for real (run the
31
+ CLI/endpoint/function; paste the actual observed output)
32
+ ✓ At least one failure-mode from the SPEC's dev scenarios was reproduced (bad
33
+ input, missing file, error path) and behaved as specified
34
+ ✓ New/changed tests actually fail when the implementation is reverted or
35
+ broken (mutate or stash to prove they assert something — restore after)
36
+ ✓ No test was skipped/disabled to get green (grep for skip/only/todo markers
37
+ in the diff)
38
+ ✓ The build artifact/dev server starts cleanly (no new warnings that indicate
39
+ breakage)
40
+ ✓ Anything that can only be confirmed by a human (visual, device, locale,
41
+ load) is listed explicitly under "Manual" — never silently dropped
42
+
43
+ ## Return exactly
44
+
45
+ ```
46
+ REVIEW VERIFY — scope: <scope>
47
+
48
+ | # | Finding | Sev | Evidence | Suggested fix |
49
+ |---|---------|-----|----------|---------------|
50
+ | 1 | <what> | critical|major|minor | <file:line> | <smallest action> |
51
+
52
+ Checklist: <n> evaluated, <n> pass, <n> findings, <n> n/a (<which + why>)
53
+ Summary: <1-2 sentences>
54
+ Manual (a human must check): <bullet list, or "none">
55
+ Decision: PASS | FAIL
56
+ ```
57
+
58
+ FAIL if any critical or major finding is open; PASS otherwise. Minor findings
59
+ never block — they route to the caller's triage step.
60
+
61
+ ## Done when
62
+
63
+ - Every checklist item was evaluated with evidence (file:line or command output)
64
+ or explicitly marked n/a with the reason.
65
+ - The fixed-format block above is returned — nothing more, nothing less — and
66
+ no code was changed.
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: ship-roadmap
3
+ user-invocable: true
4
+ version: 4.0.2
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
+ license: MIT
7
+ argument-hint: "[--fullauto] | --continue [--fullauto]"
8
+ description: >
9
+ Found or continue a roadmap autopilot one stage per invocation. Default:
10
+ human merge. --fullauto is invocation-scoped and uses the transient wrapper
11
+ only after a fresh audit. Triggers: "ship-roadmap", "ship the roadmap",
12
+ "autopilot this project".
13
+ ---
14
+
15
+ # Ship the roadmap (autopilot)
16
+
17
+ Found once, then run the driver-fired loop (Claude `/loop`, external driver, or
18
+ manual re-invocation): plan, implement, review, open and optionally merge one PR
19
+ per roadmap unit. After the roadmap, sweep existing issues, ship fix-now work,
20
+ report residue as proposals (never create backlog automatically), and print the
21
+ final report. Use strong tiers for judgment, cheap tiers for typing, and humans
22
+ at expensive-to-undo decisions.
23
+
24
+ `ship-roadmap` is the conductor of the loop. It emits its native fixed `SHIP:`
25
+ banner and closing `→ Next:` block; the package-owned machine-result profiles
26
+ apply to the worker and sensor skills that a driver invokes inside the loop.
27
+
28
+ ## Turn contract — verify before ending the turn
29
+
30
+ ```
31
+ ✓ Exactly ONE stage advanced (or a terminal banner printed) and ONE line appended to the run log
32
+ ✓ Nothing was merged outside the active --fullauto wrapper; direct merge
33
+ commands remained blocked and no authorization survived the iteration
34
+ ✓ Artifact language: explicit user instruction > the project's declared docs language > English. The CONVERSATION language never decides — a Spanish prompt still produces English PRs/issues/commits/SPECs unless one of the first two says otherwise
35
+ ✓ The closing `→ Next:` block is printed as the ABSOLUTE last output
36
+ ```
37
+
38
+ Any unchecked box means the turn is not done.
39
+
40
+ ## When to use
41
+
42
+ Use for a locked roadmap with supervision at merge/end points. For one feature,
43
+ one bug, or exploratory work use the manual planning/execution flow instead.
44
+
45
+ ## Step 0 — Discover the project (always first)
46
+
47
+ Read before acting: `CLAUDE.md`/`AGENTS.md` Workflow conventions, documentation
48
+ map, `docs/features/ROADMAP.md`, fix index, architecture doc, and `.github/`
49
+ templates. Then establish:
50
+
51
+ 1. **Substrate:** if the guide, map, roadmap and fix index exist, skip founding
52
+ and confirm their answers; otherwise founding creates missing pieces.
53
+ 2. **Skills:** verify `plan-feature`, `execute-phase`, `review-change`, and
54
+ `audit-pr` are installed and record their directory for worker prompts. If
55
+ absent, stop with `npx skills add gtrabanco/agentic-workflow`. With
56
+ `--fullauto`, also require executable `.agentic-workflow/hooks/fullauto-merge.sh`
57
+ and its platform guard; otherwise route to `init-workspace`, never direct merge.
58
+ 3. **Run:** existing `docs/features/SHIP_DECISIONS.md` or an open
59
+ `docs/ship-founding` PR means resume with `--continue`; bare invocation reports
60
+ status instead of founding again.
61
+ 4. **Shape:** greenfield/existing, branch, and dirty tree; unexplained dirty
62
+ default branch stops (never clean it silently).
63
+
64
+
65
+ ## Progressive loading — select the invocation route
66
+
67
+ The allowlist is exactly the linked paths below. Never invent another reference.
68
+ Every route starts with [guardrails](references/GUARDRAILS.md), then loads only
69
+ its matching row:
70
+
71
+ **Hard rule for `--continue` at AUDIT:** LOAD exactly, in this order,
72
+ `references/GUARDRAILS.md`, `references/RECOVERY_AND_SELECTION.md`,
73
+ `references/STOP_CONDITIONS.md`, `references/ADVANCE.md`,
74
+ `references/MODEL_ROUTING.md`, and
75
+ `references/AUDIT_AND_MERGE.md`; after the stage, load
76
+ `references/CLOSEOUT_AND_LOG.md`. When the run is not terminal and all named
77
+ primitives exist, every other reference is forbidden for that turn.
78
+
79
+ | Condition now | LOAD complete route in this order | SKIP now |
80
+ |---|---|---|
81
+ | Found or inspect a run, no `--continue` (default mode or greenfield `--fullauto`) | [guardrails](references/GUARDRAILS.md) → [founding](references/FOUNDING.md) | recovery, stop conditions, advance, model routing, audit/merge, terminal report, portability |
82
+ | Existing-repo founding with `--fullauto` | [guardrails](references/GUARDRAILS.md) → [founding](references/FOUNDING.md) → [audit and merge policy](references/AUDIT_AND_MERGE.md) | recovery, stop conditions, advance, model routing, terminal report, portability |
83
+ | Continue one non-AUDIT iteration | [guardrails](references/GUARDRAILS.md) → [recovery and selection](references/RECOVERY_AND_SELECTION.md) → [stop conditions](references/STOP_CONDITIONS.md) → [advance](references/ADVANCE.md) → [model routing](references/MODEL_ROUTING.md) before stage execution → [closeout and log](references/CLOSEOUT_AND_LOG.md) after it | founding, audit/merge, terminal report, portability |
84
+ | Continue an AUDIT/fullauto iteration | [guardrails](references/GUARDRAILS.md) → [recovery and selection](references/RECOVERY_AND_SELECTION.md) → [stop conditions](references/STOP_CONDITIONS.md) → [advance](references/ADVANCE.md) → [model routing](references/MODEL_ROUTING.md) → [audit and merge policy](references/AUDIT_AND_MERGE.md) before the AUDIT stage → [closeout and log](references/CLOSEOUT_AND_LOG.md) after it | founding, terminal report, portability |
85
+ | Terminal stop/report | the active row above, then [terminal report](references/TERMINAL_REPORT.md) | unrelated rows |
86
+ | A named platform primitive is absent | the active row above, then [portability](references/PORTABILITY.md) | unrelated rows |
87
+
88
+ Do not load terminal reporting before terminal state or portability when all
89
+ primitives exist. Model routing precedes every stage; audit/merge precedes every
90
+ AUDIT stage, including non-`--fullauto` runs.
91
+
92
+ Selected resources are one hop from this file. Fixed banners, transitions, floor
93
+ checks and output blocks are normative; an unreadable required resource stops the
94
+ run—never improvise from an older run.
95
+
96
+ ## Portability
97
+
98
+ The workflow is driver-neutral. Use the exact [portability](references/PORTABILITY.md)
99
+ fallback only when a primitive is unavailable; keep stage order and safety floors.
100
+
101
+ ## Relationship to other skills
102
+
103
+ | Relation | Skills/policy |
104
+ |---|---|
105
+ | Compose (same/lower tier) | `init-workspace`; JIT `design-feature` + `plan-feature-scaffold`; `plan-feature`; `loop-review-fold`; verdict-only `audit-pr`; `audit-docs`. |
106
+ | Cheap workers | `execute-phase` (fresh context/phase), mechanical folds, audit-blocker fixes; use the validated worker model. |
107
+ | Human hand-off | Default merges, `product-audit` (higher effort), and report issue batches via `triage-issue`. |
108
+ | Sibling | `workflow-status` supplies the strict sensor result; worker skills use the package-owned output profiles, while the conductor keeps its native `SHIP:` turn contract. |
109
+
110
+ Manual feature-by-feature flow remains the default; this skill packages it with
111
+ the human at its edges.
112
+
113
+ ## Done when
114
+
115
+ - A terminal banner and final report exist with an open PR; roadmap statuses are
116
+ true; every PR is merged, open/audited, or parked with a reason. `SHIP: COMPLETE`
117
+ also accounts for the issue sweep and reports residue as proposals.
118
+ - Locked answers, iteration evidence, outcomes and recommendations are traceable
119
+ in `SHIP_DECISIONS.md`, the run log and report; the report states exact next
120
+ human actions (merges, triage, proposals, product-audit timing).
@@ -0,0 +1,90 @@
1
+ ## Advance exactly one stage
2
+
3
+ 4. **ADVANCE exactly one stage:**
4
+ - **DESIGN (mid-run `idea`/`defined` unit only)** — compose `design-feature`
5
+ in-turn (equal tier, opus/high — within the ≥ rule already stated for
6
+ founding), **deriving the product half strictly from the locked
7
+ `SHIP_DECISIONS.md` record — no new questions, ever** (the "no further
8
+ questions after the interview" contract this skill already enforces for
9
+ every other stage applies here identically). Walk capability closure
10
+ from what rounds 2–4 already answered for this feature; stamp `## Design
11
+ status: designed` and promote the roadmap row `idea → defined` on
12
+ success. Then compose `plan-feature-scaffold` in the same iteration to
13
+ promote `defined → planned` (both writes are the same JIT pass — a
14
+ feature never sits mid-promotion between iterations). **Undesignable
15
+ from the locked record** (the feature as scoped contradicts a locked
16
+ decision, or needs an answer rounds 2–4 never covered) → do **not**
17
+ guess and do **not** ask: emit `NEEDS_INPUT`, **park the unit** with the
18
+ specific gap recorded (mirrors a red-gate park — see Stop conditions),
19
+ and SELECT continues with the next startable unit this same run (or ends
20
+ the iteration per the capacity guard if none remain). A parked
21
+ undesignable unit is picked back up only by a human answering the
22
+ recorded question and re-running `/design-feature <slug> "<answer>"`
23
+ directly — the autopilot never re-asks it.
24
+ - **PLAN** — compose `plan-feature` in-turn via its scoped path (equal
25
+ tier). Every unit reaching PLAN is already `planned`-bound (DESIGN ran
26
+ first for any `idea`/`defined` unit), so `plan-feature`'s own redirect
27
+ gate always passes here. The interview path is **forbidden** mid-run:
28
+ SPEC gaps are resolved silently from the decision record and logged. JIT
29
+ planning that reveals the feature's premise is wrong (obsolete, absorbed,
30
+ impossible on this stack) → mark it blocked with the contradiction
31
+ recorded; never re-ask.
32
+ - **EXECUTE** — run each unfinished **implementation phase** in a **fresh cheap-tier context**: on Claude
33
+ Code, spawn one subagent per phase with `model: sonnet` (the override is
34
+ the only mechanism that runs *below* the conductor's turn tier); on an
35
+ agent without subagents, the equivalent is one headless invocation per
36
+ phase driven from outside (see `docs/workflow/ORCHESTRATION.md`), or —
37
+ last resort — executing the phase in THIS turn while noting in the run
38
+ log that it ran at the conductor's tier. Whatever the mechanism, the
39
+ phase executor is instructed to read the **installed `execute-phase`
40
+ SKILL.md first** (at the skills directory
41
+ located in Step 0 and recorded in the decision record — e.g.
42
+ `.claude/skills/execute-phase/SKILL.md` in Claude Code) and follow it for
43
+ exactly one explicit phase: tests-first where it
44
+ applies, gate green, one commit, per-phase docs. Two autopilot overrides
45
+ to its recipe: (a) **never ask** — SPEC ambiguity is resolved from the
46
+ committed decision record with the most conservative reading, and the
47
+ assumption is surfaced in the phase docs so the conductor logs it;
48
+ (b) the **P1 planning commit also carries `ROADMAP.md`** (the feature's
49
+ `in-progress` flip rides it; the **`done` flip rides the PR-stage commit**
50
+ when the PR opens; any flips left at run end ride the report commit).
51
+ Stop before the literal final `Hardening & PR` phase: PR owns that explicit
52
+ phase so close-out has one owner. Never bundle phases into one worker.
53
+ - **REVIEW** — compose `loop-review-fold` in-turn (equal tier) once, over
54
+ the complete PR candidate. It reuses a current exact-SHA receipt or runs
55
+ `review-change` context-clean, batches compatible fixes through
56
+ `fold-findings`, and re-reviews only changed HEADs. Default correction
57
+ budget is two; unchanged evidence stops NO-PROGRESS. L/sensitive features
58
+ forward `--adversarial 2` (security/auth: `3`) as the unattended floor;
59
+ other units use one final reviewer. There are no intermediate phase
60
+ reviews in autopilot: phase gates + frozen acceptance guard execution,
61
+ and the independent final loop judges one complete candidate. Independent
62
+ future work remains proposals; no review/fold stage creates issues.
63
+ - **PR** — run the unit's explicit final `Hardening & PR` phase through one
64
+ fresh cheap-tier `execute-phase` worker. That canonical close-out flips the
65
+ feature to `done` (built, not merged), pushes, creates the PR with `Closes
66
+ #N` where issue-born, prints its URL, links it from the roadmap, commits the
67
+ link, and pushes. Reconcile an already-open matching PR idempotently; never
68
+ create a second one. The stage is incomplete until the row carries its PR
69
+ link and the branch is clean/current.
70
+ - **AUDIT** — compose `audit-pr` in-turn (equal tier); bind the verdict to
71
+ the PR's head SHA in the run log, and **print the PR's full URL next to
72
+ the verdict in the iteration output** (the human merging works from the
73
+ chat, not from a CI monitor). MERGE-READY → default mode logs and
74
+ moves on; `--fullauto` treats `audit-pr` as verdict/comment-only, checks
75
+ the floors, **records the merge intent in the run log first**, then calls
76
+ `.agentic-workflow/hooks/fullauto-merge.sh` with only the PR number and
77
+ run id. The wrapper derives and verifies head, base, decision, and audit
78
+ evidence from the forge. Never invoke `gh pr merge` directly.
79
+ BLOCKED → in-scope blockers go to a
80
+ cheap-tier worker next iteration (max 2 audit cycles, then the feature is
81
+ parked and the loop moves on); the fixer's cycle ends committed AND
82
+ pushed (step 5), so the re-audit judges the real branch.
83
+
84
+ The stage sequence is per-feature and size-dependent — always **one stage
85
+ per iteration**: a feature starting at `idea`/`defined` gets a DESIGN stage
86
+ first; one already `planned` (including the founding-scaffolded feature 01)
87
+ skips straight to PLAN. Every size follows [DESIGN] → PLAN → EXECUTE
88
+ (implementation phases, fresh cheap worker per phase) → PR (explicit
89
+ `Hardening & PR`) → REVIEW (bounded final loop) → AUDIT. Risk changes final
90
+ review strength, not phase cadence.
@@ -0,0 +1,64 @@
1
+ ### Merge policy
2
+
3
+ **Default — the human merges.** The autopilot opens PRs and never merges. It
4
+ continues with the next feature whose dependencies are all merged (new branches
5
+ always cut from the freshly pulled default branch); when everything remaining
6
+ waits on human merges, it stops with `SHIP: BLOCKED` + the unblock map. After
7
+ merging, re-run the same launch command (`/loop /ship-roadmap --continue`, plus
8
+ `--fullauto` on fullauto runs) — recovery records the merges (the rows are already
9
+ `done` from PR-open), unblocks the dependents, and resumes.
10
+
11
+ **`--fullauto` — dual-keyed.** Auto-merge requires a fresh SHA-bound
12
+ `audit-pr:merge-ready` comment and `merge: fullauto` in the decision file at
13
+ the PR's current head — stale or caller-supplied local evidence can never
14
+ enable it. The **first
15
+ feature PR of a greenfield run is always human-merged** (calibration: inspect
16
+ one complete artifact — code, tests, docs, review trail — before delegating).
17
+
18
+ This AUDIT stage is the **sole automated merge authority**. Authorization lasts
19
+ for this invocation and this merge attempt only:
20
+
21
+ 1. `audit-pr` returns a fresh SHA-bound MERGE-READY verdict and never merges.
22
+ 2. Record merge intent in `.ship-run.log` before execution.
23
+ 3. Invoke exactly:
24
+
25
+ ```sh
26
+ .agentic-workflow/hooks/fullauto-merge.sh \
27
+ --pr <number> --run-id <run-id>
28
+ ```
29
+
30
+ The wrapper derives the PR head and forge default base itself. A project
31
+ with no forge-reported checks fails closed.
32
+ 4. The wrapper re-checks the current PR head, forge default base, SHA-bound
33
+ audit comment, decision file fetched from that head, clean/synchronized
34
+ branch, mergeability, and CI evidence. It
35
+ creates a namespaced marker under the git common directory only after those
36
+ checks, installs cleanup with `trap`, and removes the marker on success,
37
+ failure, signal, or already-merged recovery.
38
+ 5. After the forge reports MERGED, the wrapper posts one idempotent comment
39
+ marked `<!-- agentic-workflow:automerge head=<sha> -->`, containing the run,
40
+ audited head, and merge commit. That PR comment is the durable automerge log;
41
+ no repository log grows.
42
+
43
+ Direct `gh pr merge`, `glab mr merge`, `git merge`, and forge-API merge calls
44
+ remain blocked by the command guard at all times. There is no `.automerge` file
45
+ and no persistent exception for a later manual `audit-pr` or shell session.
46
+
47
+ Non-negotiable floors, evaluated fresh immediately before every merge —
48
+ **fail-closed: a floor that cannot be evaluated counts as breached**:
49
+
50
+ 1. **Never merge red** — re-verify CI status via the forge CLI at merge time;
51
+ the audit verdict is evidence, fresh green CI is the precondition. In a
52
+ no-CI project the accepted evidence is a **fresh local verification-gate run
53
+ on the PR's exact head SHA**, recorded in the run log — without one of the
54
+ two, the floor is unevaluable and therefore breached.
55
+ 2. **Verdict freshness** — MERGE-READY must reference the PR's current head
56
+ SHA; any later commit forces a re-audit.
57
+ 3. **Sensitive-area pause** — PRs touching the declared sensitive set are
58
+ never auto-merged; the run continues around them and the report flags them.
59
+ 4. **Destructive-operation pause** — data-deleting or schema-destructive
60
+ diffs pause even when not in the declared set (users forget to declare it).
61
+ 5. **Forge refusal is a signal** — never bypass branch protection, never
62
+ force-push, never merge to anything but the default branch; a refused merge
63
+ parks the PR and is reported.
64
+ 6. **Budget floors still bind** — no cap is exempted by `--fullauto`.
@@ -0,0 +1,26 @@
1
+ ## Close out and log the iteration
2
+
3
+ 5. **CLEAN CLOSE-OUT — verify before logging the stage complete.** A stage
4
+ only counts as advanced when the conductor has RUN and checked, on the
5
+ unit's branch: `git status --porcelain` → empty (no tracked modification
6
+ left behind — **docs included**: progress/testing/known-issues/roadmap
7
+ edits ride the stage's commit, never linger), and — once the unit's PR
8
+ exists — `git status -sb` after `git fetch` → not ahead of the remote
9
+ (every commit pushed; the PR and CI must see what was actually done).
10
+ A subagent that "finished" but left the tree dirty or the branch unpushed
11
+ did NOT finish: the conductor commits/pushes the remainder itself (same
12
+ stage, same iteration) or marks the stage partial. This check is
13
+ unconditional for EXECUTE, REVIEW fix cycles, PR, and AUDIT fix cycles.
14
+ 6. **LOG** one line to `.ship-run.log`; print `→ Next: <unit> (CONTINUE)` (the
15
+ canonical next-step shape; `CONTINUE` stays the loop's keep-going signal).
16
+ **Say WHY the turn is ending** — one explicit
17
+ line before the `→ Next:` block, always one of: "iteration complete — one
18
+ stage advanced (normal; re-invoke to continue)", "parked <unit>: <exact cap
19
+ hit — red-gate retries / review ping-pong / audit ping-pong / 3 partials /
20
+ planning contradiction>", or the terminal banner's reason. A turn ending
21
+ silently reads as a crash on agents without `/loop` — never leave the stop
22
+ unexplained.
23
+
24
+ **Capacity guard:** an iteration that cannot finish its stage in one turn
25
+ (e.g. an oversized review) writes a partial-stage marker and ends cleanly;
26
+ three consecutive partials on the same stage parks the feature as blocked.
@@ -0,0 +1,101 @@
1
+ ## Process
2
+
3
+ ### Mode A — Found & launch (interactive): `/ship-roadmap [--fullauto]`
4
+
5
+ **1. The interview — all questions up front, then silence.** Small batched
6
+ rounds; recommended defaults on every question; skip what discovery already
7
+ answered. After Round 6 locks, **no further questions for the entire run** —
8
+ every later decision is made silently and logged with a one-line rationale.
9
+
10
+ | Round | Covers |
11
+ |---|---|
12
+ | 1 — Product | What it is, for whom; scale ceiling (solo / team / thousands of customers); lifespan & ambition (throwaway, internal, long-lived production). Calibrates every ceremony decision downstream. |
13
+ | 2 — Features | The feature list (or "elicit" → draft one from the goal); must-have vs can-wait; ordering constraints; explicit out-of-scope. |
14
+ | 3 — Stack & architecture | Stack decided? else recommend from features/constraints. Architecture chosen? else recommend the **lightest structure proportional to Round 1** — a solo tool gets a flat modular layout, a thousands-of-customers system gets enforced boundaries; never default to DDD, hexagonal, or any named pattern. Platform/runtime constraints, library vetoes. |
15
+ | 4 — Quality & ops | Test depth (smoke / workflow default / strict); whether a11y, SEO, i18n, perf budgets apply (proposed from platform type); deploy target + scaffold CI?; secrets posture; **confirm the proposed verification gate commands** — they become the gate every phase must pass. |
16
+ | 5 — Workflow & autonomy | Docs language (default English); forge + CLI (**verify with a real authenticated call now**, e.g. `gh auth status` — not mid-loop); **git workflow** (default `branches`: one active unit, sequential, no worktrees — `worktrees` only if the user declares it and their tooling manages them; recorded in the Workflow conventions and honored by every stage); merge policy (default human-merge vs `--fullauto`); the sensitive-area list (defaults: auth, payments, destructive migrations/data deletion, secrets, CI config — **seeded with every integration named in rounds 2–4**, e.g. the payment processor or auth provider the user mentioned); budget caps (default: max iterations = 4× roadmap feature count; 2 retries per red gate; 2 review-fix and 2 audit-fix cycles; optional "pause after N shipped features" checkpoint and milestone stop lines); model-routing confirmation; recommend enabling `ultracode` for the loop. |
17
+ | 6 — Confirm & launch | The drafted roadmap (numbers, order, deps, sizes) and the full decision record, presented for **one last edit**. Then: founding artifacts written, exact `/loop` command printed. |
18
+
19
+ **2. Founding (only what's missing).** Compose `init-workspace`'s process
20
+ in-turn (both opus/high — within the ≥ rule), **pre-fed with the interview
21
+ answers** so it asks nothing. Branch discipline:
22
+
23
+ - **Empty repo:** the scaffold (CLAUDE.md, docs/, .github/, completed
24
+ ROADMAP.md, decision record) is the repo's **initial commit on the default
25
+ branch** — there is no history to protect and no base for a PR yet.
26
+ - **Existing repo:** founding goes on a `docs/ship-founding` branch as a PR.
27
+ Default mode: **stop after the interview** — print the PR and require it
28
+ merged before the loop starts (building features against an unmerged
29
+ substrate would stack PRs). `--fullauto`: gate the founding PR with
30
+ `audit-pr` like every other PR, then merge it.
31
+
32
+ **3. The roadmap — founding IS batch design.** The interview's rounds 2–4
33
+ (features, quality/ops, workflow) already collected every product-definition
34
+ answer a `design-feature` capability closure would ask — founding is design
35
+ for every feature it names, not a shortcut around it. Adopt existing entries
36
+ (never renumber), fill gaps the interview surfaced, append elicited features.
37
+ If absent, write the complete table: NN in dependency-respecting order, slug,
38
+ **status `idea`** (the locked founding decisions are the design record, but
39
+ no per-feature `SPEC.md`/capability-closure artifact exists yet — that gets
40
+ written JIT per feature, see ADVANCE → DESIGN below), depends-on, one-line
41
+ summary with a **provisional XS/S/M/L size in the summary text** (the
42
+ template's five-state legend and column schema stay exactly as they are —
43
+ `plan-feature`/`plan-feature-scaffold` re-size authoritatively at planning
44
+ time; a size change is logged silently). Greenfield: **feature 01 is always
45
+ the project skeleton** (stack init, gate wiring, CI if requested), sized S —
46
+ founding scaffolds it immediately (composing `design-feature` +
47
+ `plan-feature-scaffold` in-turn, pre-fed from the interview, no questions) so
48
+ it lands directly at **status `planned`**, never left at `idea` — and **every
49
+ other feature's depends-on closure must include 01** (directly or
50
+ transitively), so SELECT can never start a feature on a default branch that
51
+ lacks the skeleton.
52
+
53
+ **4. The run state — two artifacts, deliberately split:**
54
+
55
+ - `docs/features/SHIP_DECISIONS.md` — **committed** (rides the founding
56
+ commit/PR): run mode, safety floors, sensitive-area list, budget caps, stop
57
+ lines, model routing, docs language, and a digest of every locked interview
58
+ answer. It is the durable, auditable policy: a crash, another machine, or a
59
+ fresh clone recovers the full run policy without re-interviewing.
60
+ - `docs/features/.ship-run.log` — **untracked** (founding appends it to
61
+ `.gitignore`): the append-only iteration log — one line per iteration
62
+ (`date | NN-slug | stage | outcome | evidence: SHA / PR# / verdict`), silent
63
+ decisions with rationale, partial-stage markers, verdict↔SHA bindings.
64
+ Machine-local mechanics; committing it would conflict across every open PR.
65
+
66
+ **5. Print the launch contract** — detect which driver this environment has
67
+ and print the matching command. **Three equivalent drivers** (the loop is the
68
+ contract; who re-invokes it is an implementation detail):
69
+
70
+ | Driver | When | Launch |
71
+ |---|---|---|
72
+ | **`/loop`** (Claude Code) | The agent has a self-re-invoking loop primitive | `/loop /ship-roadmap --continue` |
73
+ | **External orchestrator** | Any agent invocable headless (a shell loop, CI, your own program) | loop: invoke `/ship-roadmap --continue`, parse its native `SHIP:`/`→ Next:` contract, and re-invoke while the turn is non-terminal — see `docs/workflow/ORCHESTRATION.md` |
74
+ | **Manual** | Neither of the above | re-run `/ship-roadmap --continue` yourself after each iteration; each ends with the exact next command |
75
+
76
+ Default launch contract text (adapt the first line to the detected driver):
77
+
78
+ ```
79
+ Founded. Start the autopilot with:
80
+
81
+ /loop /ship-roadmap --continue (Claude Code)
82
+ — or loop `/ship-roadmap --continue` from your orchestrator/by hand;
83
+ parse the native `SHIP:` banner and `→ Next:` block, then re-invoke
84
+ while the turn is non-terminal (see docs/workflow/ORCHESTRATION.md)
85
+
86
+ Stop when an iteration's first line is SHIP: COMPLETE, SHIP: BLOCKED, or
87
+ SHIP: STOPPED (envelope state OK, BLOCKED, or FAILED). Iterations are
88
+ idempotent and resume cleanly; stopping at any time is safe.
89
+ ```
90
+
91
+ For a fullauto run the command is `/ship-roadmap --continue --fullauto` (under
92
+ whichever driver) — the flag must ride every iteration, because auto-merge is
93
+ dual-keyed: the flag on the running command **and** `merge: fullauto` in the
94
+ committed decision record (see Merge policy). One key without the other runs
95
+ in default mode.
96
+
97
+ Each firing is a fresh `/ship-roadmap --continue` turn (on Claude Code's
98
+ `#claude` branch, at this skill's pinned tier; elsewhere, at whatever tier the
99
+ driver chose — judgment iterations deserve your strongest model). Iterations
100
+ after a terminal banner are cheap no-ops that re-print the same banner — so a
101
+ missed stop costs tokens, never correctness.