/cortex-core:build <feature> [phase]from cortex-core
Take a refined ticket from spec through plan, implement, review, and complete. Needs research.md and spec.md — run refine first if either is missing.
Ships in cortex-core. 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.
Read when SKILL.md points to them.
Plan → implement → review → complete. State lives in files, so it survives context loss. cortex/lifecycle.config.md, when present, overrides complexity defaults, test commands, phase skipping, and review criteria.
cortex-lifecycle-next "$ARGUMENTS" --expect-file ${CLAUDE_SKILL_DIR}/references/protocol-expectation.txt
One read-only call returns the state, its advance contract, and its pause spec. --expect-file lets it detect a version mismatch between the installed CLI and this skill. Use the JSON result's fields, not the legacy next field. Stop on protocol-skew, wrapper exit 2 (CLI not installed), or a missing command — each gives its own fix; show it and stop.
Forms: /cortex-core:build <feature>, <feature> <phase>, reserved complete <slug> / resume <feature>.
Not yet refined — state research, specify, or new: hand off to /cortex-core:refine {feature}. Never plan without both research.md and spec.md; overnight needs both.
resume is served by phase: state is the current phase, advance_contract goes to cortex-lifecycle-advance at each boundary, and pause_spec drives the kept pauses. Write artifacts under roots.artifacts.path — never the log path, which always points at the main checkout.
Other states carry a next instruction — act on it:
derive-slug → make a 3–6 word kebab slug and re-run without asking.empty → offer the incomplete cortex/lifecycle/* lifecycles, then re-run.ambiguous-backlog → present candidates, then re-run.wontfix → run the named cortex-lifecycle-wontfix command and stop.closed / parked → already decided; show next, do not build.error / needs-feature / no-such-lifecycle → report and stop.Run the result's enter_command exactly as given — a cortex-lifecycle-enter call with every argument already filled in:
{envelope.enter_command}
Never rebuild it or swap the user's typed token in for --feature. Its backlog-file argument lets a resume repair an index that never got its backlog tags.
ready → proceed.needs-decision → the item is already_complete; nothing ran. Apply the Backlog Status Check in backlog-writeback.md.blocked → a check refused, and the user can fix the cause; .session is unwritten. Stop, fix, re-run.ensure-failed / error → stop.Mention any ignored_tokens in one line.
On resume, report the served state/criticality/tier, offer continue (default) or restart, and mention staleness briefly. Carry criticality and tier forward — the phase references use them instead of re-reading.
| Phase | Reference | Artifact |
|---|---|---|
| Plan | plan.md | plan.md |
| Implement | implement.md | Source + commits |
| Review | review.md | review.md |
| Complete | complete.md | Git workflow + summary |
Read only the row for the served state.
Invoking this skill authorises the sub-agents a phase reference calls for, even under a standing "no agents unless asked" rule. If you cannot start them, say what you did instead in the phase summary and label any review a self-review.
Path propagation. ${CLAUDE_SKILL_DIR} resolves only in this body. Wherever a reference names a ${CLAUDE_SKILL_DIR}/… path, use the absolute path resolved here.
Every phase boundary hands off to cortex-lifecycle-advance. It writes that boundary's events in order and is safe to run again. Route on the returned state and show its message / reason / preferred_remedy. Never work out an outcome or write an event by hand. On refused, re-run cortex-lifecycle-next, then re-invoke with --from-state set to advance_contract.expected_from_state; if still refused, escalate, naming both phases. Verb missing from PATH → stop; the operator installs or upgrades the cortex-command CLI.
Cross boundaries automatically: announce and continue. Add no stop unless a <!-- pause: --> marker or the routed outcome says so. Each summary carries Decisions, Scope delta, Blockers ("None" when empty), then Next. A boundary fires on its condition (e.g. plan.md all tasks [x]), not on user input; Plan also needs user approval.
Override anytime: cortex-lifecycle-event criticality-override --feature <name> --from <old> --to <new> --reason "{tag}: <one line>". Tag: reversibility: / exposure: / consequence: / other:. The reason saves the next reader from working it out again.
cortex-lifecycle-state --feature {feature} (or --field <x>) returns the log's current values and omits absent keys — default criticality=medium / tier=moderate yourself. "corrupted": true → tier and criticality are unknown: treat the feature as requiring review.
high/critical (Stage 2 complex-only). Otherwise it runs for complex tier only.low criticality below complex.critical, a single plan otherwise.You choose the model each time you start an agent. The implement→{review|complete} routing lives in its verb.
Agent(isolation: "worktree")A session binds to one feature through cortex/lifecycle/{feature}/.session — gitignored, cleaned at SessionEnd, never committed. Several incomplete lifecycles and none named → list them and ask. Ignore features with feature_complete in events.log or an APPROVED verdict in review.md.
assets/lifecycle.config.md (opens in a new tab)references/backlog-writeback.md (opens in a new tab)references/competing-plans.md (opens in a new tab)references/complete-first-run.md (opens in a new tab)references/complete.md (opens in a new tab)references/implement.md (opens in a new tab)references/kept-pauses-data.toml (opens in a new tab)references/orchestrator-review.md (opens in a new tab)references/parallel-execution.md (opens in a new tab)references/plan.md (opens in a new tab)references/protocol-expectation.txt (opens in a new tab)references/review.md (opens in a new tab)references/size-pin.txt (opens in a new tab)references/wontfix.md (opens in a new tab)references/worktree-entry.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub charleshall888/cortex-command --plugin cortex-core11 skills in this plugin
/backlog-authorCompose a ticket body from a context block, using the Why/Role/Integration/Edges/Touch-points template./critical-reviewAdversarial review — 1–2 fresh reviewer agents on distinct angles, consolidated here. Pressure-tests a plan, spec, or research artifact./devDevelopment entry point — routes a request to the right workflow. Use for "what should I work on", "what's next", or a feature described without naming a skill.Other plugins' skills for the same job