From fdceedca35eb775e9b5bbca39fc6eb1d471f253f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 26 Oct 2026 03:11:42 +0000 Subject: [PATCH] fix: restore upstream plan markers and tick prompt The checker again requires git show origin/main: and /loop 1h. The adapter maps both strings. Co-authored-by: Kaitian Xie --- .../poteto-mode/playbooks/multi-phase-plan.md | 16 +++++++------- .../skills/poteto-mode/scripts/check-plan.mjs | 2 +- .../poteto-mode/scripts/check-plan.test.ts | 21 +++---------------- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md b/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md index 489db71..7042ddf 100644 --- a/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md +++ b/.agents/skills/poteto-mode/playbooks/multi-phase-plan.md @@ -32,14 +32,14 @@ Tests alone are not sufficient verification. A PR is verified only when its unit ### Arm the program - [ ] State the protocol and this plan to the operator, then stop. Start execution only on the operator's explicit go. -- [ ] Workflow sources. Record the installed plugin root and version and read these absolute paths at program start and every audit. Read project-owned resources from the repository's resolved base ref when trunk evidence is required. - - [ ] `/playbooks/.md` - - [ ] `/SKILL.md` - - [ ] `` - - [ ] `/playbooks/opening-a-pr.md` - - [ ] `` -- [ ] Audit cadence. On the operator's go, audit hourly through an explicitly requested, supported continuation or scheduling facility. Record the actual mechanism. If none is available, record active-session-only execution and the resume command; do not promise unattended ticks. -- [ ] Use this tick prompt, verbatim. "Re-read the execution playbook from its recorded installed path. Audit the operation against it and fix drift in this tick. Probe every active lane and judge progress by side effects only. Stand down a stuck lane and dispatch its replacement now. Then post a short status message to the operator in chat only when the audit found a tracked change that no earlier status message reported, such as a PR opened, a code-ready head, a round launched or closed, a verdict, a merge, a stuck agent and the action taken, a blocker added or cleared, or a decision only the operator can make. Name every such change and nothing else. Do not repeat a table, the merged list, or an unchanged blocker. If the audit found none, end the turn with no reply text. Either way, log this tick's row in your decision trail. The row names the items reported, or none." +- [ ] Read these from trunk at program start. Re-read them at every tick. + - [ ] `git show origin/main:pstack/skills/poteto-mode/playbooks/.md` + - [ ] `git show origin/main:pstack/skills/swarm/SKILL.md` + - [ ] `git show origin/main:` + - [ ] `git show origin/main:pstack/skills/poteto-mode/playbooks/opening-a-pr.md` + - [ ] `git show origin/main:pstack/skills/` +- [ ] On the operator's go, arm the audit tick as `/loop 1h` with the tick prompt below. Never leave the cadence to memory. +- [ ] Use this tick prompt, verbatim. "Re-read the execution playbook from trunk. Audit the operation against it and fix drift in this tick. Probe every active lane and judge progress by side effects only. Stand down a stuck lane and dispatch its replacement now. Then post a short status message to the operator in chat only when the audit found a tracked change that no earlier status message reported, such as a PR opened, a code-ready head, a round launched or closed, a verdict, a merge, a stuck agent and the action taken, a blocker added or cleared, or a decision only the operator can make. Name every such change and nothing else. Do not repeat a table, the merged list, or an unchanged blocker. If the audit found none, end the turn with no reply text. Either way, log this tick's row in your decision trail. The row names the items reported, or none." - [ ] On the operator's hold or stand-down, send every owner a zero-writes order at once. ### Spawn owners diff --git a/.agents/skills/poteto-mode/scripts/check-plan.mjs b/.agents/skills/poteto-mode/scripts/check-plan.mjs index d96fe6a..c3ddc39 100755 --- a/.agents/skills/poteto-mode/scripts/check-plan.mjs +++ b/.agents/skills/poteto-mode/scripts/check-plan.mjs @@ -17,7 +17,7 @@ const SUB_BLOCKS = [ "Merge.", ]; const PROGRAM_H3 = ["Arm the program", "Spawn owners", "PR mechanics", "Verdict and merge", "Boot recipe"]; -const PROGRAM_MARKERS = ["Workflow sources.", "Audit cadence.", "status message"]; +const PROGRAM_MARKERS = ["git show origin/main:", "/loop 1h", "status message"]; const HOW_TO_READ_MARKERS = [ "One box is one unit of work", "names the evidence", diff --git a/.agents/skills/poteto-mode/scripts/check-plan.test.ts b/.agents/skills/poteto-mode/scripts/check-plan.test.ts index 39da5ec..cd1debf 100644 --- a/.agents/skills/poteto-mode/scripts/check-plan.test.ts +++ b/.agents/skills/poteto-mode/scripts/check-plan.test.ts @@ -20,9 +20,7 @@ ${rule} ### PR mechanics ### Verdict and merge ### Boot recipe -Workflow sources. Read the installed plugin paths recorded in this plan. -Audit cadence. Audit hourly during an explicitly requested Codex continuation, or record active-session-only execution. -Post a status message when tracked state changes. +\`git show origin/main:\` /loop 1h status message ## PR 1 **Depends on.** None. @@ -52,10 +50,10 @@ Close. Recorded. `; -const runPlan = (example: string, expectedExit: number, plan = validPlan) => { +const runPlan = (example: string, expectedExit: number) => { const directory = mkdtempSync(join(tmpdir(), "check-plan-test-")); const file = join(directory, "plan.md"); - writeFileSync(file, plan + example); + writeFileSync(file, validPlan + example); try { const result = spawnSync("node", [checker, file], { encoding: "utf8" }); expect(result.status).toBe(expectedExit); @@ -65,19 +63,6 @@ const runPlan = (example: string, expectedExit: number, plan = validPlan) => { } }; -test("accepts Codex workflow sources and cadence without Cursor commands", () => { - expect(validPlan).not.toContain("/loop"); - expect(validPlan).not.toContain("git show origin/main:"); - runPlan("", 0); -}); - -test("requires workflow sources and an audit cadence", () => { - for (const marker of ["Workflow sources.", "Audit cadence."]) { - const result = runPlan("", 1, validPlan.replace(marker, "Omitted.")); - expect(result.stderr).toContain(`Program checklist lacks "${marker}"`); - } -}); - test("accepts ordinary, indented, and longer closing fences", () => { for (const indent of ["", " ", " ", " "]) runPlan(`${indent}\`\`\`markdown\n## Example only\n${indent}\`\`\`\n`, 0);