@jakyeamos33/terrace
v0.1.1
Published
Spec-driven, test-governed AI development framework
Readme
Terrace
Terrace is a strict-core workflow CLI for spec-driven, test-governed AI-assisted development. It keeps implementation work tied to a recoverable repo state, explicit spec intent, protected tests, and deterministic quality gates.
Install
Terrace requires Node.js 22 or newer.
npm install --save-dev @jakyeamos33/terraceRun it with npx @jakyeamos33/terrace or through the installed terrace binary.
If you want terrace available globally (no npx), install it globally:
npm install --global @jakyeamos33/terraceQuickstart
Run Terrace from the root of an existing repository:
npx @jakyeamos33/terrace init
npx @jakyeamos33/terrace doctor
npx @jakyeamos33/terrace audit
npx @jakyeamos33/terrace report
npx @jakyeamos33/terrace ship check --jsonterrace doctor confirms the local installation is usable. terrace audit checks Terrace-owned governance state. terrace report prints the current Tier One readiness card without writing files. terrace ship check --json runs release-readiness checks and exits nonzero when a blocking gate fails.
What Terrace Creates
terrace init writes only repo-local governance state and docs scaffolding:
.terrace/state.json.terrace/config.json.terrace/presets/registry.json.terrace/rules/*.json.terrace/events.jsonldocs/prd/docs/spec/docs/testing/
Report artifacts are explicit: terrace report is read-only, while terrace report update writes .terrace/report-card.json, docs/terrace/REPORT-CARD.md, and report history.
PRD Intake
Start a new project from a PRD file:
terrace new-project hoopscout --prd docs/input/HOOPSCOUT-PRD.mdStart a new project from pasted PRD content:
terrace new-project hoopscout --paste-prd <<'PRD'
# Hoopscout PRD
- Coaches need a faster way to evaluate prospects.
PRDImport a later feature PRD:
terrace prd import saved-search --file docs/input/SAVED-SEARCH-PRD.mdRelease Readiness
Use these checks before publishing protected work:
npm run ci
npm audit --audit-level=moderate
npm run package:dry-run
npx @jakyeamos33/terrace ship check --jsonterrace ship check is read-only. Use terrace ship prepare when you want Terrace to write a release-readiness summary under docs/terrace/ship/.
Command Reference
terrace --helpshows the top-level command list.terrace --versionprints the package version.terrace initinitializes Terrace state.terrace new-project <name> --prd <file>or--paste-prdinitializes Terrace from a source PRD and writes project artifacts.terrace prd import <feature> --file <file>or--pasteimports a feature PRD into an existing Terrace project.terrace doctorchecks installation health.terrace spec validatevalidates governance artifacts.terrace spec hash --file <path>computes a stable spec hash.terrace auditchecks artifacts and protected baselines.terrace ci check [files...]runs audit and protected-change enforcement.terrace port gsd --dry-runinventories legacy GSD artifacts.terrace port gsdmigrates supported legacy GSD artifacts into Terrace state.terrace nextreports the next workflow action from state, handoff data, and blockers.terrace resumereconstructs paused workflow context from sessions and migrated handoff data.terrace historysummarizes migrated phases, sessions, decisions, and quick tasks.terrace do <plain text>routes natural-language agent instructions to stable Terrace commands.terrace autonomousplans the next phase, prepares execution readiness, and stops at blockers or agent handoff.terrace commands discoverdetects package manager, project scripts, and quality-gate command mapping.terrace align <feature>writesdocs/terrace/features/<feature>/ALIGNMENT.mdwith customer, problem, success metrics, risks, rollout, observability, validation, and cleanup intent.terrace interrogate <feature>writes edge-case, assumption-challenge, and failure-mode interrogation.terrace map-codebasewrites codebase map, architecture, risks, testing, and observability context underdocs/terrace/codebase/.terrace design <feature>records architecture decisions, tradeoffs, maintainability, and the no band-aid rule.terrace test-plan <feature>writes the behavior-firstdocs/testing/TEST-PLAN.mdrequired before implementation.terrace observe <feature>writes feature observability and post-launch debugging intent.terrace validate-prod <feature>writes production success signals, monitoring, and rollback conditions.terrace cleanup <feature>writes the cleanup contract for flags, temporary code, and docs.terrace ui import-stitch <feature>,terrace ui plan-refresh <feature>, andterrace ui diff <feature>support design-driven greenfield and brownfield UI workflows.terrace phase listlists canonical roadmap phases.terrace phase show <id>shows one roadmap phase and its migrated plans.terrace phase plan <id>writesdocs/terrace/phases/<id>/PLAN.md, pulling migrated source plans, likely files, related quick tasks, blockers, and discovered project commands into the phase plan.terrace phase execute <id>writesdocs/terrace/phases/<id>/EXECUTION.md, enters RED-gate readiness after blockers are clear, and reports an execution queue.terrace phase validate <id>writesdocs/terrace/phases/<id>/VALIDATION.md.terrace phase review <id>writesdocs/terrace/phases/<id>/REVIEW.md.terrace phase complete <id>writesdocs/terrace/phases/<id>/SUMMARY.mdand marks the phase complete.terrace quick listlists migrated GSD quick-task history.terrace quick show <id>shows one migrated quick task.terrace quick plan <title>creates a stateful quick-task plan underdocs/terrace/quick/<id>/.terrace quick execute <id>enters RED-gate execution for a quick task after a behavior-first test plan exists.terrace quick complete <id>writes a quick-task summary and marks it complete after verification evidence exists.terrace backlog listlists backlog items.terrace backlog add <title>appends a backlog item.terrace ship checkruns release-readiness checks, discovers available project scripts, enforces active Senior Cycle ship gates, treats missing optional scripts as warnings, and exits nonzero when an available quality gate fails.terrace ship preparewritesdocs/terrace/ship/SHIP.mdfrom release-readiness results.terrace plan-phase <id>,terrace execute-phase <id>,terrace validate-phase <id>,terrace review-phase <id>, andterrace complete-phase <id>are GSD-compatible aliases.terrace rule listandterrace rule explain <id>inspect rule packs.terrace preset listandterrace preset install <id>manage presets.
GSD Migration
terrace port gsd preserves the source .planning/ tree and writes converted Terrace artifacts under .terrace/, docs/prd/, docs/spec/, docs/terrace-migration/, and docs/testing/gsd/. The migration report is written to .terrace/migration/gsd-port-report.json and includes converted, skipped, writes, blockers, warnings, readiness, next_command, review_checklist, and validation_commands.
Migrated state includes roadmap phases and plans, decisions, sessions, handoff context, backlog items, blocked human actions, and quick-task history. Quick-task PLAN/SUMMARY files are archived under docs/terrace-migration/quick/ and exposed through terrace quick list / terrace quick show <id>. Handoff remaining tasks and blocking human actions become backlog items so post-migration work is visible. Unsupported files are not deleted; each skipped artifact includes a reason and manual review action.
Workflow Example
- Capture intent in
docs/prd/PRD.md. - Compile spec details in
docs/spec/COMPILED-SPEC.md. - Design test trust in
docs/testing/TEST-ARCH.md. - Use Terrace gates to require RED evidence before implementation and GREEN evidence before protection.
- Run
terrace phase plan <id>,terrace phase execute <id>,terrace phase validate <id>,terrace phase review <id>, andterrace phase complete <id>to preserve execution history. - Run
terrace audit,terrace ci check, andterrace ship preparebefore committing protected changes.
Agents can use terrace do "plan phase 11", terrace do "/gsd:plan-phase 11", terrace do "run the next phase", terrace do "create quick task fix login redirect", or terrace do "ship prepare" when they have plain text instead of a structured command.
Senior Cycle
Terrace now has a senior-cycle artifact layer for adaptive rigor:
- Small changes: alignment-lite, test-first, execute, verify.
- Medium features: alignment, edge cases, test strategy, execute, ship check.
- Large/risky features: full alignment, interrogation, codebase mapping, design, TDD, observability, rollout, production validation, and cleanup.
See docs/terrace/SENIOR-CYCLE.md for the audit report, target workflow, artifact structure, enforcement rules, and implementation milestones. The no band-aid rule is the default: even terrace quick should choose maintainable architecture unless a short-term choice explicitly preserves future development and has a cleanup contract.
Troubleshooting
Missing .terrace/state.json: runterrace initfrom the repo root.Protected file changed without DECISION-LOG.md: add a spec-linked decision before committing.terrace port gsdrefuses to overwrite state: re-run with--forceonly after preserving existing.terrace/state.json.terrace nextreports a blocked action after migration: complete or clear the migrated human action before treating the project as ready.terrace ship checkexits nonzero: inspect the failed category and run the listed command directly for detailed output.terrace ship checkreportsQUALITY_SCRIPT_MISSING: add the suggested package script if that gate should be enforced for this project.terrace do <plain text>cannot route an instruction: use an explicit command fromterrace --helpor include a clear phase number, quick-task request, resume/next/history request, or ship request.- Typecheck errors from package dependencies usually mean the repo is not using the supported
Bundlermodule resolution settings intsconfig.json.
Development
Canonical local verification is:
npm run ciThe publish allowlist is controlled by package.json#files; local planning, tests, and agent settings are not shipped.
