create-plan: v1.1.1 — fix tool names (web_extract/mcp__playwright__), echo metacharacter breakage, bash-wrapped tool calls, self-referential §6.2, add one-at-a-time rule

This commit is contained in:
Hermes Agent
2026-07-06 16:05:07 -05:00
parent 29556adb6f
commit fd3a71308e
3 changed files with 23 additions and 89 deletions

View File

@@ -200,47 +200,14 @@ The extracted section should include:
Skip the narrative Summary section (Claude can't verify prose; you already did in Phase 3).
**Step 4.3:** Write the validation prompt to a temp file (scp pattern — do NOT inline in SSH command; shell metacharacters will break):
**Step 4.3:** Compose the validation prompt and write it to a temp file. **Use `write_file`, not `echo` or `$(cat)` — shell metacharacters in the plan body (backticks, `$`, quotes) will break the command.** Then scp the file to 10.0.0.28 and run via `ask.sh`:
```bash
# Build the prompt
PROMPT="==== PLAN BEGINS ====
<full contents of <topic>_plan.md v2>
==== PLAN ENDS ====
==== RESEARCH CLAIMS/CITATIONS EXTRACT BEGINS ====
<extracted structured-claims/citations section of <topic>_research.md, ~10KB cap>
==== RESEARCH CLAIMS EXTRACT ENDS ====
You are reviewing an evidence-diff for a software plan. Below is:
1. The plan in full.
2. An extract of the structured claims, version numbers, official-URL citations, and key code/config snippets from the research evidence.
CRITICAL CONSTRAINT: Do NOT propose new features, new architecture, or new complexity. Your job is to find FLAWS in what's already proposed — not to add more. If you find a problem, say what's wrong and suggest the SIMPLEST fix.
YOUR JOB IS AN EVIDENCE-DIFF, NOT A VIBE CHECK.
For each claim the plan makes, check whether the provided research extract supports it.
For each claim in the provided research extract, check whether the plan addresses it.
Specifically report:
- Plan assertions that the research extract does NOT support (hallucinated claims)
- Major research extract findings the plan OMITS (silent gaps)
- Internal contradictions in the plan
- Missing TDD discipline (failing test before code-producing task?)
- Tasks larger than 2-5 minutes of focused work
- Missing official doc citations for tools the plan uses
Report format:
- Release-blockers (must fix)
- Medium (should fix)
- Low (nice to have)
- Pass-criteria met / not met
Do not rewrite the plan. Just report findings."
# Write locally, scp to remote, run via ask.sh
echo "$PROMPT" > /tmp/curator-claude-prompt.txt
# 1. Use write_file to create /tmp/curator-claude-prompt.txt with the composed prompt
# (see ask-claude-validation-template.md §1 for the exact prompt template)
# 2. scp the file to the remote
scp -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=30 /tmp/curator-claude-prompt.txt n8n@10.0.0.28:/tmp/curator-claude-prompt.txt
# 3. Run ask.sh on the remote
RESP=$(ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=30 n8n@10.0.0.28 '~/claude/hermes_support/ask.sh --qfile /tmp/curator-claude-prompt.txt')
echo "$RESP"
rm -f /tmp/curator-claude-prompt.txt
@@ -279,14 +246,10 @@ Claude is input, not a decision. You own the final call. Do not apply findings w
If the plan cites fewer than 3 URLs, re-verify all of them. If the plan cites more than 3, prioritize the 3 with the highest "if this is wrong, the whole plan breaks" weight.
**Step 5.2:** For each of the ≤3 URLs, fetch the current content and check it against the plan's assertion:
**Step 5.2:** For each of the ≤3 URLs, fetch the current content and check it against the plan's assertion. These are agent tool calls, not shell commands:
```bash
# For each URL:
mcp_searxng_web_url_read --url "<URL>" --maxLength 5000
# OR for docs that need a browser:
mcp_playwright_browser_navigate --url "<URL>"
```
- Call `web_extract(urls=["<URL>"], char_limit=5000)` to fetch page content as markdown.
- For docs that need a browser (JavaScript-rendered pages), call `mcp__playwright__browser_navigate(url="<URL>")` followed by `mcp__playwright__browser_snapshot()`.
For each, verify:
- Is the version number cited in the plan still the current/latest? If not, what's the new version?
@@ -355,7 +318,7 @@ Update the plan header to reflect:
**Tech Stack:** <key technologies/libraries>
**Plan version:** v<N> (final)
**Curator session:** <curator_session_id> — resume with `ask hermes --resume <curator_session_id>` for iteration, expansion, or re-validation.
**Curator session:** <curator_session_id> — captured by the dispatcher at dispatch time. Resume with `ask hermes --resume <curator_session_id>` for iteration, expansion, or re-validation.
**Validation:** Claude evidence-diff applied (<N> release-blockers, <N> medium, <N> low). <N> URL re-verifications, <N> drift(s) fixed.
**Disagreement scan:** <N> items agreed+applied, <N> agreed+skipped [reasons], <N> disagreed+rejected [reasons].
**Failure notes:** <e.g., "Adversarial validation skipped — ask-claude unreachable" or "Research phase failed">
@@ -374,7 +337,6 @@ wc -c <target_dir>/<topic>_plan.md <target_dir>/<topic>_research.md
=== CURATOR HANDOFF BEGIN ===
plan_path: <absolute path to final <topic>_plan.md>
research_path: <absolute path to <topic>_research.md>
curator_session_id: <this session's id>
phases:
1. research — <one-line summary> (research.md: <path>)
2. assembly — <one-line summary> (plan.md v1: <path>)
@@ -411,13 +373,13 @@ The dispatcher will relay this to the operator along with the resume command: `a
- **deep-research invocation:** `hermes -p research -s deep-web-research chat -q "..." -Q --max-turns 600 --yolo`
- **ask-claude invocation:** scp + `~/claude/hermes_support/ask.sh --qfile ...` (see Phase 4.3). Always use the scp pattern — never inline prompts in SSH commands.
- **Sole writer of `<topic>_research.md`:** you. No one else writes to this file.
- **Clobber guard:** the single source of truth is §6.2 Step 6.2 below (timestamped `.bak.md` rename). Do not run a separate clobber check at write time.
- **Clobber guard:** the single source of truth is Phase 6, Step 6.2 below (timestamped `.bak.md` rename). Do not run a separate clobber check at write time.
### 4.4 Failure modes (binding)
- **ask-claude unreachable:** Finalize the plan WITHOUT the adversarial pass. Header note: `"Adversarial validation skipped — ask-claude unreachable. Recommend manual review before building."` Continue to Phase 5 (if applicable) and Phase 6.
- **deep-research fails:** Retry ONCE with the same prompt. If still failing, finalize with header note: `"Research phase failed. Plan based on operator-provided brief only. Currency cannot be guaranteed."` Continue to Phase 2 with whatever evidence you have.
- **Ceiling hit (600 turns):** Stop and write the current plan with header note `"turn ceiling hit — plan may be incomplete."` Do NOT truncate silently. Better to ship an honest incomplete plan than a confident broken one. **Recovery:** the operator can resume the curator to continue from where it left off, OR start a new curator session that reads the existing `<topic>_research.md` and `<topic>_plan.md` (current state) and picks up from Phase 6 reconcile.
- **Ceiling hit (600 turns):** **Proactive save required.** Monitor your turn count. At turn ~590, stop whatever phase you're in and immediately save the current plan state with header note `"turn ceiling approaching — plan saved at turn <N>, may be incomplete."` Do NOT wait for turn 600 — the session terminates at the ceiling and you cannot write after that. **Recovery:** the operator can resume the curator to continue from where it left off, OR start a new curator session that reads the existing `<topic>_research.md` and `<topic>_plan.md` (current state) and picks up from the last completed phase.
- **Your session expires (~5h idle):** The operator's next resume returns an expired-session error. **Recovery:** the existing `<topic>_research.md` and `<topic>_plan.md` (if Phase 6 reached) survive on disk. The operator starts a fresh plan build, which reads those files and picks up from wherever the prior session left off. The expired session is not auto-resumed.
- **Operator adds new constraints mid-pipeline:** They resume you. Classify: architectural (security model, data flow, integration) → re-run Phases 24. Tactical (flag value, path, UI affordance) → apply forward and note in the plan header.