speckit-companion-after-plan

Records plan completion state into .spec-context.json for the SpecKit Companion GUI.

1|Updated Nov 21, 2020
One-click install
npx skills add https://github.com/LuanDopke/persefone --skill speckit-companion-after-plan-luandopke
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-companion-after-plan
Source: https://github.com/LuanDopke/persefone/tree/main/.agents/skills/speckit-companion-after-plan
Command: npx skills add https://github.com/LuanDopke/persefone --skill speckit-companion-after-plan-luandopke

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When using spec-kit with the Companion GUI, the interface needs to know when the plan step finishes so it can re-render the correct step and status. This Skill captures that lifecycle event automatically as an after_plan hook, writing the state without manual file edits. ## Core Features & Use Cases - State Capture Hook: Runs as the after_plan lifecycle hook to stamp currentStep=plan and status=planned into .spec-context.json. - Automatic Feature Resolution: Resolves the active feature directory via --feature-dir, environment variables, .specify/feature.json, or the current git branch prefix. - Graceful Degradation: Never fails the host command; skips with a warning if python3 is missing or the feature directory cannot be resolved. - Use Case: After running /speckit.plan in a spec-kit project, this hook fires so the Companion GUI immediately shows the plan step as completed, with an idempotent, atomic history append. ## Quick Start Run the after-plan companion hook to record that the plan step just completed for the current feature.

Frequently Asked Questions about speckit-companion-after-plan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I record plan completion for the SpecKit Companion GUI?▼

Run python3 .specify/extensions/companion/scripts/write-context.py with --step plan --status planned --kind complete --by extension from the repository root. The script updates .spec-context.json in the active feature directory atomically.

How does the write-context script find the active feature directory?▼

It resolves the directory in order: the --feature-dir flag, the SPECIFY_FEATURE_DIRECTORY environment variable, SPECIFY_FEATURE, .specify/feature.json, then the current git branch prefix. Passing --feature-dir explicitly makes resolution unambiguous.

What happens if python3 is not installed when the hook runs?▼

The hook skips the capture and prints a warning that python3 was not detected. It never fails the host command, so the core /speckit.plan workflow continues unaffected.

Does re-running the after_plan hook duplicate history entries?▼

No. The completion append is idempotent, so a re-fired hook never doubles the entry. The write is atomic using a temp file plus rename, and it appends to history[] without rewriting existing entries.

What are the limitations of the after_plan companion hook?▼

It is state-writing only and does not create the plan document, which is handled by the core /speckit.plan workflow. It also requires a spec-kit project structure with a .specify directory to function.