/ctx:ctx-decision-addfrom ctx
Records architectural decisions in DECISIONS.md with Y-statement or full format, cross-references related decisions, and captures provenance. Use when resolving trade-offs or making non-obvious design choices.
Ships in ctx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Record an architectural decision in DECISIONS.md.
For lightweight decisions, use a single statement:
"In the context of [situation], facing [constraint], we decided for [choice] and against [alternatives], to achieve [benefit], accepting that [trade-off]."
Example:
"In the context of needing a CLI framework, facing Go ecosystem options, we decided for Cobra and against urfave/cli, to achieve better subcommand support, accepting that it has more boilerplate."
For significant decisions, gather:
If the user provides only a title, ask:
For quick decisions, offer the Y-statement format instead.
When a decision supersedes an earlier one:
When decisions are related:
Provenance flags (--session-id, --branch, --commit) are required.
Get these values from the hook-relayed provenance line in your context
(e.g., Session: abc12345 | Branch: main @ 68fbc00a).
Prefer this skill over raw ctx decision add: the conversational
approach lets you automatically pick up session ID, branch, and commit
from the provenance line already in your context window.
Quick format:
ctx decision add "Use Cobra for CLI framework" \
--session-id abc12345 --branch main --commit 68fbc00a \
--context "Need CLI framework for Go project" \
--rationale "Better subcommand support than urfave/cli, team familiarity" \
--consequence "More boilerplate, but clearer command structure"
Full format with alternatives:
ctx decision add "Use PostgreSQL for primary database" \
--session-id abc12345 --branch main --commit 68fbc00a \
--context "Need ACID-compliant database for e-commerce transactions" \
--rationale "PostgreSQL offers JSONB, full-text search, and team has experience. Chose over MySQL (weaker JSON) and MongoDB (no multi-doc ACID)." \
--consequence "Single database handles transactions and search. Team needs PostgreSQL-specific training."
When a flag value would be denied: if a --rationale/--context/
--consequence value contains a substring that trips a permissions.deny
rule on the literal command string (e.g. a path like /usr/local/bin),
move the fields into a JSON file and pass --json-file instead — the
values never appear on the command line. The schema gates (placeholder
rejection, required fields, index maintenance) still apply.
cat > /tmp/decision.json <<'EOF'
{
"title": "Install ctx into the system PATH",
"context": "agents invoke ctx by bare name",
"rationale": "the binary belongs at /usr/local/bin so it is on PATH",
"consequence": "ctx resolves from any working directory",
"provenance": {"session_id": "abc12345", "branch": "main", "commit": "68fbc00a"}
}
EOF
ctx decision add --json-file /tmp/decision.json
This skill records architectural decisions — moments where a trade-off between alternatives was deliberately resolved. It does not unilaterally promote material from adjacent skills:
Light compression for clarity is allowed; new facts are not.
Before recording, verify:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub activememory/ctx --plugin ctx54 skills in this plugin
/ctx-agentLoad full context packet. Use at session start or when context seems stale or incomplete./ctx-architectureBuild and maintain architecture maps. Use to create or refresh ARCHITECTURE.md and DETAILED_DESIGN.md. Supports principal mode for deeper analysis: vision, future direction, bottlenecks, implementation alternatives, gaps, upstream proposals, and intervention points./ctx-architecture-enrichEnrich architecture artifacts with code intelligence data. Takes existing /ctx-architecture output as baseline, verifies and quantifies with GitNexus MCP (blast radius, execution flows, domain clustering, registration sites). Run after /ctx-architecture, not instead of it./ctx-archiveArchive completed tasks. Use when TASKS.md has many completed items cluttering the view.Other plugins' skills for the same job