skills/planning/SKILL.md
Structured planning skill for xtrm ecosystem projects. Creates a well-documented bd issue board from any task, feature, spec, or idea — with phases, dependencies, rich descriptions, and integrated test coverage via test-planning. MUST activate whenever the user wants to "plan", "design", "architect", "break down", "structure", "scope out", or "start" a feature or epic. Also activate when: the user describes a complex task without existing issues, pastes a spec or PRD to decompose, asks "how should I approach X" or "where do I start", mentions wanting to create implementation issues, or starts a new worktree session without a claimed issue. Activate even when the user says something like "I want to implement X" — if there's no existing issue board for X, planning comes first. Never skip planning when a task spans more than 2 files or 3 steps — that's when a structured board saves hours.
npx skillsauth add jaggerxtrm/jaggers-agent-tools planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transform intent into a bd issue board: each issue self-contained, documented enough for any agent or human to work independently.
plan, design, architect, scope out, break down, how should I approachbd update --claim — plan first, then claimPhase 1 Clarify intent → understand what, why, constraints
Phase 2 Explore codebase → GitNexus + Serena, read-only
Phase 3 Structure the plan → phases, deps, CoT reasoning
Phase 4 Create bd issues → epic + tasks, rich descriptions
Phase 5 test-planning → companion test issues per layer
Phase 6 Handoff → claim first issue, ready to build
Before touching any code, nail down:
<clarification_checklist> <item>What is being built? (feature, fix, refactor, migration)</item> <item>Why — what problem does it solve?</item> <item>Constraints (must not break X, must use pattern Y, deadline)</item> <item>Known unknowns — what needs investigation?</item> <item>Priority (P0 critical → P4 backlog)</item> </clarification_checklist>
If the request is under 8 words or the scope is unclear, ask one clarifying question before exploring. Don't ask two.
Use GitNexus and Serena to understand the landscape. No file edits.
# 1) Find relevant execution flows by concept
gitnexus_query({query: "<concept related to task>"})
# 2) Get full caller/callee/process context for likely symbols
gitnexus_context({name: "<affected symbol>"})
# 3) Assess blast radius before locking the implementation plan
gitnexus_impact({target: "<symbol to change>", direction: "upstream"})
# Preview safe multi-file rename plan first
gitnexus_rename({symbol_name: "<old>", new_name: "<new>", dry_run: true})
# Confirm context before extraction/split plans
gitnexus_context({name: "<symbol to extract/split>"})
gitnexus_impact({target: "<symbol to extract/split>", direction: "upstream"})
# Map a file without reading all of it
get_symbols_overview("path/to/relevant/file.ts")
# Read just the relevant function
find_symbol("SymbolName", include_body=true)
If MCP GitNexus tools are unavailable, use the GitNexus CLI first, then Serena symbol exploration if needed.
# Verify index freshness / repository indexing
npx gitnexus status
npx gitnexus list
# Concept and architecture exploration
npx gitnexus query "<concept or symptom>" --limit 5
npx gitnexus context "<symbolName>"
# Blast radius before committing to a plan
npx gitnexus impact "<symbolName>" --direction upstream --depth 3
# If index is stale
npx gitnexus analyze
Notes:
detect_changes and rename are available via MCP tools, not GitNexus CLI subcommands.search_for_pattern("<concept or symbol>")
get_symbols_overview("path/to/relevant/file.ts")
find_symbol("<candidate symbol>", include_body=true)
find_referencing_symbols("<symbol>", "path/to/file.ts")
Capture from exploration:
gitnexus_query/gitnexus_context)Think through the plan before writing any bd commands. Use structured CoT:
<thinking> 1. What are the distinct units of work? (group by: what can change together without breaking other things) 2. What phases make sense? - P0: Scaffold (types, interfaces, file structure) — others depend on this - P1: Core (pure logic, no I/O) — depends on scaffold - P2: Boundary/Integration (HTTP, DB, CLI wiring) — depends on core - P3: Tests — companion issues, see Phase 5 3. What are the dependencies? (what must be done before X can start?) 4. What can run in parallel? (independent tasks → no deps between them) 5. What are the risks? (complex areas, unclear spec, risky refactors) 6. What is the blast-radius summary from GitNexus? (direct callers, affected processes, risk level) </thinking> <plan> <phase name="P0: Scaffold" issues="N"> Setup that unblocks all other work </phase> <phase name="P1: Core" issues="N"> Pure logic, data transforms, parsers </phase> <phase name="P2: Integration" issues="N"> CLI wiring, API clients, I/O </phase> </plan>Sizing guidance:
If the work fits under an existing open epic (bd ready to check), create tasks
under it with --parent=<existing-epic-id> and skip creating a new epic.
If this is genuinely new work with no parent, create the epic first.
using-specialists-v3)Planner-created beads use the same 7-section contract that using-specialists-v3 SKILL.md requires for orchestrator-written beads. Downstream executor / debugger / reviewer / code-sanity / security-auditor specialists read the bead via bd show <id> and expect this exact shape. Any drift between this template and the using-specialists-v3 contract creates partial contracts and weakens downstream specialist output.
The seven sections — PROBLEM / SUCCESS / SCOPE / NON_GOALS / CONSTRAINTS / VALIDATION / OUTPUT — are mandatory for every task and every epic. Optional auxiliary sections (REFERENCES, APPROACH NOTES) may follow at the bottom.
bd create \
--title="<Feature name — concise verb phrase>" \
--description="$(cat <<'EOF'
## PROBLEM
<2-3 sentences: what user/project problem this epic exists to solve. Why now.>
## SUCCESS
<End-state across all child beads. Observable, testable, in prose.>
## SCOPE
<Area of project affected. Name files, modules, packages, or bounded surfaces. Avoid generic paths like "src/". Cross-cutting epics may list multiple bounded surfaces.>
## NON_GOALS
- <Explicit boundary 1>
- <What this epic does NOT include even though tangentially related>
## CONSTRAINTS
- <Sequencing rules across children>
- <API / wire-format / migration compatibility requirements>
- <Branch / merge / release-gate rules>
## VALIDATION
- [ ] <Observable criterion 1>
- [ ] <Observable criterion 2>
- [ ] <Test suite green / drift checks clean / smoke pass>
## OUTPUT
<What the orchestrator reports back at epic close. Usually: a summary referencing each child's handoff + the integration evidence + residual risks.>
## REFERENCES
<Optional: links to specs, related issues, existing code paths, prior session reports.>
EOF
)" \
--type=epic \
--priority=<0-4>
bd create \
--title="<Action phrase — what gets built>" \
--description="$(cat <<'EOF'
## PROBLEM
<Why this task exists. What does it enable. Anchor to the epic's PROBLEM and name the specific gap this task closes.>
## SUCCESS
<Observable acceptance criteria in prose. The bar for "done" before VALIDATION checkboxes.>
## SCOPE
<Files, symbols, modules this task MAY touch. Be explicit — file:line or symbol-list when possible. Cross-cutting tasks list every surface; otherwise narrow. Forbidden boundary ("do NOT touch") goes in NON_GOALS or CONSTRAINTS.>
## NON_GOALS
- <Related improvement explicitly excluded from this task>
- <Surface that looks adjacent but is out of scope>
## CONSTRAINTS
- <Hard rule: API compatibility, error-text backward-compat, migration safety>
- <Style / pattern: follow existing convention in <file>>
- <Do-not-touch boundary outside SCOPE>
## VALIDATION
- [ ] <Lint / typecheck / unit test for this surface>
- [ ] <Regression test for the specific failure mode being fixed>
- [ ] <Integration / smoke check if applicable>
## OUTPUT
<What the executing specialist hands back: changed files list, verification evidence (command output / test pass summary), residual risks. This is what `bd show <id>` will surface to reviewer at gate.>
## APPROACH NOTES
<Optional: relevant code paths (file:line), patterns to follow, discovered risks from Phase 2 exploration. Advisory only — not a contract.>
EOF
)" \
--type=task \
--priority=<same or +1 from epic> \
--parent=<epic-id>
# B depends on A (A blocks B)
bd dep add <B-id> <A-id>
# Non-blocking relationship
bd dep relate <issue-a> <issue-b>
Every task and epic description must fill all seven mandatory sections:
If you cannot fill all seven, the scope is still unclear — go back to Phase 1.
Why this matters: the bead description is the only contract the executor / debugger / reviewer / code-sanity / security-auditor specialist sees via bd show <id>. The using-specialists-v3 SKILL.md in the specialists project teaches the human orchestrator to write 7-section contracts; the planner must produce the same so the contract surface is uniform across human-orchestrated and planner-orchestrated chains. If this template drifts from using-specialists-v3, downstream specialists work against weaker contracts and produce noisier output. Any change to either skill must be mirrored in the other.
After the implementation issues are created, invoke test-planning:
/test-planning
test-planning will:
When to call it:
Layer signals to include in your issue descriptions (helps test-planning classify correctly):
Present the board and transition to implementation.
Include a short Architecture & Impact Summary in your handoff message:
# Show the full board
bd show <epic-id>
# Claim the first implementation issue
bd update <first-task-id> --claim
Then begin work on the first task. The planning phase is complete.
<bd_commands> bd create --title="xtrm audit: detect and report stale hook wiring" --type=epic bd create --title="Scaffold xtrm audit command" --description="Context: ..." --type=task bd create --title="Implement hook validation — compare config/hooks.json to settings.json" ... bd create --title="Add --fix flag for auto-remediation" ... bd dep add <wiring-id> <scaffold-id> # wiring depends on scaffold bd dep add <fix-id> <wiring-id> # fix depends on wiring </bd_commands> </example>
<bd_command> # No issue needed — explain the correct workflow to the user: # 1. bd close <id> --reason="..." ← closes issue # 2. git add . && git commit -m "..." ← commit changes manually # 3. xt end ← push, PR, merge, worktree cleanup </bd_command> </example>
Create epic first, then 4 implementation tasks, then call /test-planning.
</approach>
</example>
Before presenting the plan to the user:
If any issue description is empty or just restates the title — it's not ready. The test of a good issue: could another agent pick it up cold and succeed?
development
Operational service-knowledge system for a project's services. One skill that creates, discovers, activates, updates, and scopes per-service expert skill packages (SKILL.md + diagnostic scripts + references), kept in sync with the code via a GitNexus-aware drift engine. Use when onboarding to a service, routing a task to the right expert, scaffolding a missing skill, or syncing a skill after the implementation drifted. Triggers: /service-skills, /creating-service-skills, /using-service-skills, /updating-service-skills, /scope, or any task that touches a registered service territory.
development
Bootstrap a complete security pipeline (Dependabot + OSV + Semgrep + gitleaks + pre-commit hooks + Codex review) on any GitHub repo. Designed for free user-private repos where GitHub Advanced Security is unavailable. Reusable across Python/TypeScript/Go/Rust stacks.
testing
Merges queued PRs from xt worktree sessions in the correct order (FIFO), maintaining linear history by rebasing remaining PRs after each merge. Use this skill whenever the user has multiple open PRs from xt worktrees, asks to "merge my PRs", "process the PR queue", "drain the queue", "merge worktree branches", or says "what PRs do I have open". Also activate after any xt-end completion when other PRs are already open, or when the user asks "can I merge yet" or "is CI green". Handles the full sequence: list → sort → CI check → merge oldest → rebase cascade → repeat until queue is empty.
testing
Autonomous session close flow for xt worktree sessions. Use this skill whenever the user says "done", "finished", "wrap up", "close session", "ship it", "I'm done", "ready to merge", or similar. Also activate when all beads issues in the session are closed, or when the user explicitly runs /xt-end. This skill is designed for headless/specialist use: it must make deterministic decisions, auto-remediate common anomalies, and avoid clarification questions unless execution is truly blocked.