intentdocs 0.8.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.
Files changed (34) hide show
  1. package/README.md +7 -1
  2. package/bin/intentdocs.js +2 -0
  3. package/dist/chunk-34JCN66H.js +170 -0
  4. package/dist/chunk-6X4BORMW.js +317 -0
  5. package/dist/{chunk-6FGYJ3W2.js → chunk-F52HPVNQ.js} +43 -4
  6. package/dist/{chunk-ICOMMHKG.js → chunk-JX2RLGOM.js} +13 -2
  7. package/dist/chunk-KPQ42YE6.js +43 -0
  8. package/dist/chunk-LQTPZL2Y.js +15 -0
  9. package/dist/{chunk-4OWPN2RE.js → chunk-NHNBCNND.js} +28 -47
  10. package/dist/{chunk-IKF3ZLHK.js → chunk-PUGYRSMK.js} +72 -108
  11. package/dist/{chunk-ITQUQYWB.js → chunk-UQDMUKLP.js} +2 -2
  12. package/dist/chunk-UYTVTYNB.js +11 -0
  13. package/dist/{chunk-WPVDURTJ.js → chunk-WRRUCCVZ.js} +27 -3
  14. package/dist/chunk-XZE2XP6O.js +105 -0
  15. package/dist/ci-XCOXFTLB.js +11 -0
  16. package/dist/{complexity-NSSYVT54.js → complexity-X3IJKNNV.js} +12 -7
  17. package/dist/{import-prd-CKV3R67G.js → import-prd-IJTM6FZE.js} +13 -11
  18. package/dist/index.js +435 -194
  19. package/dist/{keys-EDWET3WG.js → keys-UVXCCWCS.js} +8 -7
  20. package/dist/log-XIH4BGFL.js +206 -0
  21. package/dist/{map-extract-I3AACTGL.js → map-extract-V6D27I3H.js} +3 -2
  22. package/dist/{map-import-IYUMRASO.js → map-import-LORTI4K4.js} +12 -10
  23. package/dist/{map-schema-JVL3O2TJ.js → map-schema-5BEIJM2J.js} +1 -1
  24. package/dist/projects-AYAYVFKL.js +37 -0
  25. package/dist/{prompt-WAWCRGHN.js → prompt-GOAFIKBZ.js} +3 -1
  26. package/dist/{research-6SXJ37TI.js → research-CO3W7PLC.js} +12 -10
  27. package/dist/scope-ZZLKQEF5.js +11 -0
  28. package/dist/setup-WSYIG2CR.js +14 -0
  29. package/package.json +4 -2
  30. package/dist/chunk-6XKB6RTU.js +0 -123
  31. package/dist/chunk-PCNDP5SX.js +0 -34
  32. package/dist/log-TT2UCJP7.js +0 -94
  33. package/dist/scope-OGKQ472D.js +0 -10
  34. package/dist/setup-SOI2HQAL.js +0 -11
@@ -1,94 +0,0 @@
1
- import {
2
- appendNoteToContext,
3
- storyContextPath
4
- } from "./chunk-6FGYJ3W2.js";
5
- import {
6
- ask,
7
- closePrompt
8
- } from "./chunk-WPVDURTJ.js";
9
- import {
10
- apiFetch
11
- } from "./chunk-6XKB6RTU.js";
12
- import {
13
- requireConfig
14
- } from "./chunk-ICOMMHKG.js";
15
- import "./chunk-PCNDP5SX.js";
16
-
17
- // src/commands/log.ts
18
- async function logDecision(title, opts) {
19
- const config = requireConfig();
20
- if (!title) {
21
- title = await ask(" Decision title: ");
22
- }
23
- let description = opts?.description;
24
- if (!description) {
25
- description = await ask(" Description (what was decided and why): ");
26
- }
27
- if (!title?.trim() || !description?.trim()) {
28
- console.log(" Title and description required.");
29
- closePrompt();
30
- return;
31
- }
32
- const res = await apiFetch(config, "/decisions", {
33
- method: "POST",
34
- headers: { "Content-Type": "application/json" },
35
- body: JSON.stringify({
36
- title: title.trim(),
37
- description: description.trim(),
38
- category: opts?.category ?? "technical",
39
- story_id: opts?.story ?? void 0
40
- })
41
- });
42
- if (res.ok) {
43
- console.log(` \u2713 Decision logged: ${title}`);
44
- } else {
45
- console.error(" Failed to log decision.");
46
- }
47
- closePrompt();
48
- }
49
- async function logNote(storyId, note) {
50
- const config = requireConfig();
51
- if (!note) {
52
- note = await ask(" Note: ");
53
- }
54
- if (!note?.trim()) {
55
- console.log(" Note required.");
56
- closePrompt();
57
- return;
58
- }
59
- const listRes = await apiFetch(config, "/stories");
60
- if (!listRes.ok) {
61
- console.error(" Failed to fetch stories.");
62
- closePrompt();
63
- return;
64
- }
65
- const data = await listRes.json();
66
- const match = data.stories.find((s) => s.id.startsWith(storyId));
67
- if (!match) {
68
- console.error(` No story found matching "${storyId}"`);
69
- closePrompt();
70
- return;
71
- }
72
- const res = await apiFetch(config, "/stories", {
73
- method: "PATCH",
74
- headers: { "Content-Type": "application/json" },
75
- body: JSON.stringify({
76
- stories: [{ id: match.id, notes: note.trim() }]
77
- })
78
- });
79
- if (res.ok) {
80
- console.log(` \u2713 Note added to: ${match.title.slice(0, 60)}`);
81
- } else {
82
- console.error(" Failed to add note.");
83
- }
84
- const appended = appendNoteToContext(match.id, note.trim());
85
- if (appended) {
86
- const relPath = storyContextPath(match.id).replace(process.cwd() + "/", "");
87
- console.log(` \u2713 Updated local context: ${relPath}`);
88
- }
89
- closePrompt();
90
- }
91
- export {
92
- logDecision,
93
- logNote
94
- };
@@ -1,10 +0,0 @@
1
- import {
2
- scope
3
- } from "./chunk-4OWPN2RE.js";
4
- import "./chunk-WPVDURTJ.js";
5
- import "./chunk-6XKB6RTU.js";
6
- import "./chunk-ICOMMHKG.js";
7
- import "./chunk-PCNDP5SX.js";
8
- export {
9
- scope
10
- };
@@ -1,11 +0,0 @@
1
- import {
2
- setup
3
- } from "./chunk-IKF3ZLHK.js";
4
- import "./chunk-6FGYJ3W2.js";
5
- import "./chunk-WPVDURTJ.js";
6
- import "./chunk-6XKB6RTU.js";
7
- import "./chunk-ICOMMHKG.js";
8
- import "./chunk-PCNDP5SX.js";
9
- export {
10
- setup
11
- };