forge
Forge
Forge is the workflow layer.
wiki= knowledge, verification, drift, retrieval, filingforge= delivery policy over those primitives- agent surface (3 commands) =
wiki forge plan|run|next - internal/repair =
wiki forge start|check|close|status|release - default reconciliation primitive =
wiki sync
The contract stays:
research -> domain-model -> PRD -> slices -> TDD -> wiki verify -> improve-codebase-architecture (cadence) -> desloppify
Protocol Start Checklist
Run this before any write-oriented wiki command unless the task is pure read-only retrieval.
- Read the managed protocol block in repo
AGENTS.md/CLAUDE.md. - If it looks stale or malformed, run
wiki protocol audit <project> --repo <path>and surface the diff. - Reconcile repo-local instructions vs this skill. If they conflict, the repo instruction file wins.
- Run
wiki resume <project> --repo <path> --base <rev>at session start. - When delegating wiki/forge work to a sub-agent, explicitly load
/wikior/forgein that prompt.
Behavioral Guardrails
These load with every forge session. They are not optional.
- Think before coding. State assumptions explicitly. If multiple interpretations exist, present them — don't pick silently. If something is unclear, stop and ask.
- Simplicity first. Write the minimum code that solves the problem. No speculative features, no unnecessary abstractions, no "just in case" layers. Three similar lines beat a premature helper.
- Surgical changes. Touch only what the task requires. Don't "improve" adjacent code. Match existing style. Remove only what YOUR changes made unused.
- Goal-driven execution. Define success criteria before starting. Loop until verified — typecheck, tests, gate. A task is done when the gate passes, not when the code compiles.
When To Use Forge
Use /forge for:
- any feature / PRD / slice work
- continuing an existing implementation thread
- cross-module behavior changes or refactors
- workflow, lifecycle, or operator-surface changes
- work that should leave PRD + slice history in the wiki
Do not silently downgrade an active slice thread into plain /wiki maintenance.
Required Skills
Forge assumes these repo skills exist:
/research/domain-model/write-a-prd/prd-to-slices/tdd/wiki/improve-codebase-architecture/desloppify
If one is unavailable, stop and name it.
Default Happy Path
Prefer the thin surface first.
1. /research
2. /domain-model
- append durable decisions to `projects/<project>/decisions.md`
- update glossary/context in `projects/<project>/architecture/domain-language.md`
3. wiki forge plan <project> <feature-name> [--agent <name> --repo <path>]
4. fill plan.md + test-plan.md
5. /tdd
6. wiki forge run <project> [slice-id] --repo <path>
— auto-starts the slice, runs check + verify + close pipelines, writes progress to index.md
7. /desloppify (final quality gate — external CLI, not a wiki subcommand)
8. wiki forge next <project>
Resuming work? Start every session with wiki resume <project> --repo <path> --base <rev>, then run wiki forge next <project> — it prints the one command to run next.
Agent commands (the only 3 an agent needs):
wiki forge plan= create-feature + create-prd + create-issue-slice + start-slice in one stepwiki forge run= auto-start + check + verify + close in a single pass; writes progress to slice index.mdwiki forge next= read backlog, pick the next slice, print recommended action
Internal/repair (debugging only, not for normal workflow):
wiki forge start/open= manually start a single slicewiki forge check= run slice-local verification/closeout reviewwiki forge close= finish the close sequence when check is cleanwiki forge status= show the current forge workflow ledger / phase statewiki forge release= release a claimed slice back to Todo
Low-Level Escape Hatches
Use lower-level verbs only for repair, debugging, or very explicit control:
wiki syncwiki start-slicewiki verify-slicewiki closeoutwiki gatewiki close-slicewiki feature-status
They still exist, but they are not the primary operator surface anymore.
Closeout Rule
wiki forge run handles the full closeout automatically. No manual steps needed.
If you must drop lower for debugging:
wiki maintain— also auto-resolves mechanical drift (FEAT-028): stampscomputed_statuson parent feature/PRD, cascade-refreshes pages whosesource_pathsstill hash toverified_against, flips the backlog row of a cancelled slice to[-], and advances the forge ledger phase from detected artifacts. Audit trail goes tolog.mdunderauto-heal | ….- update impacted pages from code/tests (only when sources genuinely changed — unchanged-source cascade is auto-handled above)
wiki verify-page(when content actually drifted)wiki verify-slicewiki closeoutwiki gatewiki close-slice
Remember:
closeoutis review, not completion by itselfgatemust pass before declaring done- stronger verification levels are preserved unless explicitly downgraded
- parent
computed_statusis derived, not manually authored truth — letwiki maintainpersist it - ambiguous drift (e.g. children partly cancelled partly in-progress with a complete parent) still escalates as a
scope: parentwarning with inverse command hints; that one is intentionally agent-resolved, not auto-healed
Hard Gates
- No code change without tests.
- No non-trivial implementation without PRD + slice tracking.
- Research comes before PRD; domain modeling comes before committing the design.
- Update wiki pages from code/tests, not memory.
- Do not create extra repo markdown outside the allowed set.
wiki handoveris user-invoked only.
Local Refresh Rule
When you edit any of these locally:
skills/*/SKILL.md- README / setup text that teaches the operator surface
scripts/sync-local.ts
run:
bun run sync:local
bun run sync:local -- --audit
sync:local is the local install step for the CLI, qmd, and repo-owned skills. --audit checks whether the installed repo-owned skill copies have drifted from the repo. Restart the agent session after syncing so the refreshed skills are loaded.
Planning Notes
- Keep slice docs as the authored lifecycle source.
- Let backlog, parent rollups, protocol surfaces, and derived indexes be computed by code.
- Prefer direct markdown editing plus reconciliation over long command choreography.
- Use
wiki helpfor the raw CLI inventory; do not restate the full catalog in prompts unless a repair path truly needs it.
Source Of Truth
- code = implemented behavior
- PRD / slice / test-plan = current delivery intent
- wiki = compiled memory maintained from sources
- research = evidence behind decisions
More from fasalzein/wiki-forge
wiki
>
5prd-to-slices
>
5domain-model
Stress-test a plan against the existing domain model, sharpen terminology, and record decisions/context in the project's canonical knowledge surfaces as they crystallise. Use when user wants to challenge a plan against the project's language and documented decisions.
1