@brucewaynedecoy/make-docs 2.0.8 → 2.0.9

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 (62) hide show
  1. package/dist/{backup-BLN6XCAS.js → backup-EBZZZL74.js} +4 -4
  2. package/dist/{chunk-MUQ2KL22.js → chunk-2Z7KRD4H.js} +2 -2
  3. package/dist/{chunk-XGTKLLI3.js → chunk-5XKMSGMS.js} +428 -29
  4. package/dist/{chunk-XGTKLLI3.js.map → chunk-5XKMSGMS.js.map} +1 -1
  5. package/dist/{chunk-G5BT3GGK.js → chunk-ABKEBYCF.js} +3 -3
  6. package/dist/{chunk-I3BO4LEF.js → chunk-DZ3SA3JA.js} +18 -5
  7. package/dist/{chunk-I3BO4LEF.js.map → chunk-DZ3SA3JA.js.map} +1 -1
  8. package/dist/{chunk-ILII44MP.js → chunk-HZ4QLB7L.js} +3 -3
  9. package/dist/{chunk-4OMXLXXY.js → chunk-KKXJTVMH.js} +3 -3
  10. package/dist/{chunk-L7UI56GS.js → chunk-MESLJI5A.js} +2 -2
  11. package/dist/{chunk-ANZ4AJG7.js → chunk-USVCSYS5.js} +2 -2
  12. package/dist/{chunk-EZ7FEZTG.js → chunk-VCC4D5I3.js} +2 -2
  13. package/dist/{chunk-GMIVJ7MS.js → chunk-X6TAWRTO.js} +147 -127
  14. package/dist/chunk-X6TAWRTO.js.map +1 -0
  15. package/dist/index.js +41 -24
  16. package/dist/index.js.map +1 -1
  17. package/dist/{registry-7TE6OMSU.js → registry-XNCQALXP.js} +7 -7
  18. package/dist/{self-DIK2M5CA.js → self-LDLIIKFW.js} +7 -7
  19. package/dist/{server-IEI2UXRK.js → server-G2UO2NOT.js} +10 -10
  20. package/dist/{server-IEI2UXRK.js.map → server-G2UO2NOT.js.map} +1 -1
  21. package/dist/{setup-system-SPZE6PYP.js → setup-system-2MZMQ3MX.js} +7 -7
  22. package/dist/{skills-command-ZPQG23OM.js → skills-command-VE4GRWI2.js} +53 -17
  23. package/dist/skills-command-VE4GRWI2.js.map +1 -0
  24. package/dist/{uninstall-BMDNLD6L.js → uninstall-EJF6HCYI.js} +7 -7
  25. package/dist/virtual_make-docs-first-party-skills-CLTQEIKC.js +11 -0
  26. package/dist/virtual_make-docs-first-party-skills-CLTQEIKC.js.map +1 -0
  27. package/package.json +1 -1
  28. package/template/.make-docs/system/contracts/design-contract.md +1 -1
  29. package/template/.make-docs/system/contracts/output-contract.md +3 -2
  30. package/template/.make-docs/system/prompts/designs-to-plan-change.prompt.md +2 -2
  31. package/template/.make-docs/system/prompts/prd-change-to-work.prompt.md +2 -2
  32. package/template/.make-docs/system/references/execution-workflow.md +5 -5
  33. package/template/.make-docs/system/references/lifecycle.md +3 -0
  34. package/template/.make-docs/system/references/planning-workflow.md +8 -8
  35. package/template/.make-docs/system/references/prd-change-management.md +2 -2
  36. package/template/.make-docs/system/references/wave-model.md +126 -14
  37. package/template/.make-docs/system/templates/plan-overview.md +17 -2
  38. package/template/.make-docs/system/templates/plan-prd-change.md +21 -6
  39. package/template/.make-docs/system/templates/plan-prd-decompose.md +17 -2
  40. package/template/.make-docs/system/templates/plan-prd.md +17 -2
  41. package/template/.make-docs/system/templates/work-index.md +15 -0
  42. package/template/.make-docs/system/templates/work-phase.md +3 -0
  43. package/template/docs/plans/AGENTS.md +1 -1
  44. package/template/docs/plans/CLAUDE.md +1 -1
  45. package/template/docs/work/AGENTS.md +1 -0
  46. package/template/docs/work/CLAUDE.md +1 -0
  47. package/dist/chunk-GMIVJ7MS.js.map +0 -1
  48. package/dist/skills-command-ZPQG23OM.js.map +0 -1
  49. package/dist/virtual_make-docs-first-party-skills-BGO3TGHN.js +0 -11
  50. package/dist/virtual_make-docs-first-party-skills-BGO3TGHN.js.map +0 -1
  51. /package/dist/{backup-BLN6XCAS.js.map → backup-EBZZZL74.js.map} +0 -0
  52. /package/dist/{chunk-MUQ2KL22.js.map → chunk-2Z7KRD4H.js.map} +0 -0
  53. /package/dist/{chunk-G5BT3GGK.js.map → chunk-ABKEBYCF.js.map} +0 -0
  54. /package/dist/{chunk-ILII44MP.js.map → chunk-HZ4QLB7L.js.map} +0 -0
  55. /package/dist/{chunk-4OMXLXXY.js.map → chunk-KKXJTVMH.js.map} +0 -0
  56. /package/dist/{chunk-L7UI56GS.js.map → chunk-MESLJI5A.js.map} +0 -0
  57. /package/dist/{chunk-ANZ4AJG7.js.map → chunk-USVCSYS5.js.map} +0 -0
  58. /package/dist/{chunk-EZ7FEZTG.js.map → chunk-VCC4D5I3.js.map} +0 -0
  59. /package/dist/{registry-7TE6OMSU.js.map → registry-XNCQALXP.js.map} +0 -0
  60. /package/dist/{self-DIK2M5CA.js.map → self-LDLIIKFW.js.map} +0 -0
  61. /package/dist/{setup-system-SPZE6PYP.js.map → setup-system-2MZMQ3MX.js.map} +0 -0
  62. /package/dist/{uninstall-BMDNLD6L.js.map → uninstall-EJF6HCYI.js.map} +0 -0
@@ -21,12 +21,12 @@ import {
21
21
  planProjectHarnessIntegrationWrite,
22
22
  registerSkillAdoptionRecovery,
23
23
  resolveEffectiveHarnessIntegration
24
- } from "./chunk-I3BO4LEF.js";
24
+ } from "./chunk-DZ3SA3JA.js";
25
25
  import {
26
26
  assertLifecyclePlanSnapshotCurrent,
27
27
  createLifecycleMutationReceipt,
28
28
  createLifecyclePlanSnapshot
29
- } from "./chunk-EZ7FEZTG.js";
29
+ } from "./chunk-VCC4D5I3.js";
30
30
  import {
31
31
  LIFECYCLE_STAGES,
32
32
  LIFECYCLE_STATUSES,
@@ -46,7 +46,7 @@ import {
46
46
  recordWorkEvidence,
47
47
  resolveProjectIdentity,
48
48
  transitionLifecycleRun
49
- } from "./chunk-ILII44MP.js";
49
+ } from "./chunk-HZ4QLB7L.js";
50
50
  import {
51
51
  HARNESS_CALLER_IDENTITY_ENV,
52
52
  NO_ACCESS,
@@ -65,7 +65,7 @@ import {
65
65
  sha256,
66
66
  validateHarnessMethodSelection,
67
67
  verifyMakeDocsExecutable
68
- } from "./chunk-MUQ2KL22.js";
68
+ } from "./chunk-2Z7KRD4H.js";
69
69
  import {
70
70
  CURRENT_STORE_SCHEMA_VERSION,
71
71
  HARNESS_TO_INSTRUCTION,
@@ -128,7 +128,7 @@ import {
128
128
  withStoreDatabase,
129
129
  writeManifest,
130
130
  writeTextFile
131
- } from "./chunk-GMIVJ7MS.js";
131
+ } from "./chunk-X6TAWRTO.js";
132
132
  import {
133
133
  __export
134
134
  } from "./chunk-D4HDZEJT.js";
@@ -24701,9 +24701,10 @@ function fixedStagePlan(product, checkpoint, actions) {
24701
24701
  }
24702
24702
  return {
24703
24703
  ...basePlan,
24704
- profile: resourceProjection ? resolveInstallProfile({
24704
+ // An unset resource choice must stay unset. `[]` means "no resources chosen", and a later plan would remove the local bodies.
24705
+ profile: resourceProjection && basePlan.profile.selections.resourceProjection !== void 0 ? resolveInstallProfile({
24705
24706
  ...basePlan.profile.selections,
24706
- resourceProjection: [...basePlan.profile.selections.resourceProjection ?? []]
24707
+ resourceProjection: [...basePlan.profile.selections.resourceProjection]
24707
24708
  }) : basePlan.profile,
24708
24709
  actions: [...actions],
24709
24710
  desiredSkillFiles: [...product.currentManifest?.skillFiles ?? []],
@@ -24753,6 +24754,23 @@ function assertOnDemandRoutingAvailable(projectRoot) {
24753
24754
  }
24754
24755
  }
24755
24756
  }
24757
+ function skillChangesLeftForSkillsSetup(installPlan) {
24758
+ return installPlan.actions.filter(
24759
+ (action) => action.type !== "noop" && mustPreserveOutsideP5(action) && (Boolean(action.skillExposure) || /^(?:\.agents\/skills\/|\.claude\/skills\/)/.test(action.relativePath))
24760
+ );
24761
+ }
24762
+ var SKILL_CHANGES_ROUTE = "make-docs setup skills";
24763
+ function skillChangesRoute(targetDir) {
24764
+ if (!targetDir) return SKILL_CHANGES_ROUTE;
24765
+ return `${SKILL_CHANGES_ROUTE} --target ${JSON.stringify(targetDir)}`;
24766
+ }
24767
+ function skillChangesNextAction(count3, targetDir) {
24768
+ return `Full setup leaves ${count3} Skill file ${count3 === 1 ? "change" : "changes"} to \`${skillChangesRoute(targetDir)}\`. Run it to apply ${count3 === 1 ? "that change" : "them"}.`;
24769
+ }
24770
+ function setupFollowUpAction(blockedPlatformAction, skillChangesLeft, targetDir) {
24771
+ const actions = [blockedPlatformAction, skillChangesLeft > 0 ? skillChangesNextAction(skillChangesLeft, targetDir) : void 0].filter((action) => Boolean(action));
24772
+ return actions.length ? actions.join(" ") : null;
24773
+ }
24756
24774
  function mustPreserveOutsideP5(action) {
24757
24775
  return Boolean(
24758
24776
  action.skillExposure || action.agenticOwnership || action.agenticRole || !isRetiredTemplateOwnedChildRouterPath(action.relativePath) && /(?:^|\/)(?:playbooks?|protocols?)(?:\/|$)/i.test(action.relativePath) || /^(?:\.agents\/|\.claude\/skills\/|\.make-docs\/agentics\/)/.test(action.relativePath)
@@ -27192,9 +27210,11 @@ import { createHash as createHash8 } from "crypto";
27192
27210
 
27193
27211
  // src/operations/work/backlog/catalog.ts
27194
27212
  import { createHash as createHash6 } from "crypto";
27195
- var BACKLOG_RULE_CATALOG_VERSION = 1;
27213
+ var BACKLOG_RULE_CATALOG_VERSION = 2;
27196
27214
  var AGENT_METHOD_ANCHOR = "make-docs://system/skill/backlog-review/SKILL.md#review-method";
27197
27215
  var SNAPSHOT_CONTRACT_ANCHOR = "docs/prd/51-backlog-review-and-reporting.md#backlog-snapshot-operation";
27216
+ var WAVE_MODEL_DECISION_ANCHOR = "make-docs://system/reference/wave-model.md#decision-procedure";
27217
+ var WAVE_MODEL_CHANGE_HISTORY_ANCHOR = "make-docs://system/reference/wave-model.md#change-history";
27198
27218
  var BACKLOG_RULES = Object.freeze([
27199
27219
  {
27200
27220
  id: "BACKLOG-RULE-001",
@@ -27483,6 +27503,42 @@ var BACKLOG_RULES = Object.freeze([
27483
27503
  focusedTests: ["completed tasks", "accepted closeout", "commit evidence", "closed history", "release and archive evidence"],
27484
27504
  parityMapping: "Both methods keep each lifecycle signal separate and do not promote one signal into another.",
27485
27505
  oneSidedReason: null
27506
+ },
27507
+ {
27508
+ id: "BACKLOG-RULE-017",
27509
+ title: "Change History entry shape",
27510
+ ruleClass: "fact",
27511
+ sourceClass: "repository",
27512
+ evidenceClass: "repository-authority",
27513
+ deterministicSupport: "full",
27514
+ agentInstructionLocation: WAVE_MODEL_CHANGE_HISTORY_ANCHOR,
27515
+ judgmentRequired: false,
27516
+ diagnosticCode: "BACKLOG-VAL-017",
27517
+ defaultSeverity: "warning",
27518
+ trigger: "A supported work index has a Change History entry with a malformed heading, a coordinate outside its record, a missing field, an invalid Kind or PRD decision value, or an out-of-order date.",
27519
+ humanMeaning: "A Change History entry does not follow the required shape, so a reader cannot rely on it to explain the scope change.",
27520
+ safeNextAction: "Correct the named entry so its heading reads `YYYY-MM-DD \u2014 <coordinate>` for this record and it lists all eight fields with allowed values, newest entry last.",
27521
+ focusedTests: ["valid entries", "malformed heading", "foreign coordinate", "missing field", "invalid kind or PRD decision", "out-of-order dates", "absent section"],
27522
+ parityMapping: "Both methods apply the Change History shape in wave-model.md (make-docs://system/reference/wave-model.md#change-history); the snapshot checks work indexes, and the agent also checks plan overviews.",
27523
+ oneSidedReason: "Plan overviews are outside the snapshot's work-record sources, so their Change History is checked by the agent only."
27524
+ },
27525
+ {
27526
+ id: "BACKLOG-RULE-018",
27527
+ title: "Coordinate selection",
27528
+ ruleClass: "decision",
27529
+ sourceClass: "agent-response",
27530
+ evidenceClass: "agent-judgment",
27531
+ deterministicSupport: "agent-only",
27532
+ agentInstructionLocation: WAVE_MODEL_DECISION_ANCHOR,
27533
+ judgmentRequired: true,
27534
+ diagnosticCode: "BACKLOG-AGENT-018",
27535
+ defaultSeverity: "info",
27536
+ trigger: "An agent chooses between an in-place edit, a revision Phase, a revision Wave, or a new Wave.",
27537
+ humanMeaning: "The coordinate tells the reader whether work is new, continues, or is a change order on completed work.",
27538
+ safeNextAction: "Apply the Wave Model decision procedure, use the snapshot's committed, closeout, archive, and coordinate facts as evidence, and ask the owner at each gate.",
27539
+ focusedTests: ["outcome test", "significant deviation test", "revision Wave test", "owner gates", "unknown facts stay unknown"],
27540
+ parityMapping: "The agent applies the decision procedure in wave-model.md (make-docs://system/reference/wave-model.md#decision-procedure); the snapshot reports committed, closeout-notes, archived, next phase, revision, and highest-wave facts across work and plan directories, and never selects a coordinate.",
27541
+ oneSidedReason: "The outcome, significant deviation, and revision Wave tests need judgment about plan scope and intent."
27486
27542
  }
27487
27543
  ]);
27488
27544
 
@@ -27558,6 +27614,10 @@ var SourcedCountSchema = external_exports.object({
27558
27614
  value: external_exports.number().int().nonnegative(),
27559
27615
  evidence: external_exports.array(EvidenceReferenceSchema)
27560
27616
  }).strict();
27617
+ var NullableSourcedPhaseNumberSchema = external_exports.object({
27618
+ value: external_exports.number().int().positive().nullable(),
27619
+ evidence: external_exports.array(EvidenceReferenceSchema)
27620
+ }).strict();
27561
27621
  var CreatedAtFactSchema = external_exports.object({
27562
27622
  value: dateOnly.nullable(),
27563
27623
  precision: external_exports.literal("date").nullable(),
@@ -27721,7 +27781,9 @@ var WorkPhaseFactSchema = external_exports.object({
27721
27781
  tasks: external_exports.array(WorkTaskFactSchema),
27722
27782
  dependencies: external_exports.array(WorkRelationshipFactSchema),
27723
27783
  blockers: external_exports.array(WorkRelationshipFactSchema),
27724
- sourceLinks: external_exports.array(WorkSourceLinkFactSchema)
27784
+ sourceLinks: external_exports.array(WorkSourceLinkFactSchema),
27785
+ closeoutNotesPresent: NullableSourcedBooleanSchema,
27786
+ committed: NullableSourcedBooleanSchema
27725
27787
  }).strict().superRefine((value, context) => {
27726
27788
  if (value.coordinate.value !== null && !phaseCoordinate.safeParse(value.coordinate.value).success) {
27727
27789
  context.addIssue({
@@ -27805,6 +27867,7 @@ var BacklogWorkRecordV1Schema = external_exports.object({
27805
27867
  createdAt: CreatedAtFactSchema,
27806
27868
  lastUpdatedAt: LastUpdatedAtFactSchema,
27807
27869
  phaseCount: SourcedCountSchema,
27870
+ nextPhase: NullableSourcedPhaseNumberSchema,
27808
27871
  taskCounts: TaskCountsSchema,
27809
27872
  phases: external_exports.array(WorkPhaseFactSchema),
27810
27873
  dependencies: external_exports.array(WorkRelationshipFactSchema),
@@ -27886,7 +27949,7 @@ var BacklogWorkRecordV1Schema = external_exports.object({
27886
27949
  value.sourceLinks,
27887
27950
  value.gitEvidence
27888
27951
  ];
27889
- if (value.title.value !== null || value.title.evidence.length > 0 || value.recordedStatus.value !== null || value.recordedStatus.evidence.length > 0 || value.closeout !== null || value.phaseCount.value !== 0 || value.taskCounts.total.value !== 0 || interpretedCollections.some((items) => items.length > 0)) {
27952
+ if (value.title.value !== null || value.title.evidence.length > 0 || value.recordedStatus.value !== null || value.recordedStatus.evidence.length > 0 || value.closeout !== null || value.nextPhase.value !== null || value.phaseCount.value !== 0 || value.taskCounts.total.value !== 0 || interpretedCollections.some((items) => items.length > 0)) {
27890
27953
  context.addIssue({
27891
27954
  code: external_exports.ZodIssueCode.custom,
27892
27955
  message: "An unsupported record can contain inventory facts only."
@@ -27894,8 +27957,65 @@ var BacklogWorkRecordV1Schema = external_exports.object({
27894
27957
  }
27895
27958
  }
27896
27959
  });
27960
+ var BacklogWaveCoordinateFactSchema = external_exports.object({
27961
+ wave: external_exports.number().int().positive(),
27962
+ revisions: external_exports.array(external_exports.number().int().nonnegative()).min(1),
27963
+ nextRevision: external_exports.number().int().positive(),
27964
+ archived: external_exports.boolean(),
27965
+ recordPaths: external_exports.array(repositoryRelativePath),
27966
+ planPaths: external_exports.array(repositoryRelativePath)
27967
+ }).strict().superRefine((value, context) => {
27968
+ if (value.recordPaths.length + value.planPaths.length === 0) {
27969
+ context.addIssue({
27970
+ code: external_exports.ZodIssueCode.custom,
27971
+ path: ["recordPaths"],
27972
+ message: "A wave coordinate fact needs at least one work or plan directory."
27973
+ });
27974
+ }
27975
+ const sorted = [...new Set(value.revisions)].sort((left, right) => left - right);
27976
+ if (sorted.length !== value.revisions.length || sorted.some((revision, index) => revision !== value.revisions[index])) {
27977
+ context.addIssue({
27978
+ code: external_exports.ZodIssueCode.custom,
27979
+ path: ["revisions"],
27980
+ message: "Wave revisions must be unique and in ascending order."
27981
+ });
27982
+ }
27983
+ if (value.nextRevision !== Math.max(...value.revisions) + 1) {
27984
+ context.addIssue({
27985
+ code: external_exports.ZodIssueCode.custom,
27986
+ path: ["nextRevision"],
27987
+ message: "The next revision must be one more than the highest existing revision."
27988
+ });
27989
+ }
27990
+ });
27991
+ var BacklogCoordinateFactsSchema = external_exports.object({
27992
+ highestWave: external_exports.number().int().positive().nullable(),
27993
+ waves: external_exports.array(BacklogWaveCoordinateFactSchema)
27994
+ }).strict().superRefine((value, context) => {
27995
+ const waves = value.waves.map((entry) => entry.wave);
27996
+ const sorted = [...new Set(waves)].sort((left, right) => left - right);
27997
+ if (sorted.length !== waves.length || sorted.some((wave, index) => wave !== waves[index])) {
27998
+ context.addIssue({
27999
+ code: external_exports.ZodIssueCode.custom,
28000
+ path: ["waves"],
28001
+ message: "Wave coordinate facts must be unique and in ascending wave order."
28002
+ });
28003
+ }
28004
+ const expected = waves.length === 0 ? null : Math.max(...waves);
28005
+ if (value.highestWave !== expected) {
28006
+ context.addIssue({
28007
+ code: external_exports.ZodIssueCode.custom,
28008
+ path: ["highestWave"],
28009
+ message: "The highest wave must equal the largest discovered wave, or null when none exists."
28010
+ });
28011
+ }
28012
+ });
28013
+ var BACKLOG_SNAPSHOT_SCHEMA_VERSION = 2;
28014
+ var BACKLOG_SNAPSHOT_V1_UPGRADE_MESSAGE = "This backlog snapshot uses schema version 1 from an older make-docs CLI. Upgrade the make-docs CLI to 2.0.9 or later, then create the snapshot again.";
27897
28015
  var BacklogSnapshotV1Schema = external_exports.object({
27898
- schemaVersion: external_exports.literal(1),
28016
+ schemaVersion: external_exports.literal(BACKLOG_SNAPSHOT_SCHEMA_VERSION, {
28017
+ error: (issue2) => issue2.input === 1 ? BACKLOG_SNAPSHOT_V1_UPGRADE_MESSAGE : `Unsupported backlog snapshot schemaVersion ${String(issue2.input)}. This reader accepts schema version ${BACKLOG_SNAPSHOT_SCHEMA_VERSION}.`
28018
+ }),
27899
28019
  generatedAt: utcTimestamp,
27900
28020
  targetRoot: text2,
27901
28021
  project: BacklogProjectSchema,
@@ -27907,6 +28027,7 @@ var BacklogSnapshotV1Schema = external_exports.object({
27907
28027
  sourceLinks: BacklogCapabilitySchema
27908
28028
  }).strict(),
27909
28029
  recordCounts: BacklogRecordCountsSchema,
28030
+ coordinates: BacklogCoordinateFactsSchema,
27910
28031
  records: external_exports.array(BacklogWorkRecordV1Schema),
27911
28032
  diagnostics: external_exports.array(BacklogDiagnosticSchema)
27912
28033
  }).strict().superRefine((value, context) => {
@@ -28699,6 +28820,19 @@ var PHASE_FILE = /^(0[1-9]|[1-9]\d)-.+\.md$/;
28699
28820
  var TASK = /^- \[([ xX])\]\s+(?:(t[1-9]\d*):\s*)?(.+?)\s*$/;
28700
28821
  var MARKDOWN_LINK2 = /\[[^\]]+\]\(([^)]+)\)/g;
28701
28822
  var COMPLETE_STATUS = /^(?:complete|completed|closed)$/i;
28823
+ var CHANGE_HISTORY_HEADING = /^(\d{4}-\d{2}-\d{2}) — (W[1-9]\d* R(?:0|[1-9]\d*))(?: P[1-9]\d*)?$/;
28824
+ var CHANGE_HISTORY_FIELDS = [
28825
+ "Kind",
28826
+ "Affected scope",
28827
+ "Previous scope",
28828
+ "Replacement scope",
28829
+ "Rationale",
28830
+ "PRD decision",
28831
+ "Owner approval",
28832
+ "Source"
28833
+ ];
28834
+ var CHANGE_HISTORY_KINDS = /* @__PURE__ */ new Set(["edit", "revision-phase", "pivot", "rebuild", "revision-wave"]);
28835
+ var CHANGE_HISTORY_PRD_DECISIONS = /* @__PURE__ */ new Set(["update-existing", "create", "link-only", "none"]);
28702
28836
  var BacklogSnapshotError = class extends OperationError {
28703
28837
  constructor(message2, sourceReason = "source-unavailable") {
28704
28838
  super(message2);
@@ -28836,6 +28970,29 @@ function discoverRecords(targetRoot2) {
28836
28970
  }
28837
28971
  return records.sort((left, right) => left.recordPath.localeCompare(right.recordPath));
28838
28972
  }
28973
+ function discoverPlanDirectories(targetRoot2) {
28974
+ const roots = [
28975
+ { relative: "docs/plans", scope: "live" },
28976
+ { relative: ".make-docs/archive/plans", scope: "archived" }
28977
+ ];
28978
+ const plans = [];
28979
+ for (const root of roots) {
28980
+ const absoluteRoot = path17.join(targetRoot2, ...root.relative.split("/"));
28981
+ if (!existsSync9(absoluteRoot)) continue;
28982
+ assertNoSymlink(targetRoot2, absoluteRoot, `Plan directory ${root.relative}`);
28983
+ if (!lstatSync8(absoluteRoot).isDirectory()) continue;
28984
+ for (const entry of readdirSync8(absoluteRoot, { withFileTypes: true })) {
28985
+ const match = RECORD_DIRECTORY.exec(entry.name);
28986
+ if (!match || !entry.isDirectory()) continue;
28987
+ plans.push({
28988
+ planPath: relativePath2(targetRoot2, path17.join(absoluteRoot, entry.name)),
28989
+ scope: root.scope,
28990
+ directoryCoordinate: `W${Number(match[2])} R${Number(match[3])}`
28991
+ });
28992
+ }
28993
+ }
28994
+ return plans.sort((left, right) => left.planPath.localeCompare(right.planPath));
28995
+ }
28839
28996
  function parseFrontmatter(markdown) {
28840
28997
  if (!markdown.startsWith("---\n")) {
28841
28998
  return { body: markdown, data: null, present: false, malformed: false, fieldLines: /* @__PURE__ */ new Map() };
@@ -28998,16 +29155,18 @@ function gitContext(targetRoot2, run) {
28998
29155
  const combined = `${top.stderr}
28999
29156
  ${top.stdout}`;
29000
29157
  const state = top.errorCode === "ENOENT" ? "unavailable" : /permission denied|operation not permitted|access denied/i.test(combined) ? "denied" : "not-a-repository";
29001
- return { state, revision: null, run };
29158
+ return { state, revision: null, prefix: "", run };
29002
29159
  }
29003
29160
  const revision = run(targetRoot2, ["rev-parse", "--verify", "HEAD"]);
29161
+ const prefixResult = run(targetRoot2, ["rev-parse", "--show-prefix"]);
29004
29162
  return {
29005
29163
  state: "available",
29164
+ prefix: prefixResult.status === 0 ? toPosix(prefixResult.stdout.trim()) : "",
29006
29165
  revision: revision.status === 0 && /^[a-f0-9]{7,64}$/i.test(revision.stdout.trim()) ? revision.stdout.trim().toLowerCase() : null,
29007
29166
  run
29008
29167
  };
29009
29168
  }
29010
- function changedRecordFiles(output2, discoveredFiles) {
29169
+ function changedRecordFiles(output2, discoveredFiles, prefix = "") {
29011
29170
  const changed = [];
29012
29171
  const untracked = /* @__PURE__ */ new Set();
29013
29172
  const entries = output2.split("\0").filter(Boolean);
@@ -29015,7 +29174,8 @@ function changedRecordFiles(output2, discoveredFiles) {
29015
29174
  const entry = entries[index];
29016
29175
  if (entry.length < 4) continue;
29017
29176
  const status = entry.slice(0, 2);
29018
- const candidate = toPosix(entry.slice(3));
29177
+ const repositoryPath = toPosix(entry.slice(3));
29178
+ const candidate = prefix && repositoryPath.startsWith(prefix) ? repositoryPath.slice(prefix.length) : repositoryPath;
29019
29179
  if ((status.includes("R") || status.includes("C")) && entries[index + 1]) {
29020
29180
  index += 1;
29021
29181
  }
@@ -29029,7 +29189,8 @@ function recordDates(targetRoot2, inventory, git) {
29029
29189
  const diagnostics = [];
29030
29190
  const gitEvidence = [];
29031
29191
  const changed = git.state === "available" ? git.run(targetRoot2, ["status", "--porcelain=v1", "-z", "--untracked-files=all", "--", ...inventory.discoveredFiles]) : null;
29032
- const statusFacts = changed?.status === 0 ? changedRecordFiles(changed.stdout, inventory.discoveredFiles) : { changed: [], untracked: /* @__PURE__ */ new Set() };
29192
+ const knownStatus = changed?.status === 0 ? changedRecordFiles(changed.stdout, inventory.discoveredFiles, git.prefix) : null;
29193
+ const statusFacts = knownStatus ?? { changed: [], untracked: /* @__PURE__ */ new Set() };
29033
29194
  const changedPaths = statusFacts.changed;
29034
29195
  if (changedPaths.length > 0) {
29035
29196
  const newest = newestFileTime(targetRoot2, changedPaths);
@@ -29054,7 +29215,8 @@ function recordDates(targetRoot2, inventory, git) {
29054
29215
  diagnosticCodes: []
29055
29216
  },
29056
29217
  gitEvidence,
29057
- diagnostics
29218
+ diagnostics,
29219
+ statusFacts: knownStatus
29058
29220
  };
29059
29221
  }
29060
29222
  }
@@ -29089,7 +29251,8 @@ function recordDates(targetRoot2, inventory, git) {
29089
29251
  diagnosticCodes: []
29090
29252
  },
29091
29253
  gitEvidence,
29092
- diagnostics
29254
+ diagnostics,
29255
+ statusFacts: knownStatus
29093
29256
  };
29094
29257
  }
29095
29258
  }
@@ -29114,7 +29277,8 @@ function recordDates(targetRoot2, inventory, git) {
29114
29277
  diagnosticCodes: ["BACKLOG-VAL-010"]
29115
29278
  },
29116
29279
  gitEvidence,
29117
- diagnostics
29280
+ diagnostics,
29281
+ statusFacts: knownStatus
29118
29282
  };
29119
29283
  }
29120
29284
  diagnostics.push(diagnostic2("BACKLOG-VAL-011", inventory.recordPath, inventory.recordPath));
@@ -29127,9 +29291,219 @@ function recordDates(targetRoot2, inventory, git) {
29127
29291
  diagnosticCodes: ["BACKLOG-VAL-010", "BACKLOG-VAL-011"]
29128
29292
  },
29129
29293
  gitEvidence,
29130
- diagnostics
29294
+ diagnostics,
29295
+ statusFacts: knownStatus
29131
29296
  };
29132
29297
  }
29298
+ function fileCommitFacts(targetRoot2, inventory, git, statusFacts) {
29299
+ if (git.state !== "available" || statusFacts === null || inventory.discoveredFiles.length === 0) return null;
29300
+ const listed = git.run(targetRoot2, ["ls-files", "-z", "--", ...inventory.discoveredFiles]);
29301
+ if (listed.status !== 0) return null;
29302
+ return {
29303
+ tracked: new Set(listed.stdout.split("\0").filter(Boolean).map(toPosix)),
29304
+ changed: new Set(statusFacts.changed)
29305
+ };
29306
+ }
29307
+ function committedFact(facts, files) {
29308
+ if (facts === null || files.length === 0) return nullableBoolean(null);
29309
+ return nullableBoolean(
29310
+ files.every((file2) => facts.tracked.has(file2) && !facts.changed.has(file2)),
29311
+ files.map((file2) => evidence2(file2, "git status"))
29312
+ );
29313
+ }
29314
+ function stripHtmlComments(text4, replace = () => "") {
29315
+ let current = text4;
29316
+ while (current.includes("<!--")) {
29317
+ let output2 = "";
29318
+ let cursor = 0;
29319
+ for (; ; ) {
29320
+ const start = current.indexOf("<!--", cursor);
29321
+ if (start === -1) {
29322
+ output2 += current.slice(cursor);
29323
+ break;
29324
+ }
29325
+ output2 += current.slice(cursor, start);
29326
+ const end = current.indexOf("-->", start + 4);
29327
+ const stop = end === -1 ? current.length : end + 3;
29328
+ output2 += replace(current.slice(start, stop));
29329
+ cursor = stop;
29330
+ }
29331
+ current = output2;
29332
+ }
29333
+ return current;
29334
+ }
29335
+ function liveSection(body, name) {
29336
+ const code = [];
29337
+ const keep = (text4) => `\0${code.push(text4) - 1}\0`;
29338
+ const blanked = stripHtmlComments(maskCode(body, keep), (comment) => comment.replace(/[^\n]/g, ""));
29339
+ const found = section(blanked, name);
29340
+ if (!found) return null;
29341
+ const restore = (text4) => text4.replace(/\u0000(\d+)\u0000/g, (_match, index) => code[Number(index)] ?? "");
29342
+ return { text: restore(found.text), startLine: found.startLine };
29343
+ }
29344
+ function maskCode(body, keep) {
29345
+ let fence = null;
29346
+ let inComment = false;
29347
+ return body.split("\n").map((line) => {
29348
+ if (fence !== null) {
29349
+ const closer = /^ {0,3}(`{3,}|~{3,})[ \t]*\r?$/.exec(line);
29350
+ if (closer && closer[1][0] === fence[0] && closer[1].length >= fence.length) fence = null;
29351
+ return keep(line);
29352
+ }
29353
+ if (!inComment) {
29354
+ const opener = /^ {0,3}(`{3,}|~{3,})(.*)$/.exec(line);
29355
+ if (opener && !(opener[1][0] === "`" && opener[2].includes("`"))) {
29356
+ fence = opener[1];
29357
+ return keep(line);
29358
+ }
29359
+ }
29360
+ let output2 = "";
29361
+ let cursor = 0;
29362
+ while (cursor < line.length) {
29363
+ if (inComment) {
29364
+ const close = line.indexOf("-->", cursor);
29365
+ if (close === -1) {
29366
+ output2 += line.slice(cursor);
29367
+ cursor = line.length;
29368
+ break;
29369
+ }
29370
+ output2 += line.slice(cursor, close + 3);
29371
+ cursor = close + 3;
29372
+ inComment = false;
29373
+ continue;
29374
+ }
29375
+ const tick = line.indexOf("`", cursor);
29376
+ const open2 = line.indexOf("<!--", cursor);
29377
+ if (open2 !== -1 && (tick === -1 || open2 < tick)) {
29378
+ output2 += line.slice(cursor, open2 + 4);
29379
+ cursor = open2 + 4;
29380
+ inComment = true;
29381
+ continue;
29382
+ }
29383
+ if (tick === -1) break;
29384
+ const span = inlineCodeEnd(line, tick);
29385
+ output2 += line.slice(cursor, tick) + (span === -1 ? line.slice(tick, nextNonTick(line, tick)) : keep(line.slice(tick, span)));
29386
+ cursor = span === -1 ? nextNonTick(line, tick) : span;
29387
+ }
29388
+ return output2 + line.slice(cursor);
29389
+ }).join("\n");
29390
+ }
29391
+ function nextNonTick(line, from) {
29392
+ let cursor = from;
29393
+ while (line[cursor] === "`") cursor += 1;
29394
+ return cursor;
29395
+ }
29396
+ function inlineCodeEnd(line, open2) {
29397
+ const width = nextNonTick(line, open2) - open2;
29398
+ for (let search = open2 + width; search < line.length; ) {
29399
+ const candidate = line.indexOf("`", search);
29400
+ if (candidate === -1) return -1;
29401
+ const after = nextNonTick(line, candidate);
29402
+ if (after - candidate === width) return after;
29403
+ search = after;
29404
+ }
29405
+ return -1;
29406
+ }
29407
+ function bodyLineOffset(markdown, body) {
29408
+ return markdown.slice(0, markdown.length - body.length).split("\n").length - 1;
29409
+ }
29410
+ function closeoutNotesFact(body, phasePath, lineOffset) {
29411
+ const found = liveSection(body, "Closeout Notes");
29412
+ if (!found) return nullableBoolean(false, [evidence2(phasePath, "Closeout Notes")]);
29413
+ const content = found.text.trim();
29414
+ return nullableBoolean(
29415
+ content.length > 0 && !content.includes("{{"),
29416
+ [evidence2(phasePath, "Closeout Notes", lineOffset + found.startLine - 1)]
29417
+ );
29418
+ }
29419
+ function nextPhaseFact(inventory, linkedPhasePaths = []) {
29420
+ let highest = null;
29421
+ for (const file2 of [...inventory.discoveredFiles, ...linkedPhasePaths]) {
29422
+ const name = path17.posix.basename(file2);
29423
+ if (!PHASE_FILE.test(name)) continue;
29424
+ const number4 = Number(/^([0-9]+)/.exec(name)[1]);
29425
+ if (!highest || number4 > highest.number) highest = { number: number4, file: file2 };
29426
+ }
29427
+ return highest ? { value: highest.number + 1, evidence: [evidence2(highest.file, "phase file number")] } : { value: 1, evidence: [evidence2(`${inventory.recordPath}/`, "no numbered phase file")] };
29428
+ }
29429
+ function changeHistoryDiagnostics(body, lineOffset, indexPath, recordPath2, expectedWave) {
29430
+ const found = liveSection(body, "Change History");
29431
+ if (!found) return [];
29432
+ const lines = found.text.split("\n");
29433
+ const entries = [];
29434
+ for (const [offset, line] of lines.entries()) {
29435
+ const fileLine = lineOffset + found.startLine + offset;
29436
+ const heading = /^(#{3,6})\s+(.+?)\s*$/.exec(line);
29437
+ if (heading) {
29438
+ entries.push({ heading: heading[2], level: heading[1].length, line: fileLine, fields: /* @__PURE__ */ new Map() });
29439
+ continue;
29440
+ }
29441
+ const field = /^-\s+([^:]+):\s*(.*?)\s*$/.exec(line);
29442
+ if (field && entries.length > 0) entries.at(-1).fields.set(field[1].trim(), field[2]);
29443
+ }
29444
+ const results = [];
29445
+ const report = (line, detail) => results.push(diagnostic2("BACKLOG-VAL-017", recordPath2, indexPath, line, detail));
29446
+ let previousDate = null;
29447
+ for (const entry of entries) {
29448
+ const label = `Entry "${entry.heading}"`;
29449
+ if (entry.level !== 3) {
29450
+ report(entry.line, `${label} uses a level-${entry.level} heading; write it as \`### ${entry.heading}\`.`);
29451
+ }
29452
+ const heading = CHANGE_HISTORY_HEADING.exec(entry.heading);
29453
+ const date5 = heading?.[1] ?? null;
29454
+ if (!heading || Number.isNaN(Date.parse(`${date5}T00:00:00Z`))) {
29455
+ report(entry.line, `${label} does not use the heading form \`YYYY-MM-DD \u2014 <coordinate>\`.`);
29456
+ } else if (heading[2] !== expectedWave) {
29457
+ report(entry.line, `${label} names ${heading[2]}, but this record is ${expectedWave}.`);
29458
+ }
29459
+ const missing = CHANGE_HISTORY_FIELDS.filter((name) => {
29460
+ const value = entry.fields.get(name);
29461
+ return value === void 0 || value.trim() === "" || value.includes("{{");
29462
+ });
29463
+ if (missing.length > 0) report(entry.line, `${label} is missing ${missing.join(", ")}.`);
29464
+ const kind = entry.fields.get("Kind")?.replace(/`/g, "").trim();
29465
+ if (kind && !kind.includes("{{") && !CHANGE_HISTORY_KINDS.has(kind)) {
29466
+ report(entry.line, `${label} uses Kind "${kind}", which is not edit, revision-phase, pivot, rebuild, or revision-wave.`);
29467
+ }
29468
+ const decision = entry.fields.get("PRD decision")?.replace(/`/g, "").trim().split(/\s/, 1)[0];
29469
+ if (decision && !decision.includes("{{") && !CHANGE_HISTORY_PRD_DECISIONS.has(decision)) {
29470
+ report(entry.line, `${label} uses PRD decision "${decision}", which is not update-existing, create, link-only, or none.`);
29471
+ }
29472
+ if (date5 && heading) {
29473
+ if (previousDate && date5 < previousDate) report(entry.line, `${label} is dated before the entry above it; keep the newest entry last.`);
29474
+ previousDate = date5;
29475
+ }
29476
+ }
29477
+ return results;
29478
+ }
29479
+ function coordinateFacts(inventory, plans) {
29480
+ const waves = /* @__PURE__ */ new Map();
29481
+ const add = (coordinate2, scope, item) => {
29482
+ const match = /^W(\d+) R(\d+)$/.exec(coordinate2);
29483
+ if (!match) return;
29484
+ const wave = Number(match[1]);
29485
+ const entry = waves.get(wave) ?? { revisions: /* @__PURE__ */ new Set(), recordPaths: [], planPaths: [], scopes: [] };
29486
+ entry.revisions.add(Number(match[2]));
29487
+ if (item.recordPath) entry.recordPaths.push(item.recordPath);
29488
+ if (item.planPath) entry.planPaths.push(item.planPath);
29489
+ entry.scopes.push(scope);
29490
+ waves.set(wave, entry);
29491
+ };
29492
+ for (const record2 of inventory) add(record2.directoryCoordinate, record2.scope, { recordPath: record2.recordPath });
29493
+ for (const plan of plans) add(plan.directoryCoordinate, plan.scope, { planPath: plan.planPath });
29494
+ const facts = [...waves.entries()].sort(([left], [right]) => left - right).map(([wave, entry]) => {
29495
+ const revisions = [...entry.revisions].sort((left, right) => left - right);
29496
+ return {
29497
+ wave,
29498
+ revisions,
29499
+ nextRevision: revisions.at(-1) + 1,
29500
+ archived: entry.scopes.every((scope) => scope === "archived"),
29501
+ recordPaths: entry.recordPaths.sort(),
29502
+ planPaths: entry.planPaths.sort()
29503
+ };
29504
+ });
29505
+ return { highestWave: facts.at(-1)?.wave ?? null, waves: facts };
29506
+ }
29133
29507
  function emptyCloseout(recordPath2, scope, tasks) {
29134
29508
  const taskEvidence = tasks.flatMap((task) => task.completed.evidence);
29135
29509
  return {
@@ -29159,6 +29533,7 @@ function unsupportedRecord(inventory, dates) {
29159
29533
  },
29160
29534
  lastUpdatedAt: dates.value,
29161
29535
  phaseCount: count(0),
29536
+ nextPhase: { value: null, evidence: [] },
29162
29537
  taskCounts: { total: count(0), complete: count(0), incomplete: count(0), unknown: count(0) },
29163
29538
  phases: [],
29164
29539
  dependencies: [],
@@ -29171,6 +29546,7 @@ function unsupportedRecord(inventory, dates) {
29171
29546
  function readRecord(targetRoot2, inventory, git) {
29172
29547
  const dates = recordDates(targetRoot2, inventory, git);
29173
29548
  const diagnostics = [...dates.diagnostics];
29549
+ const commitFacts = fileCommitFacts(targetRoot2, inventory, git, dates.statusFacts);
29174
29550
  const indexPath = `${inventory.recordPath}/00-index.md`;
29175
29551
  const indexAbsolute = path17.join(targetRoot2, ...indexPath.split("/"));
29176
29552
  if (!inventory.discoveredFiles.includes(indexPath)) {
@@ -29251,7 +29627,9 @@ function readRecord(targetRoot2, inventory, git) {
29251
29627
  tasks: tasks2,
29252
29628
  dependencies,
29253
29629
  blockers,
29254
- sourceLinks: source.value ? [source.value] : []
29630
+ sourceLinks: source.value ? [source.value] : [],
29631
+ closeoutNotesPresent: closeoutNotesFact(parsedPhase.body, resolved, bodyLineOffset(phaseText, parsedPhase.body)),
29632
+ committed: committedFact(commitFacts, [resolved])
29255
29633
  });
29256
29634
  interpretedPhasePaths.push(resolved);
29257
29635
  }
@@ -29280,6 +29658,17 @@ function readRecord(targetRoot2, inventory, git) {
29280
29658
  if (recordedStatus !== null && (COMPLETE_STATUS.test(recordedStatus) && taskCounts.incomplete.value > 0 || !COMPLETE_STATUS.test(recordedStatus) && taskCounts.total.value > 0 && taskCounts.complete.value === taskCounts.total.value)) {
29281
29659
  diagnostics.push(diagnostic2("BACKLOG-VAL-008", inventory.recordPath, indexPath, parsedIndex.fieldLines.get("status") ?? null));
29282
29660
  }
29661
+ if (supported) {
29662
+ diagnostics.push(
29663
+ ...changeHistoryDiagnostics(
29664
+ parsedIndex.body,
29665
+ bodyLineOffset(indexText, parsedIndex.body),
29666
+ indexPath,
29667
+ inventory.recordPath,
29668
+ indexCoordinate
29669
+ )
29670
+ );
29671
+ }
29283
29672
  const record2 = {
29284
29673
  recordPath: inventory.recordPath,
29285
29674
  scope: inventory.scope,
@@ -29301,11 +29690,15 @@ function readRecord(targetRoot2, inventory, git) {
29301
29690
  },
29302
29691
  lastUpdatedAt: dates.value,
29303
29692
  phaseCount: count(phases.length, [evidence2(indexPath, "Phase Map")]),
29693
+ nextPhase: nextPhaseFact(inventory, linkedPhasePaths),
29304
29694
  taskCounts,
29305
29695
  phases,
29306
29696
  dependencies: phases.flatMap((phase) => phase.dependencies),
29307
29697
  blockers: phases.flatMap((phase) => phase.blockers),
29308
- closeout: emptyCloseout(inventory.recordPath, inventory.scope, tasks),
29698
+ closeout: {
29699
+ ...emptyCloseout(inventory.recordPath, inventory.scope, tasks),
29700
+ committed: committedFact(commitFacts, [indexPath, ...linkedPhasePaths])
29701
+ },
29309
29702
  sourceLinks: [indexSource.value, ...phases.flatMap((phase) => phase.sourceLinks)].filter((value) => value !== null),
29310
29703
  gitEvidence: dates.gitEvidence
29311
29704
  };
@@ -29354,12 +29747,14 @@ function addDuplicateCoordinateDiagnostics(records, diagnostics) {
29354
29747
  function buildBacklogSnapshot(targetRootInput, seams = {}) {
29355
29748
  const targetRoot2 = resolveSafeTargetRoot(targetRootInput);
29356
29749
  let inventory;
29750
+ let plans;
29357
29751
  try {
29358
29752
  inventory = discoverRecords(targetRoot2);
29753
+ plans = discoverPlanDirectories(targetRoot2);
29359
29754
  } catch (error62) {
29360
29755
  if (error62 instanceof BacklogSnapshotError) throw error62;
29361
29756
  throw new BacklogSnapshotError(
29362
- "The backlog record roots cannot be read safely. Check access to docs/work and .make-docs/archive/work, then retry.",
29757
+ "The backlog record roots cannot be read safely. Check access to docs/work, docs/plans, and their .make-docs/archive directories, then retry.",
29363
29758
  sourceFailureReason(error62)
29364
29759
  );
29365
29760
  }
@@ -29373,7 +29768,7 @@ function buildBacklogSnapshot(targetRootInput, seams = {}) {
29373
29768
  const gitCapabilityState = git.state === "available" && gitFallbackUsed ? "partial" : git.state;
29374
29769
  const gitDiagnosticCodes = gitCapabilityState === "available" ? [] : ["BACKLOG-VAL-010"];
29375
29770
  const snapshot2 = {
29376
- schemaVersion: 1,
29771
+ schemaVersion: BACKLOG_SNAPSHOT_SCHEMA_VERSION,
29377
29772
  generatedAt: (seams.now ?? (() => /* @__PURE__ */ new Date()))().toISOString(),
29378
29773
  targetRoot: targetRoot2,
29379
29774
  project: projectIdentity(targetRoot2),
@@ -29389,6 +29784,7 @@ function buildBacklogSnapshot(targetRootInput, seams = {}) {
29389
29784
  live: records.filter((record2) => record2.scope === "live").length,
29390
29785
  archived: records.filter((record2) => record2.scope === "archived").length
29391
29786
  },
29787
+ coordinates: coordinateFacts(inventory, plans),
29392
29788
  records,
29393
29789
  diagnostics: uniqueDiagnostics(diagnostics).sort(
29394
29790
  (left, right) => [left.recordPath ?? "", left.code, left.path ?? "", left.line ?? 0].join("\0").localeCompare([right.recordPath ?? "", right.code, right.path ?? "", right.line ?? 0].join("\0"))
@@ -29652,7 +30048,7 @@ function phaseDisplayState(phase) {
29652
30048
  if (/supersed|defer|pause/.test(status)) return "superseded";
29653
30049
  if (/conflict/.test(status)) return "conflict";
29654
30050
  if (/block/.test(status)) return "blocked";
29655
- if (/complete|closed|done/.test(status)) return "complete";
30051
+ if (/^(?:complete|completed|closed|done)$/.test(status.trim())) return "complete";
29656
30052
  if (phase.tasks.length && phase.tasks.every((task) => task.completed.value === true)) return "complete";
29657
30053
  if (phase.tasks.some((task) => task.completed.value === false)) return "open";
29658
30054
  return "unknown";
@@ -29843,14 +30239,14 @@ var counts = external_exports.strictObject({ total: count2, hits: count2, misses
29843
30239
  var key = {
29844
30240
  recordPath: external_exports.string().min(1),
29845
30241
  recordDigest: external_exports.string().regex(/^[a-f0-9]{64}$/),
29846
- snapshotSchemaVersion: external_exports.literal(1),
30242
+ snapshotSchemaVersion: external_exports.literal(2),
29847
30243
  ruleCatalogVersion: external_exports.number().int().positive(),
29848
30244
  skillVersion: external_exports.number().int().positive()
29849
30245
  };
29850
30246
  var lookupResult = external_exports.strictObject({
29851
30247
  schemaVersion: external_exports.literal(1),
29852
30248
  service: external_exports.strictObject({ state: external_exports.literal("available"), checkout: external_exports.enum(["bound", "unbound"]) }),
29853
- key: external_exports.strictObject({ snapshotSchemaVersion: external_exports.literal(1), ruleCatalogVersion: external_exports.number().int().positive(), skillVersion: external_exports.number().int().positive() }),
30249
+ key: external_exports.strictObject({ snapshotSchemaVersion: external_exports.literal(2), ruleCatalogVersion: external_exports.number().int().positive(), skillVersion: external_exports.number().int().positive() }),
29854
30250
  records: external_exports.array(external_exports.discriminatedUnion("state", [
29855
30251
  external_exports.strictObject({ ...key, state: external_exports.literal("hit"), fragment: BacklogReportRecordV1Schema }),
29856
30252
  external_exports.strictObject({ ...key, state: external_exports.literal("miss"), reason: external_exports.enum(["checkout-not-bound", "no-exact-match"]) }),
@@ -29989,7 +30385,7 @@ var backlogReviewRefreshOperation = {
29989
30385
  inputSchema: backlogReviewRefreshInputSchema,
29990
30386
  mcpResultSchema: BacklogReviewRefreshPayloadV1Schema,
29991
30387
  async handler(input2, context) {
29992
- const { invokeOperation: invokeOperation2 } = await import("./registry-7TE6OMSU.js");
30388
+ const { invokeOperation: invokeOperation2 } = await import("./registry-XNCQALXP.js");
29993
30389
  const { envelope } = input2;
29994
30390
  const targetRoot2 = envelope.report.snapshot.targetRoot;
29995
30391
  let snapshot2;
@@ -30922,6 +31318,9 @@ export {
30922
31318
  Checkpoint9ReceiptProjectionError,
30923
31319
  executeInstallPlanMigration,
30924
31320
  getInstallPlanMigrationReviewBlock,
30925
- executeStoreCheckpoint9Migration
31321
+ executeStoreCheckpoint9Migration,
31322
+ skillChangesLeftForSkillsSetup,
31323
+ skillChangesNextAction,
31324
+ setupFollowUpAction
30926
31325
  };
30927
- //# sourceMappingURL=chunk-XGTKLLI3.js.map
31326
+ //# sourceMappingURL=chunk-5XKMSGMS.js.map