PactKit

Overview

PactKit provides 11 commands as workflow entry points. Six former utility commands (trace, draw, doctor, status, review, release) are now skills — embedded into the PDCA commands and auto-invoked at the right moment.

CommandAgentDescription
/project-initSystem ArchitectInitialize project scaffolding and governance
/project-clarifySystem ArchitectSurface ambiguities and produce a clarified brief
/project-planSystem ArchitectClarify gate → Analyze requirements → create Spec and Story
/project-actSenior DeveloperSpec lint → Consistency check → TDD implementation
/project-checkQA Engineer8-item security checklist + quality audit
/project-doneRepo MaintainerRegression gate → Auto-PR → archive → commit
/project-sprintTeam LeadAutomated PDCA orchestration
/project-hotfixSenior DeveloperFast-track fix bypassing PDCA
/project-designProduct DesignerPRD generation, story decomposition
/project-releaseRepo MaintainerVersion release: snapshot, archive, and Git tag
/project-prRepo MaintainerPush branch and create pull request via gh CLI

Role-Based Command Guide

Choose commands based on your role in the team:

RoleCommandsWhat You Do
BA/project-clarifySurface ambiguities, produce Clarified Brief
PM/project-designGenerate PRD, decompose into Stories
Architect/project-plan, /project-initCreate Specs, initialize project governance
Developer/project-act, /project-hotfixTDD implementation, emergency fixes
QA/project-checkSecurity + quality audit, spec alignment
DevOps/project-done, /project-release, /project-prCommit, release, pull request
Team Lead/project-sprintOne-command PDCA orchestration

Solo developer? Focus on /project-plan/project-act/project-done. Other commands become valuable when you have team collaboration or external stakeholders.

Note: /project-sprint is only supported in Claude Code. OpenCode users should run the PDCA commands individually.

PDCA Core Commands

/project-clarify

Surface ambiguities before planning. Standalone command or auto-invoked by Plan.

/project-clarify "Add user authentication"

Runs: ambiguity detection → structured questions (Scope, Users, Constraints, Scale, Edge Cases, Non-Goals) → clarified brief output. The brief can be fed directly into /project-plan.

/project-plan

Analyze requirements and produce a Spec.

/project-plan "Add user authentication with OAuth2"

Runs: Init GuardClarify Gate (auto-detects ambiguous input, generates questions) → visual scan → logic trace (via pactkit-trace skill) → design update → Spec creation (with Spec Lint self-check) → Board entry.

Init Guard: Before proceeding, this command automatically checks for pactkit.yaml (in .claude/ or .opencode/), docs/product/sprint_board.md, and docs/architecture/graphs/. If any are missing, it runs /project-init first — so you never have to worry about forgetting to initialize.

/project-act

Implement code per Spec using strict TDD.

/project-act STORY-001

Runs: read Spec → Spec Lint Gate (structural validation — blocks on errors) → Consistency Check (Spec ↔ Board ↔ Test Case alignment, advisory) → detect stack → write tests (RED) → implement (GREEN) → lint check → verify suite.

/project-check

Run a comprehensive QA audit with structured security checklist.

/project-check

Runs: 8-item security checklist (SEC-1 to SEC-8, PASS/FAIL/N/A) → code quality scan → test case gen → layer decision → execution → Spec alignment → verdict. SEC-1 through SEC-5 failures are classified as P0 Critical. Includes pactkit-review skill for PR code review scenarios.

/project-done

Finalize delivery with regression gate and conventional commit.

/project-done

Runs: cleanup → regression gate → lint gate → HLD consistency check → rules.md invariants refresh → board hygiene → archive → snapshot verification → commit → Auto-PR (structured PR body from Spec + test results, with user confirmation). Includes pactkit-release skill for version release scenarios.

Automation

/project-sprint

Run the full PDCA cycle in one command.

/project-sprint "Add user authentication"

Orchestrates Plan → Act → Check → Done automatically using a multi-agent team. Requires the Opus model.

/project-hotfix

Fast-track fix that bypasses the full PDCA cycle.

/project-hotfix "Fix typo in README"

Skips TDD and Spec creation. Suitable for typos, configuration changes, and minor fixes.

Lifecycle

/project-design

Greenfield product design for new projects.

/project-design "Build a task management app"

Generates PRD, decomposes into Specs, and populates the Sprint Board. Uses pactkit-draw skill for architecture diagrams.

/project-init

Initialize project scaffolding and governance structure.

/project-init

Sets up the directory structure, architecture graphs, initial governance files, and project-level instructions. For Claude Code: .claude/CLAUDE.md. For OpenCode: ./AGENTS.md + opencode.json with permission and MCP config.

/project-release

Version release workflow: snapshot, archive, and Git tag.

/project-release

Runs: version bump → architecture snapshot → story archive → Git tag creation. Uses pactkit-release skill for snapshot and archive operations.

/project-pr

Push branch and create a pull request via gh CLI.

/project-pr

Runs: push current branch to remote → create pull request with structured body (Summary + Test Plan) derived from Spec and test results. Requires gh CLI to be installed and authenticated.

OpenCode Model Routing

When deployed to OpenCode, commands include a model: field in their frontmatter for automatic model routing:

CommandsModelReason
/project-plan, /project-clarify, /project-design, /project-sprintInherit main modelDeep reasoning tasks
/project-act, /project-done, /project-check, /project-init, /project-release, /project-pr, /project-hotfixSonnetImplementation tasks

This is configurable via command_models in pactkit.yaml. Model shortnames (sonnet, opus, haiku) are automatically resolved to full provider/model-id format from your opencode.json provider configuration.

On this page