devlyn-cli 1.15.0 → 2.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.
- package/AGENTS.md +104 -0
- package/CLAUDE.md +135 -21
- package/README.md +43 -125
- package/benchmark/auto-resolve/BENCHMARK-DESIGN.md +272 -0
- package/benchmark/auto-resolve/README.md +114 -0
- package/benchmark/auto-resolve/RUBRIC.md +162 -0
- package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/NOTES.md +30 -0
- package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/expected.json +68 -0
- package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/setup.sh +4 -0
- package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/spec.md +45 -0
- package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/task.txt +8 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/NOTES.md +54 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/expected-pair-plan-registry.json +170 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/expected.json +84 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/metadata.json +21 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/pair-plan.sample-fail.json +214 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/pair-plan.sample-pass.json +223 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/setup.sh +5 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/spec.md +56 -0
- package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/task.txt +14 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/NOTES.md +28 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/expected-pair-plan-registry.json +162 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/expected.json +65 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/metadata.json +19 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/setup.sh +4 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/spec.md +56 -0
- package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/task.txt +9 -0
- package/benchmark/auto-resolve/fixtures/F4-web-browser-design/NOTES.md +40 -0
- package/benchmark/auto-resolve/fixtures/F4-web-browser-design/expected.json +57 -0
- package/benchmark/auto-resolve/fixtures/F4-web-browser-design/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F4-web-browser-design/setup.sh +6 -0
- package/benchmark/auto-resolve/fixtures/F4-web-browser-design/spec.md +49 -0
- package/benchmark/auto-resolve/fixtures/F4-web-browser-design/task.txt +9 -0
- package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/NOTES.md +38 -0
- package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/expected.json +65 -0
- package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/setup.sh +55 -0
- package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/spec.md +49 -0
- package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/task.txt +7 -0
- package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/NOTES.md +38 -0
- package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/expected.json +77 -0
- package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/setup.sh +4 -0
- package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/spec.md +49 -0
- package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/task.txt +10 -0
- package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/NOTES.md +50 -0
- package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/expected.json +76 -0
- package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/setup.sh +36 -0
- package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/spec.md +46 -0
- package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/task.txt +7 -0
- package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/NOTES.md +50 -0
- package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/expected.json +63 -0
- package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/setup.sh +4 -0
- package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/spec.md +48 -0
- package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/task.txt +1 -0
- package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/NOTES.md +93 -0
- package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/expected.json +74 -0
- package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/metadata.json +10 -0
- package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/setup.sh +28 -0
- package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/spec.md +62 -0
- package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/task.txt +5 -0
- package/benchmark/auto-resolve/fixtures/SCHEMA.md +130 -0
- package/benchmark/auto-resolve/fixtures/test-repo/README.md +27 -0
- package/benchmark/auto-resolve/fixtures/test-repo/bin/cli.js +63 -0
- package/benchmark/auto-resolve/fixtures/test-repo/package-lock.json +823 -0
- package/benchmark/auto-resolve/fixtures/test-repo/package.json +22 -0
- package/benchmark/auto-resolve/fixtures/test-repo/playwright.config.js +17 -0
- package/benchmark/auto-resolve/fixtures/test-repo/server/index.js +37 -0
- package/benchmark/auto-resolve/fixtures/test-repo/tests/cli.test.js +25 -0
- package/benchmark/auto-resolve/fixtures/test-repo/tests/server.test.js +58 -0
- package/benchmark/auto-resolve/fixtures/test-repo/web/index.html +37 -0
- package/benchmark/auto-resolve/scripts/build-pair-eligible-manifest.py +174 -0
- package/benchmark/auto-resolve/scripts/check-f9-artifacts.py +256 -0
- package/benchmark/auto-resolve/scripts/compile-report.py +331 -0
- package/benchmark/auto-resolve/scripts/iter-0033c-compare.py +552 -0
- package/benchmark/auto-resolve/scripts/judge-opus-pass.sh +430 -0
- package/benchmark/auto-resolve/scripts/judge.sh +359 -0
- package/benchmark/auto-resolve/scripts/oracle-scope-tier-a.py +260 -0
- package/benchmark/auto-resolve/scripts/oracle-scope-tier-b.py +274 -0
- package/benchmark/auto-resolve/scripts/oracle-test-fidelity.py +328 -0
- package/benchmark/auto-resolve/scripts/pair-plan-idgen.py +401 -0
- package/benchmark/auto-resolve/scripts/pair-plan-lint.py +468 -0
- package/benchmark/auto-resolve/scripts/run-fixture.sh +691 -0
- package/benchmark/auto-resolve/scripts/run-iter-0033c.sh +234 -0
- package/benchmark/auto-resolve/scripts/run-suite.sh +214 -0
- package/benchmark/auto-resolve/scripts/ship-gate.py +222 -0
- package/bin/devlyn.js +175 -17
- package/config/skills/_shared/adapters/README.md +64 -0
- package/config/skills/_shared/adapters/gpt-5-5.md +29 -0
- package/config/skills/_shared/adapters/opus-4-7.md +29 -0
- package/config/skills/{devlyn:auto-resolve/scripts → _shared}/archive_run.py +26 -0
- package/config/skills/_shared/codex-config.md +54 -0
- package/config/skills/_shared/codex-monitored.sh +141 -0
- package/config/skills/_shared/engine-preflight.md +35 -0
- package/config/skills/_shared/expected.schema.json +93 -0
- package/config/skills/_shared/pair-plan-schema.md +298 -0
- package/config/skills/_shared/runtime-principles.md +110 -0
- package/config/skills/_shared/spec-verify-check.py +519 -0
- package/config/skills/devlyn:ideate/SKILL.md +99 -429
- package/config/skills/devlyn:ideate/references/elicitation.md +97 -0
- package/config/skills/devlyn:ideate/references/from-spec-mode.md +54 -0
- package/config/skills/devlyn:ideate/references/project-mode.md +76 -0
- package/config/skills/devlyn:ideate/references/spec-template.md +102 -0
- package/config/skills/devlyn:resolve/SKILL.md +172 -184
- package/config/skills/devlyn:resolve/references/free-form-mode.md +68 -0
- package/config/skills/devlyn:resolve/references/phases/build-gate.md +45 -0
- package/config/skills/devlyn:resolve/references/phases/cleanup.md +39 -0
- package/config/skills/devlyn:resolve/references/phases/implement.md +42 -0
- package/config/skills/devlyn:resolve/references/phases/plan.md +42 -0
- package/config/skills/devlyn:resolve/references/phases/verify.md +69 -0
- package/config/skills/devlyn:resolve/references/state-schema.md +106 -0
- package/{config/skills → optional-skills}/devlyn:design-system/SKILL.md +1 -0
- package/{config/skills → optional-skills}/devlyn:reap/SKILL.md +1 -0
- package/{config/skills → optional-skills}/devlyn:team-design-ui/SKILL.md +5 -0
- package/package.json +12 -2
- package/scripts/lint-skills.sh +431 -0
- package/config/skills/devlyn:auto-resolve/SKILL.md +0 -252
- package/config/skills/devlyn:auto-resolve/evals/evals.json +0 -21
- package/config/skills/devlyn:auto-resolve/evals/task-doctor-subcommand.md +0 -42
- package/config/skills/devlyn:auto-resolve/references/build-gate.md +0 -130
- package/config/skills/devlyn:auto-resolve/references/engine-routing.md +0 -82
- package/config/skills/devlyn:auto-resolve/references/findings-schema.md +0 -103
- package/config/skills/devlyn:auto-resolve/references/phases/phase-1-build.md +0 -54
- package/config/skills/devlyn:auto-resolve/references/phases/phase-2-evaluate.md +0 -45
- package/config/skills/devlyn:auto-resolve/references/phases/phase-3-critic.md +0 -84
- package/config/skills/devlyn:auto-resolve/references/pipeline-routing.md +0 -114
- package/config/skills/devlyn:auto-resolve/references/pipeline-state.md +0 -201
- package/config/skills/devlyn:auto-resolve/scripts/terminal_verdict.py +0 -96
- package/config/skills/devlyn:browser-validate/SKILL.md +0 -164
- package/config/skills/devlyn:browser-validate/references/flow-testing.md +0 -118
- package/config/skills/devlyn:browser-validate/references/tier1-chrome.md +0 -137
- package/config/skills/devlyn:browser-validate/references/tier2-playwright.md +0 -195
- package/config/skills/devlyn:browser-validate/references/tier3-curl.md +0 -57
- package/config/skills/devlyn:clean/SKILL.md +0 -285
- package/config/skills/devlyn:design-ui/SKILL.md +0 -351
- package/config/skills/devlyn:discover-product/SKILL.md +0 -124
- package/config/skills/devlyn:evaluate/SKILL.md +0 -564
- package/config/skills/devlyn:feature-spec/SKILL.md +0 -630
- package/config/skills/devlyn:ideate/references/challenge-rubric.md +0 -122
- package/config/skills/devlyn:ideate/references/codex-critic-template.md +0 -42
- package/config/skills/devlyn:ideate/references/templates/item-spec.md +0 -90
- package/config/skills/devlyn:implement-ui/SKILL.md +0 -466
- package/config/skills/devlyn:preflight/SKILL.md +0 -355
- package/config/skills/devlyn:preflight/references/auditors/browser-auditor.md +0 -32
- package/config/skills/devlyn:preflight/references/auditors/code-auditor.md +0 -86
- package/config/skills/devlyn:preflight/references/auditors/docs-auditor.md +0 -38
- package/config/skills/devlyn:product-spec/SKILL.md +0 -603
- package/config/skills/devlyn:recommend-features/SKILL.md +0 -286
- package/config/skills/devlyn:review/SKILL.md +0 -161
- package/config/skills/devlyn:team-resolve/SKILL.md +0 -631
- package/config/skills/devlyn:team-review/SKILL.md +0 -493
- package/config/skills/devlyn:update-docs/SKILL.md +0 -463
- package/config/skills/workflow-routing/SKILL.md +0 -73
- /package/{config/skills → optional-skills}/devlyn:reap/scripts/reap.sh +0 -0
- /package/{config/skills → optional-skills}/devlyn:reap/scripts/scan.sh +0 -0
|
@@ -1,630 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate a Feature Spec document from product spec behavior
|
|
3
|
-
allowed-tools: Bash(cp:*), Bash(mkdir:*), Bash(find:*), Bash(grep:*), Bash(cat:*), Bash(ls:*), Read, Write, Edit
|
|
4
|
-
argument-hint: [feature-name]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<role>
|
|
8
|
-
You generate feature specs. Transform product spec behaviors into implementable specifications. Adapt sections based on platform type from product spec.
|
|
9
|
-
</role>
|
|
10
|
-
|
|
11
|
-
<input>
|
|
12
|
-
$ARGUMENTS
|
|
13
|
-
</input>
|
|
14
|
-
|
|
15
|
-
<step_1_verify>
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
test -f docs/product-spec.md && echo "OK" || echo "MISSING"
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
If missing:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
No product spec at docs/product-spec.md
|
|
25
|
-
Run /product-spec first.
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Stop.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
mkdir -p docs/feature-specs
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
</step_1_verify>
|
|
35
|
-
|
|
36
|
-
<step_2_read_product_spec>
|
|
37
|
-
Read docs/product-spec.md.
|
|
38
|
-
|
|
39
|
-
Extract:
|
|
40
|
-
|
|
41
|
-
```yaml
|
|
42
|
-
platform: # from meta.platform
|
|
43
|
-
behaviors: # all behaviors
|
|
44
|
-
entities: # all entities
|
|
45
|
-
views: # if defined
|
|
46
|
-
integrations: # if defined
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
</step_2_read_product_spec>
|
|
50
|
-
|
|
51
|
-
<step_3_find_feature>
|
|
52
|
-
Search for $ARGUMENTS in:
|
|
53
|
-
|
|
54
|
-
1. `behaviors[].name`
|
|
55
|
-
2. `views[].name` (if exists)
|
|
56
|
-
3. `entities[].name`
|
|
57
|
-
|
|
58
|
-
If not found:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
Feature "{$ARGUMENTS}" not found in product spec.
|
|
62
|
-
|
|
63
|
-
Available behaviors:
|
|
64
|
-
{list behavior names}
|
|
65
|
-
|
|
66
|
-
Run /recommend-features to see prioritized list.
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Stop.
|
|
70
|
-
|
|
71
|
-
Extract related content for this feature:
|
|
72
|
-
|
|
73
|
-
```yaml
|
|
74
|
-
behavior: # matched behavior definition
|
|
75
|
-
entities: # entities involved
|
|
76
|
-
views: # views if any
|
|
77
|
-
permissions: # if defined
|
|
78
|
-
errors: # error cases
|
|
79
|
-
integrations: # if uses external services
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
</step_3_find_feature>
|
|
83
|
-
|
|
84
|
-
<step_4_detect_interfaces>
|
|
85
|
-
Determine interface types from `meta.platform`:
|
|
86
|
-
|
|
87
|
-
```yaml
|
|
88
|
-
web: [api, ui]
|
|
89
|
-
mobile: [api, ui]
|
|
90
|
-
desktop: [api, ui]
|
|
91
|
-
cli: [commands]
|
|
92
|
-
api: [api]
|
|
93
|
-
library: [public_api]
|
|
94
|
-
sdk: [public_api]
|
|
95
|
-
service: [api, events, jobs]
|
|
96
|
-
worker: [jobs, events]
|
|
97
|
-
mcp: [tools, resources]
|
|
98
|
-
embedded: [hardware, protocols]
|
|
99
|
-
smartcontract: [contract_functions, contract_events, storage]
|
|
100
|
-
solidity: [contract_functions, contract_events, storage]
|
|
101
|
-
solana: [instructions, accounts, events]
|
|
102
|
-
web3: [contract_functions, contract_events, storage]
|
|
103
|
-
blockchain: [contract_functions, contract_events, storage]
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
If platform not specified, infer from:
|
|
107
|
-
|
|
108
|
-
- Has `views` section → include ui
|
|
109
|
-
- Has HTTP behaviors → include api
|
|
110
|
-
- Has CLI behaviors → include commands
|
|
111
|
-
- Has async behaviors → include jobs/events
|
|
112
|
-
- Has `contracts` section → include contract interfaces
|
|
113
|
-
- Has `.sol` files in codebase → include contract interfaces
|
|
114
|
-
</step_4_detect_interfaces>
|
|
115
|
-
|
|
116
|
-
<step_5_analyze_codebase>
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
ls package.json tsconfig.json pyproject.toml Cargo.toml go.mod hardhat.config.js foundry.toml anchor.toml 2>/dev/null
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
find . -type f \( -name "*.ts" -o -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.sol" -o -name "*.move" \) 2>/dev/null | grep -v node_modules | head -20
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
grep -ril "{$ARGUMENTS}" src/ app/ lib/ contracts/ programs/ 2>/dev/null | head -5
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
If `.sol` files found → set `interfaces += [contract_functions, contract_events, storage]`
|
|
131
|
-
If `programs/` or `anchor.toml` found → set `interfaces += [instructions, accounts, events]`
|
|
132
|
-
</step_5_analyze_codebase>
|
|
133
|
-
|
|
134
|
-
<step_6_check_template>
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
cat .claude/templates/feature-spec.md 2>/dev/null || echo "NO_TEMPLATE"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
If template exists, use its structure with platform adaptations.
|
|
141
|
-
</step_6_check_template>
|
|
142
|
-
|
|
143
|
-
<spec_sections>
|
|
144
|
-
Include sections based on detected interfaces:
|
|
145
|
-
|
|
146
|
-
## Meta (always)
|
|
147
|
-
|
|
148
|
-
```yaml
|
|
149
|
-
id: F-{number}
|
|
150
|
-
status: draft
|
|
151
|
-
version: "0.1"
|
|
152
|
-
created: { today }
|
|
153
|
-
product_spec: "{behavior_name}"
|
|
154
|
-
phase: { phase }
|
|
155
|
-
platform: { platform }
|
|
156
|
-
interfaces: [{ detected interfaces }]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Overview (always)
|
|
160
|
-
|
|
161
|
-
```yaml
|
|
162
|
-
purpose: { one sentence }
|
|
163
|
-
success_criteria:
|
|
164
|
-
- { measurable outcome }
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## Data Model (if has entities)
|
|
168
|
-
|
|
169
|
-
### {EntityName}
|
|
170
|
-
|
|
171
|
-
```yaml
|
|
172
|
-
attributes:
|
|
173
|
-
{ field }:
|
|
174
|
-
type: { type }
|
|
175
|
-
required: { bool }
|
|
176
|
-
constraints: { rules }
|
|
177
|
-
|
|
178
|
-
relations:
|
|
179
|
-
{ name }:
|
|
180
|
-
type: { relation_type }
|
|
181
|
-
target: { Entity }
|
|
182
|
-
|
|
183
|
-
examples:
|
|
184
|
-
typical: { value }
|
|
185
|
-
edge: { value }
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
If has lifecycle:
|
|
189
|
-
|
|
190
|
-
```yaml
|
|
191
|
-
states:
|
|
192
|
-
{ state }:
|
|
193
|
-
transitions:
|
|
194
|
-
- to: { next }
|
|
195
|
-
trigger: { action }
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## API (if api in interfaces)
|
|
201
|
-
|
|
202
|
-
### {METHOD} {/path}
|
|
203
|
-
|
|
204
|
-
```yaml
|
|
205
|
-
purpose: { description }
|
|
206
|
-
auth: { required|optional|public }
|
|
207
|
-
|
|
208
|
-
request:
|
|
209
|
-
body: {}
|
|
210
|
-
|
|
211
|
-
response:
|
|
212
|
-
success:
|
|
213
|
-
status: { code }
|
|
214
|
-
body: {}
|
|
215
|
-
errors:
|
|
216
|
-
- code: { ERROR_CODE }
|
|
217
|
-
when: { condition }
|
|
218
|
-
message: { text }
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## CLI (if commands in interfaces)
|
|
224
|
-
|
|
225
|
-
### {command}
|
|
226
|
-
|
|
227
|
-
```yaml
|
|
228
|
-
usage: {program} {command} [options] <args>
|
|
229
|
-
|
|
230
|
-
arguments:
|
|
231
|
-
{arg}:
|
|
232
|
-
required: {bool}
|
|
233
|
-
description: {text}
|
|
234
|
-
|
|
235
|
-
options:
|
|
236
|
-
--{flag}:
|
|
237
|
-
short: -{f}
|
|
238
|
-
type: {type}
|
|
239
|
-
default: {value}
|
|
240
|
-
|
|
241
|
-
output:
|
|
242
|
-
success: {format}
|
|
243
|
-
error: {format}
|
|
244
|
-
exit_codes:
|
|
245
|
-
0: success
|
|
246
|
-
1: {error}
|
|
247
|
-
|
|
248
|
-
examples:
|
|
249
|
-
- cmd: {example}
|
|
250
|
-
desc: {what it does}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
## Public API (if public_api in interfaces)
|
|
256
|
-
|
|
257
|
-
### {function_name}
|
|
258
|
-
|
|
259
|
-
```yaml
|
|
260
|
-
signature: { full signature }
|
|
261
|
-
|
|
262
|
-
parameters:
|
|
263
|
-
{ param }:
|
|
264
|
-
type: { type }
|
|
265
|
-
description: { text }
|
|
266
|
-
|
|
267
|
-
returns:
|
|
268
|
-
type: { type }
|
|
269
|
-
description: { text }
|
|
270
|
-
|
|
271
|
-
throws:
|
|
272
|
-
- { Error }: { when }
|
|
273
|
-
|
|
274
|
-
example: |
|
|
275
|
-
{code}
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### {ClassName}
|
|
279
|
-
|
|
280
|
-
```yaml
|
|
281
|
-
purpose: { description }
|
|
282
|
-
|
|
283
|
-
constructor:
|
|
284
|
-
params: {}
|
|
285
|
-
|
|
286
|
-
methods:
|
|
287
|
-
{ method }: { signature }
|
|
288
|
-
|
|
289
|
-
properties:
|
|
290
|
-
{ prop }: { type }
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## MCP (if tools/resources in interfaces)
|
|
296
|
-
|
|
297
|
-
### Tool: {name}
|
|
298
|
-
|
|
299
|
-
```yaml
|
|
300
|
-
description: { what it does }
|
|
301
|
-
|
|
302
|
-
parameters:
|
|
303
|
-
{ param }:
|
|
304
|
-
type: { type }
|
|
305
|
-
required: { bool }
|
|
306
|
-
|
|
307
|
-
returns: { description }
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### Resource: {uri}
|
|
311
|
-
|
|
312
|
-
```yaml
|
|
313
|
-
uri_template: { template }
|
|
314
|
-
mime_type: { type }
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
---
|
|
318
|
-
|
|
319
|
-
## UI (if ui in interfaces)
|
|
320
|
-
|
|
321
|
-
### {ViewName}
|
|
322
|
-
|
|
323
|
-
```yaml
|
|
324
|
-
route: { path }
|
|
325
|
-
layout: { type }
|
|
326
|
-
|
|
327
|
-
states:
|
|
328
|
-
loading: { shows }
|
|
329
|
-
empty: { shows }
|
|
330
|
-
error: { shows }
|
|
331
|
-
success: { shows }
|
|
332
|
-
|
|
333
|
-
flow: 1. {step}
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
---
|
|
337
|
-
|
|
338
|
-
## Events (if events in interfaces)
|
|
339
|
-
|
|
340
|
-
### {event_name}
|
|
341
|
-
|
|
342
|
-
```yaml
|
|
343
|
-
trigger: { when }
|
|
344
|
-
payload:
|
|
345
|
-
{ field }: { type }
|
|
346
|
-
subscribers: [{ who }]
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## Jobs (if jobs in interfaces)
|
|
352
|
-
|
|
353
|
-
### {job_name}
|
|
354
|
-
|
|
355
|
-
```yaml
|
|
356
|
-
trigger: { schedule|event|manual }
|
|
357
|
-
schedule: { cron }
|
|
358
|
-
input: {}
|
|
359
|
-
output: {}
|
|
360
|
-
timeout: { duration }
|
|
361
|
-
retry: { strategy }
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
---
|
|
365
|
-
|
|
366
|
-
## Hardware (if hardware in interfaces)
|
|
367
|
-
|
|
368
|
-
### {interface_name}
|
|
369
|
-
|
|
370
|
-
```yaml
|
|
371
|
-
protocol: { type }
|
|
372
|
-
pins: [{ list }]
|
|
373
|
-
timing: { constraints }
|
|
374
|
-
commands:
|
|
375
|
-
{ cmd }: { description }
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
|
-
## Contract (if contract_functions in interfaces)
|
|
381
|
-
|
|
382
|
-
### {ContractName}
|
|
383
|
-
|
|
384
|
-
```yaml
|
|
385
|
-
purpose: { description }
|
|
386
|
-
inherits: [{ parent contracts }]
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
### State
|
|
390
|
-
|
|
391
|
-
```yaml
|
|
392
|
-
{ variable }:
|
|
393
|
-
type: { solidity type }
|
|
394
|
-
visibility: { public|private|internal }
|
|
395
|
-
description: { purpose }
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
### Functions
|
|
399
|
-
|
|
400
|
-
#### {function_name}
|
|
401
|
-
|
|
402
|
-
```yaml
|
|
403
|
-
visibility: { external|public|internal|private }
|
|
404
|
-
mutability: { view|pure|payable|nonpayable }
|
|
405
|
-
modifiers: [{ modifier }]
|
|
406
|
-
|
|
407
|
-
parameters:
|
|
408
|
-
{ param }:
|
|
409
|
-
type: { solidity type }
|
|
410
|
-
description: { text }
|
|
411
|
-
|
|
412
|
-
returns:
|
|
413
|
-
{ name }: { type }
|
|
414
|
-
|
|
415
|
-
requires:
|
|
416
|
-
- { condition }: { revert message }
|
|
417
|
-
|
|
418
|
-
emits:
|
|
419
|
-
- { EventName }
|
|
420
|
-
|
|
421
|
-
gas_estimate: { approximate }
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
### Events
|
|
425
|
-
|
|
426
|
-
```yaml
|
|
427
|
-
{ EventName }:
|
|
428
|
-
params:
|
|
429
|
-
{ param }:
|
|
430
|
-
type: { type }
|
|
431
|
-
indexed: { bool }
|
|
432
|
-
emitted_when: { condition }
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
### Modifiers
|
|
436
|
-
|
|
437
|
-
```yaml
|
|
438
|
-
{ modifier_name }:
|
|
439
|
-
purpose: { description }
|
|
440
|
-
requires: [{ conditions }]
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
### Access Control
|
|
444
|
-
|
|
445
|
-
```yaml
|
|
446
|
-
roles:
|
|
447
|
-
{ ROLE_NAME }:
|
|
448
|
-
can: [{ functions }]
|
|
449
|
-
granted_by: { who }
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
### Upgradability (if applicable)
|
|
453
|
-
|
|
454
|
-
```yaml
|
|
455
|
-
pattern: { transparent|uups|beacon|diamond }
|
|
456
|
-
storage_layout: { considerations }
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
## Solana Program (if instructions in interfaces)
|
|
462
|
-
|
|
463
|
-
### {ProgramName}
|
|
464
|
-
|
|
465
|
-
```yaml
|
|
466
|
-
program_id: { pubkey or TBD }
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
### Accounts
|
|
470
|
-
|
|
471
|
-
```yaml
|
|
472
|
-
{ AccountName }:
|
|
473
|
-
seeds: [{ seed derivation }]
|
|
474
|
-
space: { bytes }
|
|
475
|
-
fields:
|
|
476
|
-
{ field }:
|
|
477
|
-
type: { borsh type }
|
|
478
|
-
offset: { bytes }
|
|
479
|
-
```
|
|
480
|
-
|
|
481
|
-
### Instructions
|
|
482
|
-
|
|
483
|
-
#### {instruction_name}
|
|
484
|
-
|
|
485
|
-
```yaml
|
|
486
|
-
discriminator: { 8 bytes }
|
|
487
|
-
|
|
488
|
-
accounts:
|
|
489
|
-
{ account }:
|
|
490
|
-
is_mut: { bool }
|
|
491
|
-
is_signer: { bool }
|
|
492
|
-
description: { text }
|
|
493
|
-
|
|
494
|
-
args:
|
|
495
|
-
{ arg }:
|
|
496
|
-
type: { borsh type }
|
|
497
|
-
|
|
498
|
-
logic: { description }
|
|
499
|
-
|
|
500
|
-
emits:
|
|
501
|
-
- { event }
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
### Events
|
|
505
|
-
|
|
506
|
-
```yaml
|
|
507
|
-
{ EventName }:
|
|
508
|
-
fields:
|
|
509
|
-
{ field }: { type }
|
|
510
|
-
```
|
|
511
|
-
|
|
512
|
-
---
|
|
513
|
-
|
|
514
|
-
## Business Logic (always)
|
|
515
|
-
|
|
516
|
-
### Rules
|
|
517
|
-
|
|
518
|
-
```yaml
|
|
519
|
-
- rule: { name }
|
|
520
|
-
when: { condition }
|
|
521
|
-
then: { action }
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
### Validations
|
|
525
|
-
|
|
526
|
-
```yaml
|
|
527
|
-
- field: { name }
|
|
528
|
-
rules: [{ validation }]
|
|
529
|
-
message: { error }
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
### Permissions (if defined)
|
|
533
|
-
|
|
534
|
-
```yaml
|
|
535
|
-
{ action }: { who }
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
---
|
|
539
|
-
|
|
540
|
-
## Integrations (if has external services)
|
|
541
|
-
|
|
542
|
-
```yaml
|
|
543
|
-
- service: { name }
|
|
544
|
-
operation: { what }
|
|
545
|
-
fallback: { if fails }
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
---
|
|
549
|
-
|
|
550
|
-
## Test Scenarios (always)
|
|
551
|
-
|
|
552
|
-
### Unit
|
|
553
|
-
|
|
554
|
-
```yaml
|
|
555
|
-
- scenario: { description }
|
|
556
|
-
given: { setup }
|
|
557
|
-
when: { action }
|
|
558
|
-
then: { result }
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
### Edge Cases
|
|
562
|
-
|
|
563
|
-
```yaml
|
|
564
|
-
- case: { description }
|
|
565
|
-
input: { value }
|
|
566
|
-
expected: { handling }
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
---
|
|
570
|
-
|
|
571
|
-
## Dependencies (always)
|
|
572
|
-
|
|
573
|
-
```yaml
|
|
574
|
-
requires:
|
|
575
|
-
- { feature }: { status }
|
|
576
|
-
enables:
|
|
577
|
-
- { feature }
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
## Open Questions
|
|
581
|
-
|
|
582
|
-
- [ ] {question}
|
|
583
|
-
</spec_sections>
|
|
584
|
-
|
|
585
|
-
<step_7_write>
|
|
586
|
-
Write to: `docs/feature-specs/{$ARGUMENTS}.md`
|
|
587
|
-
|
|
588
|
-
Include only sections for detected interfaces.
|
|
589
|
-
Use kebab-case filename.
|
|
590
|
-
</step_7_write>
|
|
591
|
-
|
|
592
|
-
<step_8_output>
|
|
593
|
-
|
|
594
|
-
```markdown
|
|
595
|
-
## Feature Spec Generated
|
|
596
|
-
|
|
597
|
-
**File:** `docs/feature-specs/{name}.md`
|
|
598
|
-
**Platform:** {platform}
|
|
599
|
-
**Interfaces:** {list}
|
|
600
|
-
|
|
601
|
-
### Summary
|
|
602
|
-
|
|
603
|
-
- Behavior: {name}
|
|
604
|
-
- Entities: {count}
|
|
605
|
-
- {interface_type}: {count} (e.g., "Endpoints: 3" or "Commands: 2" or "Functions: 5")
|
|
606
|
-
|
|
607
|
-
### Dependencies
|
|
608
|
-
|
|
609
|
-
- ✅ {specced}
|
|
610
|
-
- ❌ {missing} → `/feature-spec {name}`
|
|
611
|
-
```
|
|
612
|
-
|
|
613
|
-
</step_8_output>
|
|
614
|
-
|
|
615
|
-
<update_mode>
|
|
616
|
-
If file exists at `docs/feature-specs/{$ARGUMENTS}.md`:
|
|
617
|
-
|
|
618
|
-
Read existing. Apply targeted changes. Update version.
|
|
619
|
-
|
|
620
|
-
```markdown
|
|
621
|
-
## Feature Spec Updated
|
|
622
|
-
|
|
623
|
-
**Version:** {old} → {new}
|
|
624
|
-
|
|
625
|
-
### Changes
|
|
626
|
-
|
|
627
|
-
- {change}
|
|
628
|
-
```
|
|
629
|
-
|
|
630
|
-
</update_mode>
|