specstocode 0.5.1 → 0.6.1
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/bin/stc.js +2 -0
- package/dist/{chunk-P4M7CVDK.js → chunk-2FQUCTDE.js} +8 -8
- package/dist/{chunk-J22FYEMI.js → chunk-CNJK6J3P.js} +3 -3
- package/dist/{chunk-55DTUCLY.js → chunk-T46QKLGM.js} +44 -44
- package/dist/{chunk-CYA6I7NV.js → chunk-WJOIFYIA.js} +1 -1
- package/dist/{chunk-NAOZWXOF.js → chunk-ZLSV4CRF.js} +1 -1
- package/dist/{complexity-TUS6F2UI.js → complexity-27JMHAD2.js} +1 -1
- package/dist/{import-prd-HP66GKRA.js → import-prd-IOV3SEQV.js} +1 -1
- package/dist/index.js +35 -35
- package/dist/{log-GSWUQF6Z.js → log-4OBVVVVF.js} +2 -2
- package/dist/{research-UGNKVMZ5.js → research-NRHBPB5Q.js} +1 -1
- package/dist/{scope-BY5WSTPD.js → scope-NBFWSZEP.js} +3 -3
- package/dist/setup-ZJCK6JB4.js +9 -0
- package/package.json +4 -3
- package/dist/setup-VBFEFGTK.js +0 -9
package/bin/stc.js
ADDED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
API_BASE,
|
|
3
3
|
requireAuth
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WJOIFYIA.js";
|
|
5
5
|
import {
|
|
6
6
|
getContext
|
|
7
7
|
} from "./chunk-QKMZ2SBR.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-WPVDURTJ.js";
|
|
13
13
|
import {
|
|
14
14
|
writeConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZLSV4CRF.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/scope.ts
|
|
18
18
|
import { writeFileSync, existsSync } from "fs";
|
|
@@ -31,7 +31,7 @@ async function scope(projectId) {
|
|
|
31
31
|
const auth = requireAuth();
|
|
32
32
|
const { token } = auth;
|
|
33
33
|
if (!projectId) {
|
|
34
|
-
projectId = await ask(" Project ID (from `
|
|
34
|
+
projectId = await ask(" Project ID (from `stc start`): ");
|
|
35
35
|
}
|
|
36
36
|
if (!projectId?.trim()) {
|
|
37
37
|
console.log(" Project ID required.");
|
|
@@ -195,7 +195,7 @@ async function scope(projectId) {
|
|
|
195
195
|
" Configure your AI tool (Claude Code / Cursor) with specstocode agent workflows?"
|
|
196
196
|
);
|
|
197
197
|
if (wantSetup) {
|
|
198
|
-
const { setup } = await import("./setup-
|
|
198
|
+
const { setup } = await import("./setup-ZJCK6JB4.js");
|
|
199
199
|
await setup();
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
@@ -203,10 +203,10 @@ async function scope(projectId) {
|
|
|
203
203
|
\u2705 Your project is scoped and ready to build!
|
|
204
204
|
|
|
205
205
|
Next steps:
|
|
206
|
-
\u2022
|
|
207
|
-
\u2022
|
|
208
|
-
\u2022
|
|
209
|
-
\u2022
|
|
206
|
+
\u2022 stc setup \u2014 configure your AI tool
|
|
207
|
+
\u2022 stc status \u2014 see your story map progress
|
|
208
|
+
\u2022 stc next \u2014 see what to build first
|
|
209
|
+
\u2022 stc done <id> \u2014 mark stories as you complete them
|
|
210
210
|
|
|
211
211
|
Your story map is also live at ${API_BASE}
|
|
212
212
|
Seek advice from the community and our resources.
|
|
@@ -33,11 +33,11 @@ function writeStoryContext(story) {
|
|
|
33
33
|
``,
|
|
34
34
|
`## Implementation notes`,
|
|
35
35
|
``,
|
|
36
|
-
`_Notes added via \`
|
|
36
|
+
`_Notes added via \`stc note ${story.id.slice(0, 8)} "..."\`_`,
|
|
37
37
|
``,
|
|
38
38
|
`## Decisions`,
|
|
39
39
|
``,
|
|
40
|
-
`_Log decisions via \`
|
|
40
|
+
`_Log decisions via \`stc decide "..." -s ${story.id.slice(0, 8)}\`_`,
|
|
41
41
|
``,
|
|
42
42
|
`## Relevant files`,
|
|
43
43
|
``,
|
|
@@ -45,7 +45,7 @@ function writeStoryContext(story) {
|
|
|
45
45
|
``,
|
|
46
46
|
`---`,
|
|
47
47
|
``,
|
|
48
|
-
`Mark done: \`
|
|
48
|
+
`Mark done: \`stc done ${story.id.slice(0, 8)}\``
|
|
49
49
|
].join("\n");
|
|
50
50
|
const path = storyContextPath(story.id);
|
|
51
51
|
writeFileSync(path, md);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requireAuth
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WJOIFYIA.js";
|
|
4
4
|
import {
|
|
5
5
|
choose,
|
|
6
6
|
closePrompt
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
hasConfig,
|
|
10
10
|
requireConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZLSV4CRF.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/setup.ts
|
|
14
14
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
|
|
@@ -17,7 +17,7 @@ import { join } from "path";
|
|
|
17
17
|
async function setup() {
|
|
18
18
|
requireAuth();
|
|
19
19
|
if (!hasConfig()) {
|
|
20
|
-
console.log(" Not connected to a project. Run `
|
|
20
|
+
console.log(" Not connected to a project. Run `stc init` first.");
|
|
21
21
|
closePrompt();
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -55,11 +55,11 @@ async function setup() {
|
|
|
55
55
|
/pb-context Load focused context for the current story
|
|
56
56
|
|
|
57
57
|
Terminal commands (use anywhere):
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
stc status Show story map progress
|
|
59
|
+
stc next Next priority story
|
|
60
|
+
stc done <id> Mark a story as done
|
|
61
|
+
stc stories List all stories
|
|
62
|
+
stc sync Refresh SPECSTOCODE.md
|
|
63
63
|
`);
|
|
64
64
|
closePrompt();
|
|
65
65
|
}
|
|
@@ -78,12 +78,12 @@ Read SPECSTOCODE.md for the full product context: personas, user journey, storie
|
|
|
78
78
|
2. **ARCHITECTURE.md** \u2014 how the system is structured (decisions, patterns, trade-offs)
|
|
79
79
|
3. **CONVENTIONS.md** \u2014 how to write code (naming, file structure, testing patterns)
|
|
80
80
|
|
|
81
|
-
Refresh product context anytime: \`
|
|
81
|
+
Refresh product context anytime: \`stc sync\`
|
|
82
82
|
|
|
83
83
|
## Development workflow
|
|
84
84
|
|
|
85
85
|
### Starting work
|
|
86
|
-
1. Run \`
|
|
86
|
+
1. Run \`stc next\` to get the highest-priority story
|
|
87
87
|
2. Read the acceptance criteria \u2014 these define "done"
|
|
88
88
|
3. Check ARCHITECTURE.md for relevant technical decisions
|
|
89
89
|
4. Plan your approach before writing code
|
|
@@ -91,22 +91,22 @@ Refresh product context anytime: \`npx specstocode sync\`
|
|
|
91
91
|
### During development
|
|
92
92
|
- Follow patterns in CONVENTIONS.md
|
|
93
93
|
- If you discover a new requirement, create a story:
|
|
94
|
-
\`
|
|
94
|
+
\`stc add "Story title" --activity "Activity name" --priority must\`
|
|
95
95
|
- If you make an architectural decision, log it:
|
|
96
|
-
\`
|
|
96
|
+
\`stc decide "Decision title" -d "What was decided and why"\`
|
|
97
97
|
|
|
98
98
|
### Completing work
|
|
99
99
|
1. Verify all acceptance criteria are met
|
|
100
100
|
2. Add implementation notes:
|
|
101
|
-
\`
|
|
102
|
-
3. Mark done: \`
|
|
101
|
+
\`stc note <story-id> "How this was implemented, gotchas"\`
|
|
102
|
+
3. Mark done: \`stc done <story-id>\`
|
|
103
103
|
4. Commit: \`git commit -m "feat: description [SC-<id>]"\`
|
|
104
104
|
|
|
105
105
|
### Writing back to specstocode
|
|
106
106
|
Everything you record flows back to the story map so the team has context:
|
|
107
|
-
- **Stories**: \`
|
|
108
|
-
- **Decisions**: \`
|
|
109
|
-
- **Context refresh**: \`
|
|
107
|
+
- **Stories**: \`stc add\` / \`done\` / \`note\`
|
|
108
|
+
- **Decisions**: \`stc decide\`
|
|
109
|
+
- **Context refresh**: \`stc sync\`
|
|
110
110
|
`;
|
|
111
111
|
if (existsSync(claudeMdPath)) {
|
|
112
112
|
const existing = readFileSync(claudeMdPath, "utf-8");
|
|
@@ -126,7 +126,7 @@ Everything you record flows back to the story map so the team has context:
|
|
|
126
126
|
join(commandsDir, "pb-next.md"),
|
|
127
127
|
`# Pick up the next story
|
|
128
128
|
|
|
129
|
-
1. Run \`
|
|
129
|
+
1. Run \`stc next\` to get the highest-priority story
|
|
130
130
|
2. Read the acceptance criteria carefully \u2014 these define "done"
|
|
131
131
|
3. Check ARCHITECTURE.md for relevant technical decisions
|
|
132
132
|
4. Read CONVENTIONS.md for coding patterns to follow
|
|
@@ -139,7 +139,7 @@ Everything you record flows back to the story map so the team has context:
|
|
|
139
139
|
`# Implement a story
|
|
140
140
|
|
|
141
141
|
## Process
|
|
142
|
-
1. Run \`
|
|
142
|
+
1. Run \`stc next\` to identify the story (or use the story ID provided)
|
|
143
143
|
2. Read SPECSTOCODE.md for full product context
|
|
144
144
|
3. Read the story's acceptance criteria \u2014 each one is a requirement
|
|
145
145
|
4. Check ARCHITECTURE.md for technical decisions that affect this work
|
|
@@ -150,14 +150,14 @@ Everything you record flows back to the story map so the team has context:
|
|
|
150
150
|
|
|
151
151
|
## Write back to specstocode
|
|
152
152
|
9. Add implementation notes:
|
|
153
|
-
\`
|
|
153
|
+
\`stc note <story-id> "How this was implemented"\`
|
|
154
154
|
10. Log any significant decisions:
|
|
155
|
-
\`
|
|
155
|
+
\`stc decide "Decision title" -d "What and why" -c architecture\`
|
|
156
156
|
11. Log any trade-offs:
|
|
157
|
-
\`
|
|
157
|
+
\`stc decide "Trade-off" -d "What and why" -c trade-off\`
|
|
158
158
|
12. If you discovered new requirements:
|
|
159
|
-
\`
|
|
160
|
-
13. Mark done: \`
|
|
159
|
+
\`stc add "title" --activity "Activity" --priority should\`
|
|
160
|
+
13. Mark done: \`stc done <story-id>\`
|
|
161
161
|
14. Commit: \`git commit -m "feat: description [SC-<id>]"\`
|
|
162
162
|
|
|
163
163
|
## Rules
|
|
@@ -190,9 +190,9 @@ Everything you record flows back to the story map so the team has context:
|
|
|
190
190
|
- Decisions made and trade-offs
|
|
191
191
|
- How to test it manually
|
|
192
192
|
4. Log decisions to specstocode:
|
|
193
|
-
\`
|
|
193
|
+
\`stc decide "Title" -d "Description" -c architecture\`
|
|
194
194
|
5. Add implementation notes:
|
|
195
|
-
\`
|
|
195
|
+
\`stc note <story-id> "Summary of how it works"\`
|
|
196
196
|
6. Update ARCHITECTURE.md if needed
|
|
197
197
|
7. Update CONVENTIONS.md if new patterns were introduced
|
|
198
198
|
`
|
|
@@ -201,7 +201,7 @@ Everything you record flows back to the story map so the team has context:
|
|
|
201
201
|
join(commandsDir, "pb-test.md"),
|
|
202
202
|
`# Write tests for a story
|
|
203
203
|
|
|
204
|
-
1. Get the story details: \`
|
|
204
|
+
1. Get the story details: \`stc next\` or provided story ID
|
|
205
205
|
2. Each acceptance criterion becomes at least one test
|
|
206
206
|
3. Also consider: error cases, boundary conditions, integration points
|
|
207
207
|
4. Follow testing patterns in CONVENTIONS.md
|
|
@@ -210,15 +210,15 @@ Everything you record flows back to the story map so the team has context:
|
|
|
210
210
|
);
|
|
211
211
|
writeFileSync(
|
|
212
212
|
join(commandsDir, "pb-status.md"),
|
|
213
|
-
`Run \`
|
|
213
|
+
`Run \`stc status\` and \`stc stories --filter todo\` to show current progress and remaining backlog. Summarise what's done and what's left.`
|
|
214
214
|
);
|
|
215
215
|
writeFileSync(
|
|
216
216
|
join(commandsDir, "pb-done.md"),
|
|
217
|
-
`Ask which story was just completed, then run \`
|
|
217
|
+
`Ask which story was just completed, then run \`stc done <id>\`. Also ask if there are any implementation notes to add: \`stc note <id> "..."\``
|
|
218
218
|
);
|
|
219
219
|
writeFileSync(
|
|
220
220
|
join(commandsDir, "pb-sync.md"),
|
|
221
|
-
`Run \`
|
|
221
|
+
`Run \`stc sync\` to refresh SPECSTOCODE.md with the latest story map. Then re-read SPECSTOCODE.md to update your context.`
|
|
222
222
|
);
|
|
223
223
|
writeFileSync(
|
|
224
224
|
join(commandsDir, "pb-propose.md"),
|
|
@@ -231,18 +231,18 @@ stories there AND saves a local spec for the AI to reference during implementati
|
|
|
231
231
|
## Process
|
|
232
232
|
1. Ask the user: "What do you want to build or change? Describe the problem and the solution."
|
|
233
233
|
2. Help them break it into 2-5 stories with clear acceptance criteria (each AC is testable)
|
|
234
|
-
3. Run: \`
|
|
234
|
+
3. Run: \`stc propose <change-name>\`
|
|
235
235
|
- The CLI will guide through: problem, solution, activity, priority, stories + ACs
|
|
236
236
|
- Stories are created in the live story map at specstocode.com
|
|
237
237
|
- A local spec is saved to \`pb-changes/<name>/proposal.md\`
|
|
238
|
-
4. Once done: \`
|
|
239
|
-
5. Run \`
|
|
238
|
+
4. Once done: \`stc sync\` to pull the new stories into SPECSTOCODE.md
|
|
239
|
+
5. Run \`stc next\` to start implementing
|
|
240
240
|
|
|
241
241
|
## Tips
|
|
242
242
|
- Change names should be kebab-case: add-dark-mode, fix-auth-flow, onboarding-revamp
|
|
243
243
|
- Keep stories small \u2014 one story = one deployable increment
|
|
244
244
|
- Write ACs as testable outcomes: "Given X, when Y, then Z" or "User can..."
|
|
245
|
-
- If the change is already defined in the UI, just run \`
|
|
245
|
+
- If the change is already defined in the UI, just run \`stc sync\` instead
|
|
246
246
|
`
|
|
247
247
|
);
|
|
248
248
|
writeFileSync(
|
|
@@ -257,13 +257,13 @@ Use this to focus on a single story without loading the full story map.
|
|
|
257
257
|
- When you need a clean, focused view of ACs and notes
|
|
258
258
|
|
|
259
259
|
## Process
|
|
260
|
-
1. Run \`
|
|
260
|
+
1. Run \`stc next\` to get the active story \u2014 this automatically writes the context file to \`.specstocode/stories/<id>.md\`
|
|
261
261
|
2. Read that file \u2014 it contains: title, user story, acceptance criteria (as checkboxes), notes, and space for relevant files
|
|
262
262
|
3. Use it as your working document throughout implementation:
|
|
263
263
|
- Check off ACs as you satisfy them
|
|
264
264
|
- Add file paths under "Relevant files" as you discover them
|
|
265
|
-
- Run \`
|
|
266
|
-
4. When all ACs are checked: \`
|
|
265
|
+
- Run \`stc note <id> "..."\` to log notes (updates both remote map and local file)
|
|
266
|
+
4. When all ACs are checked: \`stc done <id>\`
|
|
267
267
|
|
|
268
268
|
## If you already know the story ID
|
|
269
269
|
The file is at \`.specstocode/stories/<full-story-id>.md\` \u2014 read it directly.
|
|
@@ -293,7 +293,7 @@ The file is at \`.specstocode/stories/<full-story-id>.md\` \u2014 read it direct
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
Or if you use OpenClaw:
|
|
296
|
+
Or if you use OpenClaw: stc openclaw-register
|
|
297
297
|
`);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
@@ -309,12 +309,12 @@ function setupCursor(syncToken) {
|
|
|
309
309
|
3. **CONVENTIONS.md** \u2014 coding patterns, naming, file structure
|
|
310
310
|
|
|
311
311
|
## Workflow
|
|
312
|
-
- Next story: \`
|
|
313
|
-
- Mark done: \`
|
|
314
|
-
- Add notes: \`
|
|
315
|
-
- Log decisions: \`
|
|
316
|
-
- Create stories: \`
|
|
317
|
-
- Refresh context: \`
|
|
312
|
+
- Next story: \`stc next\`
|
|
313
|
+
- Mark done: \`stc done <id>\`
|
|
314
|
+
- Add notes: \`stc note <id> "..."\`
|
|
315
|
+
- Log decisions: \`stc decide "Title" -d "Why"\`
|
|
316
|
+
- Create stories: \`stc add "title" --activity "Name"\`
|
|
317
|
+
- Refresh context: \`stc sync\`
|
|
318
318
|
|
|
319
319
|
## Rules
|
|
320
320
|
- Read acceptance criteria before implementing
|
|
@@ -25,7 +25,7 @@ function writeConfig(config) {
|
|
|
25
25
|
function requireConfig() {
|
|
26
26
|
const config = readConfig();
|
|
27
27
|
if (!config) {
|
|
28
|
-
console.error("Not initialized. Run:
|
|
28
|
+
console.error("Not initialized. Run: stc init");
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
31
|
return config;
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
setup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T46QKLGM.js";
|
|
5
5
|
import {
|
|
6
6
|
scope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2FQUCTDE.js";
|
|
8
8
|
import {
|
|
9
9
|
API_BASE,
|
|
10
10
|
getAuth,
|
|
11
11
|
requireAuth,
|
|
12
12
|
saveAuth
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WJOIFYIA.js";
|
|
14
14
|
import {
|
|
15
15
|
storyContextPath,
|
|
16
16
|
writeStoryContext
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CNJK6J3P.js";
|
|
18
18
|
import {
|
|
19
19
|
createStories,
|
|
20
20
|
getContext,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
readConfig,
|
|
33
33
|
requireConfig,
|
|
34
34
|
writeConfig
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZLSV4CRF.js";
|
|
36
36
|
|
|
37
37
|
// src/index.ts
|
|
38
38
|
import { Command } from "commander";
|
|
@@ -55,7 +55,7 @@ function sleep(ms) {
|
|
|
55
55
|
async function login() {
|
|
56
56
|
const existing = getAuth();
|
|
57
57
|
if (existing) {
|
|
58
|
-
console.log("Already logged in. Run `
|
|
58
|
+
console.log("Already logged in. Run `stc logout` to switch accounts.");
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
console.log("Logging in to specstocode...\n");
|
|
@@ -80,11 +80,11 @@ async function login() {
|
|
|
80
80
|
if (data.status === "approved" && data.token) {
|
|
81
81
|
saveAuth({ token: data.token, apiBase: API_BASE });
|
|
82
82
|
console.log("\u2705 Logged in to specstocode!\n");
|
|
83
|
-
console.log("You can now run:
|
|
83
|
+
console.log("You can now run: stc init");
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (data.status === "expired") {
|
|
87
|
-
console.error("Login request expired. Run `
|
|
87
|
+
console.error("Login request expired. Run `stc login` to try again.");
|
|
88
88
|
process.exit(1);
|
|
89
89
|
}
|
|
90
90
|
process.stdout.write(".");
|
|
@@ -92,7 +92,7 @@ async function login() {
|
|
|
92
92
|
process.stdout.write(".");
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
console.error("\nLogin timed out. Run `
|
|
95
|
+
console.error("\nLogin timed out. Run `stc login` to try again.");
|
|
96
96
|
process.exit(1);
|
|
97
97
|
}
|
|
98
98
|
async function logout() {
|
|
@@ -203,7 +203,7 @@ Connecting to "${map.title}"...`);
|
|
|
203
203
|
}
|
|
204
204
|
writeConfig(config);
|
|
205
205
|
await setupFiles(config);
|
|
206
|
-
console.log("\n\u2705 Ready! Try:
|
|
206
|
+
console.log("\n\u2705 Ready! Try: stc status");
|
|
207
207
|
} finally {
|
|
208
208
|
rl.close();
|
|
209
209
|
}
|
|
@@ -228,7 +228,7 @@ async function initWithSyncToken(syncToken) {
|
|
|
228
228
|
process.exit(1);
|
|
229
229
|
}
|
|
230
230
|
await setupFiles(config);
|
|
231
|
-
console.log("\n\u2705 Ready! Try:
|
|
231
|
+
console.log("\n\u2705 Ready! Try: stc status");
|
|
232
232
|
}
|
|
233
233
|
async function setupFiles(config) {
|
|
234
234
|
try {
|
|
@@ -472,10 +472,10 @@ async function next(opts = {}) {
|
|
|
472
472
|
`);
|
|
473
473
|
for (const s2 of inProgress) {
|
|
474
474
|
console.log(` \u{1F528} ${s2.title}`);
|
|
475
|
-
console.log(` ID: ${s2.id.slice(0, 8)} | Mark done:
|
|
475
|
+
console.log(` ID: ${s2.id.slice(0, 8)} | Mark done: stc done ${s2.id.slice(0, 8)}`);
|
|
476
476
|
}
|
|
477
477
|
console.log(`
|
|
478
|
-
Finish those first, or run \`
|
|
478
|
+
Finish those first, or run \`stc next --skip-wip\` to pick the next todo anyway.
|
|
479
479
|
`);
|
|
480
480
|
return;
|
|
481
481
|
}
|
|
@@ -515,7 +515,7 @@ async function next(opts = {}) {
|
|
|
515
515
|
ID: ${s.id}`);
|
|
516
516
|
console.log(` Context: ${relPath}`);
|
|
517
517
|
console.log(` Spec: ${specUrl}`);
|
|
518
|
-
console.log(` Mark done:
|
|
518
|
+
console.log(` Mark done: stc done ${s.id.slice(0, 8)}
|
|
519
519
|
`);
|
|
520
520
|
if (opts.open) {
|
|
521
521
|
openBrowser2(specUrl);
|
|
@@ -680,7 +680,7 @@ async function start() {
|
|
|
680
680
|
} catch (err) {
|
|
681
681
|
spinner.fail(" Failed to connect");
|
|
682
682
|
console.error(` ${err.message}`);
|
|
683
|
-
console.error(" Make sure you're logged in:
|
|
683
|
+
console.error(" Make sure you're logged in: stc login");
|
|
684
684
|
closePrompt();
|
|
685
685
|
return;
|
|
686
686
|
}
|
|
@@ -752,14 +752,14 @@ async function start() {
|
|
|
752
752
|
Failed to create project: ${data.error ?? "unknown error"}`);
|
|
753
753
|
}
|
|
754
754
|
} else {
|
|
755
|
-
console.error("\n Failed to create project. Try logging in again:
|
|
755
|
+
console.error("\n Failed to create project. Try logging in again: stc login");
|
|
756
756
|
}
|
|
757
757
|
closePrompt();
|
|
758
758
|
return;
|
|
759
759
|
}
|
|
760
760
|
const createContentType = createRes.headers.get("content-type") ?? "";
|
|
761
761
|
if (!createContentType.includes("application/json")) {
|
|
762
|
-
console.error("\n Unexpected response from server. Try logging in again:
|
|
762
|
+
console.error("\n Unexpected response from server. Try logging in again: stc login");
|
|
763
763
|
closePrompt();
|
|
764
764
|
return;
|
|
765
765
|
}
|
|
@@ -824,7 +824,7 @@ async function start() {
|
|
|
824
824
|
if (!readyToScope) {
|
|
825
825
|
console.log(`
|
|
826
826
|
No worries! When you're ready:
|
|
827
|
-
\u2022 Run:
|
|
827
|
+
\u2022 Run: stc scope ${projectId}
|
|
828
828
|
\u2022 Or visit: ${API_BASE}
|
|
829
829
|
|
|
830
830
|
Your project is saved and waiting for you.
|
|
@@ -832,7 +832,7 @@ async function start() {
|
|
|
832
832
|
closePrompt();
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const { scope: scope2 } = await import("./scope-
|
|
835
|
+
const { scope: scope2 } = await import("./scope-NBFWSZEP.js");
|
|
836
836
|
await scope2(projectId);
|
|
837
837
|
}
|
|
838
838
|
|
|
@@ -842,7 +842,7 @@ import { join as join3 } from "path";
|
|
|
842
842
|
async function propose(changeName, opts = {}) {
|
|
843
843
|
requireAuth();
|
|
844
844
|
if (!hasConfig()) {
|
|
845
|
-
console.log(" Not connected to a project. Run `
|
|
845
|
+
console.log(" Not connected to a project. Run `stc init` first.");
|
|
846
846
|
closePrompt();
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
@@ -984,9 +984,9 @@ async function propose(changeName, opts = {}) {
|
|
|
984
984
|
Local spec saved at: pb-changes/${slug}/proposal.md
|
|
985
985
|
|
|
986
986
|
Next:
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
987
|
+
stc next \u2014 pick up the first story
|
|
988
|
+
stc status \u2014 see full progress
|
|
989
|
+
stc sync \u2014 refresh SPECSTOCODE.md
|
|
990
990
|
`);
|
|
991
991
|
closePrompt();
|
|
992
992
|
}
|
|
@@ -1136,7 +1136,7 @@ async function proposeFromFile(filePath, config, nameOverride) {
|
|
|
1136
1136
|
writeFileSync3(join3(changesDir, "proposal.md"), proposalMd);
|
|
1137
1137
|
console.log(` \u2713 Saved pb-changes/${slug}/proposal.md`);
|
|
1138
1138
|
console.log(`
|
|
1139
|
-
\u2705 Done! Run \`
|
|
1139
|
+
\u2705 Done! Run \`stc next\` to start building.
|
|
1140
1140
|
`);
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
@@ -1153,7 +1153,7 @@ async function show(idPrefix) {
|
|
|
1153
1153
|
if (!story) {
|
|
1154
1154
|
console.error(`
|
|
1155
1155
|
No story found matching "${idPrefix}"
|
|
1156
|
-
Run \`
|
|
1156
|
+
Run \`stc stories\` to list IDs.
|
|
1157
1157
|
`);
|
|
1158
1158
|
process.exit(1);
|
|
1159
1159
|
}
|
|
@@ -1200,7 +1200,7 @@ async function show(idPrefix) {
|
|
|
1200
1200
|
const relPath = contextPath.replace(process.cwd() + "/", "");
|
|
1201
1201
|
console.log(`
|
|
1202
1202
|
Context : ${relPath}`);
|
|
1203
|
-
console.log(` Mark done:
|
|
1203
|
+
console.log(` Mark done: stc done ${story.id.slice(0, 8)}
|
|
1204
1204
|
`);
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
@@ -1664,7 +1664,7 @@ async function startMcpServer(mode = "all") {
|
|
|
1664
1664
|
import { execSync as execSync2 } from "child_process";
|
|
1665
1665
|
async function openclawRegister() {
|
|
1666
1666
|
if (!hasConfig()) {
|
|
1667
|
-
console.error("Not initialised. Run:
|
|
1667
|
+
console.error("Not initialised. Run: stc init");
|
|
1668
1668
|
process.exit(1);
|
|
1669
1669
|
}
|
|
1670
1670
|
const config = readConfig();
|
|
@@ -1703,7 +1703,7 @@ Registering specstocode MCP with OpenClaw...`);
|
|
|
1703
1703
|
var require2 = createRequire(import.meta.url);
|
|
1704
1704
|
var { version } = require2("../package.json");
|
|
1705
1705
|
var program = new Command();
|
|
1706
|
-
program.name("
|
|
1706
|
+
program.name("stc").description("Write specs, map stories, ship with AI \u2014 from your terminal").version(version);
|
|
1707
1707
|
program.command("login").description("Log in to specstocode (opens browser)").action(() => void login());
|
|
1708
1708
|
program.command("logout").description("Log out of specstocode").action(() => void logout());
|
|
1709
1709
|
program.command("start").description("Start a new project \u2014 guided flow from problem to pitch").action(() => void start());
|
|
@@ -1717,12 +1717,12 @@ program.command("templates [name]").description("Browse story map templates").ac
|
|
|
1717
1717
|
console.log(` ${key.padEnd(20)} ${tmpl.description}`);
|
|
1718
1718
|
}
|
|
1719
1719
|
console.log(`
|
|
1720
|
-
Usage:
|
|
1720
|
+
Usage: stc templates <name>
|
|
1721
1721
|
`);
|
|
1722
1722
|
} else {
|
|
1723
1723
|
const tmpl = templates[name];
|
|
1724
1724
|
if (!tmpl) {
|
|
1725
|
-
console.error(`Unknown template: "${name}". Run \`
|
|
1725
|
+
console.error(`Unknown template: "${name}". Run \`stc templates\` to list.`);
|
|
1726
1726
|
} else {
|
|
1727
1727
|
console.log(`
|
|
1728
1728
|
${tmpl.name}: ${tmpl.description}`);
|
|
@@ -1744,19 +1744,19 @@ program.command("show <id>").description("Show the full spec for a story (accept
|
|
|
1744
1744
|
program.command("done <id>").description("Mark a story as done (accepts ID prefix)").action((id) => void done(id));
|
|
1745
1745
|
program.command("add <title>").description("Create a new story").option("-a, --activity <activity>", "Activity to add the story under").option("-p, --priority <priority>", "Priority: must, should, could", "should").option("-e, --effort <effort>", "Effort: S, M, L, XL", "M").action((title, opts) => void add(title, opts));
|
|
1746
1746
|
program.command("decide [title]").description("Log an architectural or product decision").option("-d, --description <desc>", "Decision description").option("-c, --category <cat>", "Category: architecture, product, technical, trade-off", "technical").option("-s, --story <id>", "Link to a story ID").action((title, opts) => {
|
|
1747
|
-
import("./log-
|
|
1747
|
+
import("./log-4OBVVVVF.js").then((m) => void m.logDecision(title, opts));
|
|
1748
1748
|
});
|
|
1749
1749
|
program.command("note <storyId> [note]").description("Add implementation notes to a story").action((storyId, note) => {
|
|
1750
|
-
import("./log-
|
|
1750
|
+
import("./log-4OBVVVVF.js").then((m) => void m.logNote(storyId, note));
|
|
1751
1751
|
});
|
|
1752
1752
|
program.command("complexity [storyId]").description("Analyze story complexity with AI \u2014 scores, risks, effort estimates").action((id) => {
|
|
1753
|
-
import("./complexity-
|
|
1753
|
+
import("./complexity-27JMHAD2.js").then((m) => void m.complexity(id));
|
|
1754
1754
|
});
|
|
1755
1755
|
program.command("research [query]").description("Research a topic with AI using your project context").action((query) => {
|
|
1756
|
-
import("./research-
|
|
1756
|
+
import("./research-NRHBPB5Q.js").then((m) => void m.research(query));
|
|
1757
1757
|
});
|
|
1758
1758
|
program.command("import [file]").description("Import a PRD or spec into your story map as stories").action((file) => {
|
|
1759
|
-
import("./import-prd-
|
|
1759
|
+
import("./import-prd-IOV3SEQV.js").then((m) => void m.importPrd(file));
|
|
1760
1760
|
});
|
|
1761
1761
|
program.command("mcp").description("Start MCP server for Claude Code / Cursor integration").option("-m, --mode <mode>", "Tool mode: core, standard, all", "all").action((opts) => void startMcpServer(opts.mode));
|
|
1762
1762
|
program.command("openclaw-register").description("Register this project with OpenClaw MCP \u2014 gives spawned coding agents access to your story map").action(() => void openclawRegister());
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendNoteToContext,
|
|
3
3
|
storyContextPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CNJK6J3P.js";
|
|
5
5
|
import {
|
|
6
6
|
ask,
|
|
7
7
|
closePrompt
|
|
8
8
|
} from "./chunk-WPVDURTJ.js";
|
|
9
9
|
import {
|
|
10
10
|
requireConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZLSV4CRF.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/log.ts
|
|
14
14
|
async function logDecision(title, opts) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
scope
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2FQUCTDE.js";
|
|
4
|
+
import "./chunk-WJOIFYIA.js";
|
|
5
5
|
import "./chunk-QKMZ2SBR.js";
|
|
6
6
|
import "./chunk-WPVDURTJ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ZLSV4CRF.js";
|
|
8
8
|
export {
|
|
9
9
|
scope
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specstocode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "CLI for specstocode.com — connect your codebase to your product story map",
|
|
5
5
|
"bin": {
|
|
6
6
|
"specstocode": "bin/specstocode.js",
|
|
7
|
-
"productbuilders": "bin/productbuilders.js"
|
|
7
|
+
"productbuilders": "bin/productbuilders.js",
|
|
8
|
+
"stc": "bin/stc.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"build": "tsup src/index.ts --format esm --clean && chmod +x dist/index.js && chmod +x bin/specstocode.js && chmod +x bin/productbuilders.js",
|
|
11
|
+
"build": "tsup src/index.ts --format esm --clean && chmod +x dist/index.js && chmod +x bin/specstocode.js && chmod +x bin/productbuilders.js && chmod +x bin/stc.js",
|
|
11
12
|
"dev": "tsup src/index.ts --format esm --watch",
|
|
12
13
|
"test": "vitest run",
|
|
13
14
|
"prepublishOnly": "npm run build"
|