@ctrl-spc/cli 1.2.0 → 1.2.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.
package/dist/mcp.js CHANGED
@@ -1281,7 +1281,7 @@ export function protocolPromptHandler() {
1281
1281
  // ---------------------------------------------------------------------------
1282
1282
  const IDLE_TIMEOUT_MS = 10 * 60 * 1000;
1283
1283
  const HEARTBEAT_INTERVAL_MS = 30 * 1000;
1284
- export const BROKER_VERSION = '1.2.0';
1284
+ export const BROKER_VERSION = '1.2.1';
1285
1285
  async function readJsonBody(req) {
1286
1286
  const chunks = [];
1287
1287
  for await (const chunk of req)
package/dist/protocol.js CHANGED
@@ -13,6 +13,24 @@ export const PROTOCOL_FULL = `## 5a. Agent working protocol
13
13
 
14
14
  Delivered redundantly (installed skill + MCP), phrased imperatively for the agent:
15
15
 
16
+ **HARD STOP — unclear novel feature.** After \`record_context_exploration\` succeeds,
17
+ if the task does not explicitly request a build or name a deliverable, the immediate
18
+ next tool call is \`ask_question\` with category \`intent\` and the exact question:
19
+ “What should I produce for this feature? Select one or more: build, plan, spec,
20
+ diagram, mock, wireframe.” Then call \`end_work\` with reason
21
+ \`pending_user_answer\` and outcome \`blocked\`. Do not call \`get_task\` again,
22
+ \`update_task\`, \`create_artifact\`, \`reserve_work_paths\`, or any intervening tool.
23
+ The context artifact is the only artifact allowed before the answer. A read-only
24
+ execution sandbox is not a missing checkout and never changes this intent question.
25
+ Multiple selections are allowed.
26
+
27
+ Before the context artifact exists, never state or imply a requested deliverable and
28
+ never mention repository counts, contents, tests, findings, or likely impact. If
29
+ progress commentary is required, use only: “The required CTRL+SPC context review is
30
+ in progress; no decision or repository change has been made.” After persistence and
31
+ before the intent question, either say nothing or only: “The required context review
32
+ is saved to the work item. I am applying the task's explicit intent gate now.”
33
+
16
34
  1. **Resolve without side effects.** \`/ctrl-spc work <id>\` → call \`get_task(id)\` before
17
35
  anything else. \`get_task\` is read-only: it does not change task status, presence,
18
36
  collaboration, claims, or reservations. The ID is the only context in the paste;
@@ -64,9 +82,9 @@ Delivered redundantly (installed skill + MCP), phrased imperatively for the agen
64
82
  authorized deliverable. Perform the action only when the item explicitly names it; do
65
83
  not ask for confirmation. Otherwise use \`ask_question\`. For a bug, ask for reproduction steps,
66
84
  expected behavior, or actual behavior only when each is missing and not discoverable.
67
- For a novel feature with no explicit build action or deliverable, the mandatory next
68
- mutating call after \`record_context_exploration\` is \`ask_question\`: ask whether to build
69
- and/or create a plan, spec, diagram, mock, or wireframe; multiple selections are allowed.
85
+ For a novel feature with no explicit build action or deliverable, apply the HARD STOP
86
+ above; the immediate next call is the exact build/plan/spec/diagram/mock/wireframe
87
+ \`ask_question\`.
70
88
  Generic goals such as “improve,” “coordinate,” “prepare,” or “support” do not authorize
71
89
  analysis, a release decision, implementation, or another artifact. In this state do not
72
90
  call \`update_task\`, \`create_artifact\`, \`reserve_work_paths\`, or \`create_task\`; do not
@@ -109,6 +127,7 @@ Delivered redundantly (installed skill + MCP), phrased imperatively for the agen
109
127
  abandoning the run. Missing, stale, foreign, duplicate, or incomplete receipts are
110
128
  rejected. Ending releases only this session's work.`;
111
129
  export const PROTOCOL_SHORT = 'ctrl-spc protocol (compact — full text: MCP prompt `ctrl-spc-protocol`): ' +
130
+ 'HARD STOP unclear novel feature: immediately after record_context_exploration, ask_question category intent exactly “What should I produce for this feature? Select one or more: build, plan, spec, diagram, mock, wireframe.” Then end_work blocked pending_user_answer. No intervening get_task/update_task/create_artifact/reservation/tool; read-only sandbox is not a missing checkout. ' +
112
131
  '1) get_task is read-only; begin_work (run coordinator); resolve missing checkouts via fetch/link or acknowledge_unavailable_checkout. ' +
113
132
  '2) Every item needs read-only subagents covering scope IDs once. Codex spawn_agent MUST use fork_turns:none; its self-contained prompt has exact IDs/paths/focus, no copied command. Child calls no ctrl-spc tools and writes nothing. If unavailable, record blocked; stop. ' +
114
133
  '3) Parent must record_context_exploration before deciding, asking, planning, reserving, or editing. Before success narrate process only—no findings/conclusions/impact/decisions. Later summaries add no unpersisted facts. ' +
package/dist/skills.js CHANGED
@@ -38,12 +38,16 @@ export function codexLegacySkillPath() {
38
38
  function protocolBody(mcpUrl) {
39
39
  return `Resolve a CTRL+SPC work item or artifact pasted as \`/ctrl-spc work <id>\` or \`/ctrl-spc artifact <id>\`, then follow the ctrl-spc working protocol:
40
40
 
41
+ HARD STOP — unclear novel feature: after \`record_context_exploration\` succeeds, if the task does not explicitly request a build or name a deliverable, the next tool call MUST be \`ask_question\` with category \`intent\` and this exact question: “What should I produce for this feature? Select one or more: build, plan, spec, diagram, mock, wireframe.” Then call \`end_work\` with reason \`pending_user_answer\` and outcome \`blocked\`. In that run, never call \`get_task\` again, \`update_task\`, \`create_artifact\`, \`reserve_work_paths\`, or any other tool between the context artifact and \`ask_question\`. The context artifact is the only allowed artifact. Do not copy findings into the task description before the user answers. A read-only execution sandbox is not a missing checkout and must not change this intent question.
42
+
43
+ Before the context artifact exists, never state or imply a requested deliverable and never mention repository counts, contents, tests, findings, or likely impact. If progress commentary is required, use only: “The required CTRL+SPC context review is in progress; no decision or repository change has been made.” After the context artifact and before the intent question, either say nothing or use only: “The required context review is saved to the work item. I am applying the task's explicit intent gate now.”
44
+
41
45
  1. Resolve without side effects — call \`get_task\` before anything else. It is read-only: it does not change status, presence, claims, or reservations. The ID is the only context in the paste; everything current lives in ctrl-spc.
42
46
  2. Begin explicitly — call \`begin_work\` after reading the topology. The first live run is coordinator and \`begin_work\` moves Backlog to In Progress; later runs join as collaborators. Only the coordinator changes status. Never mark an item \`done\` autonomously.
43
47
  3. Repair missing context — if \`begin_work\` reports an unavailable checkout, warn the user and offer to fetch or link it. Never fetch without approval. If the user explicitly continues without it, call \`acknowledge_unavailable_checkout\`, then call \`begin_work\` again after every missing scope is fetched or acknowledged.
44
48
  4. Delegate exploration — every pasted work item MUST use at least one read-only subagent. After \`begin_work\` joins, partition every available repository scope exactly once across bounded subagent invocations. Every child prompt must explicitly list its assigned \`repository_scope_ids\`; across the batch each available ID appears exactly once. When using Codex \`spawn_agent\`, MUST pass \`fork_turns: "none"\`; never pass \`all\` or a recent-turn count. Give each child a self-contained assignment containing only its exact scope IDs, checkout paths, inspection focus, read-only restrictions, and required report shape. Never include or inherit the parent \`/ctrl-spc work\` command. The child must not call any ctrl-spc tool—including \`get_task\` or \`begin_work\`—or pick up the work item; it only inspects assigned paths and returns its report. If zero scopes are available after explicit acknowledgements, one child inspects the task/artifact context and reports those unavailable scopes without pretending they were reviewed. Children inspect only: no file mutation, path reservation, ctrl-spc call, \`tee\`, shell redirection, temp/capture file, install, formatter, cache-generating command, or any command that can write. Inspection-first is sufficient; do not decide intent before reports are persisted. Each report uses \`{ agent, focus, repository_scope_ids, inspected_paths, findings, likely_impact, unresolved_questions }\`. If no subagent is available, do not explore directly: call \`record_context_exploration\` with \`blocked_reason = subagents_unavailable\`, tell the user, and stop.
45
49
  5. Persist context before deciding — the parent consolidates every child report and MUST call \`record_context_exploration\` to create the work item's analysis artifact before deciding what to do, asking a task question, planning, reserving, or editing. Pass the structured reports plus a separate coverage array; include every active scope exactly once, and give unavailable scopes their acknowledgement. Before the tool succeeds, commentary may state process only: never disclose findings, conclusions, likely impact, or decisions. After persistence, terminal summaries may reference the persisted artifact/question but must add no unpersisted facts.
46
- 6. Decide or ask deterministically — after exploration is recorded, classify intent only from the work item's explicit wording and accepted answers, never from findings. Findings do not authorize a deliverable. Infer and perform the action only when the item explicitly names it. Otherwise persist only the necessary question with \`ask_question\`. For a bug, ask for reproduction steps, expected behavior, or actual behavior only when each is missing and not discoverable. For a novel feature with no explicit build action or deliverable, the mandatory next mutating call after \`record_context_exploration\` is \`ask_question\`: ask the user to select one or more: build, plan, spec, diagram, mock, wireframe. Generic goals such as “improve,” “coordinate,” “prepare,” or “support” are not deliverables. In this state do not call \`update_task\`, \`create_artifact\`, \`reserve_work_paths\`, or \`create_task\`; do not decide, edit, or complete. The context analysis is the only allowed artifact before the answer. Ask before overriding an unmet dependency, splitting work, fetching, or accepting a collision handoff. After \`ask_question\` succeeds, do no more work in that run: call \`end_work\` with reason \`pending_user_answer\` and outcome \`blocked\`, then wait for a later pasted run.
50
+ 6. Decide or ask deterministically — after exploration is recorded, classify intent only from the work item's explicit wording and accepted answers, never from findings. Findings do not authorize a deliverable. Infer and perform the action only when the item explicitly names it. Otherwise persist only the necessary question with \`ask_question\`. For a bug, ask for reproduction steps, expected behavior, or actual behavior only when each is missing and not discoverable. For a novel feature with no explicit build action or deliverable, apply the HARD STOP above: the mandatory next mutating call after \`record_context_exploration\` is \`ask_question\`; it must say select one or more: build, plan, spec, diagram, mock, wireframe.” Generic goals such as “improve,” “coordinate,” “prepare,” or “support” are not deliverables. In this state do not call \`update_task\`, \`create_artifact\`, \`reserve_work_paths\`, or \`create_task\`; do not decide, edit, or complete. The context analysis is the only allowed artifact before the answer. Ask before overriding an unmet dependency, splitting work, fetching, or accepting a collision handoff. After \`ask_question\` succeeds, do no more work in that run: call \`end_work\` with reason \`pending_user_answer\` and outcome \`blocked\`, then wait for a later pasted run.
47
51
  7. Persist answers and findings — after every accepted answer, call \`update_task\` to add the decision, constraint, acceptance criterion, and durable findings to the description. Pass the latest revision and refetch/reconcile on conflict. Do not use progress comments; do not leave findings only in the terminal.
48
52
  8. Reserve before writing — call \`reserve_work_paths\` with the topology revision, exact checkout ID, and every repository-relative path you intend to edit. Do not edit until the full atomic request succeeds. On collision, narrow to disjoint paths, wait, ask for an explicit handoff, or use an isolated Git worktree. Never edit a conflicting path.
49
53
  9. Persist every output — every substantive non-question output must be a ctrl-spc artifact before it is presented as complete. Use \`create_artifact\` type \`analysis\` for research/findings, \`plan\` for plans, \`spec\` for specifications or proposed schemas, and the matching type for diagrams, mocks, and wireframes. Never write planning documents into a repository. Every artifact includes exactly one coverage disposition and non-empty reason for every active repository scope.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl-spc/cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CTRL+SPC CLI — per-machine agent for browser login, project linking, presence, and the local MCP server.",
5
5
  "engines": {
6
6
  "node": ">=22"