Embed a copyable re-invoke command in every generated plan so any developer can resume, reference, or re-run the planning workflow directly from the plan HTML — no need to reconstruct the command from scratch.
/plan-agent:planning add-reinvoke-prompt-to-plan-output.html add re-invoke prompt to plan output
add-reinvoke-prompt-to-plan-output.html
docs/plans/add-reinvoke-prompt-to-plan-output.html
Context
Plans generated by the plan-agent:planning skill are self-contained HTML files stored in docs/plans/. Once a plan exists, the only way to re-invoke the skill against it (to continue implementation, update status, or run a follow-up) is to manually reconstruct the original command — the filename and a short objective summary. There is no prompt in the plan itself that surfaces this command.
The user wants each generated plan to include a visible, copyable re-invoke command in the format /plan-agent:planning <filename>.html <short-objective> so the workflow is recoverable from the artifact alone.
Steps
.plan-reinvoke CSS block to SKELETON.html
.copy-prompt-btn affordance (which targets <pre> blocks).Verify
SKELETON.html and confirm: .plan-reinvoke, .plan-reinvoke-label, .plan-reinvoke code, and .copy-cmd-btn CSS rules exist; @media print hides the row; no existing rule is modified..plan-reinvoke HTML element to SKELETON.html immediately below the .objective-card
Verify
SKELETON.html, find the #objective div (.objective-card). Confirm a <div class="plan-reinvoke"> element appears immediately after it and before .progress-wrap, and contains: <span class="plan-reinvoke-label">, <code id="reinvoke-cmd" aria-label="Re-invoke command">{reinvoke-cmd}</code>, and a button with onclick="copyCmd(this)".copyCmd() JavaScript function to SKELETON.html
copyPrompt() function targets <pre> siblings; the reinvoke row uses an inline <code> element with a known ID. A separate copyCmd() avoids brittle DOM traversal and keeps the two copy patterns independent.Verify
<script> block, confirm copyCmd(btn) is defined — it reads document.getElementById('reinvoke-cmd').textContent, copies via navigator.clipboard.writeText with document.execCommand fallback, and flashes the button with Copied ✓ / resets after 2 s.SKILL.md Step 2 (Create) and Step 3 (Frontmatter) to compute and populate {reinvoke-cmd} and <meta name="plan-reinvoke">
<meta name="plan-reinvoke"> tag so the plans-library gallery can extract the command without parsing the HTML body — this keeps the frontmatter block as the single authoritative source of machine-readable plan metadata.Verify
SKILL.md Step 2: confirm it instructs the model to set {reinvoke-cmd} = /plan-agent:planning <filename>.html <short-objective≤60chars>. Read Step 3: confirm it now lists <meta name="plan-reinvoke" content="…"> alongside the other required meta tags. Existing rules in both steps are otherwise unchanged.SKILL.md HTML Output Requirements
Verify
SKILL.md. Confirm a bullet appears stating that every plan must include a .plan-reinvoke element immediately below the .objective-card and before .progress-wrap, containing the /plan-agent:planning <filename> <short-objective> command with a copy button. No other bullets in the section are modified.Acceptance Criteria
Verification
Run /plan-agent:planning --quick test reinvoke prompt and open the generated HTML file. Confirm:
- A
.plan-reinvokerow appears immediately below the.objective-cardand before the.progress-wrap. - The command text reads
/plan-agent:planning test-reinvoke-prompt.html test reinvoke prompt(or a condensed equivalent ≤60 chars). - Clicking Copy copies the command text to clipboard and flashes "Copied ✓".
- Printing the page (Cmd+P → PDF) hides the reinvoke row.
Also confirm that this plan file itself already demonstrates the feature — the reinvoke row immediately below the objective card shows the correct command.