sentrix plan
Generate, review, implement, and manage implementation plans.
sentrix plan
Generate, review, implement, and manage implementation plans. This is the most comprehensive command group, covering the full plan lifecycle from generation through completion.
Subcommands#
The plan subcommands fall into three categories:
- AI-powered —
generate,new,review, andimplementinvoke AI to produce or improve artifacts. - API sync and git operations —
complete,activate, andcancelupdate plan metadata, sync with the Sentrix API, and perform git operations. They do not invoke AI. - Local —
listreads local files only, with no API calls or AI invocations.
sentrix plan generate#
Break a requirements document into multiple implementation plan files using AI.
Usage#
sentrix plan generate <target>
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
target | path | Yes | Path to a directory containing 00-requirements.md, or a direct path to the requirements file. | |
--workflow | string | No | basic | Workflow template name. Built-ins: basic, comprehensive. |
Creates numbered plan files (01-<name>.md, 02-<name>.md, etc.) in the same directory as the requirements file and syncs them to the Sentrix API.
Workflows#
The --workflow flag selects the AI prompt template used for plan generation. Two built-in workflows are available:
basic (default) — A streamlined, single-pass workflow with 6 concise steps. Suitable for straightforward requirements where speed matters more than exhaustive detail. Plans include a ## Checklist section but have minimal structural requirements.
comprehensive — A thorough, two-pass workflow designed to produce production-grade plans that require minimal review:
- Pass 1 (Read & Plan): Reads the requirements, architecture guides, and every source file referenced in the requirements before drafting anything.
- Pass 2 (Detail & Validate): Expands outlines into full implementation steps with copy-paste-ready code snippets, then self-validates against a strict checklist.
Comprehensive plans include required sections (Overview, Key Files table, Design Decisions, Implementation Steps, Checklist) and must satisfy 7 quality rules and 9 self-validation checks. Plans are split by architectural layer, target 2-4 hours of work each (~500 lines max), and are ordered by implementation sequence.
| Aspect | basic | comprehensive |
|---|---|---|
| Process | Single pass, 6 steps | Two-pass (Read & Plan, Detail & Validate) |
| Source file reading | Not explicitly required | Mandatory before writing code snippets |
| Code snippets | Expected | Must be copy-paste ready, complete functions |
| Quality checks | None explicit | 7 quality rules + 9 self-validation checks |
| Plan splitting guidance | Simple (independent, single concern) | By architectural layer, then entity; 2-4 hrs / ~500 lines |
| Plan document structure | Minimal (## Checklist required) | Full structure (Overview, Key Files, Design Decisions, Implementation Steps, Checklist) |
Examples#
sentrix plan generate plans/website/2026-02/feature-contact-form/
Use the comprehensive workflow for production-grade plans:
sentrix plan generate --workflow comprehensive plans/website/2026-02/feature-contact-form/
sentrix plan new#
Generate a single plan file without an existing requirements document using AI. Useful for standalone tasks.
Aliases: write, create
Usage#
sentrix plan new <plans_dir> --description <description> [--platform <platform>] [--draft]
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
plans_dir | path | Yes | Directory where the plan should be created. | |
--description | string | Yes | Natural language description of what to implement. | |
--platform | string | No | from config | Platform override: nextjs, fastapi, ui-component, or rust-cli. |
--draft | bool | No | false | Mark the plan as draft status. |
Example#
sentrix plan new plans/website/2026-02/feature-contact-form/ \
--description "Add email validation to the contact form" \
--platform nextjs
sentrix plan review#
Review and improve an existing plan file using AI. The plan file is edited in-place with up to 5 review iterations.
Usage#
sentrix plan review <target> [--platform <platform>]
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
target | path | Yes | Path to a plan file or a plans directory. When a directory is given, all plan files in it are processed. | |
--platform | string | No | from config | Platform override to select the correct review command. |
Plans in plans/backlog/ cannot be reviewed — they must be activated first.
Example#
sentrix plan review plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md
Review all plans in a directory:
sentrix plan review plans/website/2026-02/feature-contact-form/
sentrix plan implement#
Implement a plan using AI. Reads the plan file, writes the code, and runs format, lint, typecheck, test, and build with up to 5 iterations.
Usage#
sentrix plan implement <target> [--platform <platform>]
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
target | path | Yes | Path to a plan file or a plans directory. When a directory is given, all plan files in it are processed. | |
--platform | string | No | from config | Platform override. |
Plans in plans/backlog/ cannot be implemented — they must be activated first.
Example#
sentrix plan implement plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md
sentrix plan complete#
Mark one or more plans as completed. Updates plan frontmatter with the completion timestamp, PR number, and commit SHAs.
Usage#
sentrix plan complete [<target>] [--pr <pr>] [--auto]
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
target | path | No | Path to a plan file or a plans directory. Required when --auto is not used. | |
--pr | string | No | PR number to record. Required when --auto is not used. | |
--auto | bool | No | false | Automatically detect and complete plans from recent git history. |
Plans in plans/backlog/ cannot be completed — they must be activated first.
Prerequisites: GitHub CLI must be authenticated (gh auth login). The target PR must already be merged — non-merged PRs are rejected.
Auto-Complete Mode#
When --auto is used, <target> and --pr are not needed. Auto-complete runs in two passes:
- Pass 1: Completes in-progress plans that have a matching merged PR automatically without prompting.
- Pass 2: Scans for plans missing completion metadata and prompts interactively per plan ("Complete X with PR #Y? [y/n]").
Confirmation Behavior#
- In single-file mode, prompts for re-confirmation when the plan is already marked completed.
- In directory mode, prompts only when all targeted plans are already completed.
- Use
--forceto skip the re-confirmation prompt.
Examples#
Complete a specific plan with a PR:
sentrix plan complete plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md --pr 42
Auto-complete all eligible plans:
sentrix plan complete --auto
Preview auto-complete without writing:
sentrix plan complete --auto --dry-run
sentrix plan activate#
Move requirements and plans from the backlog to the active plans directory.
Usage#
sentrix plan activate <target>
Arguments#
| Argument | Type | Required | Description |
|---|---|---|---|
target | path | Yes | Path to a directory containing 00-requirements.md, or a direct path to the requirements file. Must be in plans/backlog/. |
Moves files via git and syncs to the Sentrix API.
Example#
sentrix plan activate plans/backlog/website/feature-search/
sentrix plan list#
List plans with optional filtering. This is a local operation that does not call the API.
Usage#
sentrix plan list [--initiative <path>] [--status <status>...] [--app <app>] [--include-unsynced]
Options#
| Flag | Type | Default | Description |
|---|---|---|---|
--initiative | path | Filter by initiative file path. | |
--status | string | all | Filter by status. Repeatable (e.g., --status pending --status in_progress). |
--app | string | all | Filter by app name. |
--include-unsynced | bool | false | Include plans not yet synced to the API. |
Examples#
List all plans:
sentrix plan list
List pending and in-progress plans for the website:
sentrix plan list --app website --status pending --status in_progress
sentrix plan cancel#
Cancel one or more plans. Cancelled active plans are archived; cancelled backlog plans are permanently deleted.
Usage#
sentrix plan cancel <target>
Arguments#
| Argument | Type | Required | Description |
|---|---|---|---|
target | path | Yes | Path to a plan file, a plans directory, or a 00-requirements.md file for directory-level cancel. |
Behavior#
- Active plans: Syncs deletions to the API and moves files to
plans/archive/viagit mv. - Backlog plans: Permanently deletes files (no archive).
- Requirement cascade: When canceling at directory level (or when the last plan in a directory is canceled), the
00-requirements.mdis also affected — active requirements are archived, backlog requirements are permanently deleted. The empty source directory is removed.
The command prompts for confirmation per plan file before canceling. Use --force to skip confirmation prompts, or --dry-run (-n) to preview without writing.
Examples#
Cancel a specific plan:
sentrix plan cancel plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md
Cancel all plans in a directory:
sentrix plan cancel plans/website/2026-02/feature-contact-form/
Preview what would be canceled:
sentrix plan cancel plans/website/2026-02/feature-contact-form/ --dry-run