sentrix code
Generate implementations from plans, review code changes, and create commits from staged snapshots.
sentrix code
Generate implementations from plans, review code changes, and create commits from staged snapshots.
Subcommands#
sentrix code generate <target>sentrix code review <target> [--commit <sha>] [--commit-only] [--dirty-only] [--workflow <name>]sentrix code commit [--message-only] <target>
sentrix code generate does not support --platform. It uses .sentrix/config.toml platform mappings and lead agent selection (run sentrix init to configure).
sentrix code generate and sentrix code review tell the agent to use git add only for explicit file paths it changed. After a successful non-dry run, Sentrix stages the resolved plans directory and the configured app project_root.
sentrix code commit never auto-stages files. It generates the commit message from the currently staged snapshot plus the requirements and numbered plan documents, and normal mode commits exactly that staged snapshot. See the dedicated sentrix code commit page for the full command reference.
sentrix code generate#
Implement a plan using AI. Reads the plan file, writes the code, and uses any verification commands configured for the app in .sentrix/config.toml, iterating up to 5 times. If no project tools are configured, the verification section is omitted.
This command is behaviorally equivalent to the former plan-implementation command.
Usage#
sentrix code generate <target>
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 numbered plan files in it are processed. |
Note: sentrix code generate does not support --platform. It uses .sentrix/config.toml platform mappings and lead agent selection (run sentrix init to configure).
Plans in plans/backlog/ cannot be implemented — they must be activated first.
If a directory target contains no matching numbered plan files, the command fails validation.
Example#
sentrix code generate plans/website/2026-02/feature-contact-form/01-feature-contact-form-component.md
Generate implementations for all plans in a directory:
sentrix code generate plans/website/2026-02/feature-contact-form/
sentrix code review#
Review implementation changes against the plan using AI. Compares the implementation commit and/or dirty working tree against the plan to identify issues, gaps, and improvements.
Usage#
sentrix code review <target> [--commit <sha>] [--commit-only] [--dirty-only] [--workflow <name>]
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
target | path | Yes | Path to a plans directory. | |
--commit | string | No | auto-discovered | Use the provided implementation commit hash instead of discovering one from git history. |
--commit-only | bool | No | false | Review only the implementation commit and omit dirty working tree changes. |
--dirty-only | bool | No | false | Review only dirty working tree changes and omit the commit section entirely. |
--workflow | string | No | iterative | Named code review workflow to use. |
--commit-only and --dirty-only are mutually exclusive. --commit and --dirty-only are also mutually exclusive.
Example#
sentrix code review plans/website/2026-02/feature-contact-form/
Review only the commit diff:
sentrix code review plans/website/2026-02/feature-contact-form/ --commit-only
sentrix code commit#
Generate or create a git commit from the currently staged snapshot for an active plans directory. Sentrix never auto-stages files.
Usage#
sentrix code commit [--message-only] <target>
Arguments and Options#
| Argument/Flag | Type | Required | Default | Description |
|---|---|---|---|---|
target | path | Yes | Path to an active plans directory containing 00-requirements.md. File targets are not accepted. | |
--dry-run / -n | bool | No | false | Global flag. Generate and validate the commit message but do not create a git commit. Returns the full output envelope (message, metadata, dry-run indicator). |
--message-only | bool | No | false | Print only the final assembled commit message to stdout and skip git commit. Warnings stay on stderr so stdout remains pipe-friendly for use with other tooling. |
Example#
Stage the exact snapshot you want to record, then let Sentrix assemble the commit message and optionally create the commit:
git add <paths>
sentrix code commit plans/website/2026-02/feature-guided-tour/
For the complete staged-snapshot contract, output modes, and more examples, see sentrix code commit.