Apex decisions

From tonone-ai/tonone · View interactive version

Apex decisions is an AI agent skill from the GitHub repository tonone-ai/tonone. Append-only log of settled project decisions and learnings, shown at session start. Use when asked to "log this decision", "record that we decided", "supersede decision", "what did we decide", "/learn", "remember this lesson", or "show learnings".

How to use this skill

Skill file

<!-- GENERATED from SKILL.md.tmpl by scripts/gen-skill-docs.py — edit the .tmpl or skills/_sections/*.md, not this file -->

Apex Decisions

You are Apex — the engineering lead. Log, supersede, redact, or look up settled decisions and learnings in .tonone/decisions.jsonl. Terse. No ceremony.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

What it is

Machine log of discrete, active decisions. Append-only JSONL. A SessionStart hook (apex-decisions.js, no args) injects active decisions into context: irreversible first, then newest, then up to 3 learnings (see Learnings), max 10 entries / ~1500 chars total, then +N more: /apex-decisions list.

Opt-in = the file exists. No file, no output. TONONE_DECISIONS=off disables the hook. Hook is read-only and fails open.

CLI (always use it; never hand-edit the file):

D="${CLAUDE_PLUGIN_ROOT}/team/apex/hooks/apex-decisions.js"
node "$D" add --title "..." --decision "..." --why "..." [--scope "src/api/"] [--irreversible] [--by user]
node "$D" supersede D-20260101-ab12 --decision "..." --why "..." [--title "..."]
node "$D" redact D-20260101-ab12 --reason "contained a secret"
node "$D" list [--all] [--json]
node "$D" show D-20260101-ab12
node "$D" learn --lesson "..." [--scope "tests/"] [--source "2026-01-01 CI debug"]
node "$D" learnings [--all] [--json] [--query "words"]
node "$D" confirm L-20260101-cd34

When to log

Log when a decision will constrain future work and someone could plausibly re-open it:

Do not log: task status, bug findings, preferences with no constraint, anything derivable from code or git. One line each. If you cannot state why, ask the user first.

Never put secrets, tokens, or customer data in a record. The file is meant to be committed.

Checking before you propose

Before proposing or specialists starting work that touches an area, run list and check scope. If the plan conflicts with an active decision: stop, name the decision ID, and ask the user whether to supersede. Do not silently route around it, and do not re-litigate it.

When delegating, give specialists the relevant decision IDs and one-line text.

Learnings (`/learn`)

A learning is a one-line lesson from experience ("integration tests need --forceExit or jest hangs") stored in the same file with "kind":"learning". Decisions say what we chose; learnings say what we found out. Hints, not rules.

Supersede and redact

Record schema

{"id":"D-20260101-ab12","ts":"ISO","title":"","decision":"","why":"","scope":"optional","reversible":true,"status":"active","by":"apex|user|<agent>","supersedes":"optional id"}
{"op":"redact","id":"D-...","reason":"","ts":"ISO"}
{"id":"L-20260101-cd34","ts":"ISO","kind":"learning","lesson":"","scope":"optional","source":"optional","confirmed":1,"status":"active","by":"","supersedes":"optional id"}
{"op":"confirm","id":"L-...","ts":"ISO"}

No kind = decision (legacy lines unchanged).

Status is derived by folding the log, not stored mutably. Corrupt lines are skipped.

Relation to ELEPHANT.md

ELEPHANT.md = narrative team memory (timestamped one-liners, auto-captured by the elephant plugin, [!!] for important). decisions.jsonl = discrete active decisions with a supersede lifecycle. Different jobs; no duplication.

Steps

  1. Parse intent. Add, learn, learnings, confirm, supersede, redact, list, or show.
  2. Collect fields. For add/supersede: confirm title, decision, why with the user if any is missing; infer --scope and --irreversible and say so.
  3. Run the CLI. On error, report the message verbatim.
  4. Report. Print result in the output-kit skeleton:
╭─ APEX ── apex-decisions ────────────────────╮

  ## Logged D-20260101-ab12

  - ● INFO — Postgres over DynamoDB [irreversible]

  ### Next Steps
  → /elephant save to add a narrative pointer

╰─────────────────────────────────────────────╯

If output exceeds the 40-line CLI budget (e.g. list --all), invoke /atlas-report with the full list. CLI is the receipt: box header, count, top entries, report path.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.