plan-to-pr
Coordinates source-grounded implementation through a validated plan packet, planned task tickets, fixed model routing, verified commits, independent Luna review, and publication gates. Triggers: "Plan-to-PR", "plan to PR", "implement this with one task per commit", "run the Plan-to-PR workflow", "validate Plan-to-PR", "publish the PR".
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- plan-to-pr
- description
- Coordinates source-grounded implementation through a validated plan packet, planned task tickets, fixed model routing, verified commits, independent Luna review, and publication gates. Triggers: "Plan-to-PR", "plan to PR", "implement this with one task per commit", "run the Plan-to-PR workflow", "validate Plan-to-PR", "publish the PR".
02 资源文件 23
- 参考文档reference/final-validation-tasks.md1014 B
- 参考文档reference/model-routing.md2.4 KB
- 参考文档reference/packet-contract.md2.3 KB
- 参考文档reference/packet-schema.json2.7 KB
- 参考文档reference/process-inventory.md2.4 KB
- 参考文档reference/review-loop.md1.5 KB
- 参考文档reference/run-record.schema.json2.7 KB
- 参考文档reference/self-audit-tasks.md1.0 KB
- 参考文档reference/task-seeds.md818 B
- 参考文档reference/task-ticket.md2.3 KB
- 脚本scripts/config/__init__.py61 B
- 脚本scripts/config/constants.py5.8 KB
- 脚本scripts/create_packet.py5.9 KB
- 脚本scripts/load_skill_constants.py1.6 KB
- 脚本scripts/test_create_packet.py3.3 KB
- 脚本scripts/test_validate_packet.py10.6 KB
- 脚本scripts/test_validate_protocol.py6.9 KB
- 脚本scripts/test_validate_run.py5.7 KB
- 脚本scripts/validate_packet.py24.8 KB
- 脚本scripts/validate_protocol.py23.8 KB
- 脚本scripts/validate_run.py7.2 KB
- 脚本test_skill_contract.py8.0 KB
- 脚本test_task_ticket_contract.py5.0 KB
03 SKILL.md 正文
Plan-to-PR
Purpose and boundary
Use this skill for source-grounded implementation with one deliverable, one
allowed file set, one acceptance check, and one commit per task. The planning
phase creates and validates a tool-neutral docs/plans/<slug>/ packet
before any TaskCreate or TodoWrite seeding.
The skill coordinates planning, task records, model routing, commit order, review, verification, and publication. It does not replace the orchestrator or advisor capabilities used by later phases.
Native planning phase
Run this phase before task seeding and before implementation:
- The Luna max planner reads the request, repository guidance, relevant source, tests, and documentation, then selects a unique lowercase slug.
- The planner consults a Sol xhigh advisor heavily at scope, dependency, task-boundary, acceptance, and risk decisions. The advisor supports planning decisions and packet review.
- The planner writes the packet files and validates them against
reference/packet-contract.mdandreference/packet-schema.json. - The planner repairs packet findings and repeats deterministic validation until the packet passes. A failed validation blocks task seeding.
- Only a passing packet with
status: approvedmay seed host tasks. Record the packet path and validation result in the task ledger.
The packet is the sole planning handoff. It contains its own scope, evidence, task boundaries, acceptance checks, risks, and implementation order. Do not seed tasks from conversational notes or an incomplete packet.
Capability boundary
This skill owns the native planning packet, task records, routing, review, verification, and publication decisions. Later execution uses the companion orchestrator and advisor capabilities.
Refusal cases
Refuse the first matching case and stop:
- The request has no source-grounded plan packet.
- The packet is missing, invalid, outside
docs/plans/<slug>/, or not approved. - A requested change spans files outside the packet's allowed file set.
- A task contains more than one deliverable, acceptance check, or commit.
- A required task tool, verifier, model tier, advisor, review path, or gate is unavailable.
- The user asks to bypass verification, review under the review guide, final validation, or a publication gate.
Return exactly: Plan-to-PR blocked: <missing input or capability>.
Runtime and task seeding
The packet and task-run validators use Python 3 standard library only. From this skill directory, create a packet skeleton with:
python scripts/create_packet.py --repo-root <repository> --slug <slug> --base-ref <base-ref>
After the planner fills the packet, validate it with:
python scripts/validate_packet.py <repository>/docs/plans/<slug>
Run python scripts/validate_protocol.py <record.json> for each task record;
exit 0 means valid and exit 2 means invalid.
After packet approval, seed one host task for every packet task with
TaskCreate, TodoWrite, or its equivalent. Each task records exactly one
deliverable, one allowed file set, one acceptance check, and one commit. Mark a
task complete only with verifier output and its commit identity. Use the fixed
contracts in reference/task-ticket.md, reference/model-routing.md,
reference/task-seeds.md, reference/final-validation-tasks.md, and
reference/self-audit-tasks.md. The fixed fields live in those references.
Model contract
The planner and final validator use Luna max with Sol xhigh advisory heavily at decisive points. The orchestrator uses the max route and delegates every work task. Every implementation, review, and repair worker uses fast, low-effort Luna. Unavailable models or routing tools fail closed; never promote workers, demote planners or validators, or substitute a role route.
The planner owns the approved packet. The orchestrator owns task assignment, ledger state, and result reconciliation. Workers change only their ticket's files and run its acceptance check. The final validator checks the complete history and publication gates.
One-task and one-commit protocol
For each seeded task:
- The orchestrator issues the standalone task ticket.
- One worker implements one deliverable within the ticket's allowed files.
- The worker runs the one acceptance check and reports exact output and blockers.
- Review and verify the task diff, baseline, named checks, and ticket-to-diff scope under the review guide.
- The orchestrator creates exactly one commit and records its hash.
No task borrows files, acceptance checks, or commit history from another task. Unrelated changes remain untouched and uncommitted.
Review and repair
Before every commit, record fresh verification and review under the review guide.
After the commit, a separate fast low-effort Luna review worker runs native
findings-only correctness review at /e-code-review low. The review returns
findings only and has no repair flag.
A separate fast low-effort Luna repair worker applies only confirmed findings. Record resolved model, effort, command, findings, repair status, and surface hash. Rerun the task acceptance check and fresh exact-surface verification, amend the task commit, and repeat native review until clean. The max review is the correctness gate after cleanup.
Final validation and publication
The Luna max final validator maps every commit to one packet task and checks cumulative behavior, the allowed-file ledger, acceptance checks, verification output, and post-commit review records. Any unmapped commit, missing record, failed gate, or unresolved finding blocks publication.
Run the workflow self-audit and retain its evidence. Publish only when final validation
and self-audit pass. After the branch is finalized and pushed, run Luna max /e-simplify
for cleanup-only fixes, then Luna low /e-code-review max loop with a separate
Luna low repair worker. commit, and push every validated repair;
finish only when the max review is clean.
Companion references
reference/packet-contract.md— native planning packet contract.reference/packet-schema.json— machine-readable packet schema.scripts/create_packet.py— deterministic packet skeleton creator.scripts/validate_packet.py— deterministic packet validator.reference/model-routing.md— fixed model and gate matrix.reference/task-ticket.md— task, commit, and review record contract.reference/review-loop.md— review and repair loop.reference/process-inventory.md— evidence homes.reference/run-record.schema.json— machine-checkable task-run record.
Run scripts/validate_run.py with the task records and commit set during final
validation. Add --worktree PATH when the commit set belongs to another tree.
04 同仓库更多 Skills
update
Fast-forwards a local repository's main branch to a remote's main after confirming the repo path and source remote through AskUserQuestion. Use when the user says '/update', 'update main', 'fast-forward main', 'sync main from origin', 'pull latest main into <path>', or 'bring main up to date'.
source-command-sr-loop
Converging cleanup loop: repeat /simplify until clean, then repeat /code-review --fix until clean
skill-builder
Skill lifecycle: classify, scaffold, write via the skill-writer-agent, self-audit, compose sub-skills, polish description triggers, enforce deterministic scripts. Triggers: build a skill, new skill workflow, improve this skill, optimize skill description, skill development lifecycle, skill modularity, skill composition, description trigger catalog, deterministic skill scripts.
session-tidy
Audit, clean, and consolidate session logs in the Obsidian vault. Fixes format drift, resolves orphaned next-steps, updates stale statuses, and generates project rollup summaries. Use when session logs feel cluttered or before starting a new project milestone. Triggers on '/session-tidy', 'tidy sessions', 'clean up session logs', 'session audit'.
session-log
Logs a session report as an HTML page, tracks vault context, extracts decisions, and outputs a /rename command. Use for /session-log, 'journal this session', 'log this work', 'session report', 'summarize/log/record this session', 'save session', 'capture session', or 'document what we did'.
run-claude-dev-env
Build, install, run, and test the claude-dev-env installer. Use when asked to run claude-dev-env, install the Claude Code config into ~/.claude, drive the installer, smoke-test it against a sandbox, or run its test suite.