@dendelion/paper-camp 0.4.0 → 0.6.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 (39) hide show
  1. package/README.md +6 -0
  2. package/dist/app/assets/main-CDaKqAAm.js +200 -0
  3. package/dist/app/assets/main-CDaKqAAm.js.map +1 -0
  4. package/dist/app/assets/main-DVU0frJi.css +1 -0
  5. package/dist/app/index.html +2 -2
  6. package/dist/chunks/{serializer.B8u-L8BI.js → serializer.DbnJzwVr.js} +1220 -990
  7. package/dist/chunks/serializer.DbnJzwVr.js.map +1 -0
  8. package/dist/cli/index.js +17247 -1494
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/core/content-hash.d.ts +14 -0
  11. package/dist/core/content-hash.d.ts.map +1 -0
  12. package/dist/core/content-hash.test.d.ts +2 -0
  13. package/dist/core/content-hash.test.d.ts.map +1 -0
  14. package/dist/core/entity.test.d.ts +2 -0
  15. package/dist/core/entity.test.d.ts.map +1 -0
  16. package/dist/core/index.js +54 -49
  17. package/dist/core/parser.d.ts +9 -1
  18. package/dist/core/parser.d.ts.map +1 -1
  19. package/dist/core/readers.d.ts +14 -20
  20. package/dist/core/readers.d.ts.map +1 -1
  21. package/dist/core/scaffold.d.ts.map +1 -1
  22. package/dist/core/scaffold.test.d.ts +2 -0
  23. package/dist/core/scaffold.test.d.ts.map +1 -0
  24. package/dist/core/schemas.d.ts +49 -5
  25. package/dist/core/schemas.d.ts.map +1 -1
  26. package/dist/core/serializer.d.ts +46 -6
  27. package/dist/core/serializer.d.ts.map +1 -1
  28. package/dist/core/templates.d.ts +9 -0
  29. package/dist/core/templates.d.ts.map +1 -0
  30. package/dist/types/index.d.ts +44 -4
  31. package/dist/types/index.d.ts.map +1 -1
  32. package/dist/types/index.js.map +1 -1
  33. package/package.json +11 -4
  34. package/dist/app/assets/main-6nYButky.js +0 -232
  35. package/dist/app/assets/main-6nYButky.js.map +0 -1
  36. package/dist/app/assets/main-DUnpdvQF.css +0 -1
  37. package/dist/chunks/serializer.B8u-L8BI.js.map +0 -1
  38. package/dist/core/idea-status.d.ts +0 -7
  39. package/dist/core/idea-status.d.ts.map +0 -1
@@ -0,0 +1,14 @@
1
+ import { PhaseItem } from '../types/index';
2
+ interface PlanContentInput {
3
+ body: string;
4
+ phases: PhaseItem[];
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
+ export declare function computePlanContentHash(plan: PlanContentInput): string;
13
+ export {};
14
+ //# sourceMappingURL=content-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../../src/core/content-hash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=content-hash.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-hash.test.d.ts","sourceRoot":"","sources":["../../src/core/content-hash.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=entity.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.test.d.ts","sourceRoot":"","sources":["../../src/core/entity.test.ts"],"names":[],"mappings":""}
@@ -1,54 +1,59 @@
1
- import { A as e, P as r, a as n, b as t, c as i, d as o, e as l, f as d, g as p, h as m, i as P, j as E, k as S, l as c, m as f, n as A, o as F, p as I, q as g, r as N, s as h, t as y, u as T, v as _, w as C, x as D, y as O, z as u, B as L, C as x, D as G, E as v, F as M, G as Q, H as z, I as B, J as R, K as j, L as k, M as w, N as K, O as U } from "../chunks/serializer.B8u-L8BI.js";
2
- import { AGENT_IDS as q, AGENT_LABELS as H, AGENT_OPTIONS as J, DEFAULT_AGENTS as V, PLAN_KINDS as W, PLAN_STATUSES as X, coerceAgentConfig as Y } from "../types/index.js";
1
+ import { A as e, P as t, a as r, b as n, c as i, d as o, e as p, f as m, g as E, h as l, i as d, j as S, k as c, l as P, m as f, n as F, o as y, p as I, q as A, r as g, s as N, t as T, u as h, v as _, w as C, x as D, y as O, z as u, B as L, C as G, D as Q, E as v, F as x, G as R, H as k, I as z, J as B, K as U, L as j, M as w, N as K, O as M, Q as b, R as q, S as H, T as J, U as V } from "../chunks/serializer.DbnJzwVr.js";
2
+ import { AGENT_IDS as X, AGENT_LABELS as Y, AGENT_OPTIONS as Z, DEFAULT_AGENTS as $, PLAN_KINDS as aa, PLAN_STATUSES as sa, coerceAgentConfig as ea } from "../types/index.js";
3
3
  export {
4
- q as AGENT_IDS,
5
- H as AGENT_LABELS,
6
- J as AGENT_OPTIONS,
4
+ X as AGENT_IDS,
5
+ Y as AGENT_LABELS,
6
+ Z as AGENT_OPTIONS,
7
7
  e as AlreadyInitializedError,
8
- V as DEFAULT_AGENTS,
9
- r as PAPER_CAMP_VERSION,
10
- W as PLAN_KINDS,
11
- X as PLAN_STATUSES,
12
- n as agentConfigSchema,
13
- t as appendBlock,
8
+ $ as DEFAULT_AGENTS,
9
+ t as PAPER_CAMP_VERSION,
10
+ aa as PLAN_KINDS,
11
+ sa as PLAN_STATUSES,
12
+ r as agentConfigSchema,
13
+ n as appendBlock,
14
14
  i as applyEnvEntries,
15
- o as archivePlanFile,
16
- l as assignPlanId,
17
- Y as coerceAgentConfig,
18
- d as dateString,
19
- p as decisionFieldsSchema,
20
- m as findConsistencyIssues,
21
- P as formatDecisionEntry,
22
- E as formatIdeaFile,
23
- S as formatIdeasIndex,
24
- c as formatOpenQuestionEntry,
25
- f as formatOpenQuestions,
26
- A as formatPlanEntry,
27
- F as formatPlanFile,
28
- I as formatPlans,
29
- g as formatPlansIndex,
30
- N as formatProgressEntry,
31
- h as ideaFrontmatterSchema,
32
- y as initProject,
33
- T as openQuestionFieldsSchema,
34
- _ as paperCampConfigSchema,
35
- C as parseDecisions,
36
- D as parseEnv,
37
- O as parseFrontmatter,
38
- u as parseIdeaFile,
39
- L as parseIdeas,
40
- x as parseOpenQuestions,
41
- G as parsePlanFile,
42
- v as parsePlans,
43
- M as parseProgress,
44
- Q as parseRawEntries,
45
- z as planFieldsSchema,
46
- B as planFrontmatterSchema,
47
- R as readAllIdeaFiles,
48
- j as readAllPlanFiles,
49
- k as readIdeasMerged,
50
- w as readPlansMerged,
51
- K as serializeFrontmatter,
52
- U as todayDateString
15
+ o as archiveEntityFile,
16
+ p as assignEntityId,
17
+ m as assignPlanId,
18
+ ea as coerceAgentConfig,
19
+ E as dateString,
20
+ l as decisionFieldsSchema,
21
+ d as entityFrontmatterSchema,
22
+ S as entityToIdea,
23
+ c as entityToPlan,
24
+ P as findConsistencyIssues,
25
+ f as formatDecisionEntry,
26
+ F as formatEntitiesIndex,
27
+ y as formatEntityFile,
28
+ I as formatIdeaFile,
29
+ A as formatOpenQuestionEntry,
30
+ g as formatOpenQuestions,
31
+ N as formatPlanEntry,
32
+ T as formatPlanFile,
33
+ h as formatPlans,
34
+ _ as formatProgressEntry,
35
+ C as ideaFrontmatterSchema,
36
+ D as initProject,
37
+ O as openQuestionFieldsSchema,
38
+ u as paperCampConfigSchema,
39
+ L as parseDecisions,
40
+ G as parseEntityFile,
41
+ Q as parseEnv,
42
+ v as parseFrontmatter,
43
+ x as parseIdeaFile,
44
+ R as parseIdeas,
45
+ k as parseOpenQuestions,
46
+ z as parsePlanFile,
47
+ B as parsePlans,
48
+ U as parseProgress,
49
+ j as parseRawEntries,
50
+ w as planFieldsSchema,
51
+ K as planFrontmatterSchema,
52
+ M as prependProgressItem,
53
+ b as readEntities,
54
+ q as readNoteEntries,
55
+ H as readWorkEntries,
56
+ J as serializeFrontmatter,
57
+ V as todayDateString
53
58
  };
54
59
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ConsistencyIssue, DecisionEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry } from '../types/index';
2
+ import { ConsistencyIssue, DecisionEntry, EntityEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry } from '../types/index';
3
3
  export declare function parseRawEntries(markdown: string): RawEntry[];
4
4
  export declare function parsePlans(markdown: string): ParseResult<PlanEntry>;
5
5
  export declare function parseDecisions(markdown: string): ParseResult<DecisionEntry>;
@@ -20,6 +20,14 @@ export declare function parseFrontmatter<T>(content: string, schema: z.ZodType<T
20
20
  * The body after frontmatter is scanned for ### Phases and ### Log sections,
21
21
  * same as the monolithic parser.
22
22
  */
23
+ /**
24
+ * Parses a unified entity file (FEAT-42 phases 7+): one file per entity — an
25
+ * "idea" for its whole life, plan as an optional `### Phases` body section.
26
+ * Same body pipeline as parsePlanFile (Phases/Log/Clarifications extraction);
27
+ * the frontmatter differs: `type` instead of `kind`, no `idea:` backlink, and
28
+ * the note/status asymmetry from the idea schema folded in.
29
+ */
30
+ export declare function parseEntityFile(content: string): ParseResult<EntityEntry>;
23
31
  export declare function parsePlanFile(content: string): ParseResult<PlanEntry>;
24
32
  /**
25
33
  * Parse a single per-idea file with YAML frontmatter.
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/core/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,SAAS,EAET,iBAAiB,EACjB,WAAW,EACX,YAAY,EAEZ,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,gBAAg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AiB,EAAE,EAClC,KAAK,EAAE,SAAS,EAAE,GACjB,gBAAgB,EAAE,CA0CpB;AAKD,kGAAkG;AAClG,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,EAAE,CAwB/D"}
@@ -1,27 +1,21 @@
1
- import { IdeaEntry, ParseResult, PlanEntry } from '../types/index';
1
+ import { EntityEntry, IdeaEntry, ParseResult, PlanEntry } from '../types/index';
2
2
  /**
3
- * Reads all per-file plans from a directory, including its `archive/` subdirectory
4
- * (done/dropped plans live there — see core/serializer.ts's archive move). Excludes
5
- * index.md in either directory.
6
- * Returns empty result if the directory doesn't exist or has no plan files.
3
+ * Reads every entity from the unified directory, including its `archive/`
4
+ * subdirectory (done/dropped entities live there). Excludes index.md.
7
5
  */
8
- export declare function readAllPlanFiles(plansDir: string): Promise<ParseResult<PlanEntry> & {
6
+ export declare function readEntities(ideasDir: string): Promise<ParseResult<EntityEntry> & {
9
7
  fileCount: number;
10
8
  }>;
11
9
  /**
12
- * Reads all per-file ideas from a directory (non-recursive, excludes index.md).
10
+ * PlanEntry view of a work entity (anything that isn't a note): `kind` is the
11
+ * entity's `type`. Lets the plan-shaped pipeline (API responses, prompts, UI)
12
+ * keep working until the UI morphs to entities directly.
13
13
  */
14
- export declare function readAllIdeaFiles(ideasDir: string): Promise<ParseResult<IdeaEntry> & {
15
- fileCount: number;
16
- }>;
17
- /**
18
- * Merges per-file plan entries with monolithic fallback, deduplicating by id/title.
19
- * Per-file entries take precedence; any plan in per-file that also exists in
20
- * the monolithic file is only included once (per-file version wins).
21
- */
22
- export declare function readPlansMerged(plansDir: string, monolithicPath: string): Promise<ParseResult<PlanEntry>>;
23
- /**
24
- * Merges per-file idea entries with monolithic fallback, deduplicating by id.
25
- */
26
- export declare function readIdeasMerged(ideasDir: string, monolithicPath: string): Promise<ParseResult<IdeaEntry>>;
14
+ export declare function entityToPlan(e: EntityEntry): PlanEntry;
15
+ /** IdeaEntry view of a note entity, for the note-shaped API/UI surface. */
16
+ export declare function entityToIdea(e: EntityEntry): IdeaEntry;
17
+ /** All work entities (non-notes) in PlanEntry shape — the `/api/plans` view. */
18
+ export declare function readWorkEntries(ideasDir: string): Promise<ParseResult<PlanEntry>>;
19
+ /** All note entities in IdeaEntry shape the `/api/ideas` view. */
20
+ export declare function readNoteEntries(ideasDir: string): Promise<ParseResult<IdeaEntry>>;
27
21
  //# sourceMappingURL=readers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../src/core/readers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAgB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA0BtF;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBzD;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBzD;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CA0BjC;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAkCjC"}
1
+ {"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../src/core/readers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,WAAW,EAEX,SAAS,EAEV,MAAM,gBAAgB,CAAC;AA8BxB;;;GAGG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAqB3D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAkBtD;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAStD;AAED,gFAAgF;AAChF,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAMvF;AAED,oEAAoE;AACpE,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAMvF"}
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/core/scaffold.ts"],"names":[],"mappings":"AAKA,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,CAgDxF"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/core/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,CA2CxF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scaffold.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold.test.d.ts","sourceRoot":"","sources":["../../src/core/scaffold.test.ts"],"names":[],"mappings":""}
@@ -77,22 +77,65 @@ export declare const planFrontmatterSchema: z.ZodObject<{
77
77
  created: z.ZodString;
78
78
  updated: z.ZodOptional<z.ZodString>;
79
79
  audited: z.ZodOptional<z.ZodString>;
80
+ 'audited-hash': z.ZodOptional<z.ZodString>;
80
81
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
81
82
  }, z.core.$strip>;
82
83
  export declare const ideaFrontmatterSchema: z.ZodObject<{
83
84
  id: z.ZodString;
84
85
  title: z.ZodString;
86
+ kind: z.ZodOptional<z.ZodEnum<{
87
+ idea: "idea";
88
+ note: "note";
89
+ }>>;
90
+ status: z.ZodOptional<z.ZodEnum<{
91
+ done: "done";
92
+ dropped: "dropped";
93
+ open: "open";
94
+ }>>;
95
+ }, z.core.$strip>;
96
+ export declare const entityFrontmatterSchema: z.ZodObject<{
97
+ id: z.ZodString;
98
+ title: z.ZodString;
99
+ type: z.ZodOptional<z.ZodEnum<{
100
+ feat: "feat";
101
+ fix: "fix";
102
+ chore: "chore";
103
+ docs: "docs";
104
+ refactor: "refactor";
105
+ }>>;
106
+ kind: z.ZodOptional<z.ZodEnum<{
107
+ note: "note";
108
+ }>>;
109
+ status: z.ZodEnum<{
110
+ idea: "idea";
111
+ planned: "planned";
112
+ "in-progress": "in-progress";
113
+ review: "review";
114
+ done: "done";
115
+ dropped: "dropped";
116
+ open: "open";
117
+ }>;
118
+ agent: z.ZodOptional<z.ZodEnum<{
119
+ "claude-code": "claude-code";
120
+ opencode: "opencode";
121
+ }>>;
122
+ created: z.ZodString;
123
+ updated: z.ZodOptional<z.ZodString>;
124
+ audited: z.ZodOptional<z.ZodString>;
125
+ 'audited-hash': z.ZodOptional<z.ZodString>;
126
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
127
  }, z.core.$strip>;
86
128
  export declare const paperCampConfigSchema: z.ZodObject<{
87
129
  version: z.ZodString;
88
130
  projectName: z.ZodString;
89
131
  initializedAt: z.ZodString;
90
132
  nextId: z.ZodOptional<z.ZodObject<{
91
- feat: z.ZodNumber;
92
- fix: z.ZodNumber;
93
- chore: z.ZodNumber;
94
- docs: z.ZodNumber;
95
- refactor: z.ZodNumber;
133
+ idea: z.ZodOptional<z.ZodNumber>;
134
+ feat: z.ZodOptional<z.ZodNumber>;
135
+ fix: z.ZodOptional<z.ZodNumber>;
136
+ chore: z.ZodOptional<z.ZodNumber>;
137
+ docs: z.ZodOptional<z.ZodNumber>;
138
+ refactor: z.ZodOptional<z.ZodNumber>;
96
139
  }, z.core.$strip>>;
97
140
  defaultAgent: z.ZodOptional<z.ZodEnum<{
98
141
  "claude-code": "claude-code";
@@ -138,4 +181,5 @@ export type DecisionFields = z.infer<typeof decisionFieldsSchema>;
138
181
  export type OpenQuestionFields = z.infer<typeof openQuestionFieldsSchema>;
139
182
  export type PlanFrontmatter = z.infer<typeof planFrontmatterSchema>;
140
183
  export type IdeaFrontmatter = z.infer<typeof ideaFrontmatterSchema>;
184
+ export type EntityFrontmatter = z.infer<typeof entityFrontmatterSchema>;
141
185
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;;;;kBAO7B,CAAC;AAEF,eAAO,MAAM,UAAU,aAAiE,CAAC;AAQzF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;iBAS3B,CAAC;AAEH,eAAO,MAAM,oBAAo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;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwChC,CAAC;AAEL,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IdeaEntry, LogEntry, PhaseItem, PlanEntry } from '../types/index';
1
+ import { EntityEntry, LogEntry, PhaseItem } from '../types/index';
2
2
  export declare function todayDateString(): string;
3
3
  /**
4
4
  * Mints the next `<KIND>-<N>` plan ID from the persistent counter in `papercamp/config.json`,
@@ -43,6 +43,13 @@ interface NewOpenQuestionInput {
43
43
  }
44
44
  export declare function formatOpenQuestionEntry(input: NewOpenQuestionInput): string;
45
45
  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
+ export declare function prependProgressItem(progressPath: string, item: string): Promise<void>;
46
53
  /** Serializes an array of plan entries back to a plans.md file. */
47
54
  export declare function formatPlans(entries: NewPlanInput[]): string;
48
55
  /** Serializes an array of open-question entries back to an open-questions.md file. */
@@ -60,6 +67,7 @@ interface NewPlanFileInput {
60
67
  created: string;
61
68
  updated?: string;
62
69
  audited?: string;
70
+ auditedHash?: string;
63
71
  tags?: string[];
64
72
  body?: string;
65
73
  phases?: PhaseItem[];
@@ -80,22 +88,54 @@ interface NewPlanFileInput {
80
88
  * ...
81
89
  */
82
90
  export declare function formatPlanFile(input: NewPlanFileInput): string;
91
+ interface NewEntityFileInput {
92
+ id: string;
93
+ title: string;
94
+ type?: string;
95
+ kind?: string;
96
+ status: string;
97
+ agent?: string;
98
+ created: string;
99
+ updated?: string;
100
+ audited?: string;
101
+ auditedHash?: string;
102
+ tags?: string[];
103
+ body?: string;
104
+ phases?: PhaseItem[];
105
+ log?: LogEntry[];
106
+ clarifications?: LogEntry[];
107
+ }
108
+ /**
109
+ * Serializes a unified entity file (FEAT-42 phases 7+) — same body sections as
110
+ * formatPlanFile (Clarifications/Phases/Log), but `type` instead of `kind`, no
111
+ * `idea:` backlink, and no `## id: title` body heading (title lives in
112
+ * frontmatter only).
113
+ */
114
+ 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 after the FEAT-42
118
+ * migration. Same chaining/guarantees as assignPlanId (which it delegates to).
119
+ */
120
+ export declare function assignEntityId(configPath: string): Promise<string | undefined>;
83
121
  interface NewIdeaFileInput {
84
122
  id: string;
85
123
  title: string;
124
+ kind?: string;
125
+ status?: string;
86
126
  body?: string;
127
+ log?: LogEntry[];
87
128
  }
88
129
  /**
89
130
  * Serializes an idea entry as a standalone file with YAML frontmatter.
90
131
  */
91
132
  export declare function formatIdeaFile(input: NewIdeaFileInput): string;
92
133
  /**
93
- * Moves a per-file plan from papercamp/plans/<id>.md to papercamp/plans/archive/<id>.md.
134
+ * Moves an entity from papercamp/ideas/<id>.md to papercamp/ideas/archive/<id>.md.
94
135
  * This is a pure file move — no parse-and-re-serialize step.
95
- * Returns true if the file was moved, false if no per-file exists for this plan.
136
+ * Returns true if the file was moved, false if no file exists for this entity.
96
137
  */
97
- export declare function archivePlanFile(root: string, planId: string): Promise<boolean>;
98
- export declare function formatPlansIndex(entries: PlanEntry[]): string;
99
- export declare function formatIdeasIndex(ideas: IdeaEntry[]): string;
138
+ export declare function archiveEntityFile(root: string, entityId: string): Promise<boolean>;
139
+ export declare function formatEntitiesIndex(entities: EntityEntry[]): string;
100
140
  export {};
101
141
  //# sourceMappingURL=serializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/core/serializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhF,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,EA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,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,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;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAkDlE;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAEpF;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;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAqB9D;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAexF;AAMD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,CAgBnE"}
@@ -0,0 +1,9 @@
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
+ 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
+ export declare const CLAUDE_SETTINGS_JSON: string;
9
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/core/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,0pIA2E5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAmB5B,CAAC"}
@@ -44,6 +44,7 @@ export interface PlanEntry {
44
44
  created: string;
45
45
  updated?: string;
46
46
  audited?: string;
47
+ auditedHash?: string;
47
48
  tags: string[];
48
49
  body: string;
49
50
  phases: PhaseItem[];
@@ -73,12 +74,38 @@ export interface ConsistencyIssue {
73
74
  message: string;
74
75
  planId?: string;
75
76
  }
76
- export type IdeaStatus = 'planned' | 'done';
77
+ export type IdeaKind = 'idea' | 'note';
78
+ export type IdeaStatus = 'open' | 'done' | 'dropped';
77
79
  export interface IdeaEntry {
78
80
  id: string | null;
79
81
  title: string;
80
82
  body: string;
83
+ kind?: IdeaKind;
81
84
  status?: IdeaStatus;
85
+ log?: LogEntry[];
86
+ }
87
+ /** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */
88
+ export type EntityType = PlanKind;
89
+ /** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */
90
+ export type EntityStatus = PlanStatus | 'open';
91
+ export interface EntityEntry {
92
+ id: string;
93
+ title: string;
94
+ /** Absent until the entity is classified (usually when its plan is drafted). */
95
+ type?: EntityType;
96
+ /** "note" marks an entity that never grows phases. */
97
+ kind?: 'note';
98
+ status: EntityStatus;
99
+ agent?: AgentId;
100
+ created: string;
101
+ updated?: string;
102
+ audited?: string;
103
+ auditedHash?: string;
104
+ tags: string[];
105
+ body: string;
106
+ phases: PhaseItem[];
107
+ log?: LogEntry[];
108
+ clarifications?: LogEntry[];
82
109
  }
83
110
  export interface ProgressEntry {
84
111
  date: string;
@@ -113,9 +140,14 @@ export interface PaperCampConfig {
113
140
  version: string;
114
141
  projectName: string;
115
142
  initializedAt: string;
116
- nextId?: Record<PlanKind, number>;
143
+ /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */
144
+ nextId?: Partial<Record<PlanKind, number>> & {
145
+ idea?: number;
146
+ };
117
147
  port?: number;
118
148
  defaultAgents?: DefaultAgentsMap;
149
+ /** Off by default. When true, the PostToolUse hook logs new-file creations to progress.md. */
150
+ autoLogNewFiles?: boolean;
119
151
  }
120
152
  export type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';
121
153
  export interface CheckResult {
@@ -123,7 +155,7 @@ export interface CheckResult {
123
155
  lastRun: string | null;
124
156
  output: string;
125
157
  }
126
- export type CheckName = 'lint' | 'format' | 'test';
158
+ export type CheckName = 'lint' | 'format' | 'test' | 'consistency';
127
159
  export interface GitStatusEntry {
128
160
  path: string;
129
161
  status: string;
@@ -138,7 +170,7 @@ export interface GitStatusResponse {
138
170
  }
139
171
  export type BranchHygieneStatus = 'clean-on-main' | 'stale-merged' | 'stale-no-upstream' | 'dirty' | 'fine';
140
172
  export type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';
141
- export type TaskKind = 'phase' | 'audit' | 'batch-audit' | 'run-all' | 'draft' | 'extend' | 'commit-suggest' | 'sync' | 'reconcile';
173
+ export type TaskKind = 'phase' | 'audit' | 'batch-reconcile' | 'run-all' | 'draft' | 'extend' | 'commit-suggest' | 'sync' | 'reconcile';
142
174
  export interface AgentTaskState {
143
175
  status: AgentTaskStatus;
144
176
  taskKind: TaskKind;
@@ -149,4 +181,12 @@ export interface AgentTaskState {
149
181
  agentId: AgentId;
150
182
  lines: string[];
151
183
  }
184
+ export interface ReconcileQueueItem {
185
+ planId: string;
186
+ title: string;
187
+ before: {
188
+ body: string;
189
+ phases: PhaseItem[];
190
+ };
191
+ }
152
192
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5F,eAAO,MAAM,aAAa,EAAE,UAAU,EAOrC,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtE,eAAO,MAAM,UAAU,EAAE,QAAQ,EAAiD,CAAC;AAEnF,eAAO,MAAM,SAAS,sCAAuC,CAAC;AAE9D,MAAM,MAAM,OAAO,GAAG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AE,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\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 tags: string[];\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\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 IdeaStatus = 'planned' | 'done';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n status?: IdeaStatus;\n}\n\nexport interface ProgressEntry {\n date: string;\n items: string[];\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\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 nextId?: Record<PlanKind, number>;\n port?: number;\n defaultAgents?: DefaultAgentsMap;\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';\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-audit'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'commit-suggest'\n | 'sync'\n | 'reconcile';\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"],"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,GAkHaC,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\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\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}\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 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\nexport interface EnvEntry {\n key: string;\n value: string;\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 | 'commit-suggest'\n | 'sync'\n | 'reconcile';\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\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,GAuJaC,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;"}