@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,130 @@
1
+ ---
2
+ name: planning-preflight
3
+ user-invocable: false
4
+ version: 1.1.1
5
+ author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ license: MIT
7
+ description: >
8
+ Internal planning gate: consumes the normalized repository state and makes
9
+ the ONE final architectural classification, using a two-stage contract that
10
+ allows a lightweight NRS read during planning and a full architectural
11
+ classification after the plan is cut. Used by plan-feature,
12
+ plan-feature-from-issue, plan-feature-scaffold, and plan-fix. Not a menu entry.
13
+ ---
14
+
15
+ # Planning Preflight (internal)
16
+
17
+ The single owner of the planning-side repository gates. `plan-feature` and
18
+ `plan-fix` consume this one contract instead of each internal repeating its own
19
+ normalized-state read and architectural classification.
20
+
21
+ This skill uses a **two-stage contract** to resolve the tension between:
22
+ (1) the need for planners to read the NRS early (architecture discovery is
23
+ read-only and required to inform the plan), and
24
+ (2) the requirement that the final architectural classification only happens
25
+ after the complete engineering plan exists.
26
+
27
+ ## When to use
28
+
29
+ Any planner route that can write planning artifacts:
30
+
31
+ - `plan-feature` — every route that will scaffold (scoped, issue, `--next`).
32
+ - `plan-fix` — every fix-SPEC draft.
33
+
34
+ Composed internals (`plan-feature-from-issue`, `plan-feature-scaffold`)
35
+ consume the same result via the in-turn planning context the router creates;
36
+ they never re-run discovery or classification.
37
+
38
+ ## Two-Stage Contract
39
+
40
+ ### Stage 1 — NRS read during planning (lightweight)
41
+
42
+ While the plan is still being built, routers may perform a read-only consumption
43
+ of the normalized repository state (NRS) for architectural context. At this
44
+ stage only the NRS port is classified; the architectural classification is
45
+ deferred.
46
+
47
+ Record the Stage 1 result using the following format:
48
+
49
+ ```text
50
+ Preflight: Stage 1 — NRS <consumed|n/a> · arch: deferred
51
+ ```
52
+
53
+ This result informs the plan but does not block emission.
54
+
55
+ ### Stage 2 — Full classification after plan cut (final)
56
+
57
+ Once the complete engineering plan exists (the SPEC is filled and the phases
58
+ are cut), run the FULL architectural classification exactly once per plan —
59
+ never per-composed-internal.
60
+
61
+ Discover the optional project invariant document declared in the documentation
62
+ map (normally `docs/architecture/ARCHITECTURAL_INVARIANTS.md`). If absent,
63
+ record `n/a: no project invariants declared` and pass. For every applicable
64
+ rule, cite its ID and repository evidence and classify the planned change as
65
+ `preserves`, `violates`, `introduces`, or `changes`. Only `preserves` may
66
+ reach emission. A violation, new rule, or changed rule stops for an explicit
67
+ architectural decision through the project's declared authority; never convert
68
+ it into an engineering task or infer approval from the SPEC. Use frozen NRS
69
+ facts when available, but repository inspection remains authoritative.
70
+
71
+ Record the Stage 2 result using the following format:
72
+
73
+ ```text
74
+ Preflight: NRS <consumed|n/a> · invariant classification: <preserves|violates|introduces|changes> (n/a when no invariants declared)
75
+ ```
76
+
77
+ ### When to run Stage 2
78
+
79
+ Run Stage 2 immediately after the engineering plan is complete and before the
80
+ router emits artifacts. This is the gate that decides whether the plan can be
81
+ emitted or must stop for an architectural decision.
82
+
83
+ Stage 2 must also run whenever a previously-passed plan is re-validated after
84
+ the engineering plan changes (e.g., a new phase was added or the SPEC was
85
+ expanded). In that case, re-run only the invariant rules that may have been
86
+ affected by the change.
87
+
88
+ ## Step 0 — Consume the normalized repository state
89
+
90
+ When `docs/workflow/REPOSITORY_STATE.md` exists, plan from its frozen facts and
91
+ decisions. An absent fact may be inspected; a conflict is a resolver
92
+ contradiction, never a rewrite. Planned work and documentation are not
93
+ implementation evidence. A present ledger whose status is `draft`,
94
+ `contradicted`, or `resolved` stops planning and routes to discovery or
95
+ resolution first. If no ledger exists, inspect the repository directly and
96
+ record `n/a: no normalized repository state`; NRS is optional.
97
+
98
+ ## Result — fixed classification record
99
+
100
+ Return exactly one line back to the router:
101
+
102
+ - **Stage 1** (while planning):
103
+
104
+ ```text
105
+ Preflight: Stage 1 — NRS <consumed|n/a> · arch: deferred
106
+ ```
107
+
108
+ - **Stage 2** (after plan is cut, final gate):
109
+
110
+ ```text
111
+ Preflight: NRS <consumed|n/a> · invariant classification: <preserves|violates|introduces|changes> (n/a when no invariants declared)
112
+ ```
113
+
114
+ `preserves` (or `n/a: no project invariants declared`) → the router proceeds to
115
+ emit the artifacts and register the roadmap/fix entry. Any other classification
116
+ → STOP with the fixed ARCHITECTURAL INVARIANT GATE BLOCKED block:
117
+
118
+ ```text
119
+ → Next: resolve the architectural decision first — <rule-id>: <classification> (<evidence>).
120
+ Run /design-feature or the project's declared decision authority; do not convert this into a phase task.
121
+ ```
122
+
123
+ ## Guardrails
124
+
125
+ - One classification per plan, taken after the engineering plan exists — never
126
+ in each composed internal.
127
+ - Never let the SPEC, a passing test, or a roadmap row infer the decision.
128
+ - Docs only — no code, no branch, no forge writes.
129
+ - Two-stage contract: Stage 1 is lightweight NRS read; Stage 2 is the final
130
+ architectural gate. Stage 2 supersedes Stage 1 for emission decisions.
@@ -0,0 +1,225 @@
1
+ ---
2
+ name: product-audit
3
+ user-invocable: true
4
+ disable-model-invocation: true
5
+ version: 3.1.0
6
+ metadata:
7
+ opencode/autoinvoke: false
8
+ argument-hint: <path-or-area> (optional — defaults to the whole product)
9
+ author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
10
+ license: MIT
11
+ description: >
12
+ Audit the whole product across code, quality, process, docs, roadmap, and
13
+ tooling. Persist one severity-ranked, F-numbered report with proposals; never
14
+ fix or file work. Triggers: "product-audit", "audit the product", "full health
15
+ check", "are we product-ready", "CTO review".
16
+ ---
17
+
18
+ # Product Audit
19
+
20
+ Product-wide health check. It only writes
21
+ `docs/audits/<n>-<YYYY-MM-DD>.md`; every proposed action remains a user decision.
22
+
23
+ ## Turn contract — verify before ending the turn
24
+
25
+ ```
26
+ ✓ The full PRODUCT AUDIT report was printed in the fixed output format (health by dimension, F-numbered ranked findings, four proposal streams — the roadmap streams always present, `none — <why>` when empty)
27
+ ✓ The report was WRITTEN to `docs/audits/<n>-<YYYY-MM-DD>.md` (incremental audit id) and committed — the file is the durable deliverable, the chat print is a copy
28
+ ✓ Nothing else was fixed, filed, or changed — the report file is the ONLY mutation
29
+ ✓ The closing `→ Next:` block is printed as the ABSOLUTE last output
30
+ ```
31
+
32
+ About to end the turn with any box unchecked? The turn is NOT done — complete
33
+ the missing box first (weak models drop end-of-document duties; this list is
34
+ first on purpose).
35
+
36
+ ## When to use
37
+
38
+ - Periodically (every few features) or at a product-ready milestone.
39
+ - When you want the broad, honest picture — quality, security, debt, docs, and
40
+ roadmap — not the review of a single change (`review-change`) or PR (`audit-pr`).
41
+
42
+ Unlike diff, PR, or docs-only reviews, this skill covers the whole product.
43
+
44
+ ## Scope
45
+
46
+ The entire codebase and its process artifacts: source, tests, the docs tree, the
47
+ roadmap, the fix index, open issues, and every feature folder's planning docs.
48
+ Accept an optional path/area to focus a partial audit; state the scope and, if you
49
+ sample rather than exhaust a dimension, **say what you sampled** — never imply full
50
+ coverage you didn't do.
51
+
52
+ > **Tip (provisional).** The *user* can turn on `ultracode` (a research-preview
53
+ > Claude Code session setting — no skill can declare it) so this sweep fans out
54
+ > across parallel subagents instead of one context window; without it, sweep the
55
+ > dimensions sequentially — only wall-clock changes, never coverage.
56
+
57
+ ## Step 0 — Discover the project (always first)
58
+
59
+ Per the agent guide's **Workflow conventions** + **documentation map**, then read
60
+ what THIS skill needs: the roadmap, the fix index, the feature folder layout, and
61
+ the verification gate. From the map decide the product's nature (web / mobile /
62
+ console / library / backend / infra). Defer deciding which dimensions apply until
63
+ `AUDIT_DIMENSIONS.md` has been loaded; that resource is the authoritative
64
+ applicability matrix. Note any optional platform review skills the project
65
+ installed (extras, never requirements — the internal pack covers every axis).
66
+
67
+ ## Progressive loading — audit route
68
+
69
+ The reference allowlist is exactly the two paths below. Load both after Step 0,
70
+ in order; they are normative and one hop from this entrypoint.
71
+
72
+ 1. Read [audit dimensions](references/AUDIT_DIMENSIONS.md), mark every dimension
73
+ applicable or `n-a: <reason>`, and state any sampling.
74
+ 2. Read [audit process](references/AUDIT_PROCESS.md), execute all ten steps, then
75
+ return the fixed report below.
76
+
77
+ A missing resource stops the audit; never reconstruct it from memory. Optional
78
+ platform review skills remain extras, never replacements for the internal pack.
79
+
80
+ ## Output format
81
+
82
+ This exact structure is BOTH the persisted file (`docs/audits/<id>-<YYYY-MM-DD>.md`)
83
+ and the chat print — identical content, no free-form variations between runs.
84
+ Every section below appears in every audit; a section with nothing to report
85
+ states `none — <why>` instead of being omitted (the roadmap streams especially:
86
+ "always build the roadmap picture", never silently skip it).
87
+
88
+ ```
89
+ # PRODUCT AUDIT <id> — <product> — <YYYY-MM-DD>
90
+ Scope: <whole product | area>
91
+ Coverage: <dimensions run | sampled vs. exhaustive>
92
+ Verdict: <one-line honest health verdict>
93
+
94
+ ## Health by dimension
95
+ <dimension> .......... ✓ healthy | ⚠ concerns | ✗ at risk | n-a (why)
96
+ ...
97
+ Installed tooling ....... ✓ | ⚠ | ✗ | n-a
98
+
99
+ ## Findings (severity-ranked, one F-sequence for the whole audit)
100
+ F1 [SEV] <dimension> — <finding> — evidence: <file:line | metric | doc> — class: <fix-now|postpone|tradeoff>
101
+ F2 [SEV] ...
102
+ [example — scope-export recurrence] F<k> [med] Workflow discipline — <N>
103
+ consecutive units exported scope via `## Amendments`/descope issues —
104
+ features are being cut too big for real capacity — evidence: <unit list +
105
+ amendments/issues> — class: postpone — route: #64 (atomicity/split rules)
106
+
107
+ ## Delta vs audit <prior-id>
108
+ New: F<k>
109
+ Unchanged: F<k> <- audit <prior-id> F<j>
110
+ Resolved: <prior-id> F<j>
111
+ (none — <why no equivalent-scope prior exists>)
112
+
113
+ ## Proposals — the user decides which to act on
114
+
115
+ ### Issues to open
116
+ - <title> [sev] — from: F<k>[, F<j>] — <why> — route: /triage-issue <id> F<k> — evidence: <…>
117
+ (none — <why>)
118
+
119
+ ### Roadmap — add
120
+ - <feature> — from: F<k> — <rationale & opportunity> — route: plan-feature
121
+ (none — <why>)
122
+
123
+ ### Roadmap — remove / revise
124
+ - <feature> — from: F<k> — <why it no longer fits> — route: triage-issue / roadmap edit
125
+ (none — <why>)
126
+
127
+ ### Tooling — register / re-design
128
+ - <skill|MCP> — register in CLAUDE.md (Optional review extras): <why> — route: user edits CLAUDE.md
129
+ - <skill|MCP> — would change <feature> scope: <why> — route: /design-feature <slug>
130
+ (none — <why>)
131
+
132
+ ## Manual-verification checklist (what automation can't confirm)
133
+ - <item> …
134
+
135
+ Finding set: F<k> + F<j> + F<m> (print every proposed finding; one finding → F<k>)
136
+ → Next: /triage-issue <id> F<k> F<j> F<m> — classify the complete finding set in one batch (opens the ones that warrant it)
137
+ · accepted bug/debt → /plan-fix · accepted capability → /plan-feature
138
+ · nothing to act on → the persisted report is the record; move on
139
+ ```
140
+
141
+ Replace every finding placeholder with the complete actual set before printing;
142
+ never print `…` or only the first finding in a live hand-off.
143
+
144
+ `<id>` is the audit's incremental number (Process step 9). A finding is
145
+ addressable forever as `<audit-id> F<k>` — e.g. `triage-issue 3 F2` reads
146
+ `docs/audits/3-*.md`, locates F2, and opens/classifies the issue if warranted.
147
+ Suggest that routing; **never run triage or open issues here**.
148
+
149
+ Lead with the honest one-line health verdict (e.g. "shippable with 2 high-sev
150
+ security items to track first").
151
+
152
+ ## Guardrails
153
+
154
+ - **Never auto-fixes, never opens issues, never edits the roadmap.** Output is a
155
+ report + proposals; **every action is the user's decision.** The one file this
156
+ skill writes is its own report under `docs/audits/` (plus `mkdir -p
157
+ docs/audits`) — nothing else in the repo is touched.
158
+ - **Finding ids are `F1, F2, …` only** — one sequence per audit, severity-ranked
159
+ order, never a different letter per problem type. Once persisted, ids are
160
+ frozen: a later audit gets a new audit id, never renumbers an old file; cross-audit
161
+ lineage lives only in Delta mappings as `<audit-id> F<k>`, never global slugs or
162
+ replaced ids. When the user accepts, route: `triage-issue` files/classifies,
163
+ `plan-feature` adds roadmap work, `plan-fix` scopes a concrete fix.
164
+ - **Never registers tooling or edits `CLAUDE.md`.** The tooling sweep proposes a
165
+ skill/MCP to register, but the user (or a routed `design-feature` run)
166
+ performs the edit; a scope-affecting discovery routes to
167
+ `/design-feature <slug>`, which the user approves.
168
+ - Platform-adaptive: run only applicable axes; always list what you skipped and why.
169
+ - **No silent caps.** If you sampled, prioritized, or time-boxed a dimension, say
170
+ so — never present partial coverage as exhaustive.
171
+ - Severity-ranked and deduped: cluster the same issue found via multiple axes or
172
+ multiple feature docs into one proposal.
173
+ - Honor the project's **Workflow conventions** (docs-language, evidence): every
174
+ finding/proposal cites a `file:line`/metric/doc/issue source; mark uncertainties *verify*.
175
+ - **Evidence also passes the fixed evidence-provenance gate** in
176
+ `references/AUDIT_PROCESS.md`; uncertainties stay marked *verify*.
177
+
178
+ ## Portability (agents other than Claude Code)
179
+
180
+ The workflow is the contract; Claude Code features are conveniences. On an
181
+ agent that lacks one, apply the fallback — never skip the step the feature
182
+ enables:
183
+
184
+ - **No slash-command menu** — where this skill says `/<skill>`, open that
185
+ skill's `SKILL.md` (wherever your agent installed the skills) and follow it
186
+ literally, in a fresh conversation: hand-offs assume a clean context.
187
+ - **No per-skill `model:`/`effort:`** — this is the widest, highest-stakes
188
+ sweep in the workflow: run it on your **strongest** model at its deepest
189
+ setting, as its own dedicated run — never squeezed into another task's
190
+ context.
191
+ - **No `ultracode`/subagents** — sweep the dimensions sequentially (see the
192
+ tip above); state coverage honestly either way.
193
+
194
+ ## Relationship to other skills
195
+
196
+ ```
197
+ product-audit (whole product, all axes, periodic)
198
+ ├─ composes review-change axes (codebase-wide) + audit-docs (doc coherence)
199
+ ├─ mines feature docs (decisions / known-issues / architecture-notes)
200
+ ├─ sweeps installed skills / connected MCP servers (product-wide, periodic)
201
+ └─ proposes ─┬─ Issues to open ........ ▶ triage-issue / plan-fix
202
+ ├─ Roadmap: add .......... ▶ plan-feature
203
+ ├─ Roadmap: remove/revise ▶ triage-issue / roadmap edit (user decides)
204
+ └─ Tooling: register/re-design ▶ user edits CLAUDE.md / design-feature
205
+ ```
206
+
207
+ - Broader than `review-change` (one change) and `audit-pr` (one PR); subsumes
208
+ `audit-docs`'s coherence check as one of its dimensions.
209
+ - Hands nothing off automatically — it recommends, and the planning/fix/triage
210
+ skills execute only when the user chooses to.
211
+
212
+ ## Done when
213
+
214
+ - Every applicable dimension has a health verdict backed by cited evidence, and the
215
+ skipped or sampled ones are stated.
216
+ - A severity-ranked, **F-numbered** findings list plus four proposal streams
217
+ (issues to open, roadmap add, roadmap remove/revise, tooling
218
+ register/re-design) exist — every stream present (`none — <why>` when empty),
219
+ deduped, each proposal routed and citing its source findings.
220
+ - The report is **persisted and committed** as `docs/audits/<id>-<YYYY-MM-DD>.md`
221
+ with the next incremental audit id, and printed in chat.
222
+ - Nothing else was fixed, filed, or changed — the user decides what to act on.
223
+ - The **closing `→ Next:` block is printed** — typically a batch
224
+ `/triage-issue <id> F<k> …` for the proposed issues, then `/plan-feature` /
225
+ `/plan-fix` for the accepted work.
@@ -0,0 +1,24 @@
1
+ ## Audit dimensions (platform-adaptive — run only what applies)
2
+
3
+ | Dimension | What it sweeps product-wide | Applies to |
4
+ |---|---|---|
5
+ | **Correctness & architecture** | Bugs, layer/boundary violations, dead code, overengineering, drift from the architecture doc | all |
6
+ | **Security & cybersecurity** | Secrets in repo, authz gaps, input validation, dependency / supply-chain risk | all |
7
+ | **Performance** | Hotspots, complexity, N+1s, bundle/asset weight (web), resource leaks | all |
8
+ | **Tests** | Coverage of critical paths, missing/!flaky tests, untested failure modes | all |
9
+ | **UX / UI** | Design-system adherence, broken states, inconsistency | web / mobile / TUI |
10
+ | **Accessibility** | a11y conformance for user-facing surfaces | web / mobile |
11
+ | **SEO** | Indexability, metadata, structured data | web |
12
+ | **Brand / voice** | User-facing copy vs. the brand guide | surfaces with copy |
13
+ | **Tech debt** | Accumulated shortcuts, TODO/FIXME, stale abstractions | all |
14
+ | **Process & docs** | Incomplete phases, aging open issues, **solvable known-issues**, doc completeness, missing/optimizable workflow docs, capability-inventory freshness (`docs/CAPABILITIES.md` ↔ code drift) | all |
15
+ | **Workflow discipline** | The workflow's own rules held: branch/PR discipline, `done · #<pr>` links, phase naming (`P1…`), per-phase docs, commit format, dependency closures, artifact language — **run `audit-docs` checks 1–13 mechanically** (compose it); never assume a rule held because it "should". **Scope-export recurrence:** across the most recent units (merged or in-flight), each with a non-empty `## Amendments` descope log or a descope-classified born issue (`audit-pr`'s scope-bleed gate) counts as one scope-exporting unit — **≥ 2 consecutive** such units is a planning-quality finding ("features cut too big for real capacity"), routed to the atomicity/split rules (**#64**), not re-litigated as a per-unit defect | all |
16
+ | **Roadmap coherence** | Stale/obsolete/superseded features, missing dependencies, gaps & opportunities | all |
17
+ | **Installed tooling** | Installed skills + connected MCP servers vs. the project's applicable axes and roadmap features — unregistered-but-useful items, and tooling that would change a feature's scope | all |
18
+
19
+ Skip inapplicable axes (no a11y/SEO/brand for a CLI/library/infra product) and
20
+ **say which you skipped and why**. Every axis is covered by the workflow's own
21
+ internal review pack (`review-code`, `review-security`, `review-verify`,
22
+ `review-debt`, `review-design`, `review-a11y`, `review-brand`, `review-perf`,
23
+ `review-seo`) — installed with the workflow, so an applicable axis can never be
24
+ "missing". Platform skills the project installed run as optional extras on top.
@@ -0,0 +1,85 @@
1
+ ## Process
2
+
3
+ 1. **Map & decide axes** — Step 0; mark each dimension applicable / n-a.
4
+ 2. **Sweep code & axes** — run the applicable axes across the codebase: compose
5
+ `review-implementation` plus the internal review pack's applicable passes
6
+ (each returns its fixed-format table + PASS|FAIL), and any optional installed
7
+ extras. Classify findings (severity + fix-now / postpone / tradeoff).
8
+
9
+ **Evidence-provenance gate (fixed):** applies during every evidence-collecting sweep
10
+ step (2–5). Each item ends with exactly one fallback; never pick another one mid-audit.
11
+
12
+ - Forge state — read live status from the project-declared forge CLI/API: it is
13
+ authoritative for live issue and pull-request status. Fix-index, worklist and roadmap rows
14
+ are audited for documentation drift, never treated as the live ledger.
15
+ Fallback: `mark unverified`.
16
+ - Command-derived metrics — bind the exact command plus its working directory or target and the
17
+ supporting output line or structured field; an aggregate terminal summary may never be attributed
18
+ to a narrower scope without a scope-bound rerun. Fallback: `rerun in scope`.
19
+ - Repository inventories — ordered or inventory claims ("decisions through N", "the newest row is
20
+ X") are recomputed from the current tree with project-compatible tools, citing the terminal
21
+ path/item found. No hardcoded product names, package managers, runtimes, forge hosts, or
22
+ non-portable shell recipes inside this portable contract. Fallback: `rerun in scope`.
23
+ - Freshness/timestamps — record when each source was captured and by what method; a stale capture
24
+ older than the current tree is recomputed before use. Fallback: `mark unverified`.
25
+ - Conflicting sources — resolve by declared authority order (live forge > scope-bound command
26
+ output > repository inventory > worklist index) and record the winner next to the claim.
27
+ Fallback: `mark unverified`.
28
+
29
+ 3. **Audit process & docs** — incomplete phases (`progress.md`/`TASKS.md`), aging
30
+ open issues, **solvable known-issues** (trigger now met), doc-map completeness
31
+ (compose `audit-docs`), missing/optimizable workflow docs, and **capability
32
+ inventory freshness**: cross-check `docs/CAPABILITIES.md` against the code —
33
+ roles, permissions, or cross-cutting subsystems present in the code but
34
+ missing from the inventory (or vice versa) are a Process & docs finding
35
+ (`design-feature`'s Integration closure is only as good as this file). If
36
+ the project has no inventory file, propose seeding it from the template —
37
+ a finding, never an auto-fix.
38
+ 4. **Mine accumulated suggestions** — read every feature folder's `decisions.md`,
39
+ `known-issues.md`, and `architecture-notes.md`; extract deferred items, open
40
+ questions, and recorded debt. Cluster duplicates across features.
41
+ 5. **Sweep installed tooling** — (a) inventory the installed skills and
42
+ connected MCP servers available to the agent; (b) cross-reference each
43
+ against the applicable review axes and the roadmap features; (c) classify
44
+ each as **register** (useful, not yet named in the project's `CLAUDE.md`),
45
+ **re-design** (would change a feature's definition/scope), or
46
+ **not-relevant**; (d) dedupe against what `CLAUDE.md` already registers —
47
+ only unregistered/relevant items survive into proposals. If the agent
48
+ cannot enumerate its installed skills / connected MCPs, say so plainly
49
+ (no silent caps) rather than inventing an inventory.
50
+ 6. **Synthesize proposals** — turn findings + mined items into four concrete,
51
+ deduped, severity-ranked streams:
52
+ - **Issues to open** — bugs, debt, security/perf items worth tracking.
53
+ - **Roadmap: add** — features/capabilities the evidence now justifies.
54
+ - **Roadmap: remove or revise** — features that are obsolete, superseded, or no
55
+ longer make sense.
56
+ - **Tooling: register or re-design** — unregistered-but-useful tooling to add
57
+ to `CLAUDE.md`, or a discovered skill/MCP that would rescope a feature.
58
+ 7. **Number the findings.** Assign every finding in the severity-ranked list a
59
+ sequential id `F1, F2, …` — **one single `F` sequence for the whole audit**,
60
+ in ranked order, regardless of dimension. Never use a different letter per
61
+ dimension or per severity; `F` is the only prefix. Proposals reference the
62
+ finding ids they derive from (`from: F3, F7`).
63
+ 8. **Delta vs prior audit of equivalent scope** — only after the findings are
64
+ synthesized and numbered on your own (step 7), load the newest previous audit
65
+ in `docs/audits/` with an equivalent scope (whole product, or the same
66
+ declared area) and fill the `## Delta vs audit <prior-id>` section: **New** =
67
+ an `F<k>` here with no counterpart there; **Unchanged** =
68
+ `F<k> <- audit <prior-id> F<j>`; **Resolved** = a prior finding no longer
69
+ present. Two audits have equivalent scope when they cover the same product or
70
+ the same area. No equivalent-scope prior exists → the section body is
71
+ `none — <why no equivalent-scope prior exists>`. Re-auditing the same scope on
72
+ the same date is allowed when it states a reason plus this delta — a rerun is
73
+ not forbidden by date alone.
74
+ 9. **Persist the report** (the only mutation this skill makes):
75
+ - Compute the audit id: `mkdir -p docs/audits`, then next id =
76
+ highest `<n>` among existing `docs/audits/<n>-*.md` files + 1 (first audit
77
+ → `1`). Plain incremental integer, no zero-padding.
78
+ - Write the full report (the exact fixed format below, delta section included)
79
+ to `docs/audits/<id>-<YYYY-MM-DD>.md` (today's date).
80
+ - Commit it on the current branch with
81
+ `docs(audits): product audit <id> <YYYY-MM-DD>` (and push if the project's
82
+ conventions push on commit). If the working tree carries unrelated
83
+ uncommitted changes, stage **only** the report file.
84
+ 10. **Report** — print the same report in chat. Recommend; do not act: filing
85
+ the proposed issues is `triage-issue`'s job (suggest it, never run it).
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: resolve-repository-state
3
+ user-invocable: true
4
+ version: 1.2.0
5
+ argument-hint: <contradiction-id>
6
+ description: >
7
+ Resolve an explicit Normalized Repository State contradiction. This is the
8
+ sole writer allowed to update frozen repository facts or accepted decisions.
9
+ Triggers: "resolve repository state", "resolve contradiction", "update a
10
+ frozen repository fact".
11
+ ---
12
+
13
+ # Resolve Repository State
14
+
15
+ Resolve evidence conflicts explicitly and publish the next frozen snapshot.
16
+
17
+ ## Turn contract
18
+
19
+ ```
20
+ ✓ A named contradiction and both evidence sources were read
21
+ ✓ The disposition is accepted, rejected, or needs-input
22
+ ✓ Accepted/rejected results publish a frozen snapshot; needs-input stops without freezing
23
+ ✓ No unrelated fact or decision changed
24
+ ✓ The closing → Next: block is printed last
25
+ ```
26
+
27
+ ## Step 0 — Discover the project (always first)
28
+
29
+ Read the agent guide, documentation map, frozen ledger, and the requested
30
+ contradiction before deciding anything.
31
+
32
+ ## Process
33
+
34
+ 1. Read the frozen ledger and the contradiction row named by the user.
35
+ 2. Verify both the frozen fact's evidence and the proposed new evidence.
36
+ 3. Choose one result: accept new evidence, reject it, or request human input.
37
+ 4. If human input is required, update the contradiction row with the exact
38
+ missing evidence or decision, keep snapshot status `contradicted`, and stop
39
+ without incrementing the snapshot identifier or publishing a frozen snapshot.
40
+ 5. For an accepted result, supersede the fact or decision with a new row that
41
+ cites both evidence sources. For a rejected result, retain the fact and
42
+ record why.
43
+ 6. For accepted or rejected results only, update the contradiction row,
44
+ increment the snapshot identifier, set status to `frozen`, and record the
45
+ next frozen snapshot's source revision.
46
+
47
+ ## Guardrails
48
+
49
+ - This skill is the sole writer for updates to frozen facts and accepted decisions.
50
+ - A consumer may propose a contradiction but never resolve it inline.
51
+ - Inference and documentation alone are insufficient to update a fact.
52
+
53
+ ## Portability
54
+
55
+ Without a slash menu, open this file and follow its process in a fresh turn.
56
+
57
+ ## Relationship to other skills
58
+
59
+ Consumes contradictions from every workflow role and produces the snapshot that
60
+ discovery, planning, execution, review, and audit reuse. The contradiction's
61
+ `Reported by` field identifies the interrupted role to resume; resolution never
62
+ defaults a review, audit, or status interruption to planning.
63
+
64
+ ## Done when
65
+
66
+ The contradiction has a recorded disposition, and either the next frozen
67
+ snapshot is internally consistent or the missing human input is explicit.
68
+
69
+ If human input is required:
70
+
71
+ → Next: provide the requested evidence or decision — resolution cannot continue yet
72
+ · evidence supplied → rerun /resolve-repository-state <contradiction-id>
73
+
74
+ Otherwise:
75
+
76
+ → Next: resume the interrupted workflow named by `Reported by` — continue from the resolved snapshot
77
+ · planning was interrupted → /plan-feature <slug>
78
+ · implementation was interrupted → /execute-phase <NN>
79
+ · review, audit, or status was interrupted → rerun that same skill
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: review-a11y
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 accessibility review pass of the agentic-workflow review pack —
9
+ composed in-turn by review-change and product-audit; not a menu entry.
10
+ Checks the changed user-facing surface for accessibility: semantics,
11
+ keyboard, focus, contrast, and ARIA correctness — applies only to
12
+ user-facing surfaces. Findings only; never edits code.
13
+ ---
14
+
15
+ # Review Accessibility (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
+ ✓ Semantic elements over generic ones (button not clickable div; headings in order; landmarks present)
29
+ ✓ Every input has an associated label; every image an alt (empty alt only when decorative)
30
+ ✓ Full keyboard operability of the changed surface (tab order, Enter/Space activation, Escape to dismiss)
31
+ ✓ Focus management on dynamic changes (modals trap + restore focus; route changes move focus)
32
+ ✓ Contrast of changed text/UI meets the project's declared level (default WCAG AA) — cite computed values where checkable
33
+ ✓ ARIA used correctly and only when semantics can't do it (wrong ARIA is a major finding)
34
+ ✓ No information conveyed by color alone
35
+ ✓ Motion/animation respects reduced-motion preferences (n/a if no motion added)
36
+ ✓ Error messages programmatically associated with their fields
37
+
38
+ ## Return exactly
39
+
40
+ ```
41
+ REVIEW ACCESSIBILITY — scope: <scope>
42
+
43
+ | # | Finding | Sev | Evidence | Suggested fix |
44
+ |---|---------|-----|----------|---------------|
45
+ | 1 | <what> | critical|major|minor | <file:line> | <smallest action> |
46
+
47
+ Checklist: <n> evaluated, <n> pass, <n> findings, <n> n/a (<which + why>)
48
+ Summary: <1-2 sentences>
49
+ Decision: PASS | FAIL
50
+ ```
51
+
52
+ FAIL if any critical or major finding is open; PASS otherwise. Minor findings
53
+ never block — they route to the caller's triage step.
54
+
55
+ ## Done when
56
+
57
+ - Every checklist item was evaluated with evidence (file:line or command output)
58
+ or explicitly marked n/a with the reason.
59
+ - The fixed-format block above is returned — nothing more, nothing less — and
60
+ no code was changed.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: review-brand
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 brand & copy 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
+ user-facing copy against the project's brand doc: voice, terminology, and
11
+ honesty of claims — applies only to surfaces with user-facing text. Findings
12
+ only; never edits code.
13
+ ---
14
+
15
+ # Review Brand & Copy (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
+ - ✓ Read the project's brand doc first (e.g. `docs/brand/BRAND.md`) — cite the
29
+ rule for every finding; n/a all items if the project has none and say so
30
+ - ✓ Tone of changed copy matches the declared voice (cite the guideline violated)
31
+ - ✓ Product/domain terms used consistently with the declared glossary (same
32
+ concept, same word, same capitalization)
33
+ - ✓ No forbidden/deprecated phrases from the brand doc
34
+ - ✓ Claims are honest: limits, restrictions, and reductions the code enforces
35
+ are disclosed in the copy (an undisclosed limitation is a major finding —
36
+ repo hard rule)
37
+ - ✓ Error/empty-state copy is actionable (says what happened and what to do),
38
+ not blame-y
39
+ - ✓ Consistency across the changed surface and its siblings (same action
40
+ labeled the same way everywhere)
41
+ - ✓ Placeholder/lorem text absent from the diff
42
+
43
+ ## Return exactly
44
+
45
+ ```
46
+ REVIEW BRAND — 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.