@gtrabanco/pi-agentic-workflow 0.13.2 → 0.14.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/README.md +3 -9
- package/dist/routing/catalogue.d.ts +1 -1
- package/dist/routing/catalogue.js +1 -1
- package/dist/runtime.d.ts +45 -0
- package/dist/runtime.js +62 -0
- package/package.json +10 -8
- package/skills/audit-docs/SKILL.md +6 -5
- package/skills/audit-pr/SKILL.md +1 -1
- package/skills/audit-pr/references/PORTABILITY.md +1 -1
- package/skills/execute-phase/SKILL.md +207 -116
- package/skills/execute-phase/references/DESCOPE.md +22 -18
- package/skills/execute-phase/references/EXECUTION_CONTRACT.md +69 -77
- package/skills/execute-phase/references/FOLDING.md +34 -47
- package/skills/execute-phase/references/PREFLIGHT.md +103 -114
- package/skills/execute-phase/references/PRE_EXECUTION_GATE.md +53 -60
- package/skills/init-workspace/SKILL.md +52 -16
- package/skills/init-workspace/references/BOOTSTRAP_DISCOVERY.md +6 -6
- package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +17 -10
- package/skills/init-workspace/references/PORTABILITY.md +1 -1
- package/skills/init-workspace/references/UPGRADE.md +50 -15
- package/skills/log-session/SKILL.md +4 -3
- package/skills/orchestration-envelope/references/TURN_CONTRACT.md +1 -1
- package/skills/pre-execution-review/references/LEDGERS.md +39 -39
- package/skills/pre-execution-review/references/POLICY.md +1 -0
- package/skills/product-audit/SKILL.md +4 -4
- package/skills/product-audit/references/AUDIT_PROCESS.md +3 -3
- package/skills/review-change/SKILL.md +1 -1
- package/skills/review-change/references/PORTABILITY.md +1 -1
- package/skills/unit-lane/SKILL.md +154 -0
- package/skills/unit-lane/references/DESIGN.md +35 -0
- package/skills/unit-lane/references/DOCS.md +36 -0
- package/skills/unit-lane/references/EVIDENCE.md +34 -0
- package/skills/unit-lane/references/IMPLEMENT.md +45 -0
- package/skills/unit-lane/references/PLAN.md +38 -0
- package/skills/unit-lane/references/RELEASE.md +45 -0
- package/skills/unit-lane/references/RESEARCH.md +37 -0
- package/skills/unit-lane/references/REVIEW.md +45 -0
- package/skills/unit-lane/references/STEPS.md +23 -0
- package/skills/unit-lane/references/TESTS.md +32 -0
- package/skills/workflow-status/references/ENVELOPE_FIELDS.md +5 -6
- package/skills/workflow-status/references/SENSOR_CORE.md +16 -20
- package/skills/workflow-status/references/SENSOR_SIGNALS.md +5 -7
- package/skills/design-feature/SKILL.md +0 -231
- package/skills/design-feature/references/INTERVIEW.md +0 -74
- package/skills/design-feature/references/PORTABILITY.md +0 -15
- package/skills/design-feature/references/REPAIR.md +0 -88
- package/skills/design-feature/references/UPSERT_EXAMPLE.md +0 -8
- package/skills/design-feature/references/WRITE_AND_UPSERT.md +0 -115
- package/skills/evidence-grounding/SKILL.md +0 -174
- package/skills/evidence-grounding/references/DELEGATION.md +0 -131
- package/skills/evidence-grounding/references/READINESS.md +0 -130
- package/skills/evidence-grounding/references/ROWS.md +0 -93
- package/skills/execute-phase/references/BATCH_AND_PORTABILITY.md +0 -57
- package/skills/execute-phase/references/CLOSEOUT.md +0 -77
- package/skills/execute-phase/references/HANDOFF.md +0 -21
- package/skills/execute-phase/references/OPPORTUNISTIC_FINDING.md +0 -45
- package/skills/execute-phase/references/UNIT_LOOP.md +0 -88
- package/skills/execute-phase/references/WORKFLOWS_FEATURE.md +0 -37
- package/skills/execute-phase/references/WORKFLOWS_FIX.md +0 -43
- package/skills/execute-phase/references/WORKFLOWS_LEGACY.md +0 -26
- package/skills/execute-phase/references/WORKFLOWS_SMALL_PHASED.md +0 -38
- package/skills/generate-docs/SKILL.md +0 -145
- package/skills/generate-docs/references/ADAPTERS.md +0 -15
- package/skills/generate-docs/references/ADAPTER_DISCOVERY.md +0 -33
- package/skills/generate-docs/references/GENERATION_PROCESS.md +0 -90
- package/skills/implementation-discovery/SKILL.md +0 -209
- package/skills/plan-feature/SKILL.md +0 -208
- package/skills/plan-feature/references/ROUTING.md +0 -155
- package/skills/plan-feature-from-issue/SKILL.md +0 -162
- package/skills/plan-feature-scaffold/SKILL.md +0 -112
- package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +0 -122
- package/skills/plan-fix/SKILL.md +0 -161
- package/skills/plan-fix/references/PLANNING_PROCESS.md +0 -148
- package/skills/plan-fix/references/SPEC_CONTRACT.md +0 -22
- package/skills/planning-preflight/SKILL.md +0 -130
- package/skills/replan-findings/SKILL.md +0 -131
- package/skills/replan-findings/references/PHASE_APPEND.md +0 -89
- package/skills/review-plan/SKILL.md +0 -154
- package/skills/review-plan/references/CHECKS.md +0 -111
- package/skills/review-plan/references/ENG-CHECKS.md +0 -30
- package/skills/review-plan/references/OUTPUT.md +0 -166
- package/skills/review-spec/SKILL.md +0 -145
- package/skills/review-spec/references/CHECKS.md +0 -108
- package/skills/review-spec/references/OUTPUT.md +0 -160
- package/skills/ship-roadmap/SKILL.md +0 -120
- package/skills/ship-roadmap/references/ADVANCE.md +0 -117
- package/skills/ship-roadmap/references/AUDIT_AND_MERGE.md +0 -64
- package/skills/ship-roadmap/references/CLOSEOUT_AND_LOG.md +0 -27
- package/skills/ship-roadmap/references/FOUNDING.md +0 -101
- package/skills/ship-roadmap/references/GUARDRAILS.md +0 -56
- package/skills/ship-roadmap/references/MODEL_ROUTING.md +0 -16
- package/skills/ship-roadmap/references/PORTABILITY.md +0 -34
- package/skills/ship-roadmap/references/RECOVERY_AND_SELECTION.md +0 -94
- package/skills/ship-roadmap/references/STOP_CONDITIONS.md +0 -9
- package/skills/ship-roadmap/references/TERMINAL_REPORT.md +0 -34
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: design-feature
|
|
3
|
-
user-invocable: true
|
|
4
|
-
version: 3.5.0
|
|
5
|
-
argument-hint: <idea | NN-slug> [<instruction>]
|
|
6
|
-
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
7
|
-
license: MIT
|
|
8
|
-
description: >
|
|
9
|
-
Turn a raw idea or existing feature into a designed product SPEC by completing
|
|
10
|
-
entity, integration, role, and expectation closure. Upserts never destroy
|
|
11
|
-
recorded decisions. Triggers: "design-feature", "design this feature",
|
|
12
|
-
"define product scope".
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Design Feature
|
|
16
|
-
|
|
17
|
-
Product definition — the stage that turns an idea or a feature request into an
|
|
18
|
-
exhaustive, checkable set of acceptance criteria, before any engineering
|
|
19
|
-
planning happens. **Docs only — no code, no branch.**
|
|
20
|
-
|
|
21
|
-
## Turn contract
|
|
22
|
-
|
|
23
|
-
Load and verify the **canonical** [Turn contract](.claude/skills/orchestration-envelope/references/TURN_CONTRACT.md) (11 boxes) before ending every turn. Design-specific closure boxes (product half, capability/role matrix, expectation sweep, upsert) live only in [INTERVIEW.md](references/INTERVIEW.md). Missing reference → STOP.
|
|
24
|
-
|
|
25
|
-
## When to use
|
|
26
|
-
|
|
27
|
-
- A rough idea, no issue yet, and no SPEC: `design-feature "<idea>"`.
|
|
28
|
-
- An existing feature slug whose SPEC is not yet marked `designed`:
|
|
29
|
-
`design-feature <NN-slug>`.
|
|
30
|
-
- Revising an already-designed feature's product definition:
|
|
31
|
-
`design-feature <NN-slug> "<change>"` (instruction mode), or bare
|
|
32
|
-
`design-feature <NN-slug>` for review mode (see *Interaction & upsert*).
|
|
33
|
-
- `plan-feature` redirects here when it detects an undesigned feature or a
|
|
34
|
-
product choice a `review-spec` `NEEDS-DESIGN` verdict returned to the human.
|
|
35
|
-
|
|
36
|
-
## Step 0 — Discover the project (always first)
|
|
37
|
-
|
|
38
|
-
Per the agent guide's **Workflow conventions** + **documentation map**, then
|
|
39
|
-
read what THIS skill needs: `docs/features/_TEMPLATE/SPEC.md` (the two-halves
|
|
40
|
-
layout + `## Design status` marker), the roadmap (`docs/features/ROADMAP.md`),
|
|
41
|
-
the **capability inventory** (`docs/CAPABILITIES.md` — the substrate the
|
|
42
|
-
Integration closure walks; if the project has none, derive an ad-hoc inventory
|
|
43
|
-
from the architecture doc + codebase during step 5 and offer to seed the file
|
|
44
|
-
from the template), and — if the slug already has a folder — its existing
|
|
45
|
-
`SPEC.md` and `decisions.md` in full (upsert never starts blind). Skim the
|
|
46
|
-
architecture and domain docs relevant to the idea's area only far enough to
|
|
47
|
-
ground capability closure in the project's real entities and roles — deep
|
|
48
|
-
engineering research is the Engineering half's job, not this one.
|
|
49
|
-
|
|
50
|
-
Consume the internal [evidence-grounding](<../evidence-grounding/SKILL.md>)
|
|
51
|
-
capability for the ordered passes and the readiness preflight: inventory →
|
|
52
|
-
evidence → draft → cut → readiness. Its outcomes (`READY-FOR-REVIEW |
|
|
53
|
-
NEEDS-EVIDENCE | NEEDS-DESIGN | NEEDS-REPLAN`) are an authoring gate, never an
|
|
54
|
-
approval: only `review-spec` can approve a Product half.
|
|
55
|
-
|
|
56
|
-
## Research gate (mandatory, fail-closed)
|
|
57
|
-
|
|
58
|
-
Before the Product half is emitted, run the research gate in the evidence pass
|
|
59
|
-
(step 2 of the ordered passes):
|
|
60
|
-
|
|
61
|
-
- **Fetch the domain** — acquire **at least two externally fetched sources** on
|
|
62
|
-
the capability's domain (fetch/WebFetch/browser): how the domain defines and
|
|
63
|
-
solves this capability. Repo evidence alone cannot ground a design; the bias
|
|
64
|
-
this gate closes is designing from what the repository already believes.
|
|
65
|
-
Each fetched source becomes an evidence row (URL and access date).
|
|
66
|
-
- **Cover the full definition** — the rows must state what the capability **is
|
|
67
|
-
and what it is not**, and the **user's expectation of it** — accepted and
|
|
68
|
-
rejected inputs, boundaries, semantics — not just the project's current
|
|
69
|
-
framing of it.
|
|
70
|
-
- **Decompose every enunciated expectation** — expand each expectation the
|
|
71
|
-
user enunciates into the implicit case decomposition it implies **before**
|
|
72
|
-
the Product half is cut: valid and invalid values and limits, interaction
|
|
73
|
-
states, degraded mode, backend validation/filtering/parsing, alternate user
|
|
74
|
-
paths. The canonical case: a "phone number input" is not a field — it is the
|
|
75
|
-
whole case vector (prefixes/suffixes, lengths, non-text rejection, focus,
|
|
76
|
-
no-JS/JS behavior, backend filtering/validation/parsing) that the product
|
|
77
|
-
owner's one-liner hides.
|
|
78
|
-
- **Fail closed** — offline, or a material question the fetches do not answer,
|
|
79
|
-
returns `NEEDS-EVIDENCE` with the named owner and next fetch: never a guess,
|
|
80
|
-
never an invented citation.
|
|
81
|
-
- **Research before encode** — platform semantics a test will encode are
|
|
82
|
-
verified against authoritative documentation before the test exists (the
|
|
83
|
-
prevention half of `verification-contract`'s test-immutability contract).
|
|
84
|
-
|
|
85
|
-
## Progressive loading — resolve status before product detail
|
|
86
|
-
|
|
87
|
-
The reference allowlist is exactly the paths linked below. Never invent or read
|
|
88
|
-
another `references/` path; in the DEFER column, bare names live in the same
|
|
89
|
-
directory as the links.
|
|
90
|
-
|
|
91
|
-
**Hard stop for an incomplete raw-idea interview:** LOAD exactly
|
|
92
|
-
`references/INTERVIEW.md` and no other reference. Present its ONE compact
|
|
93
|
-
form-turn — the ≤ 6 fixed rubric slots plus the identity rows, each carrying a
|
|
94
|
-
recommended default the user can accept with one word — then return
|
|
95
|
-
`NEEDS_INPUT` and end the turn when slots remain unresolved; genuine ambiguity
|
|
96
|
-
gets at most **2 follow-up turns**, never a third ask. `WRITE_AND_UPSERT.md` is
|
|
97
|
-
forbidden until every mandatory interview slot is resolved; that resource then
|
|
98
|
-
owns closure rows and writing.
|
|
99
|
-
|
|
100
|
-
| Condition now | LOAD now | DEFER / SKIP now |
|
|
101
|
-
|---|---|---|
|
|
102
|
-
| Bare existing slug, no instruction | [interview](references/INTERVIEW.md) through its interaction rule; report status and stop | `WRITE_AND_UPSERT.md`, `UPSERT_EXAMPLE.md`, `REPAIR.md`, `PORTABILITY.md` |
|
|
103
|
-
| Brand-new idea with any mandatory interview slot unresolved | [interview](references/INTERVIEW.md) only; present exactly one form-turn (≤ 6 slots + identity, each with a default) and stop | `WRITE_AND_UPSERT.md`, `UPSERT_EXAMPLE.md`, `REPAIR.md`, `PORTABILITY.md` |
|
|
104
|
-
| New idea after every mandatory interview slot resolves | [interview](references/INTERVIEW.md), then [closure, write, and upsert](references/WRITE_AND_UPSERT.md) | `UPSERT_EXAMPLE.md` unless shape is ambiguous; `REPAIR.md`, `PORTABILITY.md` |
|
|
105
|
-
| Existing slug plus instruction | interview, then closure/write/upsert | [upsert example](references/UPSERT_EXAMPLE.md) unless shape is ambiguous; `REPAIR.md`, `PORTABILITY.md` |
|
|
106
|
-
| Existing slug whose `progress.md` carries `SPEC-REVIEW-FAIL` or `NEEDS-DESIGN` | [interview](references/INTERVIEW.md), then [review repair](references/REPAIR.md) | `UPSERT_EXAMPLE.md`, `PORTABILITY.md` |
|
|
107
|
-
| A named platform primitive is absent | the selected row above plus [portability](references/PORTABILITY.md) | only unrelated rows |
|
|
108
|
-
|
|
109
|
-
Do not load write/upsert while an interview slot is unresolved. A supported
|
|
110
|
-
primitive is not absent merely because the current task does not use it.
|
|
111
|
-
|
|
112
|
-
All resources are one hop from this file. Closure rows, role matrices,
|
|
113
|
-
expectation counts, fixed status blocks, and Spec-lint are normative. A missing
|
|
114
|
-
required resource or unresolved mandatory slot returns NEEDS_INPUT; never guess.
|
|
115
|
-
|
|
116
|
-
## Guardrails
|
|
117
|
-
|
|
118
|
-
- **No review authority.** This skill authors and repairs the Product half; it
|
|
119
|
-
never approves it. Neither `## Design status: designed` nor a readiness
|
|
120
|
-
`READY-FOR-REVIEW` line is a review verdict: `review-spec` owns that, in a
|
|
121
|
-
context that did not write these bytes. Never write or "sync" a
|
|
122
|
-
`PreExecutionReviewReceipt` — the reviewer persists its own.
|
|
123
|
-
- **Rotate the revision on every write.** Each write of the Product half is a new
|
|
124
|
-
`artifactRevisionId`, a revert to previously published bytes included, and the
|
|
125
|
-
closing handoff carries it. Skipping the rotation revives a stale PASS.
|
|
126
|
-
- Docs only — no code, no branch (that is `execute-phase`), no engineering content
|
|
127
|
-
(architecture, design, phases, testing — `plan-feature`'s Engineering half; do
|
|
128
|
-
not pre-fill it even when the answer seems obvious).
|
|
129
|
-
- Never stamp `## Design status: designed` with a blank Capability closure row,
|
|
130
|
-
a skipped inventory subsystem, an incomplete role matrix, or an unresolved
|
|
131
|
-
Expectation sweep row — a skipped row silently un-does the entire point of
|
|
132
|
-
this skill.
|
|
133
|
-
- The Expectation sweep enumerates **domain conventions**, not new scope: it
|
|
134
|
-
may only route each expectation to in-scope / out-of-scope / deferred — it
|
|
135
|
-
never silently grows the feature beyond what the user confirms.
|
|
136
|
-
- No market or competitive research — the mandatory research gate above is
|
|
137
|
-
this skill's only external research; no global skill/MCP discovery
|
|
138
|
-
sweep (`product-audit`'s job); no `--update` flag — upsert is always the
|
|
139
|
-
default behavior, not an opt-in.
|
|
140
|
-
- Don't build a separate `DESIGN.md` — one SPEC, two halves, always.
|
|
141
|
-
- **Composition tier.** This skill is planning-class (judgment work — run it
|
|
142
|
-
on your strongest model / highest effort). `plan-feature-from-issue`
|
|
143
|
-
composing this skill in-turn for a thin issue is allowed only when it runs
|
|
144
|
-
at ≥ this skill's tier; otherwise it must hand off (`run /design-feature
|
|
145
|
-
<slug>`) rather than under-power it.
|
|
146
|
-
- Otherwise per the project's **Workflow conventions** (docs-language).
|
|
147
|
-
|
|
148
|
-
## Normalized Repository State
|
|
149
|
-
|
|
150
|
-
Consume frozen facts and decisions from `docs/workflow/REPOSITORY_STATE.md`.
|
|
151
|
-
An absent fact may be inspected; a conflict becomes a resolver contradiction.
|
|
152
|
-
Documentation and inference are never implementation evidence.
|
|
153
|
-
|
|
154
|
-
## Architectural invariants
|
|
155
|
-
|
|
156
|
-
Discover the optional project invariant document declared in the documentation
|
|
157
|
-
map (normally `docs/architecture/ARCHITECTURAL_INVARIANTS.md`) before defining a
|
|
158
|
-
capability. If absent, record `n/a: no project invariants declared` in the SPEC
|
|
159
|
-
and continue. For every applicable rule, cite its ID and repository evidence and
|
|
160
|
-
classify the proposal as `preserves`, `violates`, `introduces`, or `changes`.
|
|
161
|
-
Only `preserves` may proceed to capability closure. A violation, new rule, or
|
|
162
|
-
changed rule stops design for an explicit architectural decision through the
|
|
163
|
-
project's declared authority; never make a SPEC, implementation plan, or test
|
|
164
|
-
retroactively authorize it. When NRS exists, consume its frozen facts first;
|
|
165
|
-
the repository remains authoritative and a conflict routes to the resolver.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
## Portability
|
|
169
|
-
|
|
170
|
-
Do not read [portability](references/PORTABILITY.md) on a supported platform.
|
|
171
|
-
Read it only after detecting that a named interaction primitive is absent. The
|
|
172
|
-
interview, closure, upsert, and fixed output contracts stay identical.
|
|
173
|
-
|
|
174
|
-
## Relationship to other skills
|
|
175
|
-
|
|
176
|
-
- `review-spec` is the gate this skill hands to: a designed half is reviewed
|
|
177
|
-
independently before `plan-feature` may consume it. `plan-feature` fails closed
|
|
178
|
-
without that current receipt, so handing off here — not to `plan-feature` — is
|
|
179
|
-
what keeps the pipeline honest.
|
|
180
|
-
- `plan-feature` **redirects here** (no bypass flag) when a feature's product
|
|
181
|
-
half is not marked `designed` or has no current review; once `review-spec`
|
|
182
|
-
passes, `plan-feature` fills the Engineering half and scaffolds the artifacts.
|
|
183
|
-
- `plan-feature-from-issue` may compose this skill in-turn for a thin issue
|
|
184
|
-
(only at ≥ tier — see *Guardrails*), or hand off to it directly. It stops at
|
|
185
|
-
the Product half and `review-spec` — it no longer continues into engineering
|
|
186
|
-
planning in the same turn.
|
|
187
|
-
- `evidence-grounding` owns the passes and the readiness vocabulary this skill
|
|
188
|
-
consumes; it never emits a review verdict either.
|
|
189
|
-
- `triage-issue`'s `promote-to-feature` verdict routes through `plan-feature`,
|
|
190
|
-
which redirects here if the promoted issue is still undesigned.
|
|
191
|
-
- `execute-phase` never calls this skill — it only executes an already-planned
|
|
192
|
-
SPEC's Engineering half.
|
|
193
|
-
|
|
194
|
-
## Done when
|
|
195
|
-
|
|
196
|
-
- The Product half of the SPEC is filled and every Capability closure row is
|
|
197
|
-
resolved (filled surface or explicit `n/a`).
|
|
198
|
-
- `## Design status` accurately reflects the outcome (`designed` only when
|
|
199
|
-
closure is complete).
|
|
200
|
-
- The roadmap row exists (created at `idea` if this was a brand-new feature)
|
|
201
|
-
and its status matches the outcome — `defined` when `designed`, left at
|
|
202
|
-
`idea` on `NEEDS_INPUT`.
|
|
203
|
-
- The readiness preflight ran and returned `READY-FOR-REVIEW`, or the turn ended
|
|
204
|
-
with its exact blocking outcome.
|
|
205
|
-
- The handoff states the current `artifactRevisionId`.
|
|
206
|
-
- **The closing `→ Next:` block is printed:**
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
→ Next: /review-spec <slug> — product half designed and readiness-clean; it needs an
|
|
210
|
-
independent review before any engineering planning
|
|
211
|
-
· more to design → re-run /design-feature <slug> "<instruction>" (upsert, destroys nothing,
|
|
212
|
-
rotates the artifact revision)
|
|
213
|
-
· recurring gap in this project's capability closure → /product-audit (a systemic pattern,
|
|
214
|
-
not a one-off design fix)
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
When ending `NEEDS_INPUT` instead:
|
|
218
|
-
|
|
219
|
-
```
|
|
220
|
-
→ Next: answer the pending question, then re-run /design-feature <slug>
|
|
221
|
-
· unsure how to scope it → propose the smallest version and confirm
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
When readiness returned `NEEDS-EVIDENCE` or `NEEDS-REPLAN`:
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
→ Next: /design-feature <slug> "<the missing evidence>" — readiness returned
|
|
228
|
-
NEEDS-EVIDENCE for <rows>; do not invoke /review-spec on an artifact that is
|
|
229
|
-
not readiness-clean
|
|
230
|
-
· the gap is engineering, not product → it belongs to plan-feature's evidence, not here
|
|
231
|
-
```
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
## Process
|
|
2
|
-
|
|
3
|
-
1. **Resolve the slug.** A raw idea with no existing folder → propose a number
|
|
4
|
-
(next free roadmap slot) and a kebab-case slug; confirm before writing. An
|
|
5
|
-
existing `NN-slug` → that folder's `SPEC.md` (create the folder + copy the
|
|
6
|
-
template if the roadmap has the row but no folder yet).
|
|
7
|
-
2. **Interaction rule (fixed — no interpretation):**
|
|
8
|
-
- **Bare `design-feature <slug>`** (existing SPEC/decisions found): print a
|
|
9
|
-
summary of what the feature currently does (or would do, from a fresh
|
|
10
|
-
idea) → ask what to add / remove / change. This doubles as review mode.
|
|
11
|
-
- **`design-feature <slug> <instruction>`**: apply the instruction
|
|
12
|
-
directly, no questions — touch only what the instruction implies. Still
|
|
13
|
-
re-reads the existing SPEC/decisions first (upsert, never blind).
|
|
14
|
-
- **Nothing exists yet** (brand-new idea, no prior SPEC): go straight to
|
|
15
|
-
step 3 (interview), since there is nothing to review or upsert.
|
|
16
|
-
3. **Raw-idea interview (folded in, only when starting from zero or the
|
|
17
|
-
instruction leaves genuine gaps).** Fixed protocol — structural, not
|
|
18
|
-
judgement:
|
|
19
|
-
- **One form-turn, then at most 2 follow-up turns.** The first interview
|
|
20
|
-
turn is ONE compact form covering every rubric slot below plus the
|
|
21
|
-
identity slots, each row carrying a recommended default the user accepts
|
|
22
|
-
with one word (or edits in place). Ask nothing the docs or the instruction
|
|
23
|
-
already answer. Genuine ambiguity the form cannot resolve gets at most
|
|
24
|
-
**2 follow-up turns** — never a third ask.
|
|
25
|
-
- **Vagueness rubric (fixed slots — the form rows ARE this list).**
|
|
26
|
-
Probe each slot until it is filled or explicitly `n/a: <reason>`:
|
|
27
|
-
1. **Affected users/roles** — who uses it; who must not.
|
|
28
|
-
2. **Error & edge states** — what happens on failure / empty / invalid.
|
|
29
|
-
3. **Data shape** — what is stored and shown, roughly.
|
|
30
|
-
4. **Boundaries & limits** — sizes, counts, rates, thresholds.
|
|
31
|
-
5. **Out of scope** — what this deliberately does NOT do.
|
|
32
|
-
6. **Success criteria** — how we verify it worked.
|
|
33
|
-
- **Mandatory-question rule.** A stated requirement that has no verifiable
|
|
34
|
-
acceptance criterion yet is automatically the next question — no
|
|
35
|
-
requirement enters the SPEC without one.
|
|
36
|
-
- **Reframe, don't interrogate.** Restate each vague requirement as
|
|
37
|
-
measurable criteria ("fast" → "list renders < 200 ms at 1k rows") and
|
|
38
|
-
ask: "are these the right targets?" — a yes converts directly into
|
|
39
|
-
acceptance criteria.
|
|
40
|
-
- **Deferred decisions.** An answer of "decide later" is recorded as a row
|
|
41
|
-
in the SPEC's `### Deferred decisions` (with a decide-by trigger) —
|
|
42
|
-
never dropped, never silently guessed.
|
|
43
|
-
- **Escalation (structural).** If, after the interview, **≥ 3 rubric slots
|
|
44
|
-
remain empty** (neither filled nor `n/a`), do not guess: end the turn
|
|
45
|
-
`NEEDS_INPUT`, listing the empty slots verbatim as the pending
|
|
46
|
-
questions — the feature is not designable yet. Ambiguity that survives the
|
|
47
|
-
follow-up budget escalates the same way (`interview:ambiguity-cap`): the
|
|
48
|
-
2-turn cap never licenses a third ask.
|
|
49
|
-
- The identity questions ride the same form-turn: problem & goal, business
|
|
50
|
-
goals, size estimate (`XS/S/M/L` — XS/S stays SPEC-only, M/L gets the
|
|
51
|
-
full artifact set), non-goals / future work, traceability (offer a
|
|
52
|
-
tracking issue; if created, the eventual PR will `Closes #n`).
|
|
53
|
-
4. **Proportional research.** Capability closure (step 5) is cheap and comes
|
|
54
|
-
first. Reach for external or domain research **only** when the feature
|
|
55
|
-
touches a domain genuinely new to the project (a regulation, an unfamiliar
|
|
56
|
-
integration, an industry convention with no precedent in the codebase) —
|
|
57
|
-
never as a systematic per-feature step.
|
|
58
|
-
|
|
59
|
-
## Turn contract — design closure boxes
|
|
60
|
-
|
|
61
|
-
```text
|
|
62
|
-
✓ Product half written with every capability-closure row resolved (filled surface
|
|
63
|
-
or explicit `n/a: <reason>`) — zero blank rows
|
|
64
|
-
✓ Spec-lint product boxes ticked, and `## Design status` set to what they prove
|
|
65
|
-
(never optimistically); roadmap row never written past `defined` here
|
|
66
|
-
✓ Evidence rows: every material claim `proven`/`decision` at `current` freshness,
|
|
67
|
-
or `unknown` naming its owner and the next evidence step
|
|
68
|
-
✓ `stage: spec` readiness block printed; the artifact is handed off only on
|
|
69
|
-
`READY-FOR-REVIEW`
|
|
70
|
-
✓ `artifactRevisionId` rotated for the bytes just written and named in the
|
|
71
|
-
closing block
|
|
72
|
-
✓ Repair turns: one batch over the whole open findings set, each finding's repair
|
|
73
|
-
class recorded, no receipt text touched
|
|
74
|
-
```
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
## Portability (agents other than Claude Code)
|
|
2
|
-
|
|
3
|
-
The workflow is the contract; Claude Code features are conveniences. On an
|
|
4
|
-
agent that lacks one, apply the fallback — never skip the step the feature
|
|
5
|
-
enables:
|
|
6
|
-
|
|
7
|
-
- **No slash-command menu** — where this skill says `/<skill>`, open that
|
|
8
|
-
skill's `SKILL.md` (wherever your agent installed the skills) and follow it
|
|
9
|
-
literally, in a fresh conversation: hand-offs assume a clean context.
|
|
10
|
-
- **No per-skill `model:`/`effort:`** — on the `#claude` branch the
|
|
11
|
-
frontmatter pins these tiers; here, pick tiers yourself: capability closure
|
|
12
|
-
is judgment work — run it on your **strongest** model available.
|
|
13
|
-
- **No `/loop`** — re-invoke this skill by hand when a review round or an
|
|
14
|
-
instruction-mode revision is needed; follow the closing `→ Next:` block each
|
|
15
|
-
time.
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
## Repair a reviewed Product half
|
|
2
|
-
|
|
3
|
-
Load this resource only when the unit's `progress.md` carries a
|
|
4
|
-
`SPEC-REVIEW-FAIL` or `NEEDS-DESIGN` receipt from `review-spec`, or when the user
|
|
5
|
-
asks to close such findings. This is the author's repair pass — the reviewer's
|
|
6
|
-
findings are input, never a to-do list to be renegotiated.
|
|
7
|
-
|
|
8
|
-
### 1. Take the whole findings set as one batch
|
|
9
|
-
|
|
10
|
-
Read every open finding of the newest spec-stage receipt plus every open finding
|
|
11
|
-
this unit previously recorded. Classify each by root cause
|
|
12
|
-
(`product | plan | source | environment | runtime`) before touching any file.
|
|
13
|
-
|
|
14
|
-
Then apply **one evidence-bounded repair batch** to the owning artifact(s) and
|
|
15
|
-
request one re-review of the new snapshot. Rules:
|
|
16
|
-
|
|
17
|
-
- Do not fix one finding, re-review, fix the next, re-review. Findings from one
|
|
18
|
-
review are one batch, because the root cause is usually shared (an un-inventoried
|
|
19
|
-
obligation, a role the matrix never listed, an "obvious" domain convention that
|
|
20
|
-
skipped the expectation sweep).
|
|
21
|
-
- Do not split a batch because the findings landed in different files; a Product
|
|
22
|
-
half and its `decisions.md` are one owning artifact set.
|
|
23
|
-
- Findings classified outside `product` are **not** repaired here: leave them
|
|
24
|
-
open, name their owner (`review-plan`/`plan-feature` for plan defects, the
|
|
25
|
-
executor for source defects), and say so in the repair note. Repairing a plan
|
|
26
|
-
defect by editing the Product half is scope creep with extra steps.
|
|
27
|
-
- Never dismiss a finding by re-arguing with it: dismissal requires recorded
|
|
28
|
-
counter-evidence that falsifies the claim (`pre-execution-review/references/POLICY.md`
|
|
29
|
-
§2), written into the
|
|
30
|
-
`planning-findings.md` row's resolution evidence, never into chat.
|
|
31
|
-
|
|
32
|
-
### 2. Three repair classes — pick one per finding and record which
|
|
33
|
-
|
|
34
|
-
| Class | Allowed when | Who acts | Evidence required |
|
|
35
|
-
|---|---|---|---|
|
|
36
|
-
| Mechanical, intent-preserving | wording, heading order, pointer format, a copy-paste slip in a row that already resolves correctly | this skill, autonomously | a dated `decisions.md` line: which finding ids, why intent is unchanged |
|
|
37
|
-
| Closure completion | a blank/`n/a`-less closure row, a missing sweep row, an unlabelled criterion, an unowned unknown | this skill, after acquiring the evidence | new/updated evidence rows at `current` freshness |
|
|
38
|
-
| Product change | scope, intent, role, authority, or user outcome actually changes | the human, through this skill's interview | a dated SPEC `## Amendments` row or `Product decisions` entry quoting the user's decision |
|
|
39
|
-
|
|
40
|
-
The first two stay autonomous **only while reviewed product intent is
|
|
41
|
-
unchanged**. If the repair would add, remove, or redirect scope, it is the third
|
|
42
|
-
class: stop and ask, one bounded question at a time. The reviewer proved a gap
|
|
43
|
-
exists; it never chose how to fill it, and neither does this skill.
|
|
44
|
-
|
|
45
|
-
### 3. New revision, new review
|
|
46
|
-
|
|
47
|
-
1. Apply the batch to the Product half and, when a decision was made, to
|
|
48
|
-
`decisions.md` (append, dated — never rewrite a prior decision).
|
|
49
|
-
2. Re-run the Spec-lint product boxes and the `stage: spec` readiness preflight;
|
|
50
|
-
paste both results.
|
|
51
|
-
3. Mint a **new** `artifactRevisionId` — mandatory even when the bytes came back
|
|
52
|
-
to a previous state. A revert is an authoring event; reusing the old id is how
|
|
53
|
-
a stale PASS gets resurrected.
|
|
54
|
-
4. Hand off to `/review-spec <slug>` for a re-review of the new snapshot. Never
|
|
55
|
-
self-certify the repair, never reuse the reviewer's verdict for the new bytes.
|
|
56
|
-
|
|
57
|
-
### 4. Second cycle = anomaly, not routine
|
|
58
|
-
|
|
59
|
-
Cycle rules have one owner: `pre-execution-review/references/POLICY.md` §4 — a repeat needs a changed
|
|
60
|
-
snapshot or a named falsifiable question plus a new evidence route, and a second
|
|
61
|
-
consecutive repair/re-review cycle prints the `CONVERGENCE-ANOMALY` block (repeated
|
|
62
|
-
and new finding ids, the snapshots that moved, the evidence or obligation missed,
|
|
63
|
-
the owning stage, and why the prior readiness/review/repair failed) **before** any
|
|
64
|
-
further edit, then routes to that owner. The repair cycles are the correction
|
|
65
|
-
path; they never earn a PASS, and an exhausted cycle budget does not downgrade an
|
|
66
|
-
open finding. A third cycle never starts without explicit user instruction: the
|
|
67
|
-
orchestrator's `stop-review-loop-cap` refusal stops the invocation and names
|
|
68
|
-
`design-feature` as the human route, and a PASS resets the count.
|
|
69
|
-
|
|
70
|
-
The cap counts review invocations, never repairs: a repair responding to a
|
|
71
|
-
persisted verdict produces a new snapshot by design, so the repair turn itself is
|
|
72
|
-
never a loop defect. An open finding is never downgraded or waved through to
|
|
73
|
-
satisfy a count.
|
|
74
|
-
|
|
75
|
-
The spec-stage detail this skill adds: the owning stage of a Product-half miss is
|
|
76
|
-
`product` unless the evidence proves the plan asked for something the SPEC never
|
|
77
|
-
said — then it is `plan`, and it leaves this skill for `plan-feature`.
|
|
78
|
-
|
|
79
|
-
### 5. Guardrails
|
|
80
|
-
|
|
81
|
-
- Never edit `SPEC-REVIEW-PASS` text, a receipt block, or a finding's severity to
|
|
82
|
-
make a gate pass. Receipts are the reviewer's output.
|
|
83
|
-
- Never create a forge issue to hold a current-unit obligation so this batch looks
|
|
84
|
-
closed (descope guard). Amending scope requires the human's dated amendment
|
|
85
|
-
first, an issue second, never the reverse.
|
|
86
|
-
- Never widen scope while "already in the file": new obligations re-enter the
|
|
87
|
-
inventory pass with a dated note.
|
|
88
|
-
- Upsert rules still apply: append, date, and preserve recorded decisions.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
## Interaction & upsert (worked shape)
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
design-feature <slug> → print summary → ask what to add/remove/change
|
|
5
|
-
design-feature <slug> "<instruction>" → apply directly, no questions, scoped to the instruction
|
|
6
|
-
design-feature "<new idea>" → interview from zero (no prior SPEC to review)
|
|
7
|
-
design-feature <slug> "delete and redesign, <new direction>" → the only from-zero reset path
|
|
8
|
-
```
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
## Closure, write, and upsert
|
|
2
|
-
|
|
3
|
-
0. **Inventory before drafting** (the `evidence-grounding` passes, Product stage).
|
|
4
|
-
List every normative obligation, affected role/use case, failure state,
|
|
5
|
-
compatibility boundary, recorded decision, and material unknown, then acquire
|
|
6
|
-
one evidence row per material claim
|
|
7
|
-
(`claim-or-obligation | authority-kind | source-and-location |
|
|
8
|
-
observed-revision | freshness | status | owner-or-next-evidence`). Product
|
|
9
|
-
conclusions freeze in the SPEC's Product half and `decisions.md`. A claim you
|
|
10
|
-
cannot evidence stays `status: unknown` with an owner — it never becomes a
|
|
11
|
-
plausible rationale. A repeated read that answers no new question is
|
|
12
|
-
no-progress: stop and report the missing evidence.
|
|
13
|
-
|
|
14
|
-
5. **Capability closure (the core).** Walk the SPEC template's **three fixed
|
|
15
|
-
checklists** (`docs/features/_TEMPLATE/SPEC.md` → `### Capability closure`
|
|
16
|
-
is the authoritative block — instantiate it, never paraphrase it) and write
|
|
17
|
-
the result into the SPEC's `### Capability closure` section. Every row
|
|
18
|
-
resolves to a filled surface **or** an explicit `n/a: <reason>` — a blank
|
|
19
|
-
row is not a valid state, it is an unfinished design:
|
|
20
|
-
1. **Entity closure** — for every entity the feature introduces or
|
|
21
|
-
touches: Create/Read/Update/Delete/state-transitions, each with UI
|
|
22
|
-
entry point + API surface + test.
|
|
23
|
-
2. **Integration closure** — reconcile the feature against **every**
|
|
24
|
-
subsystem in the capability inventory (`docs/CAPABILITIES.md`), one row
|
|
25
|
-
per subsystem, none skipped: how does this feature touch auth, ACL,
|
|
26
|
-
navigation, notifications, search, audit, settings, …? ("blog" ⇒ ACL
|
|
27
|
-
gets a `blog:write` permission; the dashboard gets an "Articles" link
|
|
28
|
-
with drafts above published and a "New article" button; auth is
|
|
29
|
-
required to write.) **No inventory file** → derive the inventory from
|
|
30
|
-
the architecture doc + codebase, record it in the section, walk it, and
|
|
31
|
-
offer to seed `docs/CAPABILITIES.md` from the template (upsert-safe,
|
|
32
|
-
user confirms).
|
|
33
|
-
3. **Role matrix** — for every capability, EVERY role in the inventory is
|
|
34
|
-
explicitly `allowed` or `denied` — no role unlisted, no "admins
|
|
35
|
-
obviously can" left implicit.
|
|
36
|
-
|
|
37
|
-
The filled rows **become the Acceptance criteria** — copy each resolved row
|
|
38
|
-
(or its `n/a` line) into `## Acceptance criteria` as an objective, checkable
|
|
39
|
-
condition. Do not restate them loosely; the checklist row *is* the
|
|
40
|
-
criterion.
|
|
41
|
-
6. **Expectation sweep (the implicit-knowledge gate).** Enumerate **≥ 10
|
|
42
|
-
candidate expectations** (M/L; **≥ 5** for XS/S) a competent human would
|
|
43
|
-
assume ship with a feature of this kind without being told — domain
|
|
44
|
-
conventions, not project specifics ("a blog has drafts and a publish
|
|
45
|
-
action", "a list has an empty state", "a delete asks for confirmation").
|
|
46
|
-
Fill the SPEC's `### Expectation sweep` table: each row resolves to exactly
|
|
47
|
-
one of `in-scope` (add/point to an acceptance criterion), `out-of-scope`
|
|
48
|
-
(add to *Out of scope / non-goals*), or `deferred` (row in *Deferred
|
|
49
|
-
decisions*) — **never left unmentioned**. Rows the user rejects are
|
|
50
|
-
recorded as out-of-scope, not dropped: a rejected expectation is a future
|
|
51
|
-
surprise defused. When a resolution genuinely needs the user's call, it
|
|
52
|
-
rides the step-3 interview protocol (one question per turn, recommended
|
|
53
|
-
default).
|
|
54
|
-
7. **Scale-down for XS features.** The gate stays uniform — every closure row
|
|
55
|
-
and inventory subsystem is still walked, the sweep still runs (≥ 5 rows) —
|
|
56
|
-
but for a small feature most rows resolve to `n/a: out of scope for this
|
|
57
|
-
slice` in one pass, and the interview (step 3) may be a single confirming
|
|
58
|
-
question. Passing the gate is cheap; the gate itself never opens.
|
|
59
|
-
9. **Per-feature tooling notes.** Check which installed skills/MCPs are
|
|
60
|
-
relevant to *this* feature (e.g. a payments MCP for a billing feature) and
|
|
61
|
-
record them in `## Tooling`. This is not a global discovery sweep — that is
|
|
62
|
-
`product-audit`'s job; record only what this feature will actually use.
|
|
63
|
-
10. **Write the Product half.** Fill `Context`, `Business goals`, `Scope`
|
|
64
|
-
(in/out), `Capability closure`, `Acceptance criteria`, `Tooling`,
|
|
65
|
-
`Product decisions`, and `Deferred decisions` (`none` if empty) in the
|
|
66
|
-
SPEC. When instantiating the closure, **replace** the template's fenced
|
|
67
|
-
example block with the filled rows (keeping it fails the spec-lint's
|
|
68
|
-
placeholder box). Record every non-obvious call in `Product decisions`
|
|
69
|
-
with its rationale, and log any residual unknown as an open question in
|
|
70
|
-
`decisions.md` rather than guessing.
|
|
71
|
-
11. **Run the Spec-lint product boxes, then stamp.** Mechanically check the
|
|
72
|
-
SPEC template's `### Spec-lint` **product boxes**
|
|
73
|
-
(`docs/features/_TEMPLATE/SPEC.md`) and paste the box results. All
|
|
74
|
-
product boxes tick → set the marker to `designed` **and**
|
|
75
|
-
set this feature's `docs/features/ROADMAP.md` row status to `defined` (the
|
|
76
|
-
`idea → defined` transition this skill owns — see the roadmap's Status
|
|
77
|
-
legend). If the row doesn't exist yet (brand-new feature, no prior `idea`
|
|
78
|
-
row), add it first at `idea` (number, slug, dependencies), then promote it
|
|
79
|
-
to `defined` in the same edit — no feature is ever registered directly at
|
|
80
|
-
`defined` without passing through `idea`. Any spec-lint product box FAILing
|
|
81
|
-
(a blank closure row, an unlabelled prose criterion, an in-scope item with
|
|
82
|
-
no criterion, …), or an unresolved question blocking closure → leave
|
|
83
|
-
`## Design status` at `not designed`, leave the roadmap row at `idea` (or
|
|
84
|
-
unadded), and end the turn with the failed boxes / pending question stated
|
|
85
|
-
plainly instead of a false `designed` stamp or a premature `defined` write.
|
|
86
|
-
12. **Confirm the roadmap row.** The row from step 11 carries the right number,
|
|
87
|
-
slug, dependencies, and status (`defined`). Beyond `defined`, status
|
|
88
|
-
transitions (`planned`, `in-progress`, `done`) are `plan-feature-scaffold`'s
|
|
89
|
-
and `execute-phase`'s job — this skill never writes past `defined`.
|
|
90
|
-
12b. **Readiness preflight, then rotate the revision.** Before handing off, run
|
|
91
|
-
the `stage: spec` readiness boxes owned by the internal
|
|
92
|
-
[`evidence-grounding`](<../../evidence-grounding/SKILL.md>) skill (its ordered
|
|
93
|
-
passes route to its own readiness reference) and paste the fixed
|
|
94
|
-
`READINESS — <NN-slug> spec <outcome>` block. Only
|
|
95
|
-
`READY-FOR-REVIEW` may hand off; `NEEDS-EVIDENCE` / `NEEDS-DESIGN` /
|
|
96
|
-
`NEEDS-REPLAN` keep the artifact at home with the named missing row. Readiness
|
|
97
|
-
is an authoring gate: it licenses a review request, never a review verdict.
|
|
98
|
-
Then mint the new `artifactRevisionId` for the bytes just written (every write
|
|
99
|
-
rotates it — a revert included) and carry it in the handoff.
|
|
100
|
-
13. **Upsert semantics (never destroy).** Re-running on an existing slug
|
|
101
|
-
re-reads the SPEC and `decisions.md` first; a revision **appends** to
|
|
102
|
-
`decisions.md` (dated, with what changed and why) — it never rewrites or
|
|
103
|
-
deletes a prior decision. The only path that starts the product half from
|
|
104
|
-
zero is an explicit "delete and redesign" in the prompt; even then, record
|
|
105
|
-
that reset itself in `decisions.md`. **This is the retrofit path
|
|
106
|
-
`audit-pr`'s closure-integrity gate routes to:** a legacy SPEC with no
|
|
107
|
-
`Capability closure` block trips that gate's dated `design-debt:
|
|
108
|
-
closure absent, SPEC predates the rule` warning (never a blocker) on the
|
|
109
|
-
next PR touching the feature; re-running `design-feature <slug>` there
|
|
110
|
-
fills only the missing closure rows via this same upsert — it never
|
|
111
|
-
rewrites what's already recorded.
|
|
112
|
-
14. **Hand off.** Once `designed` and readiness-clean, print the closing block
|
|
113
|
-
(see *Done when*) recommending `/review-spec <slug>` with the current
|
|
114
|
-
`artifactRevisionId`. Do **not** recommend `/plan-feature`: engineering
|
|
115
|
-
planning is gated on an independent Product review this skill cannot supply.
|