docs/copilot.md
Setting up planning-with-files for GitHub Copilot (CLI, VS Code, and Coding Agent).
.github/hooks/Copy both the .github/hooks/ directory and the skills/planning-with-files/ directory into your project:
# Copy hooks (required — Copilot hook configuration and scripts)
cp -r .github/hooks/ your-project/.github/hooks/
# Copy skills (required — templates, session-catchup script, and SKILL.md)
cp -r skills/planning-with-files/ your-project/.github/skills/planning-with-files/
# Make scripts executable (macOS/Linux)
chmod +x your-project/.github/hooks/scripts/*.sh
Hooks will auto-activate for all team members. This works across Copilot CLI, VS Code, and the Coding Agent.
.github/hooks/planning-with-files.json.github/hooks/scripts/skills/planning-with-files/ to .github/skills/planning-with-files/ (templates, session-catchup script)chmod +x .github/hooks/scripts/*.sh)| Hook | Purpose | Behavior |
|---|---|---|
sessionStart | Initialization | Recovers previous context via session-catchup |
preToolUse | Context injection | Reads task_plan.md before tool operations |
postToolUse | Update reminders | Prompts to update plan after file edits |
agentStop | Completion check | Verifies if all phases are complete before stopping |
.github/
└── hooks/
├── planning-with-files.json # Hook configuration
└── scripts/
├── session-start.sh # Session initialization
├── session-start.ps1
├── pre-tool-use.sh # Plan context injection
├── pre-tool-use.ps1
├── post-tool-use.sh # Update reminders
├── post-tool-use.ps1
├── agent-stop.sh # Completion verification
└── agent-stop.ps1
session-catchup script runs. This recovers previous context if you cleared your session.pre-tool-use hook injects task_plan.md into the context. This keeps goals visible to the agent.agent-stop hook checks the phase status in task_plan.md. It prevents stopping if tasks remain.SKILL.md frontmatter hooks. Copilot uses the .github/hooks/ JSON configuration file.Stop hook corresponds to Copilot's agentStop..github/hooks/ directory is committed to your repository.bash and python3 are available in your system PATH.This setup works across the entire GitHub Copilot ecosystem: