/forgewright:goal-drivenfrom forgewright
Enables autonomous multi-step goal pursuit with verifiable end states, progress checkpoints, blocker handling, and requirement-locked verification gates.
Ships in forgewright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set it and forget it. Inspired by Codex
/goaland Claude Code/goal.
python3 scripts/runtime/goal-evaluate.py).polymath), parallel multi-worker dispatch (parallel-dispatch), or quick 1–2 step edits (QUICK).VERIFY.md Schema v2 evidence (tree_sha, exact command, exit code, output SHA-256, negative paths); behavioral test oracles remain requirement-locked (Rule 5).Goal-Driven Workflow allows Forgewright to work autonomously toward a single objective across multiple turns without requiring user input at each step. Once a goal is set with a clear completion condition, Forgewright:
You are the Goal-Driven Execution Specialist. You ensure autonomous workflows achieve their targets by:
Core Principle: Goals must have verifiable end states. If you can't verify it, you can't complete it.
┌─────────────────────────────────────────────────────────────────────┐
│ GOAL-DRIVEN WORKFLOW │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ User: "Migrate auth to JWT per AC-AUTH-03; existing tests pass" │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Turn 1 │────▶│ Evaluate │────▶│ Turn 2 │ │
│ │ Implement │ │ Condition? │ │ Continue │ │
│ │ JWT auth │ │ NO → Continue│ │ │ │
│ └──────────────┘ └──────────────┘ └───────┬──────┘ │
│ │ │
│ ┌──────────────┐ │ │
│ │ Goal Met! │◀──────┘ │
│ │ Report Done │ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
A valid goal condition must be:
| Good Condition | Why It Works |
|---|---|
| "AC-AUTH-03 is satisfied and existing auth tests pass" | Requirement defines behavior; tests verify it |
"Accepted feature requirements are met and npm test exits 0" | Requirement + command verification |
| "3 new services in services/" | Count files in directory |
| "No regressions in test/*" | Run full test suite |
"git status shows clean" | Direct git command check |
| Bad Condition | Why It Fails |
|---|---|
| "Make it work" | Not specific, can't verify |
| "Improve the codebase" | No measurable criteria |
| "Add more services" | No count specified |
| "Don't break anything" | Too vague to verify |
Goals persist in .forgewright/active-goal.json:
{
"goal_id": "goal-20260524-1330",
"condition": "All tests in test/auth pass and npm run lint exits 0",
"created_at": "2026-05-24T13:30:00+07:00",
"created_by": "user",
"turns": 0,
"last_evaluation": null,
"status": "active",
"progress": []
}
After each turn, the evaluator:
Write progress to .forgewright/goal-progress.md:
# Goal Progress — [goal_id]
## Condition
All tests in test/auth pass and npm run lint exits 0
## Status: IN PROGRESS
## Turn History
| Turn | Action | Result | Next Step |
|------|--------|--------|-----------|
| 1 | Analyzed existing auth code | Found 5 files to modify | Implement JWT in auth.js |
| 2 | Implemented JWT generation | Function added | Add JWT validation |
| 3 | Added JWT middleware | auth.js modified | Run requirement-linked tests |
| 4 | Running tests | 3 pass, 1 fail | Diagnose implementation against AC-AUTH-03; keep oracle read-only |
## Current State
- Tests passing: 3/4
- Lint status: Pending
- Last command output: [summary]
## Next Action
Fix the auth implementation if it violates AC-AUTH-03; if expected behavior is unclear, ask the user/product owner
A goal such as "all tests pass" is a verification condition, not authority to
rewrite the verifier. Existing behavioral test cases, assertions, snapshots,
goldens, eval labels, and expected outputs remain read-only unless an explicit
current requirement/acceptance change is established. If the requirement needed
to interpret a failure is missing, ambiguous, or contradictory, set the goal
step to blocked and ask the user/product owner. Do not make a "reasonable
assumption" about expected behavior and do not weaken tests to satisfy the goal.
Infrastructure-only test-runner repairs are allowed only when the behavioral
oracle and coverage stay unchanged.
Goal: Parse the goal condition and ensure it's verifiable.
Actions:
Input: "Implement JWT authentication per AC-AUTH-03 and verify existing auth tests pass"
Breakdown:
1. Requirement: `AC-AUTH-03` defines the expected JWT behavior
2. Measurable verifier: existing auth tests → `npm test -- test/auth/`
3. Constraint: existing test oracles stay read-only unless AC-AUTH-03 changes
4. Scope: implementation files in auth/; test/auth/ is verification evidence unless a requirement delta explicitly requires test propagation
Verification Command:
npm test -- test/auth/
Success Criteria:
- AC-AUTH-03 is satisfied
- Exit code 0
- All existing tests in test/auth/ pass without weakening/changing their behavioral expectations
## Feasibility Check
| Check | Result | Notes |
|-------|--------|-------|
| Files exist | ✅ Yes | auth/login.js, auth/register.js |
| Tests exist | ✅ Yes | test/auth/ has 4 test files |
| Dependencies | ✅ Installed | jest, supertest |
| Can verify | ✅ Yes | npm test command works |
Feasibility: HIGH — Ready to proceed
{
"goal_id": "goal-20260524-1335",
"condition": "AC-AUTH-03 is satisfied and all existing tests in test/auth pass",
"scope": ["auth/login.js", "auth/register.js"],
"verification": "npm test -- test/auth/",
"created_at": "2026-05-24T13:35:00+07:00",
"turns": 0,
"status": "active"
}
Output: .forgewright/active-goal.json
Goal: Break down goal into actionable steps.
Actions:
## Goal: All tests in test/auth pass
Current State:
- test/auth/login.test.js: 3 tests, 2 pass, 1 fail
- test/auth/register.test.js: 2 tests, 2 pass
- test/auth/jwt.test.js: 1 test, 0 pass (missing implementation)
## Required Changes
| Priority | Change | File | Current → Target |
|----------|--------|------|------------------|
| P1 | Fix login token storage | auth/login.js | LocalStorage → JWT |
| P2 | Implement JWT in register | auth/register.js | Add token response |
| P3 | Add requirement-derived JWT coverage if AC-AUTH-03 is a new/changed requirement | test/auth/jwt.test.js | Requirement delta → New coverage |
## Implementation Order
1. auth/login.js: Add JWT generation required by AC-AUTH-03
2. auth/register.js: Return JWT on success as required by AC-AUTH-03
3. Add/update tests only when propagating the explicit AC-AUTH-03 requirement delta; never change an oracle merely because code is red
4. Run tests to verify
## Turn Plan
Turn 1:
- Read auth/login.js to understand current implementation
- Implement JWT generation using existing jwt library
Turn 2:
- Update auth/register.js to return JWT
- If AC-AUTH-03 is a newly changed requirement, add the requirement-derived JWT test coverage; otherwise leave existing test expectations unchanged
Turn 3:
- Run tests
- Fix any remaining failures
Turn 4 (if needed):
- Final verification
- Complete or escalate
Output: .forgewright/goal-progress.md with action plan
Goal: Execute steps toward goal completion.
Actions:
# Each turn produces:
# 1. Code changes (logged)
# 2. Progress update (to goal-progress.md)
# 3. Evaluation (check if goal met)
# Example Turn 1 execution:
echo "Turn 1: Implementing JWT in auth/login.js"
# Read current implementation
cat auth/login.js
# Make changes
# ... edit file ...
# Log progress
echo "| 1 | Add JWT to login | Complete | Test JWT generation |" >> .forgewright/goal-progress.md
# Evaluate via VERIFY.md Schema v2 (exact command, exit code, output SHA-256, tree_sha)
npm test -- test/auth/ 2>&1 | tail -20
# Non-zero exit blocks goal completion; record observed Schema v2 evidence before marking met
## Blocker Handling
If a turn encounters a blocker:
1. **Assess**: Can I work around it?
- Missing dependency → Install it
- Unclear requirement that changes expected behavior → Mark blocked and ask the user/product owner
2. **If blocked**:
- Log: "BLOCKED: [reason]"
- Suggest workaround
- Ask user for guidance (1 question max)
3. **If unblocked**:
- Continue to next turn
## Common Blockers & Solutions
| Blocker | Solution |
|---------|----------|
| Missing dependency | Install it: `npm install <pkg>` |
| Test data unavailable | Create mock data |
| Unclear requirement | Ask the user/product owner; do not change behavioral test expectations until the requirement is explicit |
| Permission denied | Escalate to user |
| Build failing | Fix compilation errors first |
## Goal Progress Update
## Condition: All tests in test/auth pass
### Status: IN PROGRESS (Turn 3/50)
### Completed
✅ auth/login.js: JWT generation added
✅ auth/register.js: Returns JWT on success
✅ Requirement-derived JWT coverage added only for the explicit AC-AUTH-03 delta
### In Progress
🔄 Running test suite...
### Remaining
⬜ Fix implementation failures against AC-AUTH-03; keep existing behavioral test oracles read-only
### Next Action
Run: npm test -- test/auth/
Output: Updated files, progress logs
Goal: Verify goal completion and report results.
Actions:
# Run verification command
npm test -- test/auth/
# Check exit code
if [ $? -eq 0 ]; then
echo "✅ GOAL MET: All tests pass"
else
echo "❌ GOAL NOT MET: Some tests still failing"
fi
# Run lint if required
npm run lint
## Evaluation Result
### Condition: All tests in test/auth pass and npm run lint exits 0
| Check | Command | Exit Code | Result |
|-------|---------|-----------|--------|
| Auth tests | npm test -- test/auth/ | 0 | ✅ Pass |
| Lint | npm run lint | 0 | ✅ Pass |
### Final Status: ✅ GOAL ACHIEVED
### Summary
- Turns taken: 4
- Files modified: 3
- Tests added: 1 (requirement-derived)
- Existing behavioral test expectations changed: 0
## Goal Completion
✅ **GOAL ACHIEVED**
All tests in test/auth pass and npm run lint exits 0
### What Was Done
1. Added JWT generation to auth/login.js
2. Updated auth/register.js to return JWT
3. Created test/auth/jwt.test.js with 5 tests
4. Fixed 2 failing tests in test/auth/login.test.js
### Files Modified
- auth/login.js
- auth/register.js
- test/auth/login.test.js
- test/auth/jwt.test.js (new)
### Next Steps (Optional)
- Deploy changes to staging
- Run integration tests
- Update documentation
---
_Goal completed at 2026-05-24T14:30:00+07:00_
_Framework: Forgewright Goal-Driven Workflow v1.1_
Output: Goal completion report, clear goal state
# .production-grade.yaml
goal:
auto_mode: true # Approve tool calls automatically
progress_file: ".forgewright/goal-progress.md"
state_file: ".forgewright/active-goal.json"
# Use smaller/faster model for evaluation checks
goal:
evaluator:
model: "haiku" # Fast evaluation
provider: "anthropic"
timeout_seconds: 30 # Max time per evaluation
tokenBudget unset or
null.1 to satisfy a tool schema; it
immediately turns a valid long-running task into a premature stop./goal [completion condition]
Examples:
/goal All tests in test/auth pass and lint is clean
/goal Migrate database schema until all migrations run successfully
/goal Implement user dashboard until all acceptance criteria are met
/goal Add tests until coverage > 80%
/goal status
Shows:
/goal clear
Cancels the active goal without completion.
| Approach | Next Turn Starts | Stops When |
|---|---|---|
| Goal Mode | Previous turn finishes | Evaluator confirms condition met |
| Normal Mode | User prompts | User says done |
| Loop | Time interval elapses | User stops or limit reached |
| Stop Hook | Previous turn finishes | Custom script decides |
| Mistake | Fix |
|---|---|
| Vague condition | Make it specific and verifiable |
| No exit strategy | Use a specific, verifiable completion condition |
| Ignoring failures | Fix failures before continuing |
| No progress logging | Update goal-progress.md each turn |
| Forgetting constraints | Check "no regressions" constraint |
/goal clear to stopWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
goal-driven, autonomous, verification, planning, checkpoints
npx claudepluginhub buiphucminhtam/forgewright --plugin forgewright93 skills in this plugin
/3d-spatial-engineerUse for 3D spatial layouts, scene-graph coordinate transforms, greybox blockouts, culling volumes, static batching, and LOD optimization across 3D game engines./accessibility-engineerUse for web WCAG 2.1/2.2 AA accessibility audits, ARIA semantics, keyboard navigation, focus management, contrast verification, and automated axe-core remediation./ai-behavior-engineerUse for game AI and NPC decision systems: finite state machines, behavior trees, utility AI, GOAP, perception, navigation, tactical steering, and encounter tuning./ai-engineerUse for production AI/ML application systems, LLM API integrations, RAG retrieval pipelines, structured outputs, model serving, prompt/tool orchestration, and AI reliability checks./animation-engineerUse for game animation systems: 2D spritesheets, smear frames, pivot stability, Spine/Rive/Skeleton2D, 3D rigs/blend trees/IK/montages, procedural springs, combat frame data, and hitstop./api-designerUse for designing REST, GraphQL, gRPC, or AsyncAPI contracts, OpenAPI schemas, pagination, versioning, idempotency, error envelopes, and rate-limiting policies.Other plugins' skills for the same job