@dendelion/paper-camp 0.8.0 → 0.10.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.
Files changed (75) hide show
  1. package/dist/app/assets/index-BnXxehKU.js +2 -0
  2. package/dist/app/assets/index-BnXxehKU.js.map +1 -0
  3. package/dist/app/assets/index-C2kYil0S.js +3 -0
  4. package/dist/app/assets/index-C2kYil0S.js.map +1 -0
  5. package/dist/app/assets/index-CRRHTP77.js +2 -0
  6. package/dist/app/assets/index-CRRHTP77.js.map +1 -0
  7. package/dist/app/assets/index-DrNAzLuW.js +2 -0
  8. package/dist/app/assets/index-DrNAzLuW.js.map +1 -0
  9. package/dist/app/assets/main-BJGNGUiz.css +1 -0
  10. package/dist/app/assets/main-CyxblUnu.js +233 -0
  11. package/dist/app/assets/main-CyxblUnu.js.map +1 -0
  12. package/dist/app/assets/sidebar-section-Ch50IaLb.js +2 -0
  13. package/dist/app/assets/sidebar-section-Ch50IaLb.js.map +1 -0
  14. package/dist/app/index.html +2 -2
  15. package/dist/chunks/{serializer.BfH7zTwv.js → roadmap.C0AQ6pUX.js} +1437 -1387
  16. package/dist/chunks/roadmap.C0AQ6pUX.js.map +1 -0
  17. package/dist/cli/index.js +6720 -6420
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/core/env.d.ts +0 -5
  20. package/dist/core/env.d.ts.map +1 -1
  21. package/dist/core/git-pr/branch.d.ts +2 -6
  22. package/dist/core/git-pr/branch.d.ts.map +1 -1
  23. package/dist/core/git-pr/pr-lookup.d.ts +3 -44
  24. package/dist/core/git-pr/pr-lookup.d.ts.map +1 -1
  25. package/dist/core/git-pr/pr.d.ts +5 -85
  26. package/dist/core/git-pr/pr.d.ts.map +1 -1
  27. package/dist/core/git-pr/scopes.d.ts +0 -6
  28. package/dist/core/git-pr/scopes.d.ts.map +1 -1
  29. package/dist/core/index.d.ts +1 -0
  30. package/dist/core/index.d.ts.map +1 -1
  31. package/dist/core/index.js +71 -66
  32. package/dist/core/parse/frontmatter-schemas.d.ts +0 -8
  33. package/dist/core/parse/frontmatter-schemas.d.ts.map +1 -1
  34. package/dist/core/parse/parser.d.ts +3 -31
  35. package/dist/core/parse/parser.d.ts.map +1 -1
  36. package/dist/core/parse/schemas.d.ts +2 -0
  37. package/dist/core/parse/schemas.d.ts.map +1 -1
  38. package/dist/core/readers.d.ts +2 -28
  39. package/dist/core/readers.d.ts.map +1 -1
  40. package/dist/core/roadmap.d.ts +4 -0
  41. package/dist/core/roadmap.d.ts.map +1 -0
  42. package/dist/core/roadmap.test.d.ts +2 -0
  43. package/dist/core/roadmap.test.d.ts.map +1 -0
  44. package/dist/core/run-order.d.ts +23 -0
  45. package/dist/core/run-order.d.ts.map +1 -0
  46. package/dist/core/run-order.test.d.ts +2 -0
  47. package/dist/core/run-order.test.d.ts.map +1 -0
  48. package/dist/core/scaffold/scaffold.d.ts +0 -6
  49. package/dist/core/scaffold/scaffold.d.ts.map +1 -1
  50. package/dist/core/scaffold/templates.d.ts +0 -6
  51. package/dist/core/scaffold/templates.d.ts.map +1 -1
  52. package/dist/core/sections.d.ts +18 -0
  53. package/dist/core/sections.d.ts.map +1 -0
  54. package/dist/core/serialize/content-hash.d.ts +0 -6
  55. package/dist/core/serialize/content-hash.d.ts.map +1 -1
  56. package/dist/core/serialize/serializer.d.ts +3 -60
  57. package/dist/core/serialize/serializer.d.ts.map +1 -1
  58. package/dist/core/serialize/serializer.test.d.ts +2 -0
  59. package/dist/core/serialize/serializer.test.d.ts.map +1 -0
  60. package/dist/core/status/status.d.ts +4 -19
  61. package/dist/core/status/status.d.ts.map +1 -1
  62. package/dist/types/index.d.ts +56 -29
  63. package/dist/types/index.d.ts.map +1 -1
  64. package/dist/types/index.js.map +1 -1
  65. package/package.json +2 -2
  66. package/dist/app/assets/index-CF8jC3IN.js +0 -2
  67. package/dist/app/assets/index-CF8jC3IN.js.map +0 -1
  68. package/dist/app/assets/index-DGXi8vpJ.js +0 -2
  69. package/dist/app/assets/index-DGXi8vpJ.js.map +0 -1
  70. package/dist/app/assets/main-D66GnCKz.css +0 -1
  71. package/dist/app/assets/main-DJDNx4Xs.js +0 -218
  72. package/dist/app/assets/main-DJDNx4Xs.js.map +0 -1
  73. package/dist/app/assets/sidebar-section-C2j12TzE.js +0 -2
  74. package/dist/app/assets/sidebar-section-C2j12TzE.js.map +0 -1
  75. package/dist/chunks/serializer.BfH7zTwv.js.map +0 -1
@@ -6,11 +6,5 @@ export interface InitOptions {
6
6
  projectName: string;
7
7
  intent?: string;
8
8
  }
9
- /**
10
- * Scaffolds papercamp/config.json and papercamp/ directory structure.
11
- * Creates per-file plan/idea directories and index files, plus monolithic
12
- * files for the remaining sections (progress, decisions, open-questions).
13
- * Never overwrites existing files.
14
- */
15
9
  export declare function initProject(targetDir: string, options: InitOptions): Promise<void>;
16
10
  //# sourceMappingURL=scaffold.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/scaffold.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,SAAS,EAAE,MAAM;CAG9B;AAaD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCxF"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/scaffold.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,SAAS,EAAE,MAAM;CAG9B;AAaD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCxF"}
@@ -1,9 +1,3 @@
1
- /**
2
- * Static file contents scaffolded by `paper-camp init` for the Claude Code
3
- * native integration: the discoverable skill and the SessionStart/PostToolUse
4
- * hook wiring. Kept in one place so `init`'s no-clobber writes stay simple
5
- * string dumps.
6
- */
7
1
  export declare const SKILL_MD_CONTENT = "---\nname: paper-camp\ndescription: Work inside a project that has a papercamp/ folder \u2014 its unified idea entities (each holding its plan as a section), decisions log, open questions, and progress log. Use this whenever the working directory contains papercamp/ (papercamp/ideas/, papercamp/decisions.md, papercamp/open-questions.md, papercamp/progress.md), and especially before starting, continuing, or completing any plan phase, drafting an idea, logging a decision, or answering \"what are we working on / what's next\".\n---\n\n# Paper Camp\n\nPaper Camp is this project's planning methodology: plans, ideas, decisions, and\nopen questions live as markdown files under `papercamp/`, and an append-only\n`papercamp/progress.md` is the changelog. This skill tells you how to read that\nstate before acting and how to keep it honest as you work.\n\nIf a `papercamp` MCP server is connected in this session, prefer its tools\n(list/get plans, update phase, append progress, etc.) over raw file access \u2014\nthey enforce the same guards (id allocation, branch conflicts) that the file\ngrammar below assumes. Everything in this skill still applies conceptually;\nonly the mechanism changes.\n\n## Before doing any work\n\nRead, in this order, whatever exists:\n\n1. `papercamp/ideas/index.md` \u2014 every entity's id/title/type/status/tags, at\n a glance. Ideas and plans are one thing: an entity is an *idea* for its\n whole life, and its plan is a `### Phases` section inside the same file.\n2. The specific entity file at `papercamp/ideas/<ID>.md` (e.g. `IDEA-43.md`)\n for the work you're about to do \u2014 YAML frontmatter (`id`, `title`,\n `type`, `status`, `tags`, ...) plus prose rationale, then optionally a\n `### Phases` list of `- [ ]`/`- [x]` checkboxes with an indented\n description under each. Done/dropped entities live in\n `papercamp/ideas/archive/`.\n3. `papercamp/decisions.md` \u2014 settled calls that constrain your approach.\n Don't re-litigate a logged decision without flagging it to the user first.\n4. `papercamp/open-questions.md` \u2014 unresolved questions that might block or\n redirect the work you're about to start.\n5. The last handful of entries in `papercamp/progress.md` for recent context\n on what just happened.\n\nSkip files that don't exist yet (a fresh project may have empty logs).\n\n## While working\n\n- Work one plan phase at a time unless told otherwise \u2014 don't cascade into\n later phases just because they look quick.\n- If a phase's boundary or intent is unclear, ask before continuing.\n- Prose in plans and ideas is more current than your memory of past\n conversations. If they conflict, the files win \u2014 say so and resync.\n\n## Keep the project current as you go\n\n- **Plan phases**: when you finish a phase, flip its checkbox from `- [ ]` to\n `- [x]` in the plan's frontmatter file. Change only that line \u2014 don't touch\n other phases or prose.\n- **Plan status**: keep the plan's `status:` frontmatter honest\n (`planned` / `in-progress` / `review` / `done`). When every phase is\n checked, set status to `review` \u2014 never `done`. `done` is a human-only\n promotion after review; an agent finishing the last phase does not close\n the plan itself.\n- **Progress log**: add one bullet describing what you did under today's\n `## YYYY-MM-DD` heading at the top of `papercamp/progress.md` (newest day\n first; create the heading if today's isn't there yet). Be specific enough\n that a future read of the log alone explains what changed and why, without\n needing to re-read the diff.\n- **Decisions / open questions**: if you settle something ambiguous while\n working, log it in `papercamp/decisions.md`; if you surface a question you\n can't resolve yourself, add it to `papercamp/open-questions.md` rather than\n guessing silently.\n\n## What this skill deliberately does not do\n\nIt does not maintain a separate \"current focus\" file \u2014 that's derived at\nsession start from live plan/progress data, not hand-maintained here. It does\nnot define the file formats in full; treat the existing files under\n`papercamp/` as the grammar reference (mirror their structure exactly rather\nthan inventing a new shape).\n";
8
2
  export declare const CLAUDE_SETTINGS_JSON: string;
9
3
  //# sourceMappingURL=templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,0pIA2E5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAmB5B,CAAC"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/templates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,0pIA2E5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAmB5B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { LogEntry, PhaseItem } from '../types/index';
2
+ declare const SUB_HEADING_RE: RegExp;
3
+ /** A section's parse and format sides share the same heading, so this is the one
4
+ * table both `core/parse/parser.ts` and `core/serialize/serializer.ts` drive from.
5
+ * Headings match h2 OR h3 on read: the serializer only ever writes `###`, but generic
6
+ * markdown tooling (CodeRabbit, markdownlint) flags an h3 not preceded by an h2 and
7
+ * "helpfully" demotes it to `##` — accepting both means such an edit can't destroy
8
+ * phases/log data; the next serialize re-canonicalizes it back to `###`. */
9
+ export interface SectionDef<T> {
10
+ headingRe: RegExp;
11
+ parseEntries: (lines: string[], start: number, end: number) => T[];
12
+ formatLines: (entries: T[]) => string[];
13
+ }
14
+ export declare const PHASES_SECTION: SectionDef<PhaseItem>;
15
+ export declare const LOG_SECTION: SectionDef<LogEntry>;
16
+ export declare const CLARIFICATIONS_SECTION: SectionDef<LogEntry>;
17
+ export { SUB_HEADING_RE };
18
+ //# sourceMappingURL=sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../src/core/sections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE1D,QAAA,MAAM,cAAc,QAAe,CAAC;AAmEpC;;;;;4EAK4E;AAC5E,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;IACnE,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,SAAS,CAIhD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,QAAQ,CAI5C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,QAAQ,CAIvD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -3,12 +3,6 @@ interface PlanContentInput {
3
3
  body: string;
4
4
  phases: PhaseItem[];
5
5
  }
6
- /**
7
- * Hashes a plan's meaningful content (phases + body prose), deliberately
8
- * ignoring `audited`/`audited-hash` and any other metadata so that
9
- * stamping the audit fields never changes the hash of the content it
10
- * describes.
11
- */
12
6
  export declare function computePlanContentHash(plan: PlanContentInput): string;
13
7
  export {};
14
8
  //# sourceMappingURL=content-hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/content-hash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAWrE"}
1
+ {"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/content-hash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAWrE"}
@@ -1,13 +1,5 @@
1
1
  import { EntityEntry, LogEntry, PhaseItem, SuggestionEntry } from '../../types/index';
2
2
  export declare function todayDateString(): string;
3
- /**
4
- * Mints the next `<KIND>-<N>` plan ID from the persistent counter in `papercamp/config.json`,
5
- * incrementing and writing it back. Calls are chained through a module-level promise so two
6
- * near-simultaneous calls within this process never read the same counter value and mint a
7
- * duplicate ID — this does not protect against a concurrent call from a separate process (e.g.
8
- * the CLI racing the dev server), which is an accepted gap for a local single-user tool.
9
- * Returns undefined if the config file is missing or has no `nextId` counters yet.
10
- */
11
3
  export declare function assignPlanId(configPath: string, kind: string): Promise<string | undefined>;
12
4
  interface NewPlanInput {
13
5
  title: string;
@@ -43,18 +35,9 @@ interface NewOpenQuestionInput {
43
35
  }
44
36
  export declare function formatOpenQuestionEntry(input: NewOpenQuestionInput): string;
45
37
  export declare function formatProgressEntry(date: string, items: string[]): string;
46
- /**
47
- * Prepends a single bullet under today's `## YYYY-MM-DD` heading at the top of a
48
- * progress.md file, creating the heading if today's isn't already there (newest
49
- * day stays first). Shared by the agent's progress hook and the PostToolUse
50
- * new-file logger so both write the same grammar.
51
- */
52
38
  export declare function prependProgressItem(progressPath: string, item: string): Promise<void>;
53
- /** Serializes an array of plan entries back to a plans.md file. */
54
39
  export declare function formatPlans(entries: NewPlanInput[]): string;
55
- /** Serializes an array of open-question entries back to an open-questions.md file. */
56
40
  export declare function formatOpenQuestions(entries: NewOpenQuestionInput[]): string;
57
- /** Appends a pre-formatted block to a papercamp file, separated by a single blank line. */
58
41
  export declare function appendBlock(filePath: string, block: string): Promise<void>;
59
42
  export declare function serializeFrontmatter(data: Record<string, unknown>): string;
60
43
  interface NewPlanFileInput {
@@ -74,19 +57,6 @@ interface NewPlanFileInput {
74
57
  log?: LogEntry[];
75
58
  clarifications?: LogEntry[];
76
59
  }
77
- /**
78
- * Serializes a plan entry as a standalone file with YAML frontmatter.
79
- * Output format:
80
- * ---
81
- * id: FEAT-24
82
- * kind: feat
83
- * ...
84
- * ---
85
- * body...
86
- *
87
- * ### Phases
88
- * ...
89
- */
90
60
  export declare function formatPlanFile(input: NewPlanFileInput): string;
91
61
  interface NewEntityFileInput {
92
62
  id: string;
@@ -100,24 +70,16 @@ interface NewEntityFileInput {
100
70
  audited?: string;
101
71
  auditedHash?: string;
102
72
  tags?: string[];
73
+ subject?: string;
74
+ order?: number;
103
75
  body?: string;
104
76
  phases?: PhaseItem[];
105
77
  log?: LogEntry[];
106
78
  clarifications?: LogEntry[];
107
79
  }
108
- /**
109
- * Serializes a unified entity file — same body sections as formatPlanFile
110
- * (Clarifications/Phases/Log), but `type` instead of `kind`, no `idea:`
111
- * backlink, and no `## id: title` body heading (title lives in frontmatter
112
- * only).
113
- */
114
80
  export declare function formatEntityFile(input: NewEntityFileInput): string;
115
- /**
116
- * Mints the next lifetime IDEA-N entity id from the unified `nextId.idea`
117
- * counter — the single id space every entity lives in. Same
118
- * chaining/guarantees as assignPlanId (which it delegates to).
119
- */
120
81
  export declare function assignEntityId(configPath: string): Promise<string | undefined>;
82
+ export declare function ensureSubject(configPath: string, subject: string): Promise<void>;
121
83
  interface NewIdeaFileInput {
122
84
  id: string;
123
85
  title: string;
@@ -126,28 +88,9 @@ interface NewIdeaFileInput {
126
88
  body?: string;
127
89
  log?: LogEntry[];
128
90
  }
129
- /**
130
- * Serializes an idea entry as a standalone file with YAML frontmatter.
131
- */
132
91
  export declare function formatIdeaFile(input: NewIdeaFileInput): string;
133
- /**
134
- * Moves an entity from papercamp/ideas/<id>.md to papercamp/ideas/archive/<id>.md.
135
- * This is a pure file move — no parse-and-re-serialize step.
136
- * Returns true if the file was moved, false if no file exists for this entity.
137
- */
138
92
  export declare function archiveEntityFile(root: string, entityId: string): Promise<boolean>;
139
- /**
140
- * Removes one line from suggestions.md's flat log. Re-parses each candidate
141
- * line with parseSuggestions' own grammar and compares the parsed fields —
142
- * not a reconstructed literal string — since parseSuggestions trims title/
143
- * description and a reconstruction would miss extra internal whitespace an
144
- * LLM-authored line might contain. Only the first match is removed —
145
- * suggestions carry no id, so field matching is the only way to address a
146
- * specific line (see IDEA-62's promote/dismiss routes, both of which call
147
- * this before writing the file back).
148
- */
149
93
  export declare function removeSuggestionLine(markdown: string, target: SuggestionEntry): string;
150
- /** Generates papercamp/ideas/index.md, the one unified table. */
151
94
  export declare function formatEntitiesIndex(entities: EntityEntry[]): string;
152
95
  export {};
153
96
  //# sourceMappingURL=serializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/serializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG3F,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAID;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmBhG;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAqC3D;AAED,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,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,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAkClE;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAEpF;AAID,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAetF;AAED,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAiB9D;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAexF;AAID,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,CAkBtF;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,CAgBnE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=serializer.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer.test.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/serializer.test.ts"],"names":[],"mappings":""}
@@ -1,27 +1,12 @@
1
1
  import { EntityStatus, PhaseItem, PrInfo } from '../../types/index';
2
- /** The subset of an entity's shape the status ladder needs to look at. */
3
2
  export interface StatusDerivationInput {
4
3
  kind?: 'note';
5
4
  status?: EntityStatus;
6
5
  phases: PhaseItem[];
7
6
  }
8
- /**
9
- * Derives lifecycle status from the entity's phases and its GitHub PR instead of
10
- * trusting the stored `status` field, so it can't drift from reality. Tracking
11
- * keys off the PR (matched by id), not a local branch: the PR is canonical
12
- * across clones and survives the branch being deleted after merge.
13
- *
14
- * Ladder: idea (no phases) -> planned (phases, no PR) -> in-progress (PR open or
15
- * draft) -> review (PR open/draft AND every phase checked) -> done (PR merged).
16
- * A closed-unmerged PR reads as `dropped`. `dropped` can never be derived
17
- * (abandonment leaves no trace), so a stored `dropped` always passes through;
18
- * notes track open/done/dropped by hand and pass through unchanged.
19
- *
20
- * `pr` is the entity's resolved PR, or `undefined` when it has none / the lookup
21
- * couldn't run. `prLookupResolved` says which: `false` (no `gh`, offline) falls
22
- * the PR-backed rungs back to the stored override or a phases-only `planned`;
23
- * `true` with no PR is a confirmed "no PR", so it derives `planned`/`idea` (a
24
- * stored terminal `done` from an unmatchable legacy PR is still trusted).
25
- */
7
+ export interface ArchivabilityInput extends StatusDerivationInput {
8
+ archived?: boolean;
9
+ }
26
10
  export declare function deriveStatus(entity: StatusDerivationInput, pr: PrInfo | undefined, prLookupResolved: boolean): EntityStatus | undefined;
11
+ export declare function isArchivable(entity: ArchivabilityInput, pr: PrInfo | undefined): boolean;
27
12
  //# sourceMappingURL=status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/core/status/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,qBAAqB,EAC7B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,gBAAgB,EAAE,OAAO,GACxB,YAAY,GAAG,SAAS,CAgB1B"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/core/status/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAQD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,qBAAqB,EAC7B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,gBAAgB,EAAE,OAAO,GACxB,YAAY,GAAG,SAAS,CAgB1B;AAID,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIxF"}
@@ -17,7 +17,6 @@ export interface PhaseItem {
17
17
  description?: string;
18
18
  source?: 'review';
19
19
  }
20
- /** Raw shape produced by the generic heading-block parser, before per-file validation. */
21
20
  export interface RawEntry {
22
21
  title: string;
23
22
  fields: Record<string, string>;
@@ -38,12 +37,6 @@ export interface ParseResult<T> {
38
37
  export type PrState = 'draft' | 'open' | 'closed' | 'merged';
39
38
  /** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */
40
39
  export type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';
41
- /**
42
- * A single unresolved review comment/thread on a PR — the per-comment detail
43
- * `PrInfo.unresolvedThreadCount` only counts. Fetched by the fix-review launch
44
- * path (not `core/pr.ts`'s worklist resolver, which only needs the count) and
45
- * fed to `buildFixReviewPrompt` in `prompts.ts`.
46
- */
47
40
  export interface ReviewThread {
48
41
  /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */
49
42
  id: string;
@@ -53,21 +46,12 @@ export interface ReviewThread {
53
46
  author?: string;
54
47
  body: string;
55
48
  }
56
- /**
57
- * What a fix-review agent reports back, parsed from the JSON object its prompt
58
- * requires as its final line. The agent no longer commits — a human does — so
59
- * this carries the message it proposes plus its per-comment verdicts, which drive
60
- * which PR threads get resolved (once the fix is pushed) and which get a reply
61
- * explaining why they were left alone.
62
- */
63
49
  export interface FixReviewResult {
64
50
  commit: {
65
51
  title: string;
66
52
  message: string;
67
53
  };
68
- /** Thread ids the agent says its changes settle. */
69
54
  addressed: string[];
70
- /** Thread ids it deliberately left alone, each with the reason to post back. */
71
55
  skipped: {
72
56
  threadId: string;
73
57
  why: string;
@@ -97,13 +81,21 @@ export interface PlanEntry {
97
81
  audited?: string;
98
82
  auditedHash?: string;
99
83
  tags: string[];
84
+ /** Absent renders under the virtual "No subject" group. */
85
+ subject?: string;
86
+ /** Absent means unordered — sorts after all ordered entries, by created date. */
87
+ order?: number;
100
88
  body: string;
101
89
  phases: PhaseItem[];
102
90
  log?: LogEntry[];
103
91
  clarifications?: LogEntry[];
104
- /** Live-resolved PR for this entity's branch, when one exists — see `core/pr.ts`. */
105
92
  pr?: PrInfo;
106
93
  }
94
+ export interface ArchivableIdea {
95
+ id: string;
96
+ title: string;
97
+ pr: PrInfo;
98
+ }
107
99
  export interface DecisionEntry {
108
100
  title: string;
109
101
  date: string;
@@ -135,6 +127,12 @@ export interface IdeaEntry {
135
127
  body: string;
136
128
  kind?: IdeaKind;
137
129
  status?: IdeaStatus;
130
+ /** Absent renders under the virtual "No subject" group. */
131
+ subject?: string;
132
+ /** Absent means unordered — sorts after all ordered entries, by created date. */
133
+ order?: number;
134
+ /** Fallback sort key for unordered entries — see `order`. Absent on view-model-only IdeaEntry literals that never enter the worklist sort. */
135
+ created?: string;
138
136
  log?: LogEntry[];
139
137
  }
140
138
  /** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */
@@ -156,30 +154,43 @@ export interface EntityEntry {
156
154
  audited?: string;
157
155
  auditedHash?: string;
158
156
  tags: string[];
157
+ /** Absent renders as the virtual "No subject" group. */
158
+ subject?: string;
159
+ /** Absent means unordered — sorts after all ordered entries, by created date. */
160
+ order?: number;
159
161
  body: string;
160
162
  phases: PhaseItem[];
161
163
  log?: LogEntry[];
162
164
  clarifications?: LogEntry[];
165
+ /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */
166
+ archived?: boolean;
163
167
  }
164
168
  export interface ProgressEntry {
165
169
  date: string;
166
170
  items: string[];
167
171
  }
168
- /**
169
- * A single line in `papercamp/suggestions.md` — an agent's disposable "you
170
- * might want to do X" hunch. No `id`, no `status`: it only becomes a real
171
- * idea if a human promotes it (see IDEA-62).
172
- */
173
172
  export interface SuggestionEntry {
174
173
  date: string;
175
174
  title: string;
176
175
  description: string;
177
176
  }
177
+ export interface RoadmapItem {
178
+ name: string;
179
+ description: string;
180
+ candidates: string[];
181
+ }
182
+ export interface RoadmapHorizon {
183
+ title: string;
184
+ items: RoadmapItem[];
185
+ }
186
+ export interface Roadmap {
187
+ goal: string;
188
+ horizons: RoadmapHorizon[];
189
+ }
178
190
  export interface EnvEntry {
179
191
  key: string;
180
192
  value: string;
181
- /** Set on GET responses: the key exists in .env but its value is withheld
182
- * (secrets are never sent to the client). Absent when writing. */
193
+ /** Set on GET responses when the value is withheld — secrets never reach the client. */
183
194
  isSet?: boolean;
184
195
  }
185
196
  export interface AgentConfig {
@@ -215,6 +226,10 @@ export interface PaperCampConfig {
215
226
  defaultAgents?: DefaultAgentsMap;
216
227
  /** Off by default. When true, the PostToolUse hook logs new-file creations to progress.md. */
217
228
  autoLogNewFiles?: boolean;
229
+ /** The managed subject list; an idea's `subject` not present here renders as "No subject". */
230
+ subjects?: string[];
231
+ /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */
232
+ setupDismissed?: boolean;
218
233
  }
219
234
  export type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';
220
235
  export interface CheckResult {
@@ -223,6 +238,12 @@ export interface CheckResult {
223
238
  output: string;
224
239
  }
225
240
  export type CheckName = 'lint' | 'format' | 'test' | 'consistency';
241
+ export type CapabilityStatus = 'ok' | 'warn' | 'missing';
242
+ export interface CapabilityResult {
243
+ id: string;
244
+ status: CapabilityStatus;
245
+ detail: string;
246
+ }
226
247
  export interface GitStatusEntry {
227
248
  path: string;
228
249
  status: string;
@@ -238,7 +259,18 @@ export interface GitStatusResponse {
238
259
  export type BranchHygieneStatus = 'clean-on-main' | 'stale-merged' | 'stale-no-upstream' | 'dirty' | 'fine';
239
260
  export type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';
240
261
  export type TaskKind = 'phase' | 'audit' | 'batch-reconcile' | 'run-all' | 'draft' | 'extend' | 'suggest' | 'commit-suggest' | 'overlap-check' | 'sync' | 'reconcile' | 'fix-review';
262
+ export interface TaskLogEntry {
263
+ id: string;
264
+ taskKind: TaskKind;
265
+ planId?: string;
266
+ planTitle: string;
267
+ agentId: AgentId;
268
+ startedAt: string;
269
+ endedAt: string;
270
+ outcome: 'done' | 'error';
271
+ }
241
272
  export interface AgentTaskState {
273
+ id: string;
242
274
  status: AgentTaskStatus;
243
275
  taskKind: TaskKind;
244
276
  planTitle: string;
@@ -247,11 +279,6 @@ export interface AgentTaskState {
247
279
  ideaId?: string;
248
280
  agentId: AgentId;
249
281
  lines: string[];
250
- /**
251
- * fix-review only, once it has reported: the commit message the agent proposes
252
- * for the work it left uncommitted. The commit form prefills from this — the
253
- * agent knows the intent behind each fix, which a diff-based suggestion doesn't.
254
- */
255
282
  suggestedCommit?: {
256
283
  title: string;
257
284
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot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IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC;CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';\n\nexport const PLAN_STATUSES: PlanStatus[] = [\n 'idea',\n 'planned',\n 'in-progress',\n 'review',\n 'done',\n 'dropped',\n];\n\nexport interface LogEntry {\n date: string;\n text: string;\n}\n\nexport type PlanKind = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor';\n\nexport const PLAN_KINDS: PlanKind[] = ['feat', 'fix', 'chore', 'docs', 'refactor'];\n\nexport const AGENT_IDS = ['claude-code', 'opencode'] as const;\n\nexport type AgentId = (typeof AGENT_IDS)[number];\n\nexport const AGENT_LABELS: Record<AgentId, string> = {\n 'claude-code': 'Claude Code',\n opencode: 'OpenCode',\n};\n\nexport type DecisionStatus = 'decided' | 'superseded';\n\nexport type QuestionStatus = 'open' | 'resolved';\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n}\n\n/** Raw shape produced by the generic heading-block parser, before per-file validation. */\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n}\n\nexport interface ParseWarning {\n title: string;\n message: string;\n}\n\nexport interface ParseResult<T> {\n entries: T[];\n warnings: ParseWarning[];\n}\n\n/** A PR's reviewable/mergeable state, as surfaced by `gh pr list`. */\nexport type PrState = 'draft' | 'open' | 'closed' | 'merged';\n\n/** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */\nexport type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';\n\n/**\n * A single unresolved review comment/thread on a PR — the per-comment detail\n * `PrInfo.unresolvedThreadCount` only counts. Fetched by the fix-review launch\n * path (not `core/pr.ts`'s worklist resolver, which only needs the count) and\n * fed to `buildFixReviewPrompt` in `prompts.ts`.\n */\nexport interface ReviewThread {\n /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */\n id: string;\n /** File path the comment is anchored to; absent for a PR-level (not diff-anchored) comment. */\n path?: string;\n line?: number;\n author?: string;\n body: string;\n}\n\n/**\n * What a fix-review agent reports back, parsed from the JSON object its prompt\n * requires as its final line. The agent no longer commits — a human does — so\n * this carries the message it proposes plus its per-comment verdicts, which drive\n * which PR threads get resolved (once the fix is pushed) and which get a reply\n * explaining why they were left alone.\n */\nexport interface FixReviewResult {\n commit: { title: string; message: string };\n /** Thread ids the agent says its changes settle. */\n addressed: string[];\n /** Thread ids it deliberately left alone, each with the reason to post back. */\n skipped: { threadId: string; why: string }[];\n}\n\n/** Live-resolved PR info for an entity's branch — see `core/pr.ts`. */\nexport interface PrInfo {\n number: number;\n url: string;\n state: PrState;\n /** Undefined when no review has been requested/decided, or when unresolved (offline, closed/merged PR). */\n reviewDecision?: ReviewDecision;\n /** Count of unresolved review threads. Only fetched for open/draft PRs; undefined when not fetched or unresolved. */\n unresolvedThreadCount?: number;\n /** Whether a comment or review landed after the PR's last commit — a proxy for \"since the last agent pass\" (a pass ends with a push). Only fetched for open/draft PRs. */\n hasNewCommentsSincePush?: boolean;\n}\n\nexport interface PlanEntry {\n title: string;\n status: PlanStatus;\n kind?: PlanKind;\n id?: string;\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n tags: string[];\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n /** Live-resolved PR for this entity's branch, when one exists — see `core/pr.ts`. */\n pr?: PrInfo;\n}\n\nexport interface DecisionEntry {\n title: string;\n date: string;\n status: DecisionStatus;\n supersededBy?: string;\n body: string;\n}\n\nexport interface OpenQuestionEntry {\n title: string;\n status: QuestionStatus;\n raised: string;\n resolvedBy?: string;\n blocks?: string;\n body: string;\n}\n\nexport type ConsistencyIssueKind =\n | 'dangling-resolved-by'\n | 'dangling-superseded-by'\n | 'blocked-plan-active';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'decisions' | 'open-questions';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport type IdeaKind = 'idea' | 'note';\n\nexport type IdeaStatus = 'open' | 'done' | 'dropped';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n kind?: IdeaKind;\n status?: IdeaStatus;\n log?: LogEntry[];\n}\n\n// ---------------------------------------------------------------------------\n// Unified entity (FEAT-42 phases 7+ — one file per entity: an \"idea\" for its\n// whole life, plan as an optional Phases section. Replaces PlanEntry/IdeaEntry\n// once the migration cutover lands.)\n// ---------------------------------------------------------------------------\n\n/** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */\nexport type EntityType = PlanKind;\n\n/** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */\nexport type EntityStatus = PlanStatus | 'open';\n\nexport interface EntityEntry {\n id: string;\n title: string;\n /** Absent until the entity is classified (usually when its plan is drafted). */\n type?: EntityType;\n /** \"note\" marks an entity that never grows phases. */\n kind?: 'note';\n /** Stored override, not the source of truth — see entityFrontmatterSchema. */\n status?: EntityStatus;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n tags: string[];\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n}\n\nexport interface ProgressEntry {\n date: string;\n items: string[];\n}\n\n/**\n * A single line in `papercamp/suggestions.md` — an agent's disposable \"you\n * might want to do X\" hunch. No `id`, no `status`: it only becomes a real\n * idea if a human promotes it (see IDEA-62).\n */\nexport interface SuggestionEntry {\n date: string;\n title: string;\n description: string;\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n /** Set on GET responses: the key exists in .env but its value is withheld\n * (secrets are never sent to the client). Absent when writing. */\n isSet?: boolean;\n}\n\nexport interface AgentConfig {\n agent: AgentId;\n model?: string;\n effort?: string;\n}\n\n/** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */\nexport interface AgentRunOptions {\n model?: string;\n effort?: string;\n}\n\n/** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */\nexport type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;\n\nexport const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor> = {\n 'claude-code': {\n model: ['opus', 'sonnet', 'fable', 'haiku'],\n effort: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n opencode: {\n model: null,\n },\n};\n\nexport function coerceAgentConfig(v: unknown): AgentConfig {\n const toAgent = (a: unknown): AgentId =>\n AGENT_IDS.includes(a as AgentId) ? (a as AgentId) : 'claude-code';\n if (typeof v === 'string') return { agent: toAgent(v) };\n // Tolerate null/undefined and partial legacy entries — a missing key must not\n // throw (that would 500 the /api/config read this coercion exists to protect).\n const obj = (v ?? {}) as Record<string, unknown>;\n return {\n agent: toAgent(obj.agent),\n ...(typeof obj.model === 'string' && { model: obj.model }),\n ...(typeof obj.effort === 'string' && { effort: obj.effort }),\n };\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentConfig;\n planDraft: AgentConfig;\n ideaExtend: AgentConfig;\n commitSuggest: AgentConfig;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: { agent: 'opencode' },\n planDraft: { agent: 'claude-code' },\n ideaExtend: { agent: 'claude-code' },\n commitSuggest: { agent: 'claude-code' },\n};\n\nexport interface PaperCampConfig {\n version: string;\n projectName: string;\n initializedAt: string;\n /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */\n nextId?: Partial<Record<PlanKind, number>> & { idea?: number };\n port?: number;\n defaultAgents?: DefaultAgentsMap;\n /** Off by default. When true, the PostToolUse hook logs new-file creations to progress.md. */\n autoLogNewFiles?: boolean;\n}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency';\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n renameSource?: string;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n branchHygiene: BranchHygieneStatus;\n}\n\nexport type BranchHygieneStatus =\n | 'clean-on-main'\n | 'stale-merged'\n | 'stale-no-upstream'\n | 'dirty'\n | 'fine';\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';\n\nexport type TaskKind =\n | 'phase'\n | 'audit'\n | 'batch-reconcile'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'suggest'\n | 'commit-suggest'\n | 'overlap-check'\n | 'sync'\n | 'reconcile'\n | 'fix-review';\n\nexport interface AgentTaskState {\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n /**\n * fix-review only, once it has reported: the commit message the agent proposes\n * for the work it left uncommitted. The commit form prefills from this — the\n * agent knows the intent behind each fix, which a diff-based suggestion doesn't.\n */\n suggestedCommit?: { title: string; message: string };\n}\n\n// The AI Check-overlap action's triage result (IDEA-44 Tier 2): does the typed\n// text belong inside an existing idea, extend one, or is it genuinely new?\nexport interface OverlapVerdict {\n verdict: 'existing' | 'extend' | 'new';\n targetId: string | null;\n reasoning: string;\n}\n\n// A single entity's proposed rewrite from a batch reconcile sweep, held server-side\n// (see startBatchReconcile in agent.ts) and served via GET /api/agent/reconcile-queue\n// once the sweep's `before` snapshot for that entity is known to have changed.\nexport interface ReconcileQueueItem {\n planId: string;\n title: string;\n before: { body: string; phases: PhaseItem[] };\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","AGENT_OPTIONS","coerceAgentConfig","v","toAgent","a","obj","DEFAULT_AGENTS"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASaC,IAAyB,CAAC,QAAQ,OAAO,SAAS,QAAQ,UAAU,GAEpEC,IAAY,CAAC,eAAe,UAAU,GAItCC,IAAwC;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AACZ,GA0NaC,IAAyD;AAAA,EACpE,eAAe;AAAA,IACb,OAAO,CAAC,QAAQ,UAAU,SAAS,OAAO;AAAA,IAC1C,QAAQ,CAAC,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAAA;AAAA,EAElD,UAAU;AAAA,IACR,OAAO;AAAA,EAAA;AAEX;AAEO,SAASC,EAAkBC,GAAyB;AACzD,QAAMC,IAAU,CAACC,MACfN,EAAU,SAASM,CAAY,IAAKA,IAAgB;AACtD,MAAI,OAAOF,KAAM,SAAU,QAAO,EAAE,OAAOC,EAAQD,CAAC,EAAA;AAGpD,QAAMG,IAAOH,KAAK,CAAA;AAClB,SAAO;AAAA,IACL,OAAOC,EAAQE,EAAI,KAAK;AAAA,IACxB,GAAI,OAAOA,EAAI,SAAU,YAAY,EAAE,OAAOA,EAAI,MAAA;AAAA,IAClD,GAAI,OAAOA,EAAI,UAAW,YAAY,EAAE,QAAQA,EAAI,OAAA;AAAA,EAAO;AAE/D;AASO,MAAMC,IAAmC;AAAA,EAC9C,OAAO,EAAE,OAAO,WAAA;AAAA,EAChB,WAAW,EAAE,OAAO,cAAA;AAAA,EACpB,YAAY,EAAE,OAAO,cAAA;AAAA,EACrB,eAAe,EAAE,OAAO,cAAA;AAC1B;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';\n\nexport const PLAN_STATUSES: PlanStatus[] = [\n 'idea',\n 'planned',\n 'in-progress',\n 'review',\n 'done',\n 'dropped',\n];\n\nexport interface LogEntry {\n date: string;\n text: string;\n}\n\nexport type PlanKind = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor';\n\nexport const PLAN_KINDS: PlanKind[] = ['feat', 'fix', 'chore', 'docs', 'refactor'];\n\nexport const AGENT_IDS = ['claude-code', 'opencode'] as const;\n\nexport type AgentId = (typeof AGENT_IDS)[number];\n\nexport const AGENT_LABELS: Record<AgentId, string> = {\n 'claude-code': 'Claude Code',\n opencode: 'OpenCode',\n};\n\nexport type DecisionStatus = 'decided' | 'superseded';\n\nexport type QuestionStatus = 'open' | 'resolved';\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n}\n\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n}\n\nexport interface ParseWarning {\n title: string;\n message: string;\n}\n\nexport interface ParseResult<T> {\n entries: T[];\n warnings: ParseWarning[];\n}\n\n/** A PR's reviewable/mergeable state, as surfaced by `gh pr list`. */\nexport type PrState = 'draft' | 'open' | 'closed' | 'merged';\n\n/** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */\nexport type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';\n\n// Per-comment detail; PrInfo.unresolvedThreadCount only counts these.\nexport interface ReviewThread {\n /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */\n id: string;\n /** File path the comment is anchored to; absent for a PR-level (not diff-anchored) comment. */\n path?: string;\n line?: number;\n author?: string;\n body: string;\n}\n\n// Parsed from the JSON object a fix-review agent's prompt requires as its final line.\nexport interface FixReviewResult {\n commit: { title: string; message: string };\n addressed: string[];\n skipped: { threadId: string; why: string }[];\n}\n\n/** Live-resolved PR info for an entity's branch — see `core/pr.ts`. */\nexport interface PrInfo {\n number: number;\n url: string;\n state: PrState;\n /** Undefined when no review has been requested/decided, or when unresolved (offline, closed/merged PR). */\n reviewDecision?: ReviewDecision;\n /** Count of unresolved review threads. Only fetched for open/draft PRs; undefined when not fetched or unresolved. */\n unresolvedThreadCount?: number;\n /** Whether a comment or review landed after the PR's last commit — a proxy for \"since the last agent pass\" (a pass ends with a push). Only fetched for open/draft PRs. */\n hasNewCommentsSincePush?: boolean;\n}\n\nexport interface PlanEntry {\n title: string;\n status: PlanStatus;\n kind?: PlanKind;\n id?: string;\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n tags: string[];\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n pr?: PrInfo;\n}\n\nexport interface ArchivableIdea {\n id: string;\n title: string;\n pr: PrInfo;\n}\n\nexport interface DecisionEntry {\n title: string;\n date: string;\n status: DecisionStatus;\n supersededBy?: string;\n body: string;\n}\n\nexport interface OpenQuestionEntry {\n title: string;\n status: QuestionStatus;\n raised: string;\n resolvedBy?: string;\n blocks?: string;\n body: string;\n}\n\nexport type ConsistencyIssueKind =\n | 'dangling-resolved-by'\n | 'dangling-superseded-by'\n | 'blocked-plan-active';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'decisions' | 'open-questions';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport type IdeaKind = 'idea' | 'note';\n\nexport type IdeaStatus = 'open' | 'done' | 'dropped';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n kind?: IdeaKind;\n status?: IdeaStatus;\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** Fallback sort key for unordered entries — see `order`. Absent on view-model-only IdeaEntry literals that never enter the worklist sort. */\n created?: string;\n log?: LogEntry[];\n}\n\n// Unified entity — one file per entity, plan as an optional Phases section.\n// Supersedes PlanEntry/IdeaEntry once the migration cutover lands.\n\n/** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */\nexport type EntityType = PlanKind;\n\n/** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */\nexport type EntityStatus = PlanStatus | 'open';\n\nexport interface EntityEntry {\n id: string;\n title: string;\n /** Absent until the entity is classified (usually when its plan is drafted). */\n type?: EntityType;\n /** \"note\" marks an entity that never grows phases. */\n kind?: 'note';\n /** Stored override, not the source of truth — see entityFrontmatterSchema. */\n status?: EntityStatus;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n tags: string[];\n /** Absent renders as the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */\n archived?: boolean;\n}\n\nexport interface ProgressEntry {\n date: string;\n items: string[];\n}\n\n// No `id`/`status`: it only becomes a real idea if a human promotes it.\nexport interface SuggestionEntry {\n date: string;\n title: string;\n description: string;\n}\n\nexport interface RoadmapItem {\n name: string;\n description: string;\n candidates: string[];\n}\n\nexport interface RoadmapHorizon {\n title: string;\n items: RoadmapItem[];\n}\n\nexport interface Roadmap {\n goal: string;\n horizons: RoadmapHorizon[];\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n /** Set on GET responses when the value is withheld — secrets never reach the client. */\n isSet?: boolean;\n}\n\nexport interface AgentConfig {\n agent: AgentId;\n model?: string;\n effort?: string;\n}\n\n/** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */\nexport interface AgentRunOptions {\n model?: string;\n effort?: string;\n}\n\n/** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */\nexport type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;\n\nexport const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor> = {\n 'claude-code': {\n model: ['opus', 'sonnet', 'fable', 'haiku'],\n effort: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n opencode: {\n model: null,\n },\n};\n\nexport function coerceAgentConfig(v: unknown): AgentConfig {\n const toAgent = (a: unknown): AgentId =>\n AGENT_IDS.includes(a as AgentId) ? (a as AgentId) : 'claude-code';\n if (typeof v === 'string') return { agent: toAgent(v) };\n // A missing key must not throw — that would 500 the /api/config read this protects.\n const obj = (v ?? {}) as Record<string, unknown>;\n return {\n agent: toAgent(obj.agent),\n ...(typeof obj.model === 'string' && { model: obj.model }),\n ...(typeof obj.effort === 'string' && { effort: obj.effort }),\n };\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentConfig;\n planDraft: AgentConfig;\n ideaExtend: AgentConfig;\n commitSuggest: AgentConfig;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: { agent: 'opencode' },\n planDraft: { agent: 'claude-code' },\n ideaExtend: { agent: 'claude-code' },\n commitSuggest: { agent: 'claude-code' },\n};\n\nexport interface PaperCampConfig {\n version: string;\n projectName: string;\n initializedAt: string;\n /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */\n nextId?: Partial<Record<PlanKind, number>> & { idea?: number };\n port?: number;\n defaultAgents?: DefaultAgentsMap;\n /** Off by default. When true, the PostToolUse hook logs new-file creations to progress.md. */\n autoLogNewFiles?: boolean;\n /** The managed subject list; an idea's `subject` not present here renders as \"No subject\". */\n subjects?: string[];\n /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */\n setupDismissed?: boolean;\n}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency';\n\nexport type CapabilityStatus = 'ok' | 'warn' | 'missing';\n\nexport interface CapabilityResult {\n id: string;\n status: CapabilityStatus;\n detail: string;\n}\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n renameSource?: string;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n branchHygiene: BranchHygieneStatus;\n}\n\nexport type BranchHygieneStatus =\n | 'clean-on-main'\n | 'stale-merged'\n | 'stale-no-upstream'\n | 'dirty'\n | 'fine';\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';\n\nexport type TaskKind =\n | 'phase'\n | 'audit'\n | 'batch-reconcile'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'suggest'\n | 'commit-suggest'\n | 'overlap-check'\n | 'sync'\n | 'reconcile'\n | 'fix-review';\n\n// Persisted to papercamp/tasks.log (JSON Lines) — survives a dev-server restart,\n// unlike the in-memory task registry.\nexport interface TaskLogEntry {\n id: string;\n taskKind: TaskKind;\n planId?: string;\n planTitle: string;\n agentId: AgentId;\n startedAt: string;\n endedAt: string;\n outcome: 'done' | 'error';\n}\n\nexport interface AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n}\n\nexport interface OverlapVerdict {\n verdict: 'existing' | 'extend' | 'new';\n targetId: string | null;\n reasoning: string;\n}\n\nexport interface ReconcileQueueItem {\n planId: string;\n title: string;\n before: { body: string; phases: PhaseItem[] };\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","AGENT_OPTIONS","coerceAgentConfig","v","toAgent","a","obj","DEFAULT_AGENTS"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASaC,IAAyB,CAAC,QAAQ,OAAO,SAAS,QAAQ,UAAU,GAEpEC,IAAY,CAAC,eAAe,UAAU,GAItCC,IAAwC;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AACZ,GAyOaC,IAAyD;AAAA,EACpE,eAAe;AAAA,IACb,OAAO,CAAC,QAAQ,UAAU,SAAS,OAAO;AAAA,IAC1C,QAAQ,CAAC,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAAA;AAAA,EAElD,UAAU;AAAA,IACR,OAAO;AAAA,EAAA;AAEX;AAEO,SAASC,EAAkBC,GAAyB;AACzD,QAAMC,IAAU,CAACC,MACfN,EAAU,SAASM,CAAY,IAAKA,IAAgB;AACtD,MAAI,OAAOF,KAAM,SAAU,QAAO,EAAE,OAAOC,EAAQD,CAAC,EAAA;AAEpD,QAAMG,IAAOH,KAAK,CAAA;AAClB,SAAO;AAAA,IACL,OAAOC,EAAQE,EAAI,KAAK;AAAA,IACxB,GAAI,OAAOA,EAAI,SAAU,YAAY,EAAE,OAAOA,EAAI,MAAA;AAAA,IAClD,GAAI,OAAOA,EAAI,UAAW,YAAY,EAAE,QAAQA,EAAI,OAAA;AAAA,EAAO;AAE/D;AASO,MAAMC,IAAmC;AAAA,EAC9C,OAAO,EAAE,OAAO,WAAA;AAAA,EAChB,WAAW,EAAE,OAAO,cAAA;AAAA,EACpB,YAAY,EAAE,OAAO,cAAA;AAAA,EACrB,eAAe,EAAE,OAAO,cAAA;AAC1B;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dendelion/paper-camp",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Local-first, AI-native project management with retro aesthetics",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.12.1",
@@ -31,7 +31,7 @@
31
31
  "dev:lib": "vite",
32
32
  "cli": "bun src/cli/index.ts",
33
33
  "check-types": "tsc --noEmit",
34
- "lint": "biome check .",
34
+ "lint": "biome check . && node scripts/check-comments.mjs",
35
35
  "lint:write": "biome check --write .",
36
36
  "test": "vitest run",
37
37
  "test:watch": "vitest",
@@ -1,2 +0,0 @@
1
- import{j as e,c as B,u as i,a as $,s as r,d as M,O as W,D as H,l as L,f as T,b,M as F,Z as w,e as J,r as k,Q as E,J as Z,X as U,g as G,h as K,i as _,P as R,k as V,o as N}from"./main-DJDNx4Xs.js";import{S as z}from"./sidebar-section-C2j12TzE.js";const I=({children:t,onClick:l})=>e.jsx("button",{type:"button",onClick:l,style:{background:"none",border:"none",padding:0,color:B.accentAmberDark,cursor:"pointer",textDecoration:"underline",font:"inherit"},children:t}),Y=()=>{const t=i(p=>p.decisions),l=i(p=>p.openQuestions),d=i(p=>p.activeDocTitle),a=i(p=>p.setActiveDocTitle),n=$(),c=t.find(p=>p.title===d);if(!c)return null;const h=l.filter(p=>p.resolvedBy===c.title);return e.jsxs("div",{children:[e.jsx("h2",{style:{...M,margin:`0 0 ${r[3]}`},children:c.title}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:r[2],marginBottom:r[5]},children:[e.jsx("span",{className:"text-sm",style:{opacity:.5},children:c.date}),e.jsx(W,{size:"small",fillColor:H[c.status].fill,textColor:H[c.status].text,children:c.status}),c.supersededBy&&e.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Superseded by"," ",e.jsx(I,{onClick:()=>a(c.supersededBy),children:c.supersededBy})]}),h.length>0&&e.jsxs("span",{className:"text-sm",style:{opacity:.5},children:[h.length===1?"Resolves":"Resolves all of"," ",h.map((p,x)=>e.jsxs("span",{children:[x>0&&", ",e.jsx(I,{onClick:()=>{n({to:"/docs/$section",params:{section:"questions"}}),a(p.title)},children:p.title})]},p.title))]})]}),e.jsx("div",{style:{fontFamily:b.body,fontSize:T.base,lineHeight:L.relaxed,color:B.textProse},children:e.jsx(F,{children:c.body})})]})},D=(t,l)=>t.toLowerCase().includes(l.toLowerCase()),P=(t,l,d=120)=>{const a=t.toLowerCase().indexOf(l.toLowerCase());if(a===-1)return t.slice(0,d);const n=Math.max(0,a-40),c=Math.min(t.length,a+l.length+40);let h=t.slice(n,c);return n>0&&(h=`…${h}`),c<t.length&&(h=`${h}…`),h},q=({query:t})=>{const l=i(o=>o.decisions),d=i(o=>o.openQuestions),a=i(o=>o.progress),n=i(o=>o.repoDocs),c=i(o=>o.setActiveDocTitle),h=i(o=>o.setDocSearchQuery),p=$(),x=[];for(const o of l)(D(o.title,t)||D(o.body,t))&&x.push({section:"decisions",sectionLabel:"Decisions",title:o.title,snippet:P(o.body||o.title,t)});for(const o of d)(D(o.title,t)||D(o.body,t))&&x.push({section:"questions",sectionLabel:"Open Questions",title:o.title,snippet:P(o.body||o.title,t)});for(const o of a)for(const u of o.items)if(D(u,t)){x.push({section:"progress",sectionLabel:"Progress",title:o.date,snippet:P(u,t)});break}for(const o of n)(D(o.name,t)||D(o.content,t))&&x.push({section:"repo-docs",sectionLabel:"Repo Docs",title:o.name,snippet:P(o.content,t)});const j={};for(const o of x)j[o.section]||(j[o.section]=[]),j[o.section].push(o);const v=(o,u)=>{p({to:"/docs/$section",params:{section:o}}),c(u),h("")};return x.length===0?e.jsxs("p",{style:{opacity:.5},children:['No results found for "',t,'".']}):e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm",style:{opacity:.5,marginBottom:r[3]},children:[x.length," result",x.length===1?"":"s",' for "',t,'"']}),Object.entries(j).map(([o,u])=>e.jsxs("div",{style:{marginBottom:r[6]},children:[e.jsx("h3",{className:"text-xs",style:{fontWeight:600,letterSpacing:"0.1em",textTransform:"uppercase",opacity:.4,margin:`0 0 ${r[2]}`},children:u[0].sectionLabel}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:r[1]},children:u.map(m=>e.jsx(w,{variant:"ghost",size:"small",fullWidth:!0,onClick:()=>v(m.section,m.title),style:{justifyContent:"flex-start",padding:`${r[2]} ${r[3]}`},children:e.jsxs("span",{style:{textAlign:"left"},children:[e.jsx("span",{style:{fontFamily:b.serif,fontWeight:600,fontSize:"0.95rem",display:"block",marginBottom:"0.2rem"},children:m.title}),e.jsx("span",{className:"text-sm",style:{opacity:.6},children:m.snippet})]})},`${m.section}-${m.title}`))})]},o))]})},ee=()=>{const t=i(g=>g.openQuestions),l=i(g=>g.activeDocTitle),d=i(g=>g.setActiveDocTitle),a=i(g=>g.loadDecisions),n=i(g=>g.loadOpenQuestions),c=$(),{toast:h}=J(),[p,x]=k.useState(!1),[j,v]=k.useState(""),[o,u]=k.useState(""),[m,Q]=k.useState(!1),f=t.find(g=>g.title===l);if(!f)return null;const S=()=>{f.resolvedBy&&(c({to:"/docs/$section",params:{section:"decisions"}}),d(f.resolvedBy))},C=()=>{v(""),u(""),Q(!1),x(!0)},O=()=>{x(!1)},s=async g=>{if(g.preventDefault(),!(!j.trim()||m)){Q(!0);try{await K(f.title,j.trim(),o.trim()||void 0),x(!1),await Promise.all([a(),n()])}catch(X){Q(!1),h({title:"Resolve failed",description:X.message,variant:"error"})}}};return e.jsxs("div",{children:[e.jsx("h2",{style:{...M,margin:`0 0 ${r[3]}`},children:f.title}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:r[2],marginBottom:r[5]},children:[e.jsx("span",{className:"text-sm",style:{opacity:.5},children:f.raised}),e.jsx(W,{size:"small",fillColor:E[f.status].fill,textColor:E[f.status].text,children:f.status}),f.resolvedBy&&e.jsxs("span",{className:"text-sm",style:{opacity:.5},children:["Resolved by"," ",e.jsx(I,{onClick:S,children:f.resolvedBy})]}),f.status==="open"&&e.jsx(w,{surface:"chalkboard",onClick:C,children:"Resolve"})]}),e.jsx("div",{style:{fontFamily:b.body,fontSize:T.base,lineHeight:L.relaxed,color:B.textProse},children:e.jsx(F,{children:f.body})}),e.jsx(Z,{open:p,onClose:O,title:"Resolve question",size:"small",children:e.jsxs("form",{onSubmit:s,style:{display:"flex",flexDirection:"column",gap:r[4]},children:[e.jsx(U,{label:"Decision",value:j,onChange:g=>v(g.target.value),placeholder:"What was decided?",disabled:m,autoFocus:!0,required:!0}),e.jsx(G,{label:"Rationale",value:o,onChange:g=>u(g.target.value),placeholder:"Optional reasoning…",disabled:m,rows:4}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:r[2]},children:[e.jsx(w,{type:"button",variant:"ghost",onClick:O,disabled:m,children:"Cancel"}),e.jsx(w,{type:"submit",variant:"primary",disabled:!j.trim()||m,children:"Resolve"})]})]})})]})},se=()=>{const t=i(n=>n.progress),l=i(n=>n.activeDocTitle),a=[...l?t.filter(n=>n.date===l):t].sort((n,c)=>c.date.localeCompare(n.date));return a.length===0?e.jsx("p",{style:{opacity:.5},children:"No progress entries found."}):e.jsx("div",{children:a.map(n=>e.jsxs("div",{style:{marginBottom:r[8]},children:[e.jsx("h3",{style:{fontFamily:b.serif,fontWeight:600,fontSize:T.md,margin:`0 0 ${r[3]}`,lineHeight:L.tight,opacity:.8},children:n.date}),e.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:r[2]},children:n.items.map((c,h)=>e.jsx("li",{style:{fontFamily:b.body,fontSize:T.sm,lineHeight:1.55,color:B.textProse,paddingLeft:r[4],borderLeft:"2px solid rgba(0,0,0,0.08)"},children:e.jsx(F,{children:c})},`${n.date}-${h}`))})]},n.date))})},te=()=>{const t=i(n=>n.repoDocs),l=i(n=>n.activeDocTitle),d=t.find(n=>n.name===l);if(!d)return null;const a=d.name.endsWith(".md");return e.jsxs("div",{children:[e.jsx("h2",{style:{...M,margin:`0 0 ${r[4]}`},children:d.name}),a?e.jsx("div",{style:{fontFamily:b.body,fontSize:T.base,lineHeight:L.relaxed,color:B.textProse},children:e.jsx(F,{children:d.content})}):e.jsx("pre",{style:{fontFamily:b.mono,fontSize:T.xs,background:"rgba(0,0,0,0.04)",borderRadius:6,padding:r[4],overflowX:"auto",lineHeight:L.normal,whiteSpace:"pre-wrap"},children:d.content})]})},A=({itemId:t,label:l,onBack:d})=>e.jsx("div",{style:{marginBottom:r[4]},children:e.jsx(V,{items:[{id:"docs",label:"Docs",onClick:d},{id:t,label:l}]})}),le=()=>{const t=i(c=>c.docSearchQuery),l=i(c=>c.activeDocTitle),d=$(),a=_(),n=()=>d({to:"/docs"});return t.trim()?e.jsx("div",{children:e.jsx(q,{query:t})}):a==="decisions"&&l?e.jsxs("div",{children:[e.jsx(A,{itemId:"decision",label:l,onBack:n}),e.jsx(R,{children:"Decisions"}),e.jsx(Y,{})]}):a==="questions"&&l?e.jsxs("div",{children:[e.jsx(A,{itemId:"question",label:l,onBack:n}),e.jsx(R,{children:"Open Questions"}),e.jsx(ee,{})]}):a==="progress"?e.jsxs("div",{children:[e.jsx(A,{itemId:"progress",label:l??"Progress",onBack:n}),e.jsx(R,{children:"Progress"}),e.jsx(se,{})]}):a==="repo-docs"&&l?e.jsxs("div",{children:[e.jsx(A,{itemId:"repo-doc",label:l,onBack:n}),e.jsx(te,{})]}):e.jsxs("div",{children:[e.jsx(R,{children:"Docs"}),e.jsx("p",{style:{opacity:.5},children:"Select a section from the sidebar."})]})},oe=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),y=({children:t})=>e.jsx("span",{className:"text-sm",style:{display:"block",padding:`${r[1]} ${r[3]}`,opacity:.35,fontStyle:"italic"},children:t}),ce=()=>{const t=i(s=>s.decisions),l=i(s=>s.openQuestions),d=i(s=>s.progress),a=i(s=>s.repoDocs),n=i(s=>s.decisionsLoading),c=i(s=>s.openQuestionsLoading),h=i(s=>s.progressLoading),p=i(s=>s.repoDocsLoading),x=i(s=>s.loadDecisions),j=i(s=>s.loadOpenQuestions),v=i(s=>s.loadProgress),o=i(s=>s.loadRepoDocs),u=i(s=>s.activeDocTitle),m=i(s=>s.setActiveDocTitle),Q=i(s=>s.docSearchQuery),f=i(s=>s.setDocSearchQuery),S=_(),C=$();k.useEffect(()=>{x(),j(),v(),o()},[x,j,v,o]);const O=s=>{C({to:"/docs/$section",params:{section:"decisions"}}),m(s)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{marginBottom:r[4]},children:e.jsx(U,{size:"small","aria-label":"Search docs",placeholder:"Search docs…",value:Q,onChange:s=>f(s.target.value)})}),e.jsx(z,{label:"Repo Docs",children:p&&a.length===0?e.jsx(y,{children:"Loading…"}):a.length>0?a.map(s=>e.jsx(N,{size:"small",active:S==="repo-docs"&&u===s.name,onClick:()=>{C({to:"/docs/$section",params:{section:"repo-docs"}}),m(s.name)},children:oe(s.name)},s.name)):e.jsx(y,{children:"No repo docs found"})}),e.jsx(z,{label:"Decisions",children:n&&t.length===0?e.jsx(y,{children:"Loading…"}):t.length>0?t.map(s=>e.jsx(N,{size:"small",active:S==="decisions"&&u===s.title,onClick:()=>O(s.title),children:s.title},s.title)):e.jsx(y,{children:"No decisions yet"})}),e.jsx(z,{label:"Open Questions",children:c&&l.length===0?e.jsx(y,{children:"Loading…"}):l.length>0?l.map(s=>e.jsx(N,{size:"small",active:S==="questions"&&u===s.title,onClick:()=>{C({to:"/docs/$section",params:{section:"questions"}}),m(s.title)},children:s.title},s.title)):e.jsx(y,{children:"No open questions"})}),e.jsx(z,{label:"Progress",children:h&&d.length===0?e.jsx(y,{children:"Loading…"}):d.length>0?d.map(s=>e.jsx(N,{size:"small",active:S==="progress"&&u===s.date,onClick:()=>{C({to:"/docs/$section",params:{section:"progress"}}),m(s.date)},children:s.date},s.date)):e.jsx(y,{children:"No progress entries"})})]})};export{le as DocsPage,ce as DocsSidebar};
2
- //# sourceMappingURL=index-CF8jC3IN.js.map