intentdocs 0.10.0 → 0.10.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/README.md +5 -0
- package/dist/{chunk-YUW3W43S.js → chunk-34JCN66H.js} +7 -7
- package/dist/{chunk-IDNUBI2P.js → chunk-6X4BORMW.js} +6 -6
- package/dist/{chunk-NFIXRIHM.js → chunk-F52HPVNQ.js} +3 -3
- package/dist/{chunk-UF535HZL.js → chunk-JX2RLGOM.js} +2 -2
- package/dist/{chunk-HEHHSSUM.js → chunk-KPQ42YE6.js} +1 -1
- package/dist/{chunk-5USVG4DW.js → chunk-NHNBCNND.js} +8 -8
- package/dist/{chunk-EEKEF2FD.js → chunk-PUGYRSMK.js} +59 -59
- package/dist/{chunk-UR73WX5I.js → chunk-UQDMUKLP.js} +2 -2
- package/dist/{chunk-LXQXJULN.js → chunk-XZE2XP6O.js} +3 -3
- package/dist/ci-XCOXFTLB.js +11 -0
- package/dist/{complexity-ZOB3BPVD.js → complexity-X3IJKNNV.js} +4 -4
- package/dist/{import-prd-MJUCIMHX.js → import-prd-IJTM6FZE.js} +4 -4
- package/dist/index.js +65 -65
- package/dist/{keys-5PA3D6CX.js → keys-UVXCCWCS.js} +4 -4
- package/dist/{log-EVLWM64C.js → log-XIH4BGFL.js} +5 -5
- package/dist/{map-extract-W6WJLVOF.js → map-extract-V6D27I3H.js} +2 -2
- package/dist/{map-import-LL4AIAQE.js → map-import-LORTI4K4.js} +4 -4
- package/dist/{map-schema-6GL2UKZQ.js → map-schema-5BEIJM2J.js} +1 -1
- package/dist/{projects-F7GMH66U.js → projects-AYAYVFKL.js} +2 -2
- package/dist/{research-4ASCZSZN.js → research-CO3W7PLC.js} +4 -4
- package/dist/scope-ZZLKQEF5.js +11 -0
- package/dist/setup-WSYIG2CR.js +14 -0
- package/package.json +1 -1
- package/dist/ci-LBOCMRKZ.js +0 -11
- package/dist/scope-S3LZZ3KB.js +0 -11
- package/dist/setup-YLUPBLK6.js +0 -14
package/README.md
CHANGED
|
@@ -98,6 +98,11 @@ intent sync # Refresh INTENT.md
|
|
|
98
98
|
intent sync --context # Regenerate CLAUDE.md from your project page
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
`intent` is a short alias for typing. Another tool on your machine may also be
|
|
102
|
+
called `intent`, so everything the CLI writes for your agent (CLAUDE.md, slash
|
|
103
|
+
commands, hints) spells commands as `npx intentdocs …`, which always runs this
|
|
104
|
+
package.
|
|
105
|
+
|
|
101
106
|
---
|
|
102
107
|
|
|
103
108
|
## All Commands
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuth
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XZE2XP6O.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/api.ts
|
|
6
6
|
var AuthError = class extends Error {
|
|
@@ -15,11 +15,11 @@ function checkoutMismatch(config, binding) {
|
|
|
15
15
|
const checkoutName = checkout.name ?? "another workspace";
|
|
16
16
|
const here = config.mapTitle ? `"${config.mapTitle}"` : "this checkout";
|
|
17
17
|
if (!binding) {
|
|
18
|
-
return `${here} belongs to ${checkoutName}, but your token is personal. Run \`intentdocs login\` and choose ${checkoutName}.`;
|
|
18
|
+
return `${here} belongs to ${checkoutName}, but your token is personal. Run \`npx intentdocs login\` and choose ${checkoutName}.`;
|
|
19
19
|
}
|
|
20
20
|
if (binding.orgId !== checkout.orgId) {
|
|
21
21
|
const bound = binding.workspaceName ?? "a different workspace";
|
|
22
|
-
return `This checkout is ${checkoutName}'s \u2014 ${here} \u2014 but your token is bound to ${bound}. Run \`intentdocs login\` and choose ${checkoutName}, or work from a checkout of ${bound}'s.`;
|
|
22
|
+
return `This checkout is ${checkoutName}'s \u2014 ${here} \u2014 but your token is bound to ${bound}. Run \`npx intentdocs login\` and choose ${checkoutName}, or work from a checkout of ${bound}'s.`;
|
|
23
23
|
}
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
@@ -47,13 +47,13 @@ async function apiFetch(config, path, init) {
|
|
|
47
47
|
const mismatch = checkoutMismatch(config, auth?.binding);
|
|
48
48
|
if (mismatch) throw new AuthError(mismatch);
|
|
49
49
|
if (!auth?.token) {
|
|
50
|
-
throw new AuthError("Not logged in \u2014 every sync runs as you now. Run `intentdocs login`.");
|
|
50
|
+
throw new AuthError("Not logged in \u2014 every sync runs as you now. Run `npx intentdocs login`.");
|
|
51
51
|
}
|
|
52
52
|
const withBearer = { ...init, headers: syncHeaders(init?.headers, auth) };
|
|
53
53
|
const res = await fetch(apiUrl(config, path), withBearer);
|
|
54
54
|
if (res.status === 401) {
|
|
55
55
|
const said = await refusalMessage(res);
|
|
56
|
-
throw new AuthError(said ?? "Your login is no longer valid. Run `intentdocs login`.");
|
|
56
|
+
throw new AuthError(said ?? "Your login is no longer valid. Run `npx intentdocs login`.");
|
|
57
57
|
}
|
|
58
58
|
if (res.status === 404) {
|
|
59
59
|
const said = await refusalMessage(res);
|
|
@@ -62,7 +62,7 @@ async function apiFetch(config, path, init) {
|
|
|
62
62
|
if (res.status === 403) {
|
|
63
63
|
const said = await refusalMessage(res);
|
|
64
64
|
throw new AuthError(
|
|
65
|
-
said ?? "Access denied \u2014 you may not have permission for this project. Run `intentdocs login` to re-authenticate."
|
|
65
|
+
said ?? "Access denied \u2014 you may not have permission for this project. Run `npx intentdocs login` to re-authenticate."
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
if (!res.ok) throw new Error(`API error: ${res.status}`);
|
|
@@ -70,7 +70,7 @@ async function apiFetch(config, path, init) {
|
|
|
70
70
|
}
|
|
71
71
|
function apiUrl(config, path) {
|
|
72
72
|
if (!config.mapId) {
|
|
73
|
-
throw new AuthError("This checkout has no map id. Run `intentdocs init` to reconnect it.");
|
|
73
|
+
throw new AuthError("This checkout has no map id. Run `npx intentdocs init` to reconnect it.");
|
|
74
74
|
}
|
|
75
75
|
return `${config.apiBase}/api/sync/${config.mapId}${path}`;
|
|
76
76
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
captureCli,
|
|
3
3
|
shutdownCliAnalytics
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KPQ42YE6.js";
|
|
5
5
|
import {
|
|
6
6
|
requireConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JX2RLGOM.js";
|
|
8
8
|
import {
|
|
9
9
|
closePrompt,
|
|
10
10
|
confirm,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
authenticatedFetch,
|
|
15
15
|
requireValidAuth
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XZE2XP6O.js";
|
|
17
17
|
import {
|
|
18
18
|
canonicalApiBase
|
|
19
19
|
} from "./chunk-UYTVTYNB.js";
|
|
@@ -173,7 +173,7 @@ async function listKeys(projectId) {
|
|
|
173
173
|
async function reportStatus(projectId) {
|
|
174
174
|
const keys = (await listKeys(projectId)).filter((k) => !k.revoked_at);
|
|
175
175
|
if (keys.length === 0) {
|
|
176
|
-
console.log("No CI key yet. Run `intentdocs ci` to set up test reporting.");
|
|
176
|
+
console.log("No CI key yet. Run `npx intentdocs ci` to set up test reporting.");
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
const reported = keys.filter((k) => k.last_report_at);
|
|
@@ -198,7 +198,7 @@ async function ci(opts = {}) {
|
|
|
198
198
|
await requireValidAuth();
|
|
199
199
|
const projectId = config.projectId;
|
|
200
200
|
if (!projectId) {
|
|
201
|
-
console.error("This checkout has no project id. Run `intentdocs init` to reconnect.");
|
|
201
|
+
console.error("This checkout has no project id. Run `npx intentdocs init` to reconnect.");
|
|
202
202
|
process.exit(1);
|
|
203
203
|
}
|
|
204
204
|
if (opts.status) {
|
|
@@ -278,7 +278,7 @@ Tell your agent to save each test with its file and full name so CI results can
|
|
|
278
278
|
{ project: projectId }
|
|
279
279
|
);
|
|
280
280
|
console.log(`
|
|
281
|
-
After your next default-branch CI run, check how results matched with: intentdocs ci --status
|
|
281
|
+
After your next default-branch CI run, check how results matched with: npx intentdocs ci --status
|
|
282
282
|
`);
|
|
283
283
|
} finally {
|
|
284
284
|
closePrompt();
|
|
@@ -124,11 +124,11 @@ function writeStoryContext(story) {
|
|
|
124
124
|
...approachSection,
|
|
125
125
|
`## Implementation notes`,
|
|
126
126
|
``,
|
|
127
|
-
`_Notes added via \`intentdocs note ${storyRef(story)} "..."\`_`,
|
|
127
|
+
`_Notes added via \`npx intentdocs note ${storyRef(story)} "..."\`_`,
|
|
128
128
|
``,
|
|
129
129
|
`## Decisions`,
|
|
130
130
|
``,
|
|
131
|
-
`_Log decisions via \`intentdocs decide "..." -s ${storyRef(story)}\`_`,
|
|
131
|
+
`_Log decisions via \`npx intentdocs decide "..." -s ${storyRef(story)}\`_`,
|
|
132
132
|
``,
|
|
133
133
|
`## Relevant files`,
|
|
134
134
|
``,
|
|
@@ -136,7 +136,7 @@ function writeStoryContext(story) {
|
|
|
136
136
|
``,
|
|
137
137
|
`---`,
|
|
138
138
|
``,
|
|
139
|
-
`Mark done: \`intentdocs done ${storyRef(story)}\``
|
|
139
|
+
`Mark done: \`npx intentdocs done ${storyRef(story)}\``
|
|
140
140
|
].join("\n");
|
|
141
141
|
const path = storyContextPath(story.id);
|
|
142
142
|
writeFileSync(path, md);
|
|
@@ -39,12 +39,12 @@ function writeConfig(config) {
|
|
|
39
39
|
function requireConfig() {
|
|
40
40
|
const config = readConfig();
|
|
41
41
|
if (!config) {
|
|
42
|
-
console.error("Not initialized. Run:
|
|
42
|
+
console.error("Not initialized. Run: npx intentdocs init");
|
|
43
43
|
process.exit(1);
|
|
44
44
|
}
|
|
45
45
|
if (!config.mapId) {
|
|
46
46
|
console.error(
|
|
47
|
-
"This checkout was connected with a sync token, which has been retired: every sync now runs as you.\nRemove .intent/config.json and run `intentdocs login` then `intentdocs init` to reconnect."
|
|
47
|
+
"This checkout was connected with a sync token, which has been retired: every sync now runs as you.\nRemove .intent/config.json and run `npx intentdocs login` then `npx intentdocs init` to reconnect."
|
|
48
48
|
);
|
|
49
49
|
process.exit(1);
|
|
50
50
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-34JCN66H.js";
|
|
4
4
|
import {
|
|
5
5
|
writeConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JX2RLGOM.js";
|
|
7
7
|
import {
|
|
8
8
|
ask,
|
|
9
9
|
closePrompt,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
authenticatedFetch,
|
|
14
14
|
requireValidAuth
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XZE2XP6O.js";
|
|
16
16
|
import {
|
|
17
17
|
API_BASE
|
|
18
18
|
} from "./chunk-UYTVTYNB.js";
|
|
@@ -176,7 +176,7 @@ async function scope(projectId) {
|
|
|
176
176
|
" Configure your AI tool (Claude Code / Cursor) with intentdocs agent workflows?"
|
|
177
177
|
);
|
|
178
178
|
if (wantSetup) {
|
|
179
|
-
const { setup } = await import("./setup-
|
|
179
|
+
const { setup } = await import("./setup-WSYIG2CR.js");
|
|
180
180
|
await setup();
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
@@ -184,10 +184,10 @@ async function scope(projectId) {
|
|
|
184
184
|
\u2705 Your project is scoped and ready to build!
|
|
185
185
|
|
|
186
186
|
Next steps:
|
|
187
|
-
\u2022
|
|
188
|
-
\u2022
|
|
189
|
-
\u2022
|
|
190
|
-
\u2022
|
|
187
|
+
\u2022 npx intentdocs setup \u2014 configure your AI tool
|
|
188
|
+
\u2022 npx intentdocs status \u2014 see your story map progress
|
|
189
|
+
\u2022 npx intentdocs next \u2014 see what to build first
|
|
190
|
+
\u2022 npx intentdocs done <id> \u2014 mark stories as you complete them
|
|
191
191
|
|
|
192
192
|
Your story map is also live at ${API_BASE}
|
|
193
193
|
Seek advice from the community and our resources.
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
captureCli,
|
|
3
3
|
shutdownCliAnalytics
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KPQ42YE6.js";
|
|
5
5
|
import {
|
|
6
6
|
writeStoryContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F52HPVNQ.js";
|
|
8
8
|
import {
|
|
9
9
|
apiFetch,
|
|
10
10
|
getContext,
|
|
11
11
|
listStories
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-34JCN66H.js";
|
|
13
13
|
import {
|
|
14
14
|
hasConfig,
|
|
15
15
|
requireConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JX2RLGOM.js";
|
|
17
17
|
import {
|
|
18
18
|
choose,
|
|
19
19
|
closePrompt
|
|
20
20
|
} from "./chunk-WRRUCCVZ.js";
|
|
21
21
|
import {
|
|
22
22
|
requireValidAuth
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XZE2XP6O.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/setup.ts
|
|
26
26
|
import { existsSync as existsSync2, mkdirSync, writeFileSync as writeFileSync2, readFileSync, unlinkSync } from "fs";
|
|
@@ -124,7 +124,7 @@ async function sync(opts) {
|
|
|
124
124
|
async function setup() {
|
|
125
125
|
await requireValidAuth();
|
|
126
126
|
if (!hasConfig()) {
|
|
127
|
-
console.log(" Not connected to a project. Run `intentdocs init` first.");
|
|
127
|
+
console.log(" Not connected to a project. Run `npx intentdocs init` first.");
|
|
128
128
|
closePrompt();
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
@@ -142,7 +142,7 @@ async function setup() {
|
|
|
142
142
|
try {
|
|
143
143
|
await syncContextFile(config);
|
|
144
144
|
} catch {
|
|
145
|
-
console.log(" \u26A0 Could not fetch project context (run `intentdocs sync --context` to retry)");
|
|
145
|
+
console.log(" \u26A0 Could not fetch project context (run `npx intentdocs sync --context` to retry)");
|
|
146
146
|
}
|
|
147
147
|
generateAgentDocs();
|
|
148
148
|
console.log(`
|
|
@@ -162,13 +162,13 @@ async function setup() {
|
|
|
162
162
|
/intent-sync Refresh context from intentdocs
|
|
163
163
|
|
|
164
164
|
Terminal commands:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
npx intentdocs next Next priority story
|
|
166
|
+
npx intentdocs done <id> Mark done + log decision/lesson
|
|
167
|
+
npx intentdocs decide Log an architectural decision
|
|
168
|
+
npx intentdocs example Log a reference pattern
|
|
169
|
+
npx intentdocs sync Refresh INTENT.md
|
|
170
|
+
npx intentdocs sync --context Regenerate CLAUDE.md from intentdocs
|
|
171
|
+
npx intentdocs status Recent activity
|
|
172
172
|
`);
|
|
173
173
|
closePrompt();
|
|
174
174
|
}
|
|
@@ -179,20 +179,20 @@ function setupClaudeCode() {
|
|
|
179
179
|
# intentdocs Integration
|
|
180
180
|
|
|
181
181
|
This project is connected to a intentdocs story map.
|
|
182
|
-
Run \`intentdocs sync --context\` to generate the full CLAUDE.md with your project's instructions,
|
|
182
|
+
Run \`npx intentdocs sync --context\` to generate the full CLAUDE.md with your project's instructions,
|
|
183
183
|
story map, decisions, examples, tools, and guardrails.
|
|
184
184
|
|
|
185
185
|
## Quick reference
|
|
186
186
|
|
|
187
187
|
| Command | What it does |
|
|
188
188
|
|---|---|
|
|
189
|
-
| \`intentdocs next\` | Pick up the next priority story |
|
|
190
|
-
| \`intentdocs done <id>\` | Mark a story done + log a decision |
|
|
191
|
-
| \`intentdocs decide\` | Log an architectural or product decision |
|
|
192
|
-
| \`intentdocs example\` | Log a reference pattern for this codebase |
|
|
193
|
-
| \`intentdocs sync\` | Refresh story map + INTENT.md |
|
|
194
|
-
| \`intentdocs sync --context\` | Regenerate this file from intentdocs |
|
|
195
|
-
| \`intentdocs status\` | Show recent activity |
|
|
189
|
+
| \`npx intentdocs next\` | Pick up the next priority story |
|
|
190
|
+
| \`npx intentdocs done <id>\` | Mark a story done + log a decision |
|
|
191
|
+
| \`npx intentdocs decide\` | Log an architectural or product decision |
|
|
192
|
+
| \`npx intentdocs example\` | Log a reference pattern for this codebase |
|
|
193
|
+
| \`npx intentdocs sync\` | Refresh story map + INTENT.md |
|
|
194
|
+
| \`npx intentdocs sync --context\` | Regenerate this file from intentdocs |
|
|
195
|
+
| \`npx intentdocs status\` | Show recent activity |
|
|
196
196
|
`;
|
|
197
197
|
if (existsSync2(claudeMdPath)) {
|
|
198
198
|
const existing = readFileSync(claudeMdPath, "utf-8");
|
|
@@ -219,7 +219,7 @@ story map, decisions, examples, tools, and guardrails.
|
|
|
219
219
|
join2(commandsDir, "intent-next.md"),
|
|
220
220
|
`# Pick up the next story
|
|
221
221
|
|
|
222
|
-
1. Run \`intentdocs next\` to get the highest-priority story
|
|
222
|
+
1. Run \`npx intentdocs next\` to get the highest-priority story
|
|
223
223
|
2. Read the acceptance criteria carefully \u2014 these define "done"
|
|
224
224
|
3. Check ARCHITECTURE.md for relevant technical decisions
|
|
225
225
|
4. Read CONVENTIONS.md for coding patterns to follow
|
|
@@ -233,7 +233,7 @@ story map, decisions, examples, tools, and guardrails.
|
|
|
233
233
|
|
|
234
234
|
## Context to load first
|
|
235
235
|
1. Read CLAUDE.md \u2014 your full project harness (instructions, decisions, examples, tools, guardrails)
|
|
236
|
-
2. Run \`intentdocs next\` if you don't have a story yet
|
|
236
|
+
2. Run \`npx intentdocs next\` if you don't have a story yet
|
|
237
237
|
3. Review the "Done when" acceptance criteria \u2014 each one carries a priority
|
|
238
238
|
(\`must\`/\`should\`) and a verification method: \`[executable]\` gives you a
|
|
239
239
|
\`check:\` command to run, \`[self-check]\`/\`[visual]\`/\`[founder]\` give you
|
|
@@ -254,18 +254,18 @@ story map, decisions, examples, tools, and guardrails.
|
|
|
254
254
|
\`must\` criterion fails 3 times, call \`raise_blocker\` with what you
|
|
255
255
|
attempted, what's failing, and the single decision the founder needs to
|
|
256
256
|
make \u2014 then stop working on this story.
|
|
257
|
-
10. Never call \`mark_done\` (or \`intentdocs done\`) while a \`must\` criterion is
|
|
257
|
+
10. Never call \`mark_done\` (or \`npx intentdocs done\`) while a \`must\` criterion is
|
|
258
258
|
still failing or has never been reported \u2014 both will warn you and
|
|
259
259
|
require an explicit override if you try.
|
|
260
260
|
|
|
261
261
|
## Write back to intentdocs
|
|
262
262
|
11. Add implementation notes:
|
|
263
|
-
\`intentdocs note <story-id> "How this was implemented"\`
|
|
264
|
-
12. Log decisions: \`intentdocs decide "Title" -d "What and why" -c architecture\`
|
|
265
|
-
13. Log useful patterns: \`intentdocs example\`
|
|
263
|
+
\`npx intentdocs note <story-id> "How this was implemented"\`
|
|
264
|
+
12. Log decisions: \`npx intentdocs decide "Title" -d "What and why" -c architecture\`
|
|
265
|
+
13. Log useful patterns: \`npx intentdocs example\`
|
|
266
266
|
14. If you discovered new requirements:
|
|
267
|
-
\`intentdocs add "title" --activity "Activity" --priority should\`
|
|
268
|
-
15. Mark done: \`intentdocs done <story-id>\`
|
|
267
|
+
\`npx intentdocs add "title" --activity "Activity" --priority should\`
|
|
268
|
+
15. Mark done: \`npx intentdocs done <story-id>\`
|
|
269
269
|
16. Commit: \`git commit -m "feat: description [SC-<id>]"\`
|
|
270
270
|
|
|
271
271
|
## Rules
|
|
@@ -299,9 +299,9 @@ story map, decisions, examples, tools, and guardrails.
|
|
|
299
299
|
- Decisions made and trade-offs
|
|
300
300
|
- How to test it manually
|
|
301
301
|
4. Log decisions to intentdocs:
|
|
302
|
-
\`intentdocs decide "Title" -d "Description" -c architecture\`
|
|
302
|
+
\`npx intentdocs decide "Title" -d "Description" -c architecture\`
|
|
303
303
|
5. Add implementation notes:
|
|
304
|
-
\`intentdocs note <story-id> "Summary of how it works"\`
|
|
304
|
+
\`npx intentdocs note <story-id> "Summary of how it works"\`
|
|
305
305
|
6. Update ARCHITECTURE.md if needed
|
|
306
306
|
7. Update CONVENTIONS.md if new patterns were introduced
|
|
307
307
|
`
|
|
@@ -310,7 +310,7 @@ story map, decisions, examples, tools, and guardrails.
|
|
|
310
310
|
join2(commandsDir, "intent-test.md"),
|
|
311
311
|
`# Write tests for a story
|
|
312
312
|
|
|
313
|
-
1. Get the story details: \`intentdocs next\` or provided story ID
|
|
313
|
+
1. Get the story details: \`npx intentdocs next\` or provided story ID
|
|
314
314
|
2. Each acceptance criterion becomes at least one test
|
|
315
315
|
3. Also consider: error cases, boundary conditions, integration points
|
|
316
316
|
4. Follow testing patterns in CONVENTIONS.md
|
|
@@ -319,16 +319,16 @@ story map, decisions, examples, tools, and guardrails.
|
|
|
319
319
|
);
|
|
320
320
|
writeFileSync2(
|
|
321
321
|
join2(commandsDir, "intent-status.md"),
|
|
322
|
-
`Run \`intentdocs status\` and \`intentdocs stories --filter todo\` to show current progress and remaining backlog. Summarise what's done and what's left.`
|
|
322
|
+
`Run \`npx intentdocs status\` and \`npx intentdocs stories --filter todo\` to show current progress and remaining backlog. Summarise what's done and what's left.`
|
|
323
323
|
);
|
|
324
324
|
writeFileSync2(
|
|
325
325
|
join2(commandsDir, "intent-done.md"),
|
|
326
|
-
`Ask which story was just completed, then run \`intentdocs done <id>\`.
|
|
327
|
-
\`intentdocs done\` prints the acceptance-criteria table first. If any \`must\` criterion is still failing or was
|
|
326
|
+
`Ask which story was just completed, then run \`npx intentdocs done <id>\`.
|
|
327
|
+
\`npx intentdocs done\` prints the acceptance-criteria table first. If any \`must\` criterion is still failing or was
|
|
328
328
|
never reported via \`report_criteria\`, it will list them and ask "Mark done anyway?" \u2014 only confirm that
|
|
329
|
-
if the founder explicitly wants to override; otherwise go fix the failing criterion and re-run \`intentdocs done\`.
|
|
329
|
+
if the founder explicitly wants to override; otherwise go fix the failing criterion and re-run \`npx intentdocs done\`.
|
|
330
330
|
The CLI will prompt for an optional decision or lesson learned \u2014 encourage the user to capture it.
|
|
331
|
-
Also ask if there are implementation notes to add: \`intentdocs note <id> "..."\`
|
|
331
|
+
Also ask if there are implementation notes to add: \`npx intentdocs note <id> "..."\`
|
|
332
332
|
Both decisions and notes flow back to the project page on intentdocs.com.`
|
|
333
333
|
);
|
|
334
334
|
writeFileSync2(
|
|
@@ -336,10 +336,10 @@ Both decisions and notes flow back to the project page on intentdocs.com.`
|
|
|
336
336
|
`# Refresh context from intentdocs
|
|
337
337
|
|
|
338
338
|
## Refresh story map summary
|
|
339
|
-
Run \`intentdocs sync\` \u2014 updates INTENT.md with the latest stories and their status.
|
|
339
|
+
Run \`npx intentdocs sync\` \u2014 updates INTENT.md with the latest stories and their status.
|
|
340
340
|
|
|
341
341
|
## Regenerate the full CLAUDE.md harness
|
|
342
|
-
Run \`intentdocs sync --context\` \u2014 rebuilds CLAUDE.md from your project page, pulling in:
|
|
342
|
+
Run \`npx intentdocs sync --context\` \u2014 rebuilds CLAUDE.md from your project page, pulling in:
|
|
343
343
|
- Role & Goals (Instructions section)
|
|
344
344
|
- Scope (all story maps + story counts)
|
|
345
345
|
- Decisions & Memory (last 10 decisions)
|
|
@@ -347,7 +347,7 @@ Run \`intentdocs sync --context\` \u2014 rebuilds CLAUDE.md from your project pa
|
|
|
347
347
|
- Tools & Stack (structured tool registry + MCP config)
|
|
348
348
|
- Guardrails (hard constraints)
|
|
349
349
|
|
|
350
|
-
Run \`intentdocs sync --context\` after updating any section on intentdocs.com.`
|
|
350
|
+
Run \`npx intentdocs sync --context\` after updating any section on intentdocs.com.`
|
|
351
351
|
);
|
|
352
352
|
writeFileSync2(
|
|
353
353
|
join2(commandsDir, "intent-propose.md"),
|
|
@@ -360,18 +360,18 @@ stories there AND saves a local spec for the AI to reference during implementati
|
|
|
360
360
|
## Process
|
|
361
361
|
1. Ask the user: "What do you want to build or change? Describe the problem and the solution."
|
|
362
362
|
2. Help them break it into 2-5 stories with clear acceptance criteria (each AC is testable)
|
|
363
|
-
3. Run: \`intentdocs propose <change-name>\`
|
|
363
|
+
3. Run: \`npx intentdocs propose <change-name>\`
|
|
364
364
|
- The CLI will guide through: problem, solution, activity, priority, stories + ACs
|
|
365
365
|
- Stories are created in the live story map at intentdocs.com
|
|
366
366
|
- A local spec is saved to \`intent-changes/<name>/proposal.md\`
|
|
367
|
-
4. Once done: \`intentdocs sync\` to pull the new stories into INTENT.md
|
|
368
|
-
5. Run \`intentdocs next\` to start implementing
|
|
367
|
+
4. Once done: \`npx intentdocs sync\` to pull the new stories into INTENT.md
|
|
368
|
+
5. Run \`npx intentdocs next\` to start implementing
|
|
369
369
|
|
|
370
370
|
## Tips
|
|
371
371
|
- Change names should be kebab-case: add-dark-mode, fix-auth-flow, onboarding-revamp
|
|
372
372
|
- Keep stories small \u2014 one story = one deployable increment
|
|
373
373
|
- Write ACs as testable outcomes: "Given X, when Y, then Z" or "User can..."
|
|
374
|
-
- If the change is already defined in the UI, just run \`intentdocs sync\` instead
|
|
374
|
+
- If the change is already defined in the UI, just run \`npx intentdocs sync\` instead
|
|
375
375
|
`
|
|
376
376
|
);
|
|
377
377
|
writeFileSync2(
|
|
@@ -386,13 +386,13 @@ Use this to focus on a single story without loading the full story map.
|
|
|
386
386
|
- When you need a clean, focused view of ACs and notes
|
|
387
387
|
|
|
388
388
|
## Process
|
|
389
|
-
1. Run \`intentdocs next\` to get the active story \u2014 this automatically writes the context file to \`.intent/stories/<id>.md\`
|
|
389
|
+
1. Run \`npx intentdocs next\` to get the active story \u2014 this automatically writes the context file to \`.intent/stories/<id>.md\`
|
|
390
390
|
2. Read that file \u2014 it contains: title, user story, acceptance criteria (as checkboxes), notes, and space for relevant files
|
|
391
391
|
3. Use it as your working document throughout implementation:
|
|
392
392
|
- Check off ACs as you satisfy them
|
|
393
393
|
- Add file paths under "Relevant files" as you discover them
|
|
394
|
-
- Run \`intentdocs note <id> "..."\` to log notes (updates both remote map and local file)
|
|
395
|
-
4. When all ACs are checked: \`intentdocs done <id>\`
|
|
394
|
+
- Run \`npx intentdocs note <id> "..."\` to log notes (updates both remote map and local file)
|
|
395
|
+
4. When all ACs are checked: \`npx intentdocs done <id>\`
|
|
396
396
|
|
|
397
397
|
## If you already know the story ID
|
|
398
398
|
The file is at \`.intent/stories/<full-story-id>.md\` \u2014 read it directly.
|
|
@@ -404,13 +404,13 @@ The file is at \`.intent/stories/<full-story-id>.md\` \u2014 read it directly.
|
|
|
404
404
|
|
|
405
405
|
Use this when you've made a decision that future agents (or teammates) should know about.
|
|
406
406
|
|
|
407
|
-
Run \`intentdocs decide\` \u2014 the CLI will prompt for:
|
|
407
|
+
Run \`npx intentdocs decide\` \u2014 the CLI will prompt for:
|
|
408
408
|
- Title: short, specific description of the decision
|
|
409
409
|
- Description: what was decided and why (include trade-offs considered)
|
|
410
410
|
- Category: architecture / product / technical / trade-off
|
|
411
411
|
|
|
412
412
|
Decisions appear in the Memory section of the project page at intentdocs.com
|
|
413
|
-
and are included in CLAUDE.md the next time you run \`intentdocs sync --context\`.
|
|
413
|
+
and are included in CLAUDE.md the next time you run \`npx intentdocs sync --context\`.
|
|
414
414
|
|
|
415
415
|
Good decisions to log:
|
|
416
416
|
- "Chose X over Y because..."
|
|
@@ -423,7 +423,7 @@ Good decisions to log:
|
|
|
423
423
|
|
|
424
424
|
Use this when you've written code that represents the right way to do something in this project.
|
|
425
425
|
|
|
426
|
-
Run \`intentdocs example\` \u2014 the CLI will prompt for:
|
|
426
|
+
Run \`npx intentdocs example\` \u2014 the CLI will prompt for:
|
|
427
427
|
- Title: what the pattern is
|
|
428
428
|
- Description: when to use it
|
|
429
429
|
- Language: typescript / python / bash / other
|
|
@@ -431,7 +431,7 @@ Run \`intentdocs example\` \u2014 the CLI will prompt for:
|
|
|
431
431
|
- After code: the correct pattern to follow
|
|
432
432
|
|
|
433
433
|
Examples appear in the Knowledge > Examples section of the project page
|
|
434
|
-
and are included in CLAUDE.md as Reference Patterns the next time you run \`intentdocs sync --context\`.`
|
|
434
|
+
and are included in CLAUDE.md as Reference Patterns the next time you run \`npx intentdocs sync --context\`.`
|
|
435
435
|
);
|
|
436
436
|
console.log(" \u2713 Created slash commands: /intent-propose, /intent-next, /intent-implement, /intent-review, /intent-document, /intent-test, /intent-status, /intent-done, /intent-sync, /intent-context, /intent-decide, /intent-example");
|
|
437
437
|
registerMcpWithClaudeCode();
|
|
@@ -464,12 +464,12 @@ function setupCursor() {
|
|
|
464
464
|
3. **CONVENTIONS.md** \u2014 coding patterns, naming, file structure
|
|
465
465
|
|
|
466
466
|
## Workflow
|
|
467
|
-
- Next story: \`intentdocs next\`
|
|
468
|
-
- Mark done: \`intentdocs done <id>\`
|
|
469
|
-
- Add notes: \`intentdocs note <id> "..."\`
|
|
470
|
-
- Log decisions: \`intentdocs decide "Title" -d "Why"\`
|
|
471
|
-
- Create stories: \`intentdocs add "title" --activity "Name"\`
|
|
472
|
-
- Refresh context: \`intentdocs sync\`
|
|
467
|
+
- Next story: \`npx intentdocs next\`
|
|
468
|
+
- Mark done: \`npx intentdocs done <id>\`
|
|
469
|
+
- Add notes: \`npx intentdocs note <id> "..."\`
|
|
470
|
+
- Log decisions: \`npx intentdocs decide "Title" -d "Why"\`
|
|
471
|
+
- Create stories: \`npx intentdocs add "title" --activity "Name"\`
|
|
472
|
+
- Refresh context: \`npx intentdocs sync\`
|
|
473
473
|
|
|
474
474
|
## The acceptance-criteria loop
|
|
475
475
|
- Each "Done when" criterion carries a priority (\`must\`/\`should\`) and a
|
|
@@ -480,7 +480,7 @@ function setupCursor() {
|
|
|
480
480
|
- For a failing \`must\` criterion: fix and re-check. If the same \`must\`
|
|
481
481
|
fails 3 times, call \`raise_blocker\` with what you attempted, what's
|
|
482
482
|
failing, and the single decision needed \u2014 then stop.
|
|
483
|
-
- Never call \`mark_done\`/\`intentdocs done\` while a \`must\` criterion is still
|
|
483
|
+
- Never call \`mark_done\`/\`npx intentdocs done\` while a \`must\` criterion is still
|
|
484
484
|
failing or unreported \u2014 both warn and require an explicit override.
|
|
485
485
|
|
|
486
486
|
## Rules
|
|
@@ -3,14 +3,14 @@ import chalk from "chalk";
|
|
|
3
3
|
function isPlanGated(status) {
|
|
4
4
|
return status === 402 || status === 403;
|
|
5
5
|
}
|
|
6
|
-
var UPGRADE_MESSAGE_PLAIN = "This feature requires a Pro plan or your own Anthropic key.\n Upgrade: https://intentdocs.com/pricing\n Or add your key:
|
|
6
|
+
var UPGRADE_MESSAGE_PLAIN = "This feature requires a Pro plan or your own Anthropic key.\n Upgrade: https://intentdocs.com/pricing\n Or add your key: npx intentdocs keys set";
|
|
7
7
|
function printUpgradeMessage() {
|
|
8
8
|
console.log();
|
|
9
9
|
console.log(
|
|
10
10
|
` ${chalk.yellow("This feature requires a Pro plan or your own Anthropic key.")}`
|
|
11
11
|
);
|
|
12
12
|
console.log(` Upgrade: ${chalk.cyan.underline("https://intentdocs.com/pricing")}`);
|
|
13
|
-
console.log(` Or add your key: ${chalk.cyan("intentdocs keys set")}`);
|
|
13
|
+
console.log(` Or add your key: ${chalk.cyan("npx intentdocs keys set")}`);
|
|
14
14
|
console.log();
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -66,14 +66,14 @@ async function requireValidAuth() {
|
|
|
66
66
|
if (result.valid) return result.auth;
|
|
67
67
|
switch (result.reason) {
|
|
68
68
|
case "no_file":
|
|
69
|
-
console.error("Not logged in \u2014 no auth credentials found. Run: intentdocs login");
|
|
69
|
+
console.error("Not logged in \u2014 no auth credentials found. Run: npx intentdocs login");
|
|
70
70
|
break;
|
|
71
71
|
case "revoked":
|
|
72
|
-
console.error("Your auth token has been revoked. Run: intentdocs login");
|
|
72
|
+
console.error("Your auth token has been revoked. Run: npx intentdocs login");
|
|
73
73
|
clearAuth();
|
|
74
74
|
break;
|
|
75
75
|
case "not_found":
|
|
76
|
-
console.error("Your auth token is no longer valid (it may have been deleted). Run: intentdocs login");
|
|
76
|
+
console.error("Your auth token is no longer valid (it may have been deleted). Run: npx intentdocs login");
|
|
77
77
|
clearAuth();
|
|
78
78
|
break;
|
|
79
79
|
case "network_error":
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPlanGated,
|
|
3
3
|
printUpgradeMessage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UQDMUKLP.js";
|
|
5
5
|
import {
|
|
6
6
|
matchesStoryRef
|
|
7
7
|
} from "./chunk-LQTPZL2Y.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
apiUrl,
|
|
10
10
|
listStories,
|
|
11
11
|
syncHeaders
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-34JCN66H.js";
|
|
13
13
|
import {
|
|
14
14
|
requireConfig
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-JX2RLGOM.js";
|
|
16
|
+
import "./chunk-XZE2XP6O.js";
|
|
17
17
|
import "./chunk-UYTVTYNB.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/complexity.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPlanGated,
|
|
3
3
|
printUpgradeMessage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UQDMUKLP.js";
|
|
5
5
|
import {
|
|
6
6
|
apiUrl,
|
|
7
7
|
syncHeaders
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-34JCN66H.js";
|
|
9
9
|
import {
|
|
10
10
|
requireConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JX2RLGOM.js";
|
|
12
12
|
import {
|
|
13
13
|
closePrompt,
|
|
14
14
|
confirm
|
|
15
15
|
} from "./chunk-WRRUCCVZ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-XZE2XP6O.js";
|
|
17
17
|
import "./chunk-UYTVTYNB.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/import-prd.ts
|