with one click
implement
Execute sprint tasks with production-quality code and tests
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Execute sprint tasks with production-quality code and tests
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Bridgebuilder — Autonomous PR Review
Triage a bug report through structured phases and create micro-sprint
Launch PRD discovery with codebase grounding and context ingestion
Validate sprint implementation against acceptance criteria
Security and quality audit of application codebase
Autonomous agent execution mode
| name | implement |
| description | Execute sprint tasks with production-quality code and tests |
| role | implementation |
| capabilities | {"schema_version":1,"read_files":true,"search_code":true,"write_files":true,"execute_commands":true,"web_access":true,"user_interaction":true,"agent_spawn":true,"task_management":true} |
| cost-profile | heavy |
| parallel_threshold | 3000 |
| timeout_minutes | 120 |
| zones | {"system":{"path":".claude","permission":"none"},"state":{"paths":["grimoires/loa",".beads"],"permission":"read-write"},"app":{"paths":["src","lib","app"],"permission":"read"}} |
| inputs | [{"path":"grimoires/loa/known-failures.md","why":"Context-Intake Discipline — read first (prior dead-ends)"},{"path":"CLAUDE.md","why":"process compliance + Karpathy principles"}] |
<input_guardrails>
Skip this section entirely when .loa.config.yaml has guardrails.input.enabled: false or env
LOA_GUARDRAILS_ENABLED=false.
Otherwise: write the user's invocation prompt/args to a temp file (Write tool), then run
.claude/scripts/guardrails-orchestrator.sh --skill implementing-tasks --mode ${LOA_RUN_MODE:-interactive} --file <temp-file>
| Outcome | Action |
|---|---|
JSON action: "BLOCK" | HALT; report the script's reason to the user |
JSON action: "PROCEED" or "WARN" | Continue (logging is handled by the script) |
| Script missing, non-zero exit, or unparseable output | Continue — fail-open, preserving pre-cycle-119 semantics |
Never pass prompt text as a bash argv (quote-blindness FP class) — always via --file.
</input_guardrails>
<prompt_enhancement_prelude>
If .loa.config.yaml sets prompt_enhancement.invisible_mode.enabled: true and this command's
frontmatter does not set enhance: false, silently apply the PTCF scoring + template flow from
.claude/skills/enhancing-prompts/SKILL.md to the user's request before main logic (log per that
skill; never show enhancement output). On any error, or when disabled: proceed with the original
prompt unchanged.
</prompt_enhancement_prelude>
<zone_constraints>
This skill operates under Managed Scaffolding:
| Zone | Permission | Notes |
|---|---|---|
.claude/ | NONE | System zone - never suggest edits |
grimoires/loa/, .beads/ | Read/Write | State zone - project memory |
src/, lib/, app/ | Read/Write | App zone - implementation target |
NEVER suggest modifications to .claude/. Direct users to .claude/overrides/ or .loa.config.yaml.
</zone_constraints>
<cli_tool_permissions>
Agents SHOULD proactively run CLI tools from the approved allowlist without asking:
| Tool | Allowed Commands | Notes |
|---|---|---|
git | status, log, diff, branch, show | Local only, no network |
gh | issue list, issue view, pr list, pr view, pr checks | Use --json + field filtering to avoid leaking secrets from PR bodies |
npm/bun | test, run lint, run typecheck, run format | Build/check + format-check commands (#1086) |
cargo | check, test, clippy | Build/check commands |
| Operation Type | Examples |
|---|---|
| Network writes | git push, gh pr create, gh issue create |
| Deployments | railway deploy, vercel deploy |
| Package mutations | npm install, cargo add |
| Cloud CLIs | aws, gcloud, az (any operation) |
| Destructive | rm, git reset, git checkout -- . |
--json output and filter fields when available to avoid printing secrets<integrity_precheck>
Before ANY operation, verify System Zone integrity:
yq eval '.integrity_enforcement' .loa.config.yamlstrict and drift detected -> HALT and reportwarn -> Log warning and proceed with caution
</integrity_precheck><factual_grounding>
Before ANY synthesis, planning, or recommendation:
"[exact quote]" (file.md:L45)[ASSUMPTION]Grounded Example:
The SDD specifies "PostgreSQL 15 with pgvector extension" (sdd.md:L123)
Ungrounded Example:
[ASSUMPTION] The database likely needs connection pooling
</factual_grounding>
<context_discipline>
Follow .claude/protocols/tool-result-clearing.md. Thresholds: single result >2K tokens /
accumulated >5K / full file >3K / session total >15K → extract findings (≤10 files, ≤20 words
each, with file:line) to grimoires/loa/NOTES.md, then reason from the synthesis, not raw dumps.
Session start: read NOTES.md "Session Continuity". Session end / pre-compaction: update it
(decisions → Decision Log, discovered issues → Technical Debt).
</context_discipline>
<trajectory_logging>
Log each significant step to grimoires/loa/a2a/trajectory/{agent}-{date}.jsonl:
{"timestamp": "...", "agent": "...", "action": "...", "reasoning": "...", "grounding": {...}}
</trajectory_logging>
<kernel_framework>
Implement sprint tasks from grimoires/loa/sprint.md with production-grade code and tests. Generate implementation report at grimoires/loa/a2a/sprint-N/reviewer.md. Address feedback iteratively.
grimoires/loa/sprint.md (tasks), grimoires/loa/prd.md (requirements), grimoires/loa/sdd.md (architecture)grimoires/loa/a2a/sprint-N/auditor-sprint-feedback.md (security audit - HIGHEST PRIORITY)grimoires/loa/a2a/sprint-N/engineer-feedback.md (senior lead review)grimoires/loa/a2a/integration-context.md (if exists) for context preservation, documentation locations, commit formatsSuccess = All acceptance criteria met + comprehensive tests pass + detailed report at expected path
Report MUST include (in this order, enforced):
Before writing the COMPLETED marker for a sprint, the implementation report
MUST contain an ## AC Verification section that walks every acceptance
criterion from grimoires/loa/sprint.md. Each AC requires:
✓ Met / ✗ Not met / ⚠ Partial / ⏸ [ACCEPTED-DEFERRED]Met claim, a specific path and line
pointing to the symbol, assertion, or test that proves the AC is honored[ACCEPTED-DEFERRED] requires a matching entry
in grimoires/loa/NOTES.md under the Decision LogSkill behavior enforcement:
COMPLETED marker if any AC has status ✗ Not met or
⚠ Partial without an accompanying scope-split to a follow-up sprint taskThis gate catches SDD-implementation drift at implement time rather than
letting it slip through to /review-sprint, saving the fix-loop round trip.
Karpathy-aligned: goal-driven verification, not just code written.
See resources/templates/implementation-report.md for the structured
## AC Verification template.
MUST: immediately before writing the COMPLETED marker, run
.claude/scripts/validate-ac-verification.sh --report grimoires/loa/a2a/sprint-N/reviewer.md --sprint grimoires/loa/sprint.md.
Exit 0 → proceed. Exit 1 → fix the reported AC rows (exact repair text) and
re-run before writing the marker. Exit 2 (usage error / file not found) →
treat as a validator FAILURE, do NOT proceed: fix the report/sprint path and
re-run. Script missing entirely → fall back to the manual walk above
(fail-open, pre-cycle-119 semantics).
Before marking a task done, run the SAME fast checks CI will run — not just a
linter + tests. When the project configures them (detect from pyproject.toml,
package.json scripts, .golangci.yml, Cargo.toml, or the .github/workflows
files), ALSO run, in addition to the linter and tests:
ruff format --check, prettier --check,
gofmt -l, cargo fmt --check, … (a formatter that would rewrite files is
a red CI waiting to happen), andmypy, tsc --noEmit, pyright, go vet, ….Treat a format-check or type-check failure exactly like a lint/test failure: fix it before handoff. Goal: the agent's self-check == CI's fast gate, so work marked done doesn't bounce on formatting/types after it's otherwise approved. Tool-agnostic — the above are examples; run whatever the project configures. </kernel_framework>
<uncertainty_protocol>
<karpathy_principles>
Karpathy Principles are injected every session via CLAUDE.loa.md. Full protocol:
.claude/protocols/karpathy-principles.md.
</karpathy_principles>
<grounding_requirements> Before implementing:
grimoires/loa/a2a/sprint-N/auditor-sprint-feedback.md FIRST (security audit)grimoires/loa/a2a/sprint-N/engineer-feedback.md SECOND (senior lead)grimoires/loa/a2a/integration-context.md for organizational contextgrimoires/loa/sprint.md for acceptance criteriagrimoires/loa/sdd.md for technical architecturegrimoires/loa/prd.md for business requirements> From sprint.md: Task 1.2 requires....claude/scripts/qmd-context-query.sh exists and qmd_context.enabled is not false in .loa.config.yaml:
.claude/scripts/qmd-context-query.sh --query "<task_desc> <file_names>" --scope grimoires --budget 2000 --format text<citation_requirements>
<karpathy_goal_driven_gate>
Karpathy principle 4 (Goal-Driven Execution) requires testable verification before implementation. Tasks without written success criteria invite scope drift and unverifiable completion claims. This gate enforces the principle at the /implement entry point.
Before Phase -2 (Beads-First Integration) runs:
grimoires/loa/sprint.mdyq eval '.karpathy_principles.require_success_criteria // true' .loa.config.yaml| Section present | Config require_success_criteria | Action |
|---|---|---|
| Yes | any | Proceed to Phase -2 normally |
| No | false | Proceed (operator opted out) — log to trajectory: {"phase":"karpathy_check","principle":"goal_driven","verdict":"skipped_by_config",...} |
| No | true (default) | AskUserQuestion before any tool call |
When the gate fires, present these 3 options:
| Option | Effect |
|---|---|
| Provide criteria now | Operator dictates the criteria; agent appends a "Success Criteria" section to sprint.md, then proceeds |
| Skip with rationale | Operator provides a 1-line rationale; agent logs to trajectory and proceeds |
| Abort | Exit cleanly (no tool calls); operator can re-invoke /implement after updating sprint.md |
Every gate decision emits a single event to grimoires/loa/a2a/trajectory/karpathy-{date}.jsonl:
{"phase":"karpathy_check","principle":"goal_driven","verdict":"passed|skipped_by_config|skipped_by_operator|aborted","timestamp":"...","sprint_path":"..."}
The schema at .claude/data/trajectory-schemas/karpathy-check.payload.schema.json
permits principle: goal_driven alongside the surgical_changes events from
the K-1 hook.
This gate is intentionally NOT a "remind once and proceed" check — it's a
precondition. Even autonomous /run cycles MUST satisfy it, either via
config-driven opt-out (require_success_criteria: false for trusted batch
runs) or via per-invocation skip with rationale. The rationale itself is the
audit trail.
See: #961 K-3 / FR-4, PR #960 (companion: inline Karpathy in CLAUDE.loa.md),
.claude/protocols/karpathy-principles.md (full protocol doc).
</karpathy_goal_driven_gate>
Beads task tracking is the EXPECTED DEFAULT. Check health and sync before implementation.
For sprint task lifecycle: Use beads (br) commands exclusively.
br update <task-id> --status in-progress when starting a taskbr close <task-id> when completing a taskbr list to see all tasks and their statusClaude's TaskCreate/TaskUpdate: Use ONLY for session-level progress display to the user (e.g., showing a progress checklist). These are NOT a substitute for beads task tracking. Sprint tasks tracked only via TaskCreate are invisible to cross-session recovery, /run-resume, and beads health checks.
If beads is not available: Fall back to markdown tracking in NOTES.md (existing behavior).
health=$(.claude/scripts/beads/beads-health.sh --quick --json)
status=$(echo "$health" | jq -r '.status')
| Status | Action |
|---|---|
HEALTHY | Import state and proceed |
DEGRADED | Warn, import state, proceed |
NOT_INSTALLED/NOT_INITIALIZED | Check opt-out, fallback to markdown |
MIGRATION_NEEDED/UNHEALTHY | Warn, fallback to markdown |
Import latest state:
br sync --import-only
.claude/scripts/beads/update-beads-state.sh --sync-import
Use beads_rust for task lifecycle:
br ready - Get next actionable task (JIT retrieval)br update <task-id> --status in_progress - Mark task startedbr close <task-id> - Mark task completedCheck for valid opt-out:
opt_out=$(.claude/scripts/beads/update-beads-state.sh --opt-out-check 2>/dev/null || echo "NO_OPT_OUT")
If no valid opt-out, log warning:
Beads not available. Task tracking via markdown only.
Consider installing: cargo install beads_rust && br init
Fallback: Use markdown-based tracking from sprint.md.
.claude/scripts/beads/update-beads-state.sh --health "$status"
IMPORTANT: Users should NOT run br commands manually. This agent handles the entire beads_rust lifecycle internally:
br sync --import-only, then br ready to find first unblocked taskbr update <task-id> --status in_progressbr close <task-id>br sync --flush-only then record: .claude/scripts/beads/update-beads-state.sh --sync-flushSee .claude/protocols/beads-preflight.md for full specification.
Assess context size to determine if parallel splitting is needed:
wc -l grimoires/loa/prd.md grimoires/loa/sdd.md grimoires/loa/sprint.md grimoires/loa/a2a/*.md 2>/dev/null
Thresholds:
| Size | Lines | Strategy |
|---|---|---|
| SMALL | <3,000 | Sequential implementation |
| MEDIUM | 3,000-8,000 | Consider parallel if >3 independent tasks |
| LARGE | >8,000 | MUST split into parallel |
If MEDIUM/LARGE: See <parallel_execution> section below.
If SMALL: Proceed to Phase 0.
Check grimoires/loa/a2a/sprint-N/auditor-sprint-feedback.md:
If exists + "CHANGES_REQUIRED":
If exists + "APPROVED - LET'S FUCKING GO":
If missing:
Check grimoires/loa/a2a/sprint-N/engineer-feedback.md:
If exists + NOT "All good":
If exists + "All good":
If missing:
Check grimoires/loa/a2a/integration-context.md:
If exists, read for:
Review core documentation:
grimoires/loa/sprint.md - Primary task list and acceptance criteriagrimoires/loa/prd.md - Product requirements and business contextgrimoires/loa/sdd.md - System design and technical architectureAnalyze existing codebase:
Create implementation strategy:
# 0. Import latest state (session start)
br sync --import-only
# 1. Get next actionable task
TASK=$(br ready --json | jq '.[0]')
TASK_ID=$(echo $TASK | jq -r '.id')
# 2. Mark in progress (automatic - user never sees this)
br update $TASK_ID --status in_progress
# 3. Implement the task...
# 4. Mark complete (automatic - user never sees this)
br close $TASK_ID
# 5. Repeat for next task...
# 6. Flush state before commit (session end)
br sync --flush-only
The user only runs /implement sprint-1. All br commands are invisible.
When bugs or tech debt are discovered during implementation:
.claude/scripts/beads/log-discovered-issue.sh "$CURRENT_TASK_ID" "Description of discovered issue" bug 2
This creates a new issue with semantic label discovered-during:<parent-id> for traceability.
Testing Requirements:
Code Quality Standards:
Create report at grimoires/loa/a2a/sprint-N/reviewer.md:
Use template from resources/templates/implementation-report.md.
Key sections:
MUST, immediately before writing any COMPLETED marker: run
.claude/scripts/validate-ac-verification.sh --report <reviewer.md> --sprint grimoires/loa/sprint.md
(see AC Verification Gate above for the full contract and fail-open fallback).
<file_creation_safety>
Use the Write tool for ALL source files — never an unquoted Bash heredoc,
which silently corrupts template-literal syntax (${variable}) in .tsx/.ts/
.jsx/.vue/.md and similar. This duplicates the canonical rule in
.claude/rules/shell-conventions.md; the full decision tree lives in
.claude/protocols/safe-file-creation.md, and the expanded rules, examples, and
pre-write checklist are in resources/REFERENCE.md.
</file_creation_safety>
<parallel_execution>
When multiple feedback sources exist:
Spawn 2 parallel Explore agents:
Agent 1: "Read grimoires/loa/a2a/sprint-N/auditor-sprint-feedback.md:
1. Does file exist?
2. If yes, verdict (CHANGES_REQUIRED or APPROVED)?
3. If CHANGES_REQUIRED, list all CRITICAL/HIGH issues with file paths
Return: structured summary"
Agent 2: "Read grimoires/loa/a2a/sprint-N/engineer-feedback.md:
1. Does file exist?
2. If yes, verdict (All good or changes requested)?
3. If changes, list all feedback items with file paths
Return: structured summary"
When sprint has multiple independent tasks:
1. Read sprint.md and identify all tasks
2. Analyze task dependencies
3. Group into parallel batches:
- Batch 1: Tasks with no dependencies (parallel)
- Batch 2: Tasks depending on Batch 1 (after Batch 1)
For independent tasks, spawn parallel agents:
Agent 1: "Implement Task 1.2 - read acceptance criteria, review patterns, implement, write tests, return summary"
Agent 2: "Implement Task 1.3 - read acceptance criteria, review patterns, implement, write tests, return summary"
Evidence-gathering fan-outs (e.g. Option A feedback checks, codebase surveys) MAY dispatch the
loa-scout agent (haiku, read-only — .claude/agents/loa-scout.md) instead of a full Explore
agent, to cut cost on pure read-and-report work. Implementation substeps (any Write/Edit) and
anything verdict-bearing (feedback verdict classification, AC status determination, audit/review
judgments) MUST stay in-session or on a full agent — never delegated to loa-scout.
</parallel_execution>
<output_format>
See resources/templates/implementation-report.md for full structure.
Key sections:
<success_criteria>
<semver_requirements>
See resources/REFERENCE.md for the SemVer version format (MAJOR.MINOR.PATCH),
the when-to-bump table, and the version update process.
</semver_requirements>
<task_planning>
A task is complex if ANY of these apply:
For complex tasks, create a plan BEFORE writing code: see the Task Plan
Template in resources/REFERENCE.md for the full plan structure (Objective,
Approach, Files to Modify, Dependencies, Risks, Verification, Acceptance Criteria).
Before implementing:
For simple tasks (documentation updates, config changes, small fixes), planning is optional. Use judgment.
Task plans are stored in grimoires/loa/a2a/sprint-N/task-{N}-plan.md and become part of the review artifact.
</task_planning>
Red Flags (immediate action required):
<beads_workflow>
The canonical br task lifecycle is Phase -2 (Beads-First Integration) above
and .claude/protocols/beads-integration.md. The full session-start /
task-lifecycle / semantic-labels / session-end command reference (including
get-ready-work.sh and the label table) is in resources/REFERENCE.md.
</beads_workflow>
<retrospective_postlude>
After main skill logic completes, if .loa.config.yaml invisible_retrospective.enabled: true
(and not disabled for this skill under invisible_retrospective.skills), silently run the
learning-signal scan per .claude/skills/continuous-learning/SKILL.md and its
resources/RETROSPECTIVE.md (quality gates, sanitization, trajectory logging). Recursion guard:
never when the active skill is continuous-learning itself.
</retrospective_postlude>