rosettify 2.2.1 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/commands/help/index.d.ts.map +1 -1
  2. package/dist/commands/help/index.js +1 -2
  3. package/dist/commands/help/index.js.map +1 -1
  4. package/dist/commands/plan/core.d.ts +38 -31
  5. package/dist/commands/plan/core.d.ts.map +1 -1
  6. package/dist/commands/plan/core.js.map +1 -1
  7. package/dist/commands/plan/create-with-template.d.ts +3 -16
  8. package/dist/commands/plan/create-with-template.d.ts.map +1 -1
  9. package/dist/commands/plan/create-with-template.js +4 -11
  10. package/dist/commands/plan/create-with-template.js.map +1 -1
  11. package/dist/commands/plan/create.d.ts +3 -55
  12. package/dist/commands/plan/create.d.ts.map +1 -1
  13. package/dist/commands/plan/create.js +4 -38
  14. package/dist/commands/plan/create.js.map +1 -1
  15. package/dist/commands/plan/help-content.d.ts +18 -3
  16. package/dist/commands/plan/help-content.d.ts.map +1 -1
  17. package/dist/commands/plan/help-content.js +56 -33
  18. package/dist/commands/plan/help-content.js.map +1 -1
  19. package/dist/commands/plan/index.d.ts.map +1 -1
  20. package/dist/commands/plan/index.js +6 -7
  21. package/dist/commands/plan/index.js.map +1 -1
  22. package/dist/commands/plan/list-templates.d.ts +4 -27
  23. package/dist/commands/plan/list-templates.d.ts.map +1 -1
  24. package/dist/commands/plan/list-templates.js +1 -7
  25. package/dist/commands/plan/list-templates.js.map +1 -1
  26. package/dist/commands/plan/next.d.ts +3 -16
  27. package/dist/commands/plan/next.d.ts.map +1 -1
  28. package/dist/commands/plan/next.js +67 -25
  29. package/dist/commands/plan/next.js.map +1 -1
  30. package/dist/commands/plan/output.d.ts +10 -21
  31. package/dist/commands/plan/output.d.ts.map +1 -1
  32. package/dist/commands/plan/output.js +6 -6
  33. package/dist/commands/plan/output.js.map +1 -1
  34. package/dist/commands/plan/query.d.ts +7 -2
  35. package/dist/commands/plan/query.d.ts.map +1 -1
  36. package/dist/commands/plan/query.js +6 -3
  37. package/dist/commands/plan/query.js.map +1 -1
  38. package/dist/commands/plan/schemas.d.ts +36 -151
  39. package/dist/commands/plan/schemas.d.ts.map +1 -1
  40. package/dist/commands/plan/schemas.js +200 -68
  41. package/dist/commands/plan/schemas.js.map +1 -1
  42. package/dist/commands/plan/show-status.d.ts +9 -22
  43. package/dist/commands/plan/show-status.d.ts.map +1 -1
  44. package/dist/commands/plan/show-status.js +7 -10
  45. package/dist/commands/plan/show-status.js.map +1 -1
  46. package/dist/commands/plan/templates/create/for-orchestrator.d.ts +14 -33
  47. package/dist/commands/plan/templates/create/for-orchestrator.d.ts.map +1 -1
  48. package/dist/commands/plan/templates/create/for-orchestrator.js +14 -38
  49. package/dist/commands/plan/templates/create/for-orchestrator.js.map +1 -1
  50. package/dist/commands/plan/templates/index.d.ts +29 -45
  51. package/dist/commands/plan/templates/index.d.ts.map +1 -1
  52. package/dist/commands/plan/templates/index.js +2 -0
  53. package/dist/commands/plan/templates/index.js.map +1 -1
  54. package/dist/commands/plan/templates/upsert/for-subagent.d.ts +10 -9
  55. package/dist/commands/plan/templates/upsert/for-subagent.d.ts.map +1 -1
  56. package/dist/commands/plan/templates/upsert/for-subagent.js +12 -11
  57. package/dist/commands/plan/templates/upsert/for-subagent.js.map +1 -1
  58. package/dist/commands/plan/update-status.d.ts +2 -3
  59. package/dist/commands/plan/update-status.d.ts.map +1 -1
  60. package/dist/commands/plan/update-status.js +2 -3
  61. package/dist/commands/plan/update-status.js.map +1 -1
  62. package/dist/commands/plan/upsert-with-template.d.ts +3 -16
  63. package/dist/commands/plan/upsert-with-template.d.ts.map +1 -1
  64. package/dist/commands/plan/upsert-with-template.js +5 -12
  65. package/dist/commands/plan/upsert-with-template.js.map +1 -1
  66. package/dist/commands/plan/upsert.d.ts +3 -16
  67. package/dist/commands/plan/upsert.d.ts.map +1 -1
  68. package/dist/commands/plan/upsert.js +9 -17
  69. package/dist/commands/plan/upsert.js.map +1 -1
  70. package/dist/frontends/cli.d.ts.map +1 -1
  71. package/dist/frontends/cli.js +8 -4
  72. package/dist/frontends/cli.js.map +1 -1
  73. package/dist/frontends/mcp.d.ts.map +1 -1
  74. package/dist/frontends/mcp.js +2 -1
  75. package/dist/frontends/mcp.js.map +1 -1
  76. package/dist/shared/version.d.ts +2 -0
  77. package/dist/shared/version.d.ts.map +1 -0
  78. package/dist/shared/version.js +8 -0
  79. package/dist/shared/version.js.map +1 -0
  80. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"for-orchestrator.js","sourceRoot":"","sources":["../../../../../src/commands/plan/templates/create/for-orchestrator.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,2GAA2G;AAE3G;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,uEAAuE;IAC9E,YAAY,EAAE,CAAC,WAAW,EAAE,kBAAkB,CAAU;IACxD,OAAO,EAAE;QACP,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,oBAAoB;QACjC,gBAAgB,EAAE,IAAI;QACtB,MAAM,EAAE;YACN;gBACE,EAAE,EAAE,SAAS;gBACb,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,yGAAyG;gBACtH,UAAU,EAAE,EAAE;gBACd,KAAK,EAAE;oBACL;wBACE,EAAE,EAAE,qCAAqC;wBACzC,IAAI,EAAE,wBAAwB;wBAC9B,MAAM,EAAE,0OAA0O;qBACnP;oBACD;wBACE,EAAE,EAAE,6BAA6B;wBACjC,IAAI,EAAE,yCAAyC;wBAC/C,MAAM,EAAE,sPAAsP;qBAC/P;oBACD;wBACE,EAAE,EAAE,kCAAkC;wBACtC,IAAI,EAAE,wBAAwB;wBAC9B,MAAM,EAAE,8IAA8I;qBACvJ;oBACD;wBACE,EAAE,EAAE,qCAAqC;wBACzC,IAAI,EAAE,6CAA6C;wBACnD,MAAM,EAAE,4HAA4H;qBACrI;oBACD;wBACE,EAAE,EAAE,sCAAsC;wBAC1C,IAAI,EAAE,iDAAiD;wBACvD,MAAM,EAAE,gHAAgH;qBACzH;oBACD;wBACE,EAAE,EAAE,iCAAiC;wBACrC,IAAI,EAAE,+BAA+B;wBACrC,MAAM,EAAE,4HAA4H;qBACrI;oBACD;wBACE,EAAE,EAAE,iCAAiC;wBACrC,IAAI,EAAE,uBAAuB;wBAC7B,MAAM,EAAE,+NAA+N;qBACxO;oBACD;wBACE,EAAE,EAAE,4BAA4B;wBAChC,IAAI,EAAE,2BAA2B;wBACjC,MAAM,EAAE,wLAAwL;qBACjM;oBACD;wBACE,EAAE,EAAE,8BAA8B;wBAClC,IAAI,EAAE,oCAAoC;wBAC1C,MAAM,EAAE,8JAA8J;qBACvK;oBACD;wBACE,EAAE,EAAE,4BAA4B;wBAChC,IAAI,EAAE,sBAAsB;wBAC5B,MAAM,EAAE,qKAAqK;qBAC9K;iBACF;aACF;SACF;KACF;CACO,CAAC"}
1
+ {"version":3,"file":"for-orchestrator.js","sourceRoot":"","sources":["../../../../../src/commands/plan/templates/create/for-orchestrator.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,2GAA2G;AAE3G;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,uEAAuE;IAC9E,YAAY,EAAE,CAAC,WAAW,EAAE,kBAAkB,CAAU;IACxD,QAAQ,EAAE,4FAA4F;IACtG,OAAO,EAAE;QACP,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,oBAAoB;QACjC,gBAAgB,EAAE,IAAI;QACtB,MAAM,EAAE;YACN;gBACE,EAAE,EAAE,SAAS;gBACb,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,yGAAyG;gBACtH,UAAU,EAAE,EAAE;gBACd,KAAK,EAAE;oBACL;wBACE,EAAE,EAAE,qCAAqC;wBACzC,IAAI,EAAE,wBAAwB;wBAC9B,MAAM,EAAE,yEAAyE;qBAClF;oBACD;wBACE,EAAE,EAAE,qBAAqB;wBACzB,IAAI,EAAE,sBAAsB;wBAC5B,MAAM,EAAE,gJAAgJ;qBACzJ;oBACD;wBACE,EAAE,EAAE,iCAAiC;wBACrC,IAAI,EAAE,4BAA4B;wBAClC,MAAM,EAAE,8KAA8K;qBACvL;oBACD;wBACE,EAAE,EAAE,yBAAyB;wBAC7B,IAAI,EAAE,eAAe;wBACrB,MAAM,EAAE,iCAAiC;qBAC1C;oBACD;wBACE,EAAE,EAAE,+BAA+B;wBACnC,IAAI,EAAE,qBAAqB;wBAC3B,MAAM,EAAC,2QAA2Q;qBACnR;iBACF;aACF;SACF;KACF;CACO,CAAC"}
@@ -3,6 +3,7 @@ export declare const createTemplates: {
3
3
  readonly name: "for-orchestrator";
4
4
  readonly brief: "Bootstrap a new plan with the Rosetta orchestrator preparation phase.";
5
5
  readonly placeholders: readonly ["plan-name", "plan-description"];
6
+ readonly produces: "A new plan with one preparation phase (ph-prep) of 5 Rosetta orchestrator bootstrap steps.";
6
7
  readonly content: {
7
8
  readonly name: "[plan-name]";
8
9
  readonly description: "[plan-description]";
@@ -15,43 +16,23 @@ export declare const createTemplates: {
15
16
  readonly steps: readonly [{
16
17
  readonly id: "ph-prep-s-load-context-instructions";
17
18
  readonly name: "Load bootstrap context";
18
- readonly prompt: "Call get_context_instructions exactly once to load the bundled bootstrap rules (core policy, execution policy, guardrails, HITL, rosetta files). This is the blocking prerequisite gate (Prep Step 1). Do not call any other tool first.";
19
+ readonly prompt: "USE SKILL `load-context-instructions`. Execute ALL returned prep steps.";
19
20
  }, {
20
- readonly id: "ph-prep-s-create-todo-tasks";
21
- readonly name: "Create todo tasks for prep and workflow";
22
- readonly prompt: "Create separate, dedicated, detailed todo tasks covering all actions of Prep Step 2 and Prep Step 3 (loading workflow, creating workflow-phase tasks, executing the workflow). Output to the user: 'Tasks Created: [task ids returned by the tool]'.";
21
+ readonly id: "ph-prep-s-read-docs";
22
+ readonly name: "Read project context";
23
+ readonly prompt: "USE SKILL `load-context` as the canonical current context loader. The skill is required even when its expected outputs already look satisfied.";
23
24
  }, {
24
- readonly id: "ph-prep-s-use-load-context-skill";
25
- readonly name: "Use load-context skill";
26
- readonly prompt: "USE SKILL load-context as the canonical current-context loader. The skill is required even when its expected outputs already look satisfied.";
25
+ readonly id: "ph-prep-s-orchestrator-contract";
26
+ readonly name: "Load orchestrator contract";
27
+ readonly prompt: "MUST USE SKILL `orchestrator-contract` as first action before dispatching any subagents. MUST USE SKILL `hitl` unless explicitly requested in prompt with exactly `No HITL`.";
27
28
  }, {
28
- readonly id: "ph-prep-s-read-context-architecture";
29
- readonly name: "Read CONTEXT.md and ARCHITECTURE.md in full";
30
- readonly prompt: "Read docs/CONTEXT.md and docs/ARCHITECTURE.md in full. Read all lines at once. These files carry critical project context.";
29
+ readonly id: "ph-prep-s-load-workflow";
30
+ readonly name: "Load workflow";
31
+ readonly prompt: "MUST USE SKILL `load-workflow`.";
31
32
  }, {
32
- readonly id: "ph-prep-s-grep-implementation-memory";
33
- readonly name: "Grep headers of IMPLEMENTATION.md and MEMORY.md";
34
- readonly prompt: "Grep '^#{1,3}' headers of agents/IMPLEMENTATION.md and agents/MEMORY.md. Read further sections only as needed.";
35
- }, {
36
- readonly id: "ph-prep-s-validate-requirements";
37
- readonly name: "Use and validate requirements";
38
- readonly prompt: "If docs/REQUIREMENTS exists, use and validate the relevant requirement set. Apply the requirements-use skill when present.";
39
- }, {
40
- readonly id: "ph-prep-s-identify-request-size";
41
- readonly name: "Identify request size";
42
- readonly prompt: "Classify the user request as SMALL (1-2 file changes, single area), MEDIUM (up to ~10 file changes, single area), or LARGE (more than 10 file changes or multiple areas). Re-evaluate and announce if the size changes later.";
43
- }, {
44
- readonly id: "ph-prep-s-acquire-workflow";
45
- readonly name: "Acquire matching workflow";
46
- readonly prompt: "ACQUIRE the most matching workflow tag from KB (for example workflows/coding-flow.md) and load its full definition. The workflow guides the end-to-end execution for the request size.";
47
- }, {
48
- readonly id: "ph-prep-s-add-workflow-tasks";
49
- readonly name: "Add todo tasks for workflow phases";
50
- readonly prompt: "Add and update separate, dedicated todo tasks reflecting the loaded workflow's phases. Output to the user: 'Tasks Created: [task ids returned by the tool]'.";
51
- }, {
52
- readonly id: "ph-prep-s-execute-workflow";
53
- readonly name: "Execute the workflow";
54
- readonly prompt: "Proceed executing the loaded workflow end-to-end, integrating questioning, planning, implementation, review, validation, and HITL gates as the workflow prescribes.";
33
+ readonly id: "ph-prep-s-add-workflow-phases";
34
+ readonly name: "Add workflow phases";
35
+ readonly prompt: "Add workflow phases from the loaded workflow into this plan — one plan phase per workflow phase, each with dedicated, detailed, and specific steps. Must add phase to identify request size after intial discovery. Include state-restore and resume steps if applicable.";
55
36
  }];
56
37
  }];
57
38
  };
@@ -62,6 +43,7 @@ export declare const upsertTemplates: {
62
43
  readonly name: "for-subagent";
63
44
  readonly brief: "Bootstrap a subagent preparation phase with standard Rosetta load-context steps.";
64
45
  readonly placeholders: readonly ["phase-id", "phase-name", "phase-description"];
46
+ readonly produces: "One phase seeded with 6 Rosetta subagent load-context bootstrap steps, step ids prefixed by the phase id.";
65
47
  readonly content: {
66
48
  readonly id: "[phase-id]";
67
49
  readonly name: "[phase-name]";
@@ -70,19 +52,19 @@ export declare const upsertTemplates: {
70
52
  readonly steps: readonly [{
71
53
  readonly id: "[phase-id]-s-load-context-instructions";
72
54
  readonly name: "Load bootstrap context";
73
- readonly prompt: "Call get_context_instructions exactly once to load the bundled bootstrap rules. This is the blocking prerequisite gate (Prep Step 1). Do not call any other tool first.";
55
+ readonly prompt: "USE SKILL `load-context-instructions`. Execute ALL returned prep steps.";
56
+ }, {
57
+ readonly id: "[phase-id]-s-read-docs";
58
+ readonly name: "Read project context";
59
+ readonly prompt: "USE SKILL `load-context` as the canonical current context loader. The skill is required even when its expected outputs already look satisfied.";
60
+ }, {
61
+ readonly id: "[phase-id]-s-subagent-contract";
62
+ readonly name: "Load subagent-only contract";
63
+ readonly prompt: "MUST USE SKILL `subagent-contract` to understand and to follow scope boundaries, input/output contracts, and escalation protocol.";
74
64
  }, {
75
65
  readonly id: "[phase-id]-s-execution-planning";
76
66
  readonly name: "Plan execution at the task level";
77
67
  readonly prompt: "Perform execution-level planning using todo tasks for this phase's scope. Identify dependencies and the right order before acting.";
78
- }, {
79
- readonly id: "[phase-id]-s-read-context-architecture";
80
- readonly name: "Read CONTEXT.md and ARCHITECTURE.md in full";
81
- readonly prompt: "Read docs/CONTEXT.md and docs/ARCHITECTURE.md in full. Read all lines at once. These files carry critical project context.";
82
- }, {
83
- readonly id: "[phase-id]-s-grep-implementation-memory";
84
- readonly name: "Grep headers of IMPLEMENTATION.md and MEMORY.md";
85
- readonly prompt: "Grep '^#{1,3}' headers of agents/IMPLEMENTATION.md and agents/MEMORY.md. Read further sections only as needed.";
86
68
  }, {
87
69
  readonly id: "[phase-id]-s-execute-tasks";
88
70
  readonly name: "Execute todo tasks and adopt changes";
@@ -95,14 +77,16 @@ export declare const upsertTemplates: {
95
77
  };
96
78
  };
97
79
  };
98
- export interface TemplateCatalogEntry {
80
+ export interface PlanTemplateCatalogEntry {
99
81
  name: string;
100
82
  brief: string;
101
83
  placeholders: readonly string[];
84
+ produces: string;
102
85
  }
86
+ export type TemplateCatalogEntry = PlanTemplateCatalogEntry;
103
87
  /** Returns the catalog for list-templates (FR-PLAN-0032). */
104
88
  export declare function buildTemplateCatalog(): {
105
- create: TemplateCatalogEntry[];
106
- upsert: TemplateCatalogEntry[];
89
+ create: PlanTemplateCatalogEntry[];
90
+ upsert: PlanTemplateCatalogEntry[];
107
91
  };
108
92
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/plan/templates/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAElB,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAElB,CAAC;AAGX,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,6DAA6D;AAC7D,wBAAgB,oBAAoB,IAAI;IACtC,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAYA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/plan/templates/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAElB,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAElB,CAAC;AAGX,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAE5D,6DAA6D;AAC7D,wBAAgB,oBAAoB,IAAI;IACtC,MAAM,EAAE,wBAAwB,EAAE,CAAC;IACnC,MAAM,EAAE,wBAAwB,EAAE,CAAC;CACpC,CAcA"}
@@ -15,11 +15,13 @@ export function buildTemplateCatalog() {
15
15
  name: t.name,
16
16
  brief: t.brief,
17
17
  placeholders: t.placeholders,
18
+ produces: t.produces,
18
19
  }));
19
20
  const upsert = Object.values(upsertTemplates).map((t) => ({
20
21
  name: t.name,
21
22
  brief: t.brief,
22
23
  placeholders: t.placeholders,
24
+ produces: t.produces,
23
25
  }));
24
26
  return { create, upsert };
25
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/plan/templates/index.ts"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,yEAAyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE,eAAe;CAC3B,CAAC;AAEX,yEAAyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc,EAAE,WAAW;CACnB,CAAC;AASX,6DAA6D;AAC7D,MAAM,UAAU,oBAAoB;IAIlC,MAAM,MAAM,GAA2B,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChF,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,YAAY,EAAE,CAAC,CAAC,YAAY;KAC7B,CAAC,CAAC,CAAC;IACJ,MAAM,MAAM,GAA2B,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChF,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,YAAY,EAAE,CAAC,CAAC,YAAY;KAC7B,CAAC,CAAC,CAAC;IACJ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/plan/templates/index.ts"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,yEAAyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE,eAAe;CAC3B,CAAC;AAEX,yEAAyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc,EAAE,WAAW;CACnB,CAAC;AAaX,6DAA6D;AAC7D,MAAM,UAAU,oBAAoB;IAIlC,MAAM,MAAM,GAA+B,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,YAAY,EAAE,CAAC,CAAC,YAAY;QAC5B,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC,CAAC,CAAC;IACJ,MAAM,MAAM,GAA+B,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,YAAY,EAAE,CAAC,CAAC,YAAY;QAC5B,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC,CAAC,CAAC;IACJ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
@@ -8,6 +8,7 @@ export declare const forSubagent: {
8
8
  readonly name: "for-subagent";
9
9
  readonly brief: "Bootstrap a subagent preparation phase with standard Rosetta load-context steps.";
10
10
  readonly placeholders: readonly ["phase-id", "phase-name", "phase-description"];
11
+ readonly produces: "One phase seeded with 6 Rosetta subagent load-context bootstrap steps, step ids prefixed by the phase id.";
11
12
  readonly content: {
12
13
  readonly id: "[phase-id]";
13
14
  readonly name: "[phase-name]";
@@ -16,19 +17,19 @@ export declare const forSubagent: {
16
17
  readonly steps: readonly [{
17
18
  readonly id: "[phase-id]-s-load-context-instructions";
18
19
  readonly name: "Load bootstrap context";
19
- readonly prompt: "Call get_context_instructions exactly once to load the bundled bootstrap rules. This is the blocking prerequisite gate (Prep Step 1). Do not call any other tool first.";
20
+ readonly prompt: "USE SKILL `load-context-instructions`. Execute ALL returned prep steps.";
21
+ }, {
22
+ readonly id: "[phase-id]-s-read-docs";
23
+ readonly name: "Read project context";
24
+ readonly prompt: "USE SKILL `load-context` as the canonical current context loader. The skill is required even when its expected outputs already look satisfied.";
25
+ }, {
26
+ readonly id: "[phase-id]-s-subagent-contract";
27
+ readonly name: "Load subagent-only contract";
28
+ readonly prompt: "MUST USE SKILL `subagent-contract` to understand and to follow scope boundaries, input/output contracts, and escalation protocol.";
20
29
  }, {
21
30
  readonly id: "[phase-id]-s-execution-planning";
22
31
  readonly name: "Plan execution at the task level";
23
32
  readonly prompt: "Perform execution-level planning using todo tasks for this phase's scope. Identify dependencies and the right order before acting.";
24
- }, {
25
- readonly id: "[phase-id]-s-read-context-architecture";
26
- readonly name: "Read CONTEXT.md and ARCHITECTURE.md in full";
27
- readonly prompt: "Read docs/CONTEXT.md and docs/ARCHITECTURE.md in full. Read all lines at once. These files carry critical project context.";
28
- }, {
29
- readonly id: "[phase-id]-s-grep-implementation-memory";
30
- readonly name: "Grep headers of IMPLEMENTATION.md and MEMORY.md";
31
- readonly prompt: "Grep '^#{1,3}' headers of agents/IMPLEMENTATION.md and agents/MEMORY.md. Read further sections only as needed.";
32
33
  }, {
33
34
  readonly id: "[phase-id]-s-execute-tasks";
34
35
  readonly name: "Execute todo tasks and adopt changes";
@@ -1 +1 @@
1
- {"version":3,"file":"for-subagent.d.ts","sourceRoot":"","sources":["../../../../../src/commands/plan/templates/upsert/for-subagent.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Cd,CAAC"}
1
+ {"version":3,"file":"for-subagent.d.ts","sourceRoot":"","sources":["../../../../../src/commands/plan/templates/upsert/for-subagent.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Cd,CAAC"}
@@ -10,6 +10,7 @@ export const forSubagent = {
10
10
  name: "for-subagent",
11
11
  brief: "Bootstrap a subagent preparation phase with standard Rosetta load-context steps.",
12
12
  placeholders: ["phase-id", "phase-name", "phase-description"],
13
+ produces: "One phase seeded with 6 Rosetta subagent load-context bootstrap steps, step ids prefixed by the phase id.",
13
14
  content: {
14
15
  id: "[phase-id]",
15
16
  name: "[phase-name]",
@@ -19,22 +20,22 @@ export const forSubagent = {
19
20
  {
20
21
  id: "[phase-id]-s-load-context-instructions",
21
22
  name: "Load bootstrap context",
22
- prompt: "Call get_context_instructions exactly once to load the bundled bootstrap rules. This is the blocking prerequisite gate (Prep Step 1). Do not call any other tool first.",
23
+ prompt: "USE SKILL `load-context-instructions`. Execute ALL returned prep steps.",
23
24
  },
24
25
  {
25
- id: "[phase-id]-s-execution-planning",
26
- name: "Plan execution at the task level",
27
- prompt: "Perform execution-level planning using todo tasks for this phase's scope. Identify dependencies and the right order before acting.",
26
+ id: "[phase-id]-s-read-docs",
27
+ name: "Read project context",
28
+ prompt: "USE SKILL `load-context` as the canonical current context loader. The skill is required even when its expected outputs already look satisfied.",
28
29
  },
29
30
  {
30
- id: "[phase-id]-s-read-context-architecture",
31
- name: "Read CONTEXT.md and ARCHITECTURE.md in full",
32
- prompt: "Read docs/CONTEXT.md and docs/ARCHITECTURE.md in full. Read all lines at once. These files carry critical project context.",
31
+ id: "[phase-id]-s-subagent-contract",
32
+ name: "Load subagent-only contract",
33
+ prompt: "MUST USE SKILL `subagent-contract` to understand and to follow scope boundaries, input/output contracts, and escalation protocol.",
33
34
  },
34
35
  {
35
- id: "[phase-id]-s-grep-implementation-memory",
36
- name: "Grep headers of IMPLEMENTATION.md and MEMORY.md",
37
- prompt: "Grep '^#{1,3}' headers of agents/IMPLEMENTATION.md and agents/MEMORY.md. Read further sections only as needed.",
36
+ id: "[phase-id]-s-execution-planning",
37
+ name: "Plan execution at the task level",
38
+ prompt: "Perform execution-level planning using todo tasks for this phase's scope. Identify dependencies and the right order before acting.",
38
39
  },
39
40
  {
40
41
  id: "[phase-id]-s-execute-tasks",
@@ -45,7 +46,7 @@ export const forSubagent = {
45
46
  id: "[phase-id]-s-proceed-with-request",
46
47
  name: "Proceed with the assigned request",
47
48
  prompt: "Proceed with the original assigned request and its activities, following all guardrails and HITL rules.",
48
- },
49
+ }
49
50
  ],
50
51
  },
51
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"for-subagent.js","sourceRoot":"","sources":["../../../../../src/commands/plan/templates/upsert/for-subagent.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,uGAAuG;AAEvG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,kFAAkF;IACzF,YAAY,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,mBAAmB,CAAU;IACtE,OAAO,EAAE;QACP,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,EAAE;QACd,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,wCAAwC;gBAC5C,IAAI,EAAE,wBAAwB;gBAC9B,MAAM,EAAE,yKAAyK;aAClL;YACD;gBACE,EAAE,EAAE,iCAAiC;gBACrC,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,oIAAoI;aAC7I;YACD;gBACE,EAAE,EAAE,wCAAwC;gBAC5C,IAAI,EAAE,6CAA6C;gBACnD,MAAM,EAAE,4HAA4H;aACrI;YACD;gBACE,EAAE,EAAE,yCAAyC;gBAC7C,IAAI,EAAE,iDAAiD;gBACvD,MAAM,EAAE,gHAAgH;aACzH;YACD;gBACE,EAAE,EAAE,4BAA4B;gBAChC,IAAI,EAAE,sCAAsC;gBAC5C,MAAM,EAAE,wGAAwG;aACjH;YACD;gBACE,EAAE,EAAE,mCAAmC;gBACvC,IAAI,EAAE,mCAAmC;gBACzC,MAAM,EAAE,yGAAyG;aAClH;SACF;KACF;CACO,CAAC"}
1
+ {"version":3,"file":"for-subagent.js","sourceRoot":"","sources":["../../../../../src/commands/plan/templates/upsert/for-subagent.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,uGAAuG;AAEvG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,kFAAkF;IACzF,YAAY,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,mBAAmB,CAAU;IACtE,QAAQ,EAAE,2GAA2G;IACrH,OAAO,EAAE;QACP,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,EAAE;QACd,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,wCAAwC;gBAC5C,IAAI,EAAE,wBAAwB;gBAC9B,MAAM,EAAE,yEAAyE;aAClF;YACD;gBACE,EAAE,EAAE,wBAAwB;gBAC5B,IAAI,EAAE,sBAAsB;gBAC5B,MAAM,EAAE,gJAAgJ;aACzJ;YACD;gBACE,EAAE,EAAE,gCAAgC;gBACpC,IAAI,EAAE,6BAA6B;gBACnC,MAAM,EAAE,mIAAmI;aAC5I;YACD;gBACE,EAAE,EAAE,iCAAiC;gBACrC,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,oIAAoI;aAC7I;YACD;gBACE,EAAE,EAAE,4BAA4B;gBAChC,IAAI,EAAE,sCAAsC;gBAC5C,MAAM,EAAE,wGAAwG;aACjH;YACD;gBACE,EAAE,EAAE,mCAAmC;gBACvC,IAAI,EAAE,mCAAmC;gBACzC,MAAM,EAAE,yGAAyG;aAClH;SACF;KACF;CACO,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { RunEnvelope } from "../../registry/types.js";
2
- import { type UpdateStatusResult } from "./core.js";
2
+ import { type PlanUpdateStatusResult } from "./core.js";
3
3
  export declare const updateStatusInputSchema: {
4
4
  type: "object";
5
5
  properties: {
@@ -16,7 +16,6 @@ export declare const updateStatusInputSchema: {
16
16
  description: string;
17
17
  };
18
18
  };
19
- required: never[];
20
19
  };
21
20
  export declare const updateStatusOutputSchema: {
22
21
  type: "object";
@@ -33,5 +32,5 @@ export declare const updateStatusOutputSchema: {
33
32
  };
34
33
  };
35
34
  };
36
- export declare function cmdUpdateStatus(planFile: string, targetId: string, newStatus: string): Promise<RunEnvelope<UpdateStatusResult>>;
35
+ export declare function cmdUpdateStatus(planFile: string, targetId: string, newStatus: string): Promise<RunEnvelope<PlanUpdateStatusResult>>;
37
36
  //# sourceMappingURL=update-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-status.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/update-status.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EAGL,KAAK,kBAAkB,EAMxB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;CAQnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;CAQpC,CAAC;AAEF,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CA2C1C"}
1
+ {"version":3,"file":"update-status.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/update-status.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EAGL,KAAK,sBAAsB,EAM5B,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;CAOnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;CAQpC,CAAC;AAEF,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC,CA2C9C"}
@@ -11,11 +11,10 @@ export const updateStatusInputSchema = {
11
11
  target_id: { type: "string", description: "Step ID to update" },
12
12
  new_status: { type: "string", description: "New status: open | in_progress | complete | blocked | failed" },
13
13
  },
14
- required: [],
15
14
  };
16
15
  export const updateStatusOutputSchema = {
17
16
  type: "object",
18
- description: "FR-PLAN-0012 — result of update_status",
17
+ description: "PlanUpdateStatusResult — result of update_status",
19
18
  properties: {
20
19
  id: { type: "string" },
21
20
  status: { type: "string" },
@@ -24,7 +23,7 @@ export const updateStatusOutputSchema = {
24
23
  };
25
24
  export async function cmdUpdateStatus(planFile, targetId, newStatus) {
26
25
  try {
27
- // FR-PLAN-0024 — use rename-as-guard write cycle
26
+ // Use rename-as-guard write cycle
28
27
  const writeResult = await atomicWriteWithBackup(planFile, (plan) => {
29
28
  if (targetId === "entire_plan") {
30
29
  return { ok: false, error: "invalid_target" };
@@ -1 +1 @@
1
- {"version":3,"file":"update-status.js","sourceRoot":"","sources":["../../../src/commands/plan/update-status.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,6EAA6E;AAC7E,4GAA4G;AAI5G,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAIL,cAAc,EACd,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;QACxE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;QAC/D,UAAU,EAAE,EAAE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CAAC;QAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,MAAO,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IAC5F,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,mBAAmB,GAAG,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IAC3F,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { RunEnvelope } from "../../registry/types.js";
2
- import type { CompressedPlanTree } from "./output.js";
2
+ import type { PlanWriteResult } from "./output.js";
3
3
  export declare const upsertWithTemplateInputSchema: {
4
4
  type: "object";
5
5
  properties: {
@@ -24,22 +24,9 @@ export declare const upsertWithTemplateInputSchema: {
24
24
  description: string;
25
25
  };
26
26
  };
27
- required: never[];
28
27
  };
29
28
  export declare const upsertWithTemplateOutputSchema: {
30
- type: "object";
31
- description: string;
32
- properties: {
33
- plan: {
34
- type: string;
35
- };
36
- previous_version: {
37
- type: string[];
38
- };
39
- phases: {
40
- type: string;
41
- };
42
- };
29
+ $ref: "PlanWriteResult";
43
30
  };
44
- export declare function cmdUpsertWithTemplate(planFile: string, phaseId: string, templateName: string, phaseName: string, phaseDescription: string): Promise<RunEnvelope<CompressedPlanTree>>;
31
+ export declare function cmdUpsertWithTemplate(planFile: string, phaseId: string, templateName: string, phaseName: string, phaseDescription: string): Promise<RunEnvelope<PlanWriteResult>>;
45
32
  //# sourceMappingURL=upsert-with-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-with-template.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/upsert-with-template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;CAUzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;CAQ1C,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAwB1C"}
1
+ {"version":3,"file":"upsert-with-template.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/upsert-with-template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;CASzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;CAE1C,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAwBvC"}
@@ -12,21 +12,14 @@ export const upsertWithTemplateInputSchema = {
12
12
  type: "object",
13
13
  properties: {
14
14
  plan_file: { type: "string", description: "Path to the plan JSON file" },
15
- "phase-id": { type: "string", description: "FR-PLAN-0031 / FR-PLAN-0034 — value for the [phase-id] placeholder and upsert target ID" },
16
- template: { type: "string", description: "FR-PLAN-0031 / FR-PLAN-0034 — template name from upsert-kind collection" },
17
- "phase-name": { type: "string", description: "FR-PLAN-0031 / FR-PLAN-0034 — value for the [phase-name] placeholder" },
18
- "phase-description": { type: "string", description: "FR-PLAN-0031 / FR-PLAN-0034 — value for the [phase-description] placeholder" },
15
+ "phase-id": { type: "string", description: "Value for the [phase-id] placeholder and upsert target ID" },
16
+ template: { type: "string", description: "Template name from upsert-kind collection" },
17
+ "phase-name": { type: "string", description: "Value for the [phase-name] placeholder" },
18
+ "phase-description": { type: "string", description: "Value for the [phase-description] placeholder" },
19
19
  },
20
- required: [],
21
20
  };
22
21
  export const upsertWithTemplateOutputSchema = {
23
- type: "object",
24
- description: "FR-PLAN-0040 — compressed-tree shape after upsert-with-template",
25
- properties: {
26
- plan: { type: "object" },
27
- previous_version: { type: ["string", "null"] },
28
- phases: { type: "array" },
29
- },
22
+ $ref: "PlanWriteResult",
30
23
  };
31
24
  export async function cmdUpsertWithTemplate(planFile, phaseId, templateName, phaseName, phaseDescription) {
32
25
  // FR-PLAN-0031 — look up template in upsert-kind collection only
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-with-template.js","sourceRoot":"","sources":["../../../src/commands/plan/upsert-with-template.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,wEAAwE;AACxE,4HAA4H;AAG5H,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,uDAAuD;AACvD,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,IAAI,EAAE,QAAiB;IACvB,UAAU,EAAE;QACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA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AAE,+CAA+C,EAAE;KACtG;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,IAAI,EAAE,iBAA0B;CACjC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,QAAgB,EAChB,OAAe,EACf,YAAoB,EACpB,SAAiB,EACjB,gBAAwB;IAExB,iEAAiE;IACjE,MAAM,QAAQ,GAAG,eAAe,CAAC,YAA4C,CAAC,CAAC;IAC/E,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,iFAAiF;QACjF,OAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACnC,CAAC;IAED,2DAA2D;IAC3D,MAAM,QAAQ,GAAG,cAAc,CAAC,QAAQ,EAAE;QACxC,UAAU,EAAE,OAAO;QACnB,YAAY,EAAE,SAAS;QACvB,mBAAmB,EAAE,gBAAgB;KACtC,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,wBAAwB,CAAC,CAAC;QAC/E,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,sDAAsD,CAAC,CAAC;IACzG,oFAAoF;IACpF,oEAAoE;IACpE,OAAO,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,QAAmC,EAAE,OAAO,CAAC,CAAC;AAC7F,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { RunEnvelope } from "../../registry/types.js";
2
- import { type CompressedPlanTree } from "./output.js";
2
+ import { type PlanWriteResult } from "./output.js";
3
3
  export declare const upsertInputSchema: {
4
4
  type: "object";
5
5
  properties: {
@@ -26,22 +26,9 @@ export declare const upsertInputSchema: {
26
26
  description: string;
27
27
  };
28
28
  };
29
- required: never[];
30
29
  };
31
30
  export declare const upsertOutputSchema: {
32
- type: "object";
33
- description: string;
34
- properties: {
35
- plan: {
36
- type: string;
37
- };
38
- previous_version: {
39
- type: string[];
40
- };
41
- phases: {
42
- type: string;
43
- };
44
- };
31
+ $ref: "PlanWriteResult";
45
32
  };
46
- export declare function cmdUpsert(planFile: string, targetId: string | undefined, data: Record<string, unknown>, kind?: string, phaseId?: string): Promise<RunEnvelope<CompressedPlanTree>>;
33
+ export declare function cmdUpsert(planFile: string, targetId: string | undefined, data: Record<string, unknown>, kind?: string, phaseId?: string): Promise<RunEnvelope<PlanWriteResult>>;
47
34
  //# sourceMappingURL=upsert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/upsert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmB3D,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAG3E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;CAQ9B,CAAC;AAyBF,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAqH1C"}
1
+ {"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/upsert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAmB3D,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGzE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;CAc7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;CAE9B,CAAC;AAyBF,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAoHvC"}
@@ -6,7 +6,7 @@ import { ok, err } from "../../shared/envelope.js";
6
6
  import { logger } from "../../shared/logger.js";
7
7
  import { atomicWriteWithBackup } from "../../shared/plan-io.js";
8
8
  import { savePlan, mergePatch, mergeById, validateUniqueIds, validateDependencies, validateSizeLimits, validateImmutableId, propagateStatuses, findPhase, findStep, } from "./core.js";
9
- import { buildCompressedTree } from "./output.js";
9
+ import { buildPlanWriteResult } from "./output.js";
10
10
  // FR-PLAN-0015 — upsert returns compressed-tree shape (FR-PLAN-0040)
11
11
  export const upsertInputSchema = {
12
12
  type: "object",
@@ -22,16 +22,9 @@ export const upsertInputSchema = {
22
22
  kind: { type: "string", description: "Type for new items: phase | step" },
23
23
  phase_id: { type: "string", description: "Parent phase for new step" },
24
24
  },
25
- required: [],
26
25
  };
27
26
  export const upsertOutputSchema = {
28
- type: "object",
29
- description: "FR-PLAN-0040 — compressed-tree shape after upsert",
30
- properties: {
31
- plan: { type: "object" },
32
- previous_version: { type: ["string", "null"] },
33
- phases: { type: "array" },
34
- },
27
+ $ref: "PlanWriteResult",
35
28
  };
36
29
  // FR-PLAN-0015 — status fields are silently dropped from patch data;
37
30
  // FR-PLAN-0016 — this behavior is documented in help notes, not per-call output.
@@ -94,8 +87,8 @@ export async function cmdUpsert(planFile, targetId, data, kind, phaseId) {
94
87
  // FR-PLAN-0026 — savePlan writes 2-space pretty-formatted JSON
95
88
  savePlan(planFile, plan);
96
89
  logger.info({ planFile, targetId: resolvedTargetId }, "upsert created new plan");
97
- // FR-PLAN-0040 — return compressed-tree; previous_version=null (first create)
98
- return ok(buildCompressedTree(plan, null));
90
+ // FR-PLAN-0040 — return PlanWriteResult; previous_version=null on first create (FR-PLAN-0010)
91
+ return ok(buildPlanWriteResult(plan, null));
99
92
  }
100
93
  // FR-PLAN-0024 — use rename-as-guard write cycle for existing plans
101
94
  const writeResult = await atomicWriteWithBackup(planFile, (plan) => {
@@ -173,17 +166,16 @@ export async function cmdUpsert(planFile, targetId, data, kind, phaseId) {
173
166
  return { ok: false, error: sizeErr };
174
167
  propagateStatuses(mutated);
175
168
  logger.info({ planFile, targetId: resolvedTargetId }, "upsert complete");
176
- // FR-PLAN-0040 — result is compressed-tree; backupPath injected by atomicWriteWithBackup
177
- return { ok: true, result: buildCompressedTree(mutated, null), updated: mutated };
169
+ // FR-PLAN-0040 — placeholder result; real backup path injected at the call site after atomicWriteWithBackup
170
+ return { ok: true, result: buildPlanWriteResult(mutated, null), updated: mutated };
178
171
  }, savePlan);
179
172
  if (!writeResult.ok) {
180
173
  return { ok: false, result: null, error: writeResult.error, include_help: writeResult.include_help };
181
174
  }
182
- // Patch the compressed tree's previous_version with the actual backup path from write cycle
175
+ // FR-PLAN-0040 — inject real backup path into plan summary (FR-PLAN-0024 / FR-PLAN-0010)
183
176
  const tree = writeResult.result.result;
184
- const actualBackupPath = writeResult.result.backupPath;
185
- const finalTree = { ...tree, previous_version: actualBackupPath };
186
- return ok(finalTree);
177
+ const bak = writeResult.result.backupPath;
178
+ return ok({ ...tree, plan: { ...tree.plan, previous_version: bak } });
187
179
  }
188
180
  catch (e) {
189
181
  const msg = e instanceof Error ? e.message : String(e);
@@ -1 +1 @@
1
- {"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../src/commands/plan/upsert.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,wEAAwE;AACxE,4GAA4G;AAE5G,OAAO,KAAK,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EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACxE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvD,OAAO,GAAG,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAU,EAAE,SAAkC;IAC1E,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QAC5E,MAAM,WAAW,GAAG,SAAS,CAAC,QAAQ,CAA8B,CAAC;QACrE,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,MAA8C,EAAE,WAAW,CAAC,CAAC;QACjG,IAAI,OAAO,IAAI,YAAY;YAAE,OAAO,YAA+B,CAAC;QACpE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAC1C,MAAM,MAAM,GAAG,UAAU,CAAC,IAA0C,EAAE,IAAI,CAAoB,CAAC;QAC/F,MAAM,CAAC,MAAM,GAAG,YAAkC,CAAC;QACnD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,UAAU,CAAC,IAA0C,EAAE,SAAS,CAAoB,CAAC;AAC9F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/frontends/cli.ts"],"names":[],"mappings":"AAwBA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0Q1D"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/frontends/cli.ts"],"names":[],"mappings":"AAyBA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6Q1D"}
@@ -1,13 +1,14 @@
1
1
  // CLI frontend for rosettify.
2
2
  // Implements FR-CLI-0001 (standard CLI), FR-SHRD-0008 (dense JSON output).
3
3
  // All new plan subcommands: create-with-template, upsert-with-template, list-templates.
4
- import { Command } from "commander";
4
+ import { Command, Option } from "commander";
5
5
  import { registry } from "../registry/index.js";
6
6
  import { dispatch } from "../shared/dispatch.js";
7
7
  import { extractOutput, logFailure } from "../shared/envelope.js";
8
8
  import { planToolDef } from "../commands/plan/index.js";
9
9
  import { helpToolDef } from "../commands/help/index.js";
10
10
  import { logger } from "../shared/logger.js";
11
+ import { VERSION } from "../shared/version.js";
11
12
  // FR-ARCH-0007 — all command output is valid JSON; FR-SHRD-0008 — dense (no indent)
12
13
  function writeResult(toolName, envelope) {
13
14
  const output = extractOutput(envelope);
@@ -24,7 +25,7 @@ export async function runCli(args) {
24
25
  process.exit(1);
25
26
  }
26
27
  const program = new Command("rosettify");
27
- program.version("0.1.0");
28
+ program.version(VERSION);
28
29
  // Suppress commander's default help output
29
30
  program.helpOption(false);
30
31
  // Override --help at root level
@@ -57,13 +58,16 @@ export async function runCli(args) {
57
58
  .command("next")
58
59
  .description("Get next steps")
59
60
  .argument("<plan_file>", "Path to plan file")
60
- .argument("[limit]", "Max steps to return", "10")
61
+ .argument("[limit]", "Max steps to return (default: 3)")
61
62
  .option("--target <id>", "Scope to phase")
63
+ .addOption(new Option("--limit <n>", "compatibility alias for the positional limit").hideHelp())
62
64
  .action(async (planFile, limitStr, opts) => {
65
+ const rawLimit = limitStr !== undefined ? limitStr : opts.limit;
66
+ const limit = rawLimit !== undefined ? parseInt(rawLimit, 10) : undefined;
63
67
  const input = {
64
68
  subcommand: "next",
65
69
  plan_file: planFile,
66
- limit: parseInt(limitStr, 10),
70
+ ...(limit !== undefined ? { limit } : {}),
67
71
  target_id: opts.target,
68
72
  };
69
73
  const envelope = await dispatch(planToolDef, input);