Skip to main content

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-poweredgenerate, new, review, and implement invoke AI to produce or improve artifacts.
  • API sync and git operationscomplete, activate, and cancel update plan metadata, sync with the Sentrix API, and perform git operations. They do not invoke AI.
  • Locallist reads 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#

bash
sentrix plan generate <target>

Arguments and Options#

Argument/FlagTypeRequiredDefaultDescription
targetpathYesPath to a directory containing 00-requirements.md, or a direct path to the requirements file.
--workflowstringNobasicWorkflow 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.

Aspectbasiccomprehensive
ProcessSingle pass, 6 stepsTwo-pass (Read & Plan, Detail & Validate)
Source file readingNot explicitly requiredMandatory before writing code snippets
Code snippetsExpectedMust be copy-paste ready, complete functions
Quality checksNone explicit7 quality rules + 9 self-validation checks
Plan splitting guidanceSimple (independent, single concern)By architectural layer, then entity; 2-4 hrs / ~500 lines
Plan document structureMinimal (## Checklist required)Full structure (Overview, Key Files, Design Decisions, Implementation Steps, Checklist)

Examples#

bash
sentrix plan generate plans/website/2026-02/feature-contact-form/

Use the comprehensive workflow for production-grade plans:

bash
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#

bash
sentrix plan new <plans_dir> --description <description> [--platform <platform>] [--draft]

Arguments and Options#

Argument/FlagTypeRequiredDefaultDescription
plans_dirpathYesDirectory where the plan should be created.
--descriptionstringYesNatural language description of what to implement.
--platformstringNofrom configPlatform override: nextjs, fastapi, ui-component, or rust-cli.
--draftboolNofalseMark the plan as draft status.

Example#

bash
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#

bash
sentrix plan review <target> [--platform <platform>]

Arguments and Options#

Argument/FlagTypeRequiredDefaultDescription
targetpathYesPath to a plan file or a plans directory. When a directory is given, all plan files in it are processed.
--platformstringNofrom configPlatform override to select the correct review command.

Plans in plans/backlog/ cannot be reviewed — they must be activated first.

Example#

bash
sentrix plan review plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md

Review all plans in a directory:

bash
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#

bash
sentrix plan implement <target> [--platform <platform>]

Arguments and Options#

Argument/FlagTypeRequiredDefaultDescription
targetpathYesPath to a plan file or a plans directory. When a directory is given, all plan files in it are processed.
--platformstringNofrom configPlatform override.

Plans in plans/backlog/ cannot be implemented — they must be activated first.

Example#

bash
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#

bash
sentrix plan complete [<target>] [--pr <pr>] [--auto]

Arguments and Options#

Argument/FlagTypeRequiredDefaultDescription
targetpathNoPath to a plan file or a plans directory. Required when --auto is not used.
--prstringNoPR number to record. Required when --auto is not used.
--autoboolNofalseAutomatically 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 --force to skip the re-confirmation prompt.

Examples#

Complete a specific plan with a PR:

bash
sentrix plan complete plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md --pr 42

Auto-complete all eligible plans:

bash
sentrix plan complete --auto

Preview auto-complete without writing:

bash
sentrix plan complete --auto --dry-run

sentrix plan activate#

Move requirements and plans from the backlog to the active plans directory.

Usage#

bash
sentrix plan activate <target>

Arguments#

ArgumentTypeRequiredDescription
targetpathYesPath 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#

bash
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#

bash
sentrix plan list [--initiative <path>] [--status <status>...] [--app <app>] [--include-unsynced]

Options#

FlagTypeDefaultDescription
--initiativepathFilter by initiative file path.
--statusstringallFilter by status. Repeatable (e.g., --status pending --status in_progress).
--appstringallFilter by app name.
--include-unsyncedboolfalseInclude plans not yet synced to the API.

Examples#

List all plans:

bash
sentrix plan list

List pending and in-progress plans for the website:

bash
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#

bash
sentrix plan cancel <target>

Arguments#

ArgumentTypeRequiredDescription
targetpathYesPath 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/ via git 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.md is 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:

bash
sentrix plan cancel plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md

Cancel all plans in a directory:

bash
sentrix plan cancel plans/website/2026-02/feature-contact-form/

Preview what would be canceled:

bash
sentrix plan cancel plans/website/2026-02/feature-contact-form/ --dry-run