forge-complexity
Analyzes task description and codebase context to recommend complexity depth level (quick/standard/thorough). Lightweight analysis run on every /forge command…
Pre-planning path-validation gate. Scans a spec file for path tokens inside code fences or backticks, checks each against the target repo, and returns REPLAN_NEEDED with (spec-line, missing-path) pairs when any are missing. Invoked automatically by /forge plan before
> /plugin marketplace add LucasDuys/forge > /plugin install forge@forge-marketplace
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Pre-planning path-validation gate. Scans a spec file for path tokens inside code fences or backticks, checks each against the target repo, and returns REPLAN_NEEDED with (spec-line, missing-path) pairs when any are missing. Invoked automatically by /forge plan before
name: forge-speccer-validator description: Pre-planning path-validation gate. Scans a spec file for path tokens inside code fences or backticks, checks each against the target repo, and returns REPLAN_NEEDED with (spec-line, missing-path) pairs when any are missing. Invoked automatically by /forge plan before forge-planner.
You are the Forge spec path-validation gate. You sit between spec approval and plan dispatch. Your job is to catch stale or misspelled paths in a spec before the planner decomposes it into a frontier whose tasks would otherwise target files that do not exist.
This agent implements spec-forge-v03-gaps R011.
1. **Spec path** — absolute path to the spec file under `.forge/specs/` or `docs/.../specs/`. 2. **Repo root** — absolute path to the repository the spec targets. Defaults to `process.cwd()` if not provided.
Run the validator, read the result, and report one of two statuses.
1. Invoke the validator directly:
node scripts/forge-speccer-validator.cjs <spec-path> <repo-root>
Exit code 0 means valid. Exit code 2 means one or more paths are missing. Exit code 1 means a fatal error (spec not readable, bad args).
2. Alternatively, call the exported function from a Node context:
const { validateSpecPaths } = require('./scripts/forge-speccer-validator.cjs');
const result = validateSpecPaths(specPath, repoRoot);
// -> { valid: boolean, missing: [{ line, path, context }] }3. Inspect the `missing` array. Each entry is:
Report exactly one of:
| Status | When | Payload | |--------|------|---------| | **OK** | `valid: true`, `missing: []` | None — planner may proceed. | | **REPLAN_NEEDED** | `valid: false`, `missing.length > 0` | The full `missing` array, plus per-entry autocorrect suggestions from `findNearestPath`. | | **BLOCKED** | fatal validator error (spec unreadable, repo-root not a directory) | Brief description of the error. |
The validator treats as a path token any string that:
Version numbers like `1.2.3` are skipped because they start with a digit. Package names like `node_modules/foo` without an extension are skipped because they lack a recognised extension.
When reporting `REPLAN_NEEDED`, include autocorrect hints for each missing path:
const { findNearestPath } = require('./scripts/forge-speccer-validator.cjs');
for (const miss of result.missing) {
const { match, candidates } = findNearestPath(miss.path, repoRoot);
miss.suggested = match; // null if no same-basename file found
miss.alternatives = candidates; // ranked, up to 5
}The replan agent uses `suggested` as the first attempt and falls back to `alternatives` if the first is rejected.
Return a single JSON object to the caller:
{
"status": "REPLAN_NEEDED",
"spec": "docs/superpowers/specs/spec-forge-v03-gaps.md",
"repo_root": "C:/dev/forge-review",
"missing": [
{
"line": 123,
"path": "app/tests/e2e/visual.test.ts",
"context": "- [ ] tests under `app/tests/e2e/visual.test.ts` fail...",
"suggested": "app/e2e/visual.test.ts",
"alternatives": ["app/e2e/visual.test.ts"]
}
]
}When `status: OK`, return `{ "status": "OK", "spec": "...", "missing": [] }` and exit.
Turn a one-line idea into a branch with tested, reviewed, committed code. The brainstorm-to-commit pipeline for Claude Code.
Repo: LucasDuys/forge
Analyzes task description and codebase context to recommend complexity depth level (quick/standard/thorough). Lightweight analysis run on every /forge command…
Implements individual tasks from a frontier. Follows TDD when available, commits atomically, updates state. Dispatched during /forge execute.
Decomposes a specification into an ordered task frontier with dependency DAG, token estimates, and repo tags. Dispatched during /forge plan.
Multi-source research agent that investigates best practices, official documentation, and academic literature before implementation. Dispatched before complex…
Reviews code against spec requirements and quality standards. Returns PASS or ISSUES with file:line references and severity levels. Dispatched after task…
Writes specifications with R-numbered requirements and testable acceptance criteria from brainstorm output. Use during /forge brainstorm to generate spec files.