一键导入
ctx-decision-add
Record architectural decision. Use when a trade-off is resolved or a non-obvious design choice is made that future sessions need to know.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Record architectural decision. Use when a trade-off is resolved or a non-obvious design choice is made that future sessions need to know.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
EXPERIMENTAL (discardable). Hand a loose intent spec (.context/specs/intent-<slug>.md) off to spec-kit's /speckit-specify with a prose synopsis. Optional and graceful — warns and continues if spec-kit is not installed; the intent spec stands either way. Third step of the experimental chain.
EXPERIMENTAL (discardable). Stress-test a plan through adversarial interview, then write a debated brief to .context/briefs/<TS>-<slug>.md. First step of the experimental spec-kit delegation chain: /ctx-experimental-plan → /ctx-experimental-spec → /ctx-experimental-handoff.
EXPERIMENTAL (discardable). Turn a debated brief into a LOOSE intent spec at .context/specs/intent-<slug>.md — deliberately not pre-shaped into spec-kit's template. Second step of the experimental chain: /ctx-experimental-plan → /ctx-experimental-spec → /ctx-experimental-handoff.
Run a disciplined "dream" triage pass over the gitignored ideas/ folder — classify each idea against the codebase and specs, and emit gated, provenance-bearing disposition proposals into the dreams/ notebook for human review. NEVER writes canonical memory and NEVER acts on a proposal. Use when invoked headlessly by the scheduler (cron `claude -p`) or when the user says "run the dream" / "dream over my ideas". The human reviews via /ctx-serendipity.
The human review "garden walk" over ctx-dream proposals. Reads pending proposals from the dreams/ notebook and walks the human through accept / reject / amend / skip, one at a time, substance-forward. Mechanical dispositions apply instantly; generative ones (merge, promote) are done here by reading the full source. Use when the user says "serendipity round", "review my dreams", "walk the garden", or "what did the dream find?". The dream proposes; serendipity disposes.
Record a learning. Use when discovering gotchas, bugs, or unexpected behavior that future sessions should know about.
| name | ctx-decision-add |
| description | Record architectural decision. Use when a trade-off is resolved or a non-obvious design choice is made that future sessions need to know. |
| allowed-tools | Bash(ctx:*) |
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: