ystack 0.1.0 → 0.2.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/CHANGELOG.md +36 -1
- package/LINTING.md +36 -71
- package/PHILOSOPHY.md +11 -11
- package/README.md +103 -43
- package/RUNTIMES.md +10 -10
- package/bin/cli.js +84 -62
- package/hooks/docs-match-progress.js +100 -0
- package/hooks/no-undocumented-check.js +91 -0
- package/hooks/progress-before-ship.js +74 -0
- package/hooks/session-start.sh +11 -6
- package/hooks/workflow-nudge.js +2 -2
- package/package.json +3 -5
- package/skills/address-review/SKILL.md +1 -1
- package/skills/build/SKILL.md +3 -3
- package/skills/docs/SKILL.md +4 -2
- package/skills/go/SKILL.md +11 -9
- package/skills/import/SKILL.md +182 -81
- package/skills/pr/SKILL.md +15 -10
- package/skills/quick/SKILL.md +110 -0
- package/skills/scaffold/SKILL.md +77 -65
- package/PLAN.md +0 -515
package/skills/go/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: go
|
|
3
3
|
description: >
|
|
4
4
|
Execute a plan created by /build. Runs each task with a fresh subagent, produces
|
|
5
|
-
atomic commits, and updates
|
|
5
|
+
atomic commits, and updates progress files. Use this skill when the user says
|
|
6
6
|
'go', '/go', 'execute', 'run the plan', 'execute the plan', 'start building',
|
|
7
7
|
'let's do it', or confirms a plan and wants to proceed with implementation.
|
|
8
8
|
Requires a PLAN.md from a prior /build run.
|
|
@@ -111,18 +111,20 @@ Where:
|
|
|
111
111
|
- `scope` = the package or module affected (e.g., `db`, `api`, `admin`, `shared`)
|
|
112
112
|
- `description` = what changed, in imperative mood
|
|
113
113
|
|
|
114
|
-
Stage
|
|
114
|
+
Stage the code files AND the progress file together, then commit as one atomic operation:
|
|
115
115
|
|
|
116
|
-
**Step 5: Update notes**
|
|
117
|
-
|
|
118
|
-
If Beads is available (`bd` CLI), update the bead's structured notes:
|
|
119
116
|
```bash
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
bd close <bead-id> --reason "<summary>"
|
|
117
|
+
git add <code-files> .ystack/progress/<module>.md
|
|
118
|
+
git commit -m "<type>(<scope>): <description>"
|
|
123
119
|
```
|
|
124
120
|
|
|
125
|
-
|
|
121
|
+
**Step 5: Update progress (before committing)**
|
|
122
|
+
|
|
123
|
+
Before running `git commit` in Step 4, update the module's progress file at `.ystack/progress/<module>.md`:
|
|
124
|
+
- Check the box for the completed feature: `- [ ]` → `- [x]`
|
|
125
|
+
- Add a row to the Decisions table if any implementation decisions were made
|
|
126
|
+
|
|
127
|
+
The progress update and code change are staged and committed together — one commit includes both.
|
|
126
128
|
|
|
127
129
|
### Subagent execution (Tier 1 runtimes)
|
|
128
130
|
|
package/skills/import/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: import
|
|
3
3
|
description: >
|
|
4
|
-
Analyze an existing codebase and generate a ystack module registry,
|
|
4
|
+
Analyze an existing codebase and generate a ystack module registry, progress files,
|
|
5
5
|
and a documentation gap report. Use this skill when the user says 'import', '/import',
|
|
6
6
|
'adopt this project', 'onboard this repo', 'scan the codebase', 'set up ystack here',
|
|
7
7
|
or when adding ystack to a project that already has code and possibly docs.
|
|
@@ -11,94 +11,164 @@ user-invocable: true
|
|
|
11
11
|
|
|
12
12
|
# /import — Adopt an Existing Project
|
|
13
13
|
|
|
14
|
-
You analyze an existing codebase and produce a module registry,
|
|
14
|
+
You analyze an existing codebase and produce a module registry, progress files, and a gap report. This is the on-ramp for projects that already have code.
|
|
15
15
|
|
|
16
16
|
**You do NOT modify code or docs.** You produce a registry and report. The user decides what to act on.
|
|
17
17
|
|
|
18
18
|
## Phase 0: Determine Scope
|
|
19
19
|
|
|
20
|
-
1. Check if
|
|
20
|
+
1. Check if `.ystack/config.json` already exists:
|
|
21
21
|
```bash
|
|
22
|
-
cat ystack
|
|
22
|
+
cat .ystack/config.json 2>/dev/null
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
2. If a `--module <name>` argument was provided, scope the import to that module only. Otherwise, scan the entire repo.
|
|
26
26
|
|
|
27
27
|
3. If the config already has modules registered, note which are new vs. already known.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
4. Identify the project root — store it as `$PROJECT_ROOT` for the scan agents.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
## Phase 1: Scan the Codebase (parallel subagents)
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
**You MUST use the Agent tool to run these 4 scans in parallel.** Launch all 4 agents in a single message so they execute concurrently. Each agent writes its findings to a file in `.context/import/` so results survive context limits.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Before launching agents, create the output directory:
|
|
36
36
|
```bash
|
|
37
|
-
|
|
38
|
-
find . -name "package.json" -not -path "*/node_modules/*" -maxdepth 3
|
|
39
|
-
|
|
40
|
-
# Get directory structure
|
|
41
|
-
ls -d apps/*/ packages/*/ 2>/dev/null
|
|
42
|
-
|
|
43
|
-
# Check for monorepo config
|
|
44
|
-
cat turbo.json 2>/dev/null
|
|
45
|
-
cat pnpm-workspace.yaml 2>/dev/null
|
|
46
|
-
cat lerna.json 2>/dev/null
|
|
37
|
+
mkdir -p .context/import
|
|
47
38
|
```
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
- `apps/*` → likely an app module (UI, server, API)
|
|
51
|
-
- `packages/*` → likely a library package
|
|
52
|
-
- `src/modules/*` or `src/features/*` → feature-based structure (single-app repo)
|
|
53
|
-
- Top-level `src/` without sub-packages → single-module project
|
|
40
|
+
### Launch 4 agents in parallel
|
|
54
41
|
|
|
55
|
-
|
|
42
|
+
Use the Agent tool with `subagent_type: "Explore"` for each. Include the project root path in every agent prompt so they know where to look.
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
# Find cross-package imports
|
|
60
|
-
grep -r "from ['\"]@" packages/ apps/ --include="*.ts" --include="*.tsx" -l 2>/dev/null
|
|
44
|
+
---
|
|
61
45
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
**Agent 1 — "structure-scan"**
|
|
47
|
+
|
|
48
|
+
Prompt the agent with:
|
|
49
|
+
|
|
50
|
+
> Scan the codebase at `$PROJECT_ROOT` and write findings to `$PROJECT_ROOT/.context/import/scan-structure.md`.
|
|
51
|
+
>
|
|
52
|
+
> Your job: map the directory tree and identify module boundaries.
|
|
53
|
+
>
|
|
54
|
+
> 1. Find all package.json files (exclude node_modules), up to depth 3
|
|
55
|
+
> 2. List directories under apps/, packages/, src/modules/, src/features/ if they exist
|
|
56
|
+
> 3. Check for monorepo config: turbo.json, pnpm-workspace.yaml, lerna.json, nx.json
|
|
57
|
+
> 4. Read the root package.json for project name and workspace config
|
|
58
|
+
>
|
|
59
|
+
> Classify each directory:
|
|
60
|
+
> - `apps/*` → app module (UI, server, API)
|
|
61
|
+
> - `packages/*` → library package
|
|
62
|
+
> - `src/modules/*` or `src/features/*` → feature-based structure
|
|
63
|
+
> - Top-level `src/` without sub-packages → single-module project
|
|
64
|
+
>
|
|
65
|
+
> Write your output as a structured markdown file with:
|
|
66
|
+
> - Project name
|
|
67
|
+
> - Monorepo tool (if any)
|
|
68
|
+
> - A table of directories with: path, type (app/package/feature/single), and a one-line description based on its package.json name/description or directory name
|
|
69
|
+
>
|
|
70
|
+
> Do NOT modify any files other than the output file.
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
---
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
**Agent 2 — "dependency-scan"**
|
|
75
|
+
|
|
76
|
+
Prompt the agent with:
|
|
77
|
+
|
|
78
|
+
> Scan the codebase at `$PROJECT_ROOT` and write findings to `$PROJECT_ROOT/.context/import/scan-dependencies.md`.
|
|
79
|
+
>
|
|
80
|
+
> Your job: map imports and dependencies between packages to build a dependency graph.
|
|
81
|
+
>
|
|
82
|
+
> 1. For each package.json in apps/ and packages/, extract:
|
|
83
|
+
> - Package name
|
|
84
|
+
> - Dependencies and devDependencies that reference workspace packages (look for `workspace:` protocol or `@<org>/` packages that match other packages in the repo)
|
|
85
|
+
> 2. Search for cross-package imports in .ts/.tsx/.js/.jsx files:
|
|
86
|
+
> - `from '@<org>/...'` or `from '<package-name>'` patterns that reference sibling packages
|
|
87
|
+
> - Focus on the import sources, not every file — just which packages import from which
|
|
88
|
+
> 3. Identify shared/foundational packages that many others depend on
|
|
89
|
+
>
|
|
90
|
+
> Write your output as a structured markdown file with:
|
|
91
|
+
> - A dependency table: package → depends on [list]
|
|
92
|
+
> - A "most depended on" ranking
|
|
93
|
+
> - Any circular dependency warnings
|
|
94
|
+
>
|
|
95
|
+
> Do NOT modify any files other than the output file.
|
|
69
96
|
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Database schemas
|
|
73
|
-
find . -path "*/schema*" -name "*.ts" -not -path "*/node_modules/*" 2>/dev/null
|
|
74
|
-
find . -path "*/migrations*" -not -path "*/node_modules/*" -type d 2>/dev/null
|
|
97
|
+
---
|
|
75
98
|
|
|
76
|
-
|
|
77
|
-
|
|
99
|
+
**Agent 3 — "schema-scan"**
|
|
100
|
+
|
|
101
|
+
Prompt the agent with:
|
|
102
|
+
|
|
103
|
+
> Scan the codebase at `$PROJECT_ROOT` and write findings to `$PROJECT_ROOT/.context/import/scan-schemas.md`.
|
|
104
|
+
>
|
|
105
|
+
> Your job: identify data models, API routes, and type definitions.
|
|
106
|
+
>
|
|
107
|
+
> 1. Database schemas — find files matching: `**/schema*.ts`, `**/models/**`, `**/entities/**`, `**/prisma/schema.prisma`, `**/drizzle/**`
|
|
108
|
+
> 2. Migrations — find directories matching: `**/migrations/**`
|
|
109
|
+
> 3. API routes — find files in: `**/routes/**`, `**/api/**`, `**/app/api/**` (Next.js app router)
|
|
110
|
+
> 4. Shared types — find files in: `**/types/**`, `**/*.types.ts`, `**/*.d.ts` (exclude node_modules)
|
|
111
|
+
> 5. For each schema/model file found, briefly note what entities/tables it defines (read the file to extract type/interface/table names)
|
|
112
|
+
> 6. For each API route directory, list the route files and their HTTP methods if detectable
|
|
113
|
+
>
|
|
114
|
+
> Write your output as a structured markdown file with:
|
|
115
|
+
> - Data models section: file path → entities defined
|
|
116
|
+
> - API routes section: route path → methods
|
|
117
|
+
> - Shared types section: file path → key types exported
|
|
118
|
+
>
|
|
119
|
+
> Do NOT modify any files other than the output file.
|
|
78
120
|
|
|
79
|
-
|
|
80
|
-
find . -path "*/types/*" -name "*.ts" -not -path "*/node_modules/*" 2>/dev/null
|
|
81
|
-
```
|
|
121
|
+
---
|
|
82
122
|
|
|
83
|
-
|
|
123
|
+
**Agent 4 — "docs-scan"**
|
|
124
|
+
|
|
125
|
+
Prompt the agent with:
|
|
126
|
+
|
|
127
|
+
> Scan the codebase at `$PROJECT_ROOT` and write findings to `$PROJECT_ROOT/.context/import/scan-docs.md`.
|
|
128
|
+
>
|
|
129
|
+
> Your job: find existing documentation and map it to code modules.
|
|
130
|
+
>
|
|
131
|
+
> 1. Check for doc frameworks:
|
|
132
|
+
> - Nextra: look for `docs/src/content/_meta.ts` or `docs/_meta.ts`
|
|
133
|
+
> - Fumadocs: look for `content/docs/meta.json`
|
|
134
|
+
> - Docusaurus: look for `docs/` with `docusaurus.config.*`
|
|
135
|
+
> - Mintlify: look for `mint.json`
|
|
136
|
+
> - Generic: look for `docs/`, `README.md`, `CLAUDE.md`, `AGENTS.md`
|
|
137
|
+
> 2. If a doc framework is found, read the navigation config (`_meta.ts`, `meta.json`, `mint.json`, `sidebars.*`) to understand the doc site structure
|
|
138
|
+
> 3. List all .md and .mdx files in the docs directory
|
|
139
|
+
> 4. For each doc section/page, note:
|
|
140
|
+
> - The page path (relative to docs root)
|
|
141
|
+
> - The page title (from frontmatter or first heading)
|
|
142
|
+
> - Which code module it likely corresponds to (by name matching)
|
|
143
|
+
> 5. Read CLAUDE.md and AGENTS.md if they exist — extract any project context
|
|
144
|
+
>
|
|
145
|
+
> Write your output as a structured markdown file with:
|
|
146
|
+
> - Docs framework detected
|
|
147
|
+
> - Docs root path
|
|
148
|
+
> - Navigation structure (sections and pages)
|
|
149
|
+
> - A table mapping: doc page → likely code module
|
|
150
|
+
> - Any project context from CLAUDE.md/AGENTS.md
|
|
151
|
+
>
|
|
152
|
+
> Do NOT modify any files other than the output file.
|
|
84
153
|
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Nextra
|
|
88
|
-
ls docs/src/content/_meta.ts 2>/dev/null && find docs/src/content -name "*.mdx" -o -name "*.md" 2>/dev/null
|
|
154
|
+
---
|
|
89
155
|
|
|
90
|
-
|
|
91
|
-
ls content/docs/meta.json 2>/dev/null && find content/docs -name "*.mdx" -o -name "*.md" 2>/dev/null
|
|
156
|
+
### Collect scan results
|
|
92
157
|
|
|
93
|
-
|
|
94
|
-
|
|
158
|
+
After all 4 agents complete, read their output files:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
.context/import/scan-structure.md
|
|
162
|
+
.context/import/scan-dependencies.md
|
|
163
|
+
.context/import/scan-schemas.md
|
|
164
|
+
.context/import/scan-docs.md
|
|
95
165
|
```
|
|
96
166
|
|
|
97
|
-
|
|
167
|
+
If `--module <name>` was specified, you may skip agents whose scope doesn't overlap with the target module, but generally it's better to run all 4 and filter in Phase 2.
|
|
98
168
|
|
|
99
169
|
## Phase 2: Detect Modules
|
|
100
170
|
|
|
101
|
-
|
|
171
|
+
Using the collected scan results from `.context/import/`, group findings into logical modules.
|
|
102
172
|
|
|
103
173
|
### Grouping rules
|
|
104
174
|
|
|
@@ -153,7 +223,7 @@ Does this look right? I'll generate the registry from this.
|
|
|
153
223
|
|
|
154
224
|
## Phase 3: Generate Module Registry
|
|
155
225
|
|
|
156
|
-
Create or update
|
|
226
|
+
Create or update `.ystack/config.json`:
|
|
157
227
|
|
|
158
228
|
```json
|
|
159
229
|
{
|
|
@@ -169,8 +239,7 @@ Create or update `ystack.config.json`:
|
|
|
169
239
|
"packages/payments/**",
|
|
170
240
|
"packages/db/src/schema/transactions.*",
|
|
171
241
|
"apps/api/src/routes/payments.*"
|
|
172
|
-
]
|
|
173
|
-
"status": "active"
|
|
242
|
+
]
|
|
174
243
|
}
|
|
175
244
|
}
|
|
176
245
|
}
|
|
@@ -179,34 +248,66 @@ Create or update `ystack.config.json`:
|
|
|
179
248
|
For each module:
|
|
180
249
|
- `doc` — the matching docs path, or `null` if no docs exist
|
|
181
250
|
- `scope` — glob patterns covering all files that belong to this module
|
|
182
|
-
- `status` — `"active"` if code exists, `"planned"` if only docs/stubs
|
|
183
251
|
|
|
184
252
|
If the config already exists, merge new modules — don't overwrite existing entries.
|
|
185
253
|
|
|
186
|
-
## Phase 4: Create
|
|
254
|
+
## Phase 4: Create Progress Files
|
|
187
255
|
|
|
188
|
-
|
|
256
|
+
Create a progress file per module in `.ystack/progress/`:
|
|
189
257
|
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
bd create "<Module Name>" -t epic --metadata '{"doc": "<module-slug>", "ystack": true}'
|
|
193
|
-
```
|
|
258
|
+
For each module, write `.ystack/progress/<module-slug>.md`:
|
|
194
259
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
bd create "<Feature description>" -t feature --parent <epic-id>
|
|
198
|
-
bd close <bead-id> --reason "Pre-existing implementation detected by /import"
|
|
199
|
-
```
|
|
260
|
+
```markdown
|
|
261
|
+
# <Module Name>
|
|
200
262
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
263
|
+
## Features
|
|
264
|
+
- [x] <Implemented Feature 1> → <doc-path>#<anchor>
|
|
265
|
+
- [x] <Implemented Feature 2> → <doc-path>#<anchor>
|
|
266
|
+
- [?] <Feature with code but no docs> → (needs docs)
|
|
267
|
+
⚠️ Code exists but no doc section found
|
|
268
|
+
- [ ] <Planned Feature> → <doc-path>#<anchor>
|
|
205
269
|
|
|
206
|
-
|
|
270
|
+
## Decisions
|
|
271
|
+
| Date | Feature | Decision |
|
|
272
|
+
|------------|---------|---------------------------------------|
|
|
273
|
+
| pre-import | All | Pre-existing — detected by /import |
|
|
274
|
+
|
|
275
|
+
## Notes
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
For already-implemented features, mark as `[x]`.
|
|
279
|
+
For features with code but missing docs, mark as `[?]` with a warning annotation.
|
|
280
|
+
For planned features (docs exist but no code), mark as `[ ]`.
|
|
281
|
+
|
|
282
|
+
Create `.ystack/progress/_overview.md`:
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
# Project Progress
|
|
207
286
|
|
|
208
|
-
|
|
209
|
-
|
|
287
|
+
## Module Status
|
|
288
|
+
|
|
289
|
+
| Module | Done | Total | Gaps | Status |
|
|
290
|
+
|--------|------|-------|------|--------|
|
|
291
|
+
| payments | 5 | 5 | 0 | complete |
|
|
292
|
+
| auth | 2 | 4 | 1 | in progress |
|
|
293
|
+
| admin | 4 | 5 | 1 | in progress |
|
|
294
|
+
|
|
295
|
+
## Dependencies
|
|
296
|
+
|
|
297
|
+
auth → db
|
|
298
|
+
payments → auth, db
|
|
299
|
+
admin → payments, auth
|
|
300
|
+
|
|
301
|
+
## Ready Front
|
|
302
|
+
|
|
303
|
+
- auth/oauth (sessions complete, ready to build)
|
|
304
|
+
- admin/team-settings (no dependencies)
|
|
305
|
+
|
|
306
|
+
## Documentation Gaps
|
|
307
|
+
|
|
308
|
+
- auth/oauth: code exists, no doc section
|
|
309
|
+
- admin/team-settings: code exists, no doc section
|
|
310
|
+
```
|
|
210
311
|
|
|
211
312
|
## Phase 5: Generate Gap Report
|
|
212
313
|
|
|
@@ -268,10 +369,10 @@ Only flag clear mismatches. Don't flag vague prose that's technically correct.
|
|
|
268
369
|
## Import Complete
|
|
269
370
|
|
|
270
371
|
### Registry
|
|
271
|
-
ystack
|
|
372
|
+
.ystack/config.json — N modules registered
|
|
272
373
|
|
|
273
|
-
###
|
|
274
|
-
N
|
|
374
|
+
### Progress
|
|
375
|
+
N progress files created, M features tracked (K checked as implemented)
|
|
275
376
|
|
|
276
377
|
### Documentation
|
|
277
378
|
N pages found, M gaps detected
|
|
@@ -279,7 +380,7 @@ Only flag clear mismatches. Don't flag vague prose that's technically correct.
|
|
|
279
380
|
### Next Steps
|
|
280
381
|
- Fix N doc gaps with /docs or /scaffold
|
|
281
382
|
- Run /build to start new feature work
|
|
282
|
-
- The module registry connects code ↔ docs ↔
|
|
383
|
+
- The module registry connects code ↔ docs ↔ progress
|
|
283
384
|
```
|
|
284
385
|
|
|
285
386
|
---
|
|
@@ -290,7 +391,7 @@ With `--module <name>`:
|
|
|
290
391
|
|
|
291
392
|
1. Only scan files matching the specified module name or path
|
|
292
393
|
2. Only create one module entry in the registry
|
|
293
|
-
3. Only create one
|
|
394
|
+
3. Only create one progress file
|
|
294
395
|
4. Gap report scoped to that module
|
|
295
396
|
|
|
296
397
|
This is useful for large repos where a full scan is too slow, or when onboarding one team at a time.
|
package/skills/pr/SKILL.md
CHANGED
|
@@ -35,14 +35,23 @@ Detect if code changes affect documented modules:
|
|
|
35
35
|
git diff main...HEAD --stat
|
|
36
36
|
|
|
37
37
|
# Check if any changed packages map to doc pages
|
|
38
|
-
# Read ystack
|
|
38
|
+
# Read .ystack/config.json or scan docs structure
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
If
|
|
42
|
-
> Code changes in **payments** but docs at `docs/src/content/shared/payments/` weren't updated.
|
|
43
|
-
> Run `/docs` to update, or confirm docs don't need changes.
|
|
41
|
+
**If this is a `/quick` change** (`.context/.quick` exists): skip doc check entirely. Quick fixes don't need doc updates.
|
|
44
42
|
|
|
45
|
-
If
|
|
43
|
+
**If this is a feature** (`.context/<feature>/PLAN.md` exists):
|
|
44
|
+
|
|
45
|
+
1. Read `.ystack/progress/<module>.md` for newly checked `[x]` items.
|
|
46
|
+
2. Check if the linked doc sections still have `<!-- ystack:stub -->`.
|
|
47
|
+
3. If stubs remain:
|
|
48
|
+
> Feature **OAuth** is checked off but docs still have stubs. Running `/docs` to fill them in...
|
|
49
|
+
|
|
50
|
+
Run `/docs` inline — don't just warn, actually execute the doc update. Then continue with the PR.
|
|
51
|
+
4. If no stubs and no doc changes needed, proceed.
|
|
52
|
+
|
|
53
|
+
**If unsure** (no plan, no quick marker): fall back to a warning:
|
|
54
|
+
> Code changes in **payments** but docs weren't updated. Run `/docs` to update, or confirm docs don't need changes.
|
|
46
55
|
|
|
47
56
|
### 3. Lint and typecheck
|
|
48
57
|
|
|
@@ -118,11 +127,7 @@ Create the PR directly:
|
|
|
118
127
|
|
|
119
128
|
After the PR is created:
|
|
120
129
|
|
|
121
|
-
1. **
|
|
122
|
-
```bash
|
|
123
|
-
# Verify all feature beads are closed
|
|
124
|
-
bd show <bead-id>
|
|
125
|
-
```
|
|
130
|
+
1. **Verify progress** — confirm all features in scope are checked in `.ystack/progress/<module>.md`.
|
|
126
131
|
|
|
127
132
|
2. **Archive `.context/`** — don't delete, just note it's done:
|
|
128
133
|
```
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quick
|
|
3
|
+
description: >
|
|
4
|
+
Fast path for bug fixes, chores, and small changes that don't need full planning.
|
|
5
|
+
Skips /build planning, progress tracking, and /docs. Use this skill when the user
|
|
6
|
+
says 'quick', '/quick', 'quick fix', 'just fix', 'small fix', 'hotfix', 'chore',
|
|
7
|
+
'bump', 'typo', 'quick change', or describes a change that's clearly a bug fix,
|
|
8
|
+
dependency update, config tweak, or other small change that doesn't represent a
|
|
9
|
+
new feature or architectural change.
|
|
10
|
+
user-invocable: true
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# /quick — Fast Path for Small Changes
|
|
14
|
+
|
|
15
|
+
You are the lightweight path for bug fixes, chores, and small changes. No planning ceremony, no progress tracking, no doc updates. Just fix it and commit.
|
|
16
|
+
|
|
17
|
+
**Use this when:**
|
|
18
|
+
- Bug fixes (typos, wrong values, missing null checks)
|
|
19
|
+
- Dependency bumps (`pnpm update`, version changes)
|
|
20
|
+
- Config tweaks (env vars, build config, lint rules)
|
|
21
|
+
- Refactors that don't change behavior (rename, extract, inline)
|
|
22
|
+
- Chores (cleanup, removing dead code, fixing warnings)
|
|
23
|
+
|
|
24
|
+
**Do NOT use this when:**
|
|
25
|
+
- Adding a new feature (use `/build`)
|
|
26
|
+
- Changing module boundaries or architecture (use `/build`)
|
|
27
|
+
- Work that should appear in documentation (use `/build` → `/docs`)
|
|
28
|
+
- Work that has a checklist item in `.ystack/progress/` (use `/build` → `/go`)
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Step 1: Understand the Change
|
|
33
|
+
|
|
34
|
+
Read the relevant code. For bug fixes, understand what's broken and why. Keep scope tight — fix the bug, nothing more.
|
|
35
|
+
|
|
36
|
+
If `.ystack/config.json` exists, check if the affected files fall under a module scope. This is informational only — `/quick` doesn't update progress files.
|
|
37
|
+
|
|
38
|
+
## Step 2: Make the Change
|
|
39
|
+
|
|
40
|
+
Write the code. Follow existing patterns in the files you're modifying.
|
|
41
|
+
|
|
42
|
+
Rules:
|
|
43
|
+
- Fix only what's asked. No drive-by refactors.
|
|
44
|
+
- Match existing code style.
|
|
45
|
+
- Run the linter if available: `pnpm fix` or equivalent.
|
|
46
|
+
|
|
47
|
+
## Step 3: Verify
|
|
48
|
+
|
|
49
|
+
Run the appropriate checks:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pnpm typecheck 2>/dev/null
|
|
53
|
+
pnpm check 2>/dev/null
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For bug fixes, confirm the fix addresses the reported issue. A quick grep or read of the changed code is sufficient — no formal success criteria needed.
|
|
57
|
+
|
|
58
|
+
## Step 4: Commit
|
|
59
|
+
|
|
60
|
+
Use Conventional Commits:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
fix(<scope>): <what was fixed>
|
|
64
|
+
chore(<scope>): <what was cleaned up>
|
|
65
|
+
refactor(<scope>): <what was refactored>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Step 5: Mark Quick Mode
|
|
69
|
+
|
|
70
|
+
Create the quick mode marker so hooks know to skip progress warnings:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
mkdir -p .context
|
|
74
|
+
touch .context/.quick
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This marker is cleaned up automatically when the session ends or when `/pr` runs.
|
|
78
|
+
|
|
79
|
+
## Step 6: Done
|
|
80
|
+
|
|
81
|
+
Report what was changed:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
## Quick Fix
|
|
85
|
+
|
|
86
|
+
- Fixed: <what>
|
|
87
|
+
- Files: <list>
|
|
88
|
+
- Commit: <hash>
|
|
89
|
+
|
|
90
|
+
Ready for /pr when you want to ship, or keep working.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## When /quick Escalates to /build
|
|
96
|
+
|
|
97
|
+
If during Step 1 you discover the change is bigger than expected, say so:
|
|
98
|
+
|
|
99
|
+
> This looks bigger than a quick fix — it touches the data model / requires a migration / affects multiple modules. Want me to switch to `/build` for proper planning?
|
|
100
|
+
|
|
101
|
+
Don't silently turn a `/quick` into a multi-file feature implementation.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## What This Skill Does NOT Do
|
|
106
|
+
|
|
107
|
+
- **Does not create plans.** No PLAN.md, no DECISIONS.md.
|
|
108
|
+
- **Does not update progress files.** Quick changes aren't tracked features.
|
|
109
|
+
- **Does not update docs.** If it needs docs, it's not a quick change.
|
|
110
|
+
- **Does not skip verification.** Typecheck and lint still run.
|