@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
@@ -1,9 +1,4 @@
1
1
  import { EnvEntry } from '../types/index';
2
- /** Parses `KEY=value` lines, skipping comments and blank lines. */
3
2
  export declare function parseEnv(content: string): EnvEntry[];
4
- /**
5
- * Replaces matched-key lines in place, drops keys no longer present, and appends
6
- * new keys at the end — preserving comments and the ordering of every untouched line.
7
- */
8
3
  export declare function applyEnvEntries(content: string, entries: EnvEntry[]): string;
9
4
  //# sourceMappingURL=env.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/core/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA2B/C,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAOpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,CAuB5E"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/core/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA2B/C,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAOpD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,CAuB5E"}
@@ -1,8 +1,4 @@
1
- /**
2
- * Feature-branch name for an entity, matching the `kind/id-slug` convention
3
- * that `branchEntityId`/`getFeatureBranchPlanId` parse back out. Shared so
4
- * branch creation (`ensureBranch`) and PR resolution (`resolvePrMerged`)
5
- * target the exact same name.
6
- */
1
+ /** Matches the `kind/id-slug` convention that `branchEntityId`/`getFeatureBranchPlanId`
2
+ * parse back out — shared so branch creation and PR resolution target the same name. */
7
3
  export declare function branchName(id: string | undefined, type: string | undefined, title: string): string | undefined;
8
4
  //# sourceMappingURL=branch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/branch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAQpB"}
1
+ {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/branch.ts"],"names":[],"mappings":"AAAA;wFACwF;AACxF,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAQpB"}
@@ -1,57 +1,16 @@
1
1
  import { PrInfo, ReviewThread } from '../../types/index';
2
- /**
3
- * The entity id a PR references — its `**Plan:** \`IDEA-N\`` body line (stamped
4
- * by draft-pr.yml), falling back to the `feat/idea-N-…` id prefix of its head
5
- * branch. Both key off the stable id, never the title, so a renamed entity's PR
6
- * still resolves. Shared by the row-level index (`prEntityId`) and the
7
- * single-ref lookup (`resolvePlanForPrRef` in `pr.ts`).
8
- */
9
2
  export declare function resolveEntityIdFromPrRef(body: string | null | undefined, branch: string | null | undefined): string | null;
10
- /**
11
- * Splits a PR's `html_url` into the owner/repo/number a `gh api graphql` call
12
- * needs. Also used by `pr.ts`'s consistency-comment sync to build the REST
13
- * PATCH endpoint for editing an existing sticky comment.
14
- */
15
3
  export declare function parsePrUrl(url: string): {
16
4
  owner: string;
17
5
  repo: string;
18
6
  number: string;
19
7
  } | null;
20
- /**
21
- * Per-comment detail for a PR's unresolved review threads, for the fix-review
22
- * launch path (`POST /api/agent/launch-fix-review`) to hand to
23
- * `buildFixReviewPrompt`. Each thread is represented by its first comment, since
24
- * that's the one that states what needs fixing. Best-effort: resolves `[]` on
25
- * any failure so a launch with no readable threads falls back to
26
- * `buildFixReviewPrompt`'s own empty-threads guard rather than erroring out.
27
- */
8
+ /** Best-effort: resolves `[]` on any failure rather than throwing. */
28
9
  export declare function fetchUnresolvedThreads(root: string, url: string): Promise<ReviewThread[]>;
29
- /**
30
- * Marks a review thread resolved. Called once the fix that addresses it is
31
- * actually pushed (see the git push route) — resolving earlier would mark the
32
- * thread done against code the PR can't see yet. Best-effort: returns false on
33
- * any failure rather than throwing, since a failed resolve must not fail a push.
34
- */
10
+ /** Best-effort: returns `false` on any failure — a failed resolve must not fail the push that triggered it. */
35
11
  export declare function resolveReviewThread(root: string, threadId: string): Promise<boolean>;
36
- /**
37
- * Posts a reply on a review thread — used to record why the agent deliberately
38
- * skipped a comment, so a rejected suggestion reads as a reasoned decision
39
- * rather than silence. Best-effort, same as resolveReviewThread.
40
- */
41
12
  export declare function replyToReviewThread(root: string, threadId: string, body: string): Promise<boolean>;
42
- /**
43
- * Every PR in the repo indexed by the entity id it references, resolved via a
44
- * single `gh pr list` and cached for `ttlMs`, feeding `core/status.ts`'s
45
- * PR-driven status derivation. `undefined` when the lookup can't resolve at
46
- * all (no `gh`, not authenticated, offline, no GitHub remote); callers fall
47
- * back to stored status.
48
- * An entity simply absent from the returned map has no PR (a confirmed answer).
49
- */
13
+ /** `undefined` means the lookup couldn't resolve at all; callers fall back to stored status. */
50
14
  export declare function resolvePrsByEntity(root: string, ttlMs?: number): Promise<Map<string, PrInfo> | undefined>;
51
- /**
52
- * Clears the module-level PR cache. Used by the manual refresh route
53
- * (`POST /api/refresh`) so a user-triggered refresh re-resolves PR/review state
54
- * instead of replaying the TTL window, and by tests to isolate cases.
55
- */
56
15
  export declare function clearPrCache(): void;
57
16
  //# sourceMappingURL=pr-lookup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr-lookup.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/pr-lookup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAkB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmD9E;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,GAAG,IAAI,CAKf;AA8BD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAK9F;AAyID;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAkB/F;AAgBD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK1F;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAKlB;AAiFD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,KAAK,SAAkB,GACtB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAS1C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
1
+ {"version":3,"file":"pr-lookup.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/pr-lookup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAkB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA2C9E,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,GAAG,IAAI,CAKf;AA0BD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAK9F;AA0HD,sEAAsE;AACtE,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAkB/F;AAgBD,+GAA+G;AAC/G,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK1F;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAKlB;AA4ED,gGAAgG;AAChG,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,KAAK,SAAkB,GACtB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAQ1C;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
@@ -1,101 +1,21 @@
1
1
  import { ConsistencyIssue, EntityType, PhaseItem } from '../../types/index';
2
2
  export { clearPrCache, fetchUnresolvedThreads, replyToReviewThread, resolvePrsByEntity, resolveReviewThread, } from './pr-lookup';
3
- /** The fields later Scout workflows need to mirror a plan onto its PR. */
4
- export interface ResolvedPlanForPr {
3
+ interface ResolvedPlanForPr {
5
4
  id: string;
6
5
  kind?: EntityType;
7
6
  tags: string[];
8
7
  phases: PhaseItem[];
9
8
  }
10
- /**
11
- * Resolves the plan a PR (given by number or branch) mirrors, and parses
12
- * `papercamp/ideas/<ID>.md` for the fields the mirroring workflows need. `ref`
13
- * is passed straight to `gh pr view`, so both a PR number and a branch name
14
- * work; when no PR exists yet for a branch, falls back to reading the plan id
15
- * out of the branch name itself (same convention `draft-pr.yml` uses to name
16
- * the PR in the first place). Returns `undefined` when the id can't be
17
- * resolved at all, or when it doesn't match a file under `papercamp/ideas/`.
18
- */
19
9
  export declare function resolvePlanForPrRef(root: string, ref: string): Promise<ResolvedPlanForPr | undefined>;
20
- /**
21
- * Renders a plan's `### Phases` as a GitHub task-list checklist and
22
- * inserts/replaces it in a PR body between marker comments, leaving
23
- * everything else — notably the `**Plan:**` line `draft-pr.yml` stamps — untouched.
24
- * Idempotent: the same `phases` always renders the same section text, so a
25
- * caller can compare the result to the current body and skip the `gh pr edit`
26
- * call when nothing changed.
27
- */
28
10
  export declare function renderPlanPhasesIntoBody(body: string, phases: PhaseItem[]): string;
29
- export type SyncPlanPhasesResult = 'updated' | 'unchanged' | 'unresolved';
30
- /**
31
- * On push to a plan branch: rewrites the PR body's phases checklist to match
32
- * `### Phases` in the plan file, preserving the `**Plan:**` line and
33
- * everything else. Only calls `gh pr edit` when the rendered body actually
34
- * differs from the PR's current body, so rerunning on an unchanged plan is a
35
- * no-op — the idempotency `renderPlanPhasesIntoBody` makes possible.
36
- */
37
- export declare function syncPlanPhasesToPr(root: string, ref: string): Promise<SyncPlanPhasesResult>;
38
- /**
39
- * The labels a PR should carry for a plan: its `kind` (feat/fix/…, the
40
- * type-enum values) plus whichever `tags` are also recognized commit scopes
41
- * (`COMMIT_SCOPES` — the same area vocabulary `.commitlintrc.json`'s
42
- * `scope-enum` uses), so free-form tags that aren't area names don't leak
43
- * into GitHub labels. Order-stable and de-duped.
44
- */
11
+ export declare function syncPlanPhasesToPr(root: string, ref: string): Promise<'updated' | 'unchanged' | 'unresolved'>;
45
12
  export declare function derivePrLabels(plan: Pick<ResolvedPlanForPr, 'kind' | 'tags'>): string[];
46
- export type SyncPrLabelsResult = 'updated' | 'unchanged' | 'unresolved';
47
- /**
48
- * On push to a plan branch: applies the labels `derivePrLabels` derives from
49
- * the plan's `kind`/`tags`, creating any that don't exist in the repo yet.
50
- * Additive only — a label already on the PR (human-added or from a previous
51
- * run) is left alone, and a plan label no longer implied by the file is not
52
- * removed, so a human's own labeling is never clobbered. Only calls `gh` to
53
- * add labels that are actually missing from the PR, so rerunning on an
54
- * unchanged plan is a no-op.
55
- */
56
- export declare function syncPrLabelsToPr(root: string, ref: string): Promise<SyncPrLabelsResult>;
57
- export type SyncPrReadinessResult = 'ready' | 'closed' | 'unchanged' | 'unresolved';
58
- /**
59
- * On push to a plan branch: one-way plan → PR readiness, never plan status.
60
- * A stored `dropped` override closes an open PR (abandonment leaves no other
61
- * trace to derive from, per `core/status.ts`). Otherwise, once every phase in
62
- * the plan is checked, a draft PR flips to ready for review — the phases list
63
- * is the derived `review` signal per `core/status.ts`. Anything already in the
64
- * target state (a non-draft PR with all phases done, an already-closed
65
- * dropped PR) is a no-op, so rerunning on an unchanged plan doesn't call `gh`
66
- * again. Marking a plan `done` on merge is deliberately not done here — that's
67
- * `core/status.ts`'s derivation from the merged PR, not a write this function
68
- * makes.
69
- */
70
- export declare function syncPrReadinessToPr(root: string, ref: string): Promise<SyncPrReadinessResult>;
13
+ export declare function syncPrLabelsToPr(root: string, ref: string): Promise<'updated' | 'unchanged' | 'unresolved'>;
14
+ export declare function syncPrReadinessToPr(root: string, ref: string): Promise<'ready' | 'closed' | 'unchanged' | 'unresolved'>;
71
15
  interface AuditSummary {
72
16
  audited: string;
73
- /** Whether the plan's content has changed since the stored `audited-hash`. */
74
17
  stale: boolean;
75
18
  }
76
- /**
77
- * Renders `findConsistencyIssues`' repo-wide results, plus the plan's own
78
- * convergence-audit staleness where one has been recorded, as a sticky PR
79
- * comment body wrapped in marker comments (same `find/replace-by-marker`
80
- * shape as `renderPlanPhasesIntoBody`). Deterministic for the same inputs, so
81
- * a caller can compare against the existing sticky comment and skip the `gh`
82
- * call when nothing changed.
83
- */
84
19
  export declare function renderConsistencyComment(issues: ConsistencyIssue[], audit?: AuditSummary): string;
85
- export type SyncConsistencyCommentResult = 'created' | 'updated' | 'unchanged' | 'unresolved';
86
- /**
87
- * On push to a plan branch: upserts a single sticky Scout comment on the PR with
88
- * `findConsistencyIssues`' repo-wide results (dangling decision/question links, an
89
- * open question blocking an already-active plan) and, when the plan carries a
90
- * recorded convergence audit, whether it's gone stale since — so Paper Camp's own
91
- * structured checks sit next to CI and CodeRabbit where review actually happens.
92
- * Reads decisions/open-questions/plans straight off the checked-out branch (same
93
- * corpus `/api/consistency` reads), not scoped to just this plan, since most issue
94
- * kinds aren't plan-specific. Finds the existing sticky comment by its marker and
95
- * PATCHes it via the REST id parsed from its URL rather than `gh pr comment
96
- * --edit-last`, which isn't safe once Scout has posted any other unrelated comment.
97
- * Only calls `gh` when the rendered body actually changed, so a rerun on an
98
- * unchanged repo state is a no-op.
99
- */
100
- export declare function syncConsistencyCommentToPr(root: string, ref: string): Promise<SyncConsistencyCommentResult>;
20
+ export declare function syncConsistencyCommentToPr(root: string, ref: string): Promise<'created' | 'updated' | 'unchanged' | 'unresolved'>;
101
21
  //# sourceMappingURL=pr.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/pr.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAe,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAY9F,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,m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,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,EAAE,CAOvF;AAyDD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC,CAoBjD;AA0BD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC,CAgB1D;AAKD,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAkBjG;AA2CD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC,CAwC7D"}
@@ -1,8 +1,2 @@
1
- /**
2
- * Valid commit scopes — keep in sync with `.commitlintrc.json`'s `scope-enum`.
3
- * Doubles as the area-label vocabulary Scout's PR label sync reuses (see
4
- * `derivePrLabels` in `pr.ts`), so a plan tag only becomes a label when it's
5
- * also a recognized commit scope.
6
- */
7
1
  export declare const COMMIT_SCOPES: Set<string>;
8
2
  //# sourceMappingURL=scopes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/scopes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,aAmBxB,CAAC"}
1
+ {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/scopes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,aAmBxB,CAAC"}
@@ -4,5 +4,6 @@ export * from './parse';
4
4
  export * from './git-pr';
5
5
  export * from './scaffold';
6
6
  export * from './serialize';
7
+ export * from './roadmap';
7
8
  export * from '../types/index';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -1,81 +1,86 @@
1
- import { A as e, C as r, a as n, P as t, S as i, b as o, c as l, d as E, e as d, f as m, g as P, h as p, i as S, j as c, k as y, l as T, m as h, n as I, o as f, p as F, q as N, r as g, s as C, t as _, u as A, v, w as L, x as O, y as u, z as D, B as R, D as G, E as U, F as b, G as B, H as M, I as Q, J as w, K as x, L as k, M as z, N as K, O as W, Q as j, R as H, T as J, U as V, V as Y, W as q, X, Y as Z, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ra, a2 as na, a3 as ta, a4 as ia, a5 as oa, a6 as la, a7 as Ea, a8 as da, a9 as ma, aa as Pa, ab as pa, ac as Sa, ad as ca, ae as ya } from "../chunks/serializer.BfH7zTwv.js";
2
- import { AGENT_IDS as ha, AGENT_LABELS as Ia, AGENT_OPTIONS as fa, DEFAULT_AGENTS as Fa, PLAN_KINDS as Na, PLAN_STATUSES as ga, coerceAgentConfig as Ca } from "../types/index.js";
1
+ import { A as e, C as r, a as n, P as t, S as i, b as o, c as d, d as m, e as l, f as p, g as E, h as P, i as c, j as S, k as T, l as y, m as h, n as I, o as f, p as g, q as F, r as N, s as C, t as A, u as _, v, w as L, x as u, y as O, z as R, B as D, D as G, E as b, F as U, G as B, H as M, I as Q, J as j, K as k, L as w, M as x, N as z, O as K, Q as W, R as H, T as J, U as V, V as Y, W as q, X, Y as Z, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ra, a2 as na, a3 as ta, a4 as ia, a5 as oa, a6 as da, a7 as ma, a8 as la, a9 as pa, aa as Ea, ab as Pa, ac as ca, ad as Sa, ae as Ta, af as ya, ag as ha, ah as Ia, ai as fa, aj as ga } from "../chunks/roadmap.C0AQ6pUX.js";
2
+ import { AGENT_IDS as Na, AGENT_LABELS as Ca, AGENT_OPTIONS as Aa, DEFAULT_AGENTS as _a, PLAN_KINDS as va, PLAN_STATUSES as La, coerceAgentConfig as ua } from "../types/index.js";
3
3
  export {
4
- ha as AGENT_IDS,
5
- Ia as AGENT_LABELS,
6
- fa as AGENT_OPTIONS,
4
+ Na as AGENT_IDS,
5
+ Ca as AGENT_LABELS,
6
+ Aa as AGENT_OPTIONS,
7
7
  e as AlreadyInitializedError,
8
8
  r as CLAUDE_SETTINGS_JSON,
9
9
  n as COMMIT_SCOPES,
10
- Fa as DEFAULT_AGENTS,
10
+ _a as DEFAULT_AGENTS,
11
11
  t as PAPER_CAMP_VERSION,
12
- Na as PLAN_KINDS,
13
- ga as PLAN_STATUSES,
12
+ va as PLAN_KINDS,
13
+ La as PLAN_STATUSES,
14
14
  i as SKILL_MD_CONTENT,
15
15
  o as SUGGESTION_ENTRY_RE,
16
- l as agentConfigSchema,
17
- E as appendBlock,
18
- d as applyEnvEntries,
19
- m as archiveEntityFile,
20
- P as assignEntityId,
21
- p as assignPlanId,
22
- S as branchName,
23
- c as clearPrCache,
24
- Ca as coerceAgentConfig,
25
- y as computePlanContentHash,
26
- T as dateString,
16
+ d as agentConfigSchema,
17
+ m as appendBlock,
18
+ l as applyEnvEntries,
19
+ p as archiveEntityFile,
20
+ E as assignEntityId,
21
+ P as assignPlanId,
22
+ c as branchName,
23
+ S as clearPrCache,
24
+ ua as coerceAgentConfig,
25
+ T as computePlanContentHash,
26
+ y as dateString,
27
27
  h as decisionFieldsSchema,
28
28
  I as derivePrLabels,
29
- f as entityFrontmatterSchema,
29
+ f as ensureSubject,
30
+ g as entityFrontmatterSchema,
30
31
  F as entityToIdea,
31
32
  N as entityToPlan,
32
- g as fetchUnresolvedThreads,
33
- C as findConsistencyIssues,
34
- _ as formatDecisionEntry,
35
- A as formatEntitiesIndex,
36
- v as formatEntityFile,
37
- L as formatIdeaFile,
38
- O as formatOpenQuestionEntry,
39
- u as formatOpenQuestions,
40
- D as formatPlanEntry,
41
- R as formatPlanFile,
42
- G as formatPlans,
43
- U as formatProgressEntry,
44
- b as ideaFrontmatterSchema,
45
- B as initProject,
46
- M as openQuestionFieldsSchema,
47
- Q as paperCampConfigSchema,
33
+ C as fetchUnresolvedThreads,
34
+ A as findArchivableIdeas,
35
+ _ as findConsistencyIssues,
36
+ v as formatDecisionEntry,
37
+ L as formatEntitiesIndex,
38
+ u as formatEntityFile,
39
+ O as formatIdeaFile,
40
+ R as formatOpenQuestionEntry,
41
+ D as formatOpenQuestions,
42
+ G as formatPlanEntry,
43
+ b as formatPlanFile,
44
+ U as formatPlans,
45
+ B as formatProgressEntry,
46
+ M as ideaFrontmatterSchema,
47
+ Q as initProject,
48
+ j as openQuestionFieldsSchema,
49
+ k as paperCampConfigSchema,
48
50
  w as parseDecisions,
49
51
  x as parseEntityFile,
50
- k as parseEnv,
51
- z as parseFrontmatter,
52
- K as parseIdeaFile,
53
- W as parseIdeas,
54
- j as parseOpenQuestions,
55
- H as parsePlanFile,
56
- J as parsePlans,
57
- V as parseProgress,
58
- Y as parseRawEntries,
59
- q as parseSuggestions,
60
- X as planFieldsSchema,
61
- Z as planFrontmatterSchema,
62
- $ as prependProgressItem,
63
- aa as readEntities,
64
- sa as readEntitiesWithDerivedStatus,
65
- ea as readNoteEntries,
66
- ra as readWorkEntries,
67
- na as removeSuggestionLine,
68
- ta as renderConsistencyComment,
69
- ia as renderPlanPhasesIntoBody,
70
- oa as replyToReviewThread,
71
- la as resolvePlanForPrRef,
72
- Ea as resolvePrsByEntity,
73
- da as resolveReviewThread,
74
- ma as serializeFrontmatter,
75
- Pa as syncConsistencyCommentToPr,
76
- pa as syncPlanPhasesToPr,
77
- Sa as syncPrLabelsToPr,
78
- ca as syncPrReadinessToPr,
79
- ya as todayDateString
52
+ z as parseEnv,
53
+ K as parseFrontmatter,
54
+ W as parseIdeaFile,
55
+ H as parseIdeas,
56
+ J as parseOpenQuestions,
57
+ V as parsePlanFile,
58
+ Y as parsePlans,
59
+ q as parseProgress,
60
+ X as parseRawEntries,
61
+ Z as parseRoadmap,
62
+ $ as parseSuggestions,
63
+ aa as parseTaskLog,
64
+ sa as planFieldsSchema,
65
+ ea as planFrontmatterSchema,
66
+ ra as prependProgressItem,
67
+ na as readEntities,
68
+ ta as readEntitiesWithDerivedStatus,
69
+ ia as readNoteEntries,
70
+ oa as readWorkEntries,
71
+ da as removeRoadmapItem,
72
+ ma as removeSuggestionLine,
73
+ la as renderConsistencyComment,
74
+ pa as renderPlanPhasesIntoBody,
75
+ Ea as replyToReviewThread,
76
+ Pa as resolvePlanForPrRef,
77
+ ca as resolvePrsByEntity,
78
+ Sa as resolveReviewThread,
79
+ Ta as serializeFrontmatter,
80
+ ya as syncConsistencyCommentToPr,
81
+ ha as syncPlanPhasesToPr,
82
+ Ia as syncPrLabelsToPr,
83
+ fa as syncPrReadinessToPr,
84
+ ga as todayDateString
80
85
  };
81
86
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,3 @@
1
- /**
2
- * Re-exports from `schemas.ts` for backwards compatibility.
3
- *
4
- * This file is referenced by `papercamp/about.md` as the "single source of truth"
5
- * for the frontmatter format. Keeping it as a thin barrel means existing docs/links
6
- * don't break while the actual schemas live alongside their field-based counterparts
7
- * in one file.
8
- */
9
1
  export { dateString, planFrontmatterSchema, ideaFrontmatterSchema, } from './schemas';
10
2
  export type { PlanFrontmatter, IdeaFrontmatter } from './schemas';
11
3
  //# sourceMappingURL=frontmatter-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter-schemas.d.ts","sourceRoot":"","sources":["../../../src/core/parse/frontmatter-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"frontmatter-schemas.d.ts","sourceRoot":"","sources":["../../../src/core/parse/frontmatter-schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
@@ -1,50 +1,22 @@
1
1
  import { z } from 'zod';
2
- import { ConsistencyIssue, DecisionEntry, EntityEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry, SuggestionEntry } from '../../types/index';
2
+ import { ConsistencyIssue, DecisionEntry, EntityEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry, SuggestionEntry, TaskLogEntry } 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>;
6
6
  export declare function parseOpenQuestions(markdown: string): ParseResult<OpenQuestionEntry>;
7
- /**
8
- * Extracts and validates YAML frontmatter from a markdown string.
9
- * Returns the parsed data + body without warnings on success.
10
- * Returns partial data + warnings when frontmatter is absent, malformed,
11
- * or fails schema validation — never throws.
12
- */
13
7
  export declare function parseFrontmatter<T>(content: string, schema: z.ZodType<T>): {
14
8
  data: T | null;
15
9
  body: string;
16
10
  warnings: ParseWarning[];
17
11
  };
18
- /**
19
- * Parses a unified entity file: one file per entity — an "idea" for its whole
20
- * life, plan as an optional `### Phases` body section. Same body pipeline as
21
- * parsePlanFile (Phases/Log/Clarifications extraction); the frontmatter
22
- * differs: `type` instead of `kind`, no `idea:` backlink, and the note/status
23
- * asymmetry from the idea schema folded in.
24
- */
25
12
  export declare function parseEntityFile(content: string): ParseResult<EntityEntry>;
26
13
  export declare function parsePlanFile(content: string): ParseResult<PlanEntry>;
27
- /**
28
- * Parse a single per-idea file with YAML frontmatter.
29
- */
30
14
  export declare function parseIdeaFile(content: string): ParseResult<IdeaEntry>;
31
- /** ideas.md is split into sections by `---` separators. Each section has an optional
32
- * `## IDEA-N:` heading prefix followed by a short title, and a prose body. */
33
15
  export declare function parseIdeas(markdown: string): IdeaEntry[];
34
- /** Read-only cross-reference checks over already-parsed decisions/open-questions/plans —
35
- * dangling `resolved-by`/`superseded-by` titles, and open questions blocking an
36
- * already-active plan. */
37
16
  export declare function findConsistencyIssues(decisions: DecisionEntry[], openQuestions: OpenQuestionEntry[], plans: PlanEntry[]): ConsistencyIssue[];
38
- /** progress.md is an append-only date log, not a record-based file — no fields, no validation. */
39
17
  export declare function parseProgress(markdown: string): ProgressEntry[];
18
+ /** tasks.log is JSON Lines — one TaskLogEntry per line. Skip lines that fail to parse rather than fail the whole read (a truncated last line from a crash shouldn't hide the rest). */
19
+ export declare function parseTaskLog(raw: string): TaskLogEntry[];
40
20
  export declare const SUGGESTION_ENTRY_RE: RegExp;
41
- /**
42
- * suggestions.md is a flat, append-only line log — sibling to decisions.md/
43
- * open-questions.md/progress.md but with no `## Heading` per entry and no
44
- * `**Field:**` lines: each line already carries its own date, title, and a
45
- * one-line description (like plans' dated `### Log` grammar), and there is
46
- * no `id` or `status` since a suggestion never counts as a plan/idea until a
47
- * human promotes it.
48
- */
49
21
  export declare function parseSuggestions(markdown: string): SuggestionEntry[];
50
22
  //# sourceMappingURL=parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/core/parse/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,SAAS,EAET,iBAAiB,EACjB,WAAW,EACX,YAAY,EAEZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,eAAe,EAChB,MAAM,mBAAmB,CAAC;AA4H3B,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAwC5D;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAqCnE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,aAAa,CAAC,CAwB3E;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAyBnF;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GACnB;IAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAyC5D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,WAAW,CAAC,CA+CzE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAwCrE;AAED;;GAEG;AACH,wBAAgB,aA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AM,EACf,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GACnB;IAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAyC5D;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,WAAW,CAAC,CA2CzE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAkCrE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAuBrE;AAMD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,CAYxD;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,aAAa,EAAE,EAC1B,aAAa,EAAE,iBAAiB,EAAE,EAClC,KAAK,EAAE,SAAS,EAAE,GACjB,gBAAgB,EAAE,CA0CpB;AAKD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,EAAE,CAwB/D;AAED,uLAAuL;AACvL,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAUxD;AAED,eAAO,MAAM,mBAAmB,QAAkD,CAAC;AAGnF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,EAAE,CASpE"}
@@ -124,6 +124,8 @@ export declare const entityFrontmatterSchema: z.ZodObject<{
124
124
  audited: z.ZodOptional<z.ZodString>;
125
125
  'audited-hash': z.ZodOptional<z.ZodString>;
126
126
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
127
+ subject: z.ZodOptional<z.ZodString>;
128
+ order: z.ZodOptional<z.ZodNumber>;
127
129
  }, z.core.$strip>;
128
130
  export declare const paperCampConfigSchema: z.ZodObject<{
129
131
  version: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/core/parse/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;;;;kBAO7B,CAAC;AAEF,eAAO,MAAM,UAAU,aAAiE,CAAC;AAMzF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;iBAS3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;iBAI/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;iBAKnC,CAAC;AAQH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAgB9B,CAAC;AAOL,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+ChC,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
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/core/parse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directory, including its `archive/`
4
- * subdirectory (done/dropped entities live there). Excludes index.md.
5
- */
1
+ import { ArchivableIdea, EntityEntry, IdeaEntry, ParseResult, PlanEntry, PrInfo } from '../types/index';
6
2
  export declare function readEntities(ideasDir: string): Promise<ParseResult<EntityEntry> & {
7
3
  fileCount: number;
8
4
  }>;
9
- /**
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
- *
14
- * `status` is derived from phases + PR state rather than read straight off
15
- * `e.status` — see `deriveStatus`. `pr` is the entity's resolved PR (or
16
- * `undefined`); `prLookupResolved` is whether the PR listing succeeded (a
17
- * failed/absent lookup falls back to the stored override). Note this only
18
- * affects the *view*: `e.status` itself stays the raw stored override, so
19
- * round-tripping an `EntityEntry` back to disk never persists a derived value.
20
- */
21
5
  export declare function entityToPlan(e: EntityEntry, pr?: PrInfo, prLookupResolved?: boolean): PlanEntry;
22
- /** IdeaEntry view of a note entity, for the note-shaped API/UI surface. */
23
6
  export declare function entityToIdea(e: EntityEntry): IdeaEntry;
24
- /**
25
- * Every entity (including notes) with `status` replaced by its derived value —
26
- * for callers that need the resolved lifecycle without the PlanEntry reshape,
27
- * namely index generation and the branch-guard. One `gh` PR listing resolves
28
- * every entity's PR (matched by id), cached. This is a shallow copy: it never
29
- * touches disk, so it's safe to feed straight back into
30
- * `entityToPlan`/`deriveStatus` elsewhere without risking a stale-status write.
31
- */
32
7
  export declare function readEntitiesWithDerivedStatus(ideasDir: string): Promise<ParseResult<EntityEntry>>;
33
- /** All work entities (non-notes) in PlanEntry shape — the `/api/plans` view. */
34
8
  export declare function readWorkEntries(ideasDir: string): Promise<ParseResult<PlanEntry>>;
35
- /** All note entities in IdeaEntry shape — the `/api/ideas` view. */
9
+ export declare function findArchivableIdeas(ideasDir: string): Promise<ArchivableIdea[]>;
36
10
  export declare function readNoteEntries(ideasDir: string): Promise<ParseResult<IdeaEntry>>;
37
11
  //# 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,EACV,WAAW,EACX,SAAS,EAET,WAAW,EAEX,SAAS,EAET,MAAM,EACP,MAAM,gBAAgB,CAAC;AA2BxB;;;GAGG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAwB3D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,UAAQ,GAAG,SAAS,CAmB7F;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAStD;AASD;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAOnC;AAED,gFAAgF;AAChF,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAQvF;AAED,oEAAoE;AACpE,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAMvF"}
1
+ {"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../src/core/readers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,SAAS,EAET,WAAW,EAEX,SAAS,EAET,MAAM,EACP,MAAM,gBAAgB,CAAC;AAqBxB,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CA2B3D;AAKD,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,UAAQ,GAAG,SAAS,CAqB7F;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAYtD;AAWD,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAOnC;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAQvF;AAID,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAMrF;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAMvF"}
@@ -0,0 +1,4 @@
1
+ import { Roadmap } from '../types/index';
2
+ export declare function parseRoadmap(markdown: string): Roadmap;
3
+ export declare function removeRoadmapItem(markdown: string, horizonTitle: string, itemName: string, candidateName?: string): string;
4
+ //# sourceMappingURL=roadmap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roadmap.d.ts","sourceRoot":"","sources":["../../src/core/roadmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,gBAAgB,CAAC;AAuC3D,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CA2BtD;AAMD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACrB,MAAM,CAsCR"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=roadmap.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roadmap.test.d.ts","sourceRoot":"","sources":["../../src/core/roadmap.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ /** Classification input — status must be the DERIVED status (what the UI shows),
2
+ * not the stored frontmatter override, or merged-PR `done` entries get ordered. */
3
+ export interface RunOrderEntry {
4
+ id: string;
5
+ status?: string;
6
+ order?: number;
7
+ created: string;
8
+ }
9
+ export declare function isRunOrdered(entry: Pick<RunOrderEntry, 'status'>): boolean;
10
+ export interface RunOrderChange {
11
+ id: string;
12
+ order: number | undefined;
13
+ }
14
+ /**
15
+ * Enforces the run-order invariant: every planned/in-progress/review entry
16
+ * carries a contiguous 1..N order, everything else carries none. `moved`
17
+ * places that entry at the requested slot (clamped) before renumbering.
18
+ */
19
+ export declare function normalizeRunOrder(entries: RunOrderEntry[], moved?: {
20
+ id: string;
21
+ order: number;
22
+ }): RunOrderChange[];
23
+ //# sourceMappingURL=run-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-order.d.ts","sourceRoot":"","sources":["../../src/core/run-order.ts"],"names":[],"mappings":"AAEA;oFACoF;AACpF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,OAAO,CAE1E;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,EAAE,EACxB,KAAK,CAAC,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC,cAAc,EAAE,CA2BlB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=run-order.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-order.test.d.ts","sourceRoot":"","sources":["../../src/core/run-order.test.ts"],"names":[],"mappings":""}