Goal Execution Skill
Guidelines for AI-driven goal work within cli-jaw. Applies when a goal is active via /goal or cli-jaw goal set, and especially when using /goal plan for AI-driven goal formulation.
Two Modes
Mode 1: Direct Goal (/goal "objective")
User provides the objective directly. AI executes following these guidelines. The objective is taken verbatim as the goal.
Mode 2: AI-Planned Goal (/goal plan "objective")
AI analyzes the user's intent and formulates a specific, long-term executable goal. The user's input is a direction, not the final objective.
Planning Process (fully autonomous — no user confirmation step):
- Context Scan: Read project docs (README, CLAUDE.md, structure/, devlog/), recent git history, and relevant source code
- Scope Analysis: What does the objective mean in this specific codebase? What subsystems are affected?
- Dependency Map: What existing modules, APIs, data flows, or external services are involved?
- Risk Assessment: What could go wrong? Integration risks? Breaking changes? Performance impact?
- Sub-goal Decomposition: Break into PABCD-compatible work units, each independently verifiable
- Execution Plan: Formulate a specific, measurable goal with clear completion criteria
- Refine & Execute: Immediately refine the goal objective via API and enter PABCD autonomously
Core Guidelines
1. PABCD Integration
Every goal should be executable through the P-A-B-C-D orchestration cycle:
- P (Plan): Write a complete plan with diff-level precision
- A (Audit): Dispatch an employee to audit the plan against real code
- B (Build): Implement the plan; dispatch verification employees
- C (Check): Final sanity check (tsc, consistency, structure docs)
- D (Done): Summarize and return to IDLE
When a goal is active, it supersedes PABCD phase gates for autonomous execution. Phase transitions are mandatory shell commands (cli-jaw orchestrate A/B/C/D), not status text. "Supersedes gates" means no user wait — it does NOT mean skip P/A/B/C/D or merge work-phases into B. The evidence attestation (--attest) is still required in goal mode: it is proof-of-work, not a user-approval wait, so each forward transition must carry a real {"from","to","did"} (C→D also checkOutput/exitCode).
Multi-phase / loop goals: each sub-goal / work-phase = one FULL PABCD cycle (P→A→B→C→D). After D (state → IDLE), run cli-jaw orchestrate P to start the next work-phase; repeat until the objective is met. Never run B for several work-phases back-to-back. A "loop"/"루프" goal is multi-pass: pre-plan the full slice map and WRITE all per-phase decade docs to diff-level up front (DIFFLEVEL-ROADMAP-01) — scaffolding empty stubs is not pre-planning. It may open with a design-only PABCD pass (Phase 0) before the first implementation work-phase. Faithfully execute each PABCD-phase — never rubber-stamp a phase to advance.
2. Documentation Workflow
Documentation is required throughout the goal lifecycle:
- Planning: Create devlog entries at
devlog/_plan/<YYMMDD_topic>/ using decade numbering:
- 00-09: Research, specs, analysis (mandatory)
- 10-19: Phase 1 artifacts
- 20-29: Phase 2 artifacts
- 30+: Additional phases
- Progress: Use
cli-jaw goal update "<summary>" --evidence "<path>" at every milestone
- Bug tracking: Document bugs and fixes explicitly in devlog entries
- Phase evidence: Every PABCD phase must produce documentation evidence (devlog path or structure update)
3. Commit Discipline
- Small, atomic commits after each logical change
- Never batch multiple unrelated changes into one commit
- Each commit must be self-contained and independently reversible
- Commit messages should explain WHY, not WHAT
- Do not commit generated files, secrets, or temporary state
4. Verification Process
Scale verification effort to change complexity (adapted from harness verification-tiers pattern):
| Tier |
Criteria |
Who Verifies |
Evidence Required |
| LIGHT |
<5 files, <100 lines changed |
CLI sub-agent |
LSP diagnostics clean |
| STANDARD |
Default for mid-size changes |
jaw employee dispatch |
Diagnostics + build pass |
| THOROUGH |
>20 files OR security/architectural changes |
jaw employee (full review) |
All tests pass + independent code review |
Tier Selection Logic:
- Security-related changes (auth, credentials, tokens, permissions) -> always THOROUGH
- Architectural changes (config, schema, types, package.json) -> always THOROUGH
- Explicit user request ("careful", "thorough", "critical") -> THOROUGH
- Small isolated fixes with full test coverage -> LIGHT
- Everything else -> STANDARD
Override Triggers:
- User says "quick", "simple", "trivial" -> LIGHT
- User says "thorough", "careful", "important" -> THOROUGH
5. Sub-agent/Employee Verification Mandates
- Before claiming any phase completion, dispatch independent verification
- Verification is NOT an approval gate: dispatch -> receive result -> act immediately
- Independent reviewers must challenge completion claims, not rubber-stamp
- Evidence must be authoritative: file paths, command output, test results, runtime behavior
- If verification finds issues, fix them and re-verify; do not skip
6. Quality Gates
Adapted from the ultragoal pattern:
- No placeholder evidence: Reject any evidence containing "todo", "tbd", "stub", "not implemented", or "fake pass"
- Artifact paths required: Every validation summary must include concrete file paths
- Evidence triple required for completion: Documentation evidence + Implementation evidence + Verification evidence
- Independent review for final completion: Dispatch a separate reviewer to challenge whether all requirements are truly met
- Treat completion as unproven: Default to "not done" until evidence proves otherwise
7. When Blocked
- Try alternative approaches before declaring blocked
- If genuinely blocked (need auth, hardware, human business decision):
- Record all progress with
cli-jaw goal update
- Dispatch independent reviewer to confirm no viable path remains
- Pause with audit:
cli-jaw goal pause --agent --audit "<review summary>"
- Never declare blocked merely because work is hard, slow, or uncertain
- Never auto-complete a goal; completion is reserved for explicit user request or verified evidence
Steer Prompt Templates
Direct Goal Steer
[System] User set a new goal: "<objective>" (ID: <id>). Acknowledge the goal and help the user achieve it.
Plan Goal Steer
[System] User requested AI-driven goal planning: "<objective>" (ID: <id>).
Do NOT execute the objective directly. First ANALYZE, then EXECUTE AUTONOMOUSLY:
1. Context Scan -> 2. Scope Analysis -> 3. Dependency Map -> 4. Risk Assessment -> 5. Sub-goal Decomposition -> 6. Execution Plan
After analysis, immediately refine the goal objective and enter PABCD orchestration.
Do NOT wait for user confirmation. Execute the full goal autonomously.
1---2name: jaw-goal3description: Goal execution guidelines with PABCD integration, verification tiers, documentation workflow, and AI-driven planning4---56# Goal Execution Skill78Guidelines for AI-driven goal work within cli-jaw. Applies when a goal is active via `/goal` or `cli-jaw goal set`, and especially when using `/goal plan` for AI-driven goal formulation.910## Two Modes1112### Mode 1: Direct Goal (`/goal "objective"`)1314User provides the objective directly. AI executes following these guidelines. The objective is taken verbatim as the goal.1516### Mode 2: AI-Planned Goal (`/goal plan "objective"`)1718AI analyzes the user's intent and formulates a specific, long-term executable goal. The user's input is a direction, not the final objective.1920**Planning Process (fully autonomous — no user confirmation step):**21221. **Context Scan**: Read project docs (README, CLAUDE.md, structure/, devlog/), recent git history, and relevant source code232. **Scope Analysis**: What does the objective mean in this specific codebase? What subsystems are affected?243. **Dependency Map**: What existing modules, APIs, data flows, or external services are involved?254. **Risk Assessment**: What could go wrong? Integration risks? Breaking changes? Performance impact?265. **Sub-goal Decomposition**: Break into PABCD-compatible work units, each independently verifiable276. **Execution Plan**: Formulate a specific, measurable goal with clear completion criteria287. **Refine & Execute**: Immediately refine the goal objective via API and enter PABCD autonomously2930## Core Guidelines3132### 1. PABCD Integration3334Every goal should be executable through the P-A-B-C-D orchestration cycle:35- **P (Plan)**: Write a complete plan with diff-level precision36- **A (Audit)**: Dispatch an employee to audit the plan against real code37- **B (Build)**: Implement the plan; dispatch verification employees38- **C (Check)**: Final sanity check (tsc, consistency, structure docs)39- **D (Done)**: Summarize and return to IDLE4041When a goal is active, it supersedes PABCD phase gates for autonomous execution. Phase transitions are mandatory shell commands (`cli-jaw orchestrate A/B/C/D`), not status text. "Supersedes gates" means no user wait — it does NOT mean skip P/A/B/C/D or merge work-phases into B. The evidence attestation (`--attest`) is still required in goal mode: it is proof-of-work, not a user-approval wait, so each forward transition must carry a real `{"from","to","did"}` (C→D also `checkOutput`/`exitCode`).4243**Multi-phase / loop goals**: each sub-goal / work-phase = one FULL PABCD cycle (P→A→B→C→D). After D (state → IDLE), run `cli-jaw orchestrate P` to start the next work-phase; repeat until the objective is met. Never run B for several work-phases back-to-back. A "loop"/"루프" goal is multi-pass: pre-plan the full slice map and WRITE all per-phase decade docs to diff-level up front (DIFFLEVEL-ROADMAP-01) — scaffolding empty stubs is not pre-planning. It may open with a design-only PABCD pass (Phase 0) before the first implementation work-phase. Faithfully execute each PABCD-phase — never rubber-stamp a phase to advance.4445### 2. Documentation Workflow4647Documentation is required throughout the goal lifecycle:4849- **Planning**: Create devlog entries at `devlog/_plan/<YYMMDD_topic>/` using decade numbering:50 - 00-09: Research, specs, analysis (mandatory)51 - 10-19: Phase 1 artifacts52 - 20-29: Phase 2 artifacts53 - 30+: Additional phases54- **Progress**: Use `cli-jaw goal update "<summary>" --evidence "<path>"` at every milestone55- **Bug tracking**: Document bugs and fixes explicitly in devlog entries56- **Phase evidence**: Every PABCD phase must produce documentation evidence (devlog path or structure update)5758### 3. Commit Discipline5960- Small, atomic commits after each logical change61- Never batch multiple unrelated changes into one commit62- Each commit must be self-contained and independently reversible63- Commit messages should explain WHY, not WHAT64- Do not commit generated files, secrets, or temporary state6566### 4. Verification Process6768Scale verification effort to change complexity (adapted from harness verification-tiers pattern):6970| Tier | Criteria | Who Verifies | Evidence Required |71|------|----------|--------------|-------------------|72| **LIGHT** | <5 files, <100 lines changed | CLI sub-agent | LSP diagnostics clean |73| **STANDARD** | Default for mid-size changes | jaw employee dispatch | Diagnostics + build pass |74| **THOROUGH** | >20 files OR security/architectural changes | jaw employee (full review) | All tests pass + independent code review |7576**Tier Selection Logic:**77- Security-related changes (auth, credentials, tokens, permissions) -> always THOROUGH78- Architectural changes (config, schema, types, package.json) -> always THOROUGH79- Explicit user request ("careful", "thorough", "critical") -> THOROUGH80- Small isolated fixes with full test coverage -> LIGHT81- Everything else -> STANDARD8283**Override Triggers:**84- User says "quick", "simple", "trivial" -> LIGHT85- User says "thorough", "careful", "important" -> THOROUGH8687### 5. Sub-agent/Employee Verification Mandates8889- **Before claiming any phase completion**, dispatch independent verification90- Verification is NOT an approval gate: dispatch -> receive result -> act immediately91- Independent reviewers must challenge completion claims, not rubber-stamp92- Evidence must be authoritative: file paths, command output, test results, runtime behavior93- If verification finds issues, fix them and re-verify; do not skip9495### 6. Quality Gates9697Adapted from the ultragoal pattern:9899- **No placeholder evidence**: Reject any evidence containing "todo", "tbd", "stub", "not implemented", or "fake pass"100- **Artifact paths required**: Every validation summary must include concrete file paths101- **Evidence triple required for completion**: Documentation evidence + Implementation evidence + Verification evidence102- **Independent review for final completion**: Dispatch a separate reviewer to challenge whether all requirements are truly met103- **Treat completion as unproven**: Default to "not done" until evidence proves otherwise104105### 7. When Blocked106107- Try alternative approaches before declaring blocked108- If genuinely blocked (need auth, hardware, human business decision):109 1. Record all progress with `cli-jaw goal update`110 2. Dispatch independent reviewer to confirm no viable path remains111 3. Pause with audit: `cli-jaw goal pause --agent --audit "<review summary>"`112- Never declare blocked merely because work is hard, slow, or uncertain113- Never auto-complete a goal; completion is reserved for explicit user request or verified evidence114115## Steer Prompt Templates116117### Direct Goal Steer118```119[System] User set a new goal: "<objective>" (ID: <id>). Acknowledge the goal and help the user achieve it.120```121122### Plan Goal Steer123```124[System] User requested AI-driven goal planning: "<objective>" (ID: <id>).125Do NOT execute the objective directly. First ANALYZE, then EXECUTE AUTONOMOUSLY:1261. Context Scan -> 2. Scope Analysis -> 3. Dependency Map -> 4. Risk Assessment -> 5. Sub-goal Decomposition -> 6. Execution Plan127After analysis, immediately refine the goal objective and enter PABCD orchestration.128Do NOT wait for user confirmation. Execute the full goal autonomously.129```