Skip to content

Hidden Sub-commands Reference

AgilePlus includes 40+ hidden sub-commands across 8 categories for advanced agent workflows. These are not shown in --help but are available via the MCP dispatch_command tool and audit-logged for compliance.

Each invocation is recorded in the append-only JSONL audit log at .agileplus/audit.jsonl with full traceability.

Branch Operations

Hidden under agileplus branch:*

branch:create

Create a new branch from a base ref.

bash
agileplus branch:create --name feat/001-login-WP01 --base main
ArgumentTypeDescription
--namestringBranch name (required)
--basestringBase ref to branch from (default: main)

Audit Log Entry:

json
{
  "command": "branch:create",
  "args": {"name": "feat/001-login-WP01", "base": "main"},
  "actor": "claude-code",
  "timestamp": "2025-01-16T14:22:00Z",
  "exit_code": 0,
  "duration_ms": 145
}

branch:checkout

Switch to an existing branch.

bash
agileplus branch:checkout --name feat/001-login-WP01
ArgumentTypeDescription
--namestringBranch name (required)

branch:delete

Delete a branch (local or remote).

bash
agileplus branch:delete --name feat/001-login-WP01 --force
ArgumentTypeDescription
--namestringBranch name (required)
--forceflagForce delete even if not merged
--remotestringDelete from remote (origin, etc.)

branch:list

List all branches matching a pattern.

bash
agileplus branch:list --pattern "feat/*" --remote

Commit Operations

Hidden under agileplus commit:*

commit:create

Stage files and create a new commit.

bash
agileplus commit:create \
  --message "WP01: Implement login form" \
  --files "src/auth/login.rs,src/auth/session.rs"
ArgumentTypeDescription
--messagestringCommit message (required)
--filesstringComma-separated file paths
--authorstringAuthor (auto-detected from git config)
--allow-emptyflagAllow empty commits

commit:amend

Modify the last commit.

bash
agileplus commit:amend \
  --message "WP01: Fix login form validation" \
  --allow-empty
ArgumentTypeDescription
--messagestringNew commit message
--allow-emptyflagKeep empty commit

commit:fixup

Create a fixup commit for an earlier commit.

bash
agileplus commit:fixup --target abc123def456 --message "Fix type error"
ArgumentTypeDescription
--targetstringCommit SHA to fixup (required)
--messagestringFixup message

Diff Inspection

Hidden under agileplus diff:*

diff:show

Show changes between commits or branches.

bash
agileplus diff:show --from main --to feat/001-login-WP01
ArgumentTypeDescription
--fromstringBase ref (default: HEAD~1)
--tostringTarget ref (default: HEAD)
--statflagShow stats only
--unifiedintContext lines (default: 3)

diff:stat

Show file-level diffstat.

bash
agileplus diff:stat --from main --to feat/001-login-WP01

Stash Management

Hidden under agileplus stash:*

stash:push

Save uncommitted changes to stash.

bash
agileplus stash:push --message "WIP: login form styling"
ArgumentTypeDescription
--messagestringStash description
--include-untrackedflagInclude untracked files

stash:pop

Restore and remove a stash entry.

bash
agileplus stash:pop --index 0
ArgumentTypeDescription
--indexintStash index (0 = latest)

stash:list

Show all stash entries.

bash
agileplus stash:list

Worktree Operations

Hidden under agileplus worktree:*

worktree:add

Create a new worktree for parallel development.

bash
agileplus worktree:add \
  --path .worktrees/001-login-WP01 \
  --branch feat/001-login-WP01 \
  --feature-slug 001-login \
  --wp-id WP01
ArgumentTypeDescription
--pathstringWorktree directory path (required)
--branchstringBranch name (required)
--feature-slugstringFeature identifier (metadata)
--wp-idstringWork package ID (metadata)

worktree:remove

Delete a worktree.

bash
agileplus worktree:remove --path .worktrees/001-login-WP01
ArgumentTypeDescription
--pathstringWorktree directory path (required)
--forceflagForce remove even if dirty

worktree:list

Show all active worktrees.

bash
agileplus worktree:list

Output:

json
[
  {
    "path": ".worktrees/001-login-WP01",
    "branch": "feat/001-login-WP01",
    "feature_slug": "001-login",
    "wp_id": "WP01"
  }
]

Artifact File Operations

Hidden under agileplus artifact:*

artifact:write

Write a feature artifact (spec, plan, evidence, etc.).

bash
agileplus artifact:write \
  --feature-slug 001-login \
  --relative-path spec.md \
  --content "# Login Feature\n\n..."
ArgumentTypeDescription
--feature-slugstringFeature ID (required)
--relative-pathstringPath relative to feature dir (required)
--contentstringFile content
--from-filestringRead content from file instead of stdin

artifact:read

Read a feature artifact.

bash
agileplus artifact:read \
  --feature-slug 001-login \
  --relative-path spec.md

artifact:hash

Compute hash of an artifact (for integrity checking).

bash
agileplus artifact:hash \
  --feature-slug 001-login \
  --relative-path spec.md

Output:

json
{
  "path": "001-login/spec.md",
  "hash": "sha256:abc123...",
  "size_bytes": 4567
}

Governance Operations

Hidden under agileplus governance:*

governance:check

Validate whether a feature can transition to a new state.

bash
agileplus governance:check \
  --feature-slug 001-login \
  --transition REVIEW
ArgumentTypeDescription
--feature-slugstringFeature ID (required)
--transitionstringTarget state (required)
--verboseflagShow detailed violations

Output (success):

json
{
  "passed": true,
  "violations": []
}

Output (failure):

json
{
  "passed": false,
  "violations": [
    {
      "rule_id": "FR-REVIEW-001",
      "message": "At least one approved review required",
      "remediation": "Request code review from @reviewer"
    }
  ]
}

governance:enforce

Enforce a governance rule (admin use).

bash
agileplus governance:enforce \
  --feature-slug 001-login \
  --rule FR-REVIEW-001 \
  --action enable
ArgumentTypeDescription
--feature-slugstringFeature ID (required)
--rulestringRule ID (required)
--actionstringenable, disable, reset

Audit Trail Operations

Hidden under agileplus audit:*

audit:log

Query audit log entries.

bash
agileplus audit:log \
  --feature-slug 001-login \
  --limit 20 \
  --output json
ArgumentTypeDescription
--feature-slugstringFilter by feature
--actorstringFilter by actor (claude-code, etc.)
--sincestringISO 8601 timestamp (e.g., 2025-01-16T00:00:00Z)
--limitintMax entries (default: 50)
--outputstringjson, table, or markdown

Example JSON output:

json
[
  {
    "id": 42,
    "feature_slug": "001-login",
    "wp_sequence": 1,
    "timestamp": "2025-01-16T14:22:00Z",
    "actor": "claude-code",
    "transition": "PLANNED -> DOING",
    "evidence_refs": ["pr/42", "commit/abc123"],
    "prev_hash": "...",
    "hash": "..."
  }
]

audit:query

Advanced query on audit log (supports filtering, aggregation).

bash
agileplus audit:query \
  --where "actor = 'claude-code' AND transition LIKE '%REVIEW%'" \
  --group-by "feature_slug" \
  --order-by "timestamp DESC"

audit:verify

Verify the cryptographic integrity of the audit chain.

bash
agileplus audit:verify --feature-slug 001-login

Output:

json
{
  "valid": true,
  "entries_verified": 127,
  "first_invalid_id": null,
  "error_message": null
}

Audit Log Format

All subcommands are recorded in .agileplus/audit.jsonl:

jsonl
{"command":"branch:create","args":{"name":"feat/001"},"actor":"claude-code","exit_code":0,"duration_ms":145,"timestamp":"2025-01-16T14:22:00Z"}
{"command":"commit:create","args":{"message":"WP01: init","files":"src/main.rs"},"actor":"claude-code","exit_code":0,"duration_ms":234,"timestamp":"2025-01-16T14:23:15Z"}

Each line is complete JSON (no multiline records).

Accessibility via MCP

All subcommands are callable via the MCP dispatch_command tool:

json
{
  "command": "dispatch_command",
  "feature_slug": "001-login",
  "args": {
    "command": "branch:create",
    "name": "feat/001-login-WP02",
    "base": "feat/001-login-WP01"
  }
}

Stability & Versioning

Subcommands follow semantic versioning:

  • Existing args are never removed (backward compatible)
  • New args are optional with sensible defaults
  • New subcommands can be added freely
  • Deprecated subcommands move to legacy:* namespace

This ensures agent scripts never break unexpectedly.

MIT License