Quick Ref / Command

Marketing Kit

/ak:docs

Create and audit project docs

Creates, refreshes, summarizes, and audits only the documentation surface the project actually uses, including root agent context files.

01

Frame intent

02

Route command

03

Load rules

04

Discover authority

Rule 01

Code owns what and how; documentation owns why and where.

Rule 02

Smallest useful docs beat broad duplicated prose.

Rule 03

A root CLAUDE.md or AGENTS.md is process memory, not a general project handbook.

Rule 04

Current evidence outranks stale documentation and assumed file names.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Frame intent Bound the consumer, outcome, proof sources, evergreen versus stateful material, and acceptance criteria.
  2. 2 Route command Parse init, update, summarize, agent-context, agents, llms, or ask the user instead of assuming init.
02

Work

Agent / skill execution

  1. 3 Load rules Load the matching reference workflow plus doc-content or agent-context rules before writing.
  2. 4 Discover authority Inspect repo instructions, README, docs navigation, existing docs, source, tests, scripts, and live evidence in order.
03

Verify

Gate, review, validation

  1. 5 Choose owners Update only documents whose contract or evidence changed; link to executable owners instead of duplicating facts.
  2. 6 Write thinly Keep docs as navigation, rationale, constraints, decisions, terminology, and rejected alternatives.
04

Close

Report, handoff, artifact

  1. 7 Verify claims Check every path, command, configuration key, and behavioral claim against current evidence.
  2. 8 Report scope Separate evergreen authority from research or audit notes, and state what changed without printing unnecessary bodies.

Don't skip the required step

Each item contrasts a tempting shortcut with the required approach.

Tempting shortcut

I know the docs folder shape.

Do this instead

Discover the project contract first; there may be no universal docs tree.

Tempting shortcut

This behavior should be copied into docs.

Do this instead

Prefer linking to the owning script, manifest, source, or generated artifact.

Tempting shortcut

Historical notes can stay in authority docs.

Do this instead

Stateful evidence, audits, plans, and release notes stay outside evergreen authority paths.

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Initialize docs Recommended
/ak:docs init
Use when:
A repository needs a minimal project-specific documentation route.
Expected:
Loads the init workflow and establishes only the needed docs surface before writing durable guidance.
Refresh changed docs
/ak:docs update
Use when:
Source, scripts, or project contracts changed and docs may be stale.
Expected:
Reconciles affected documents with current evidence and keeps unrelated documentation surfaces unchanged.
Audit agent context
/ak:docs agent-context --audit
Use when:
The root CLAUDE.md or AGENTS.md needs a keep, cut, or fix review.
Expected:
Runs the agent-context rules and confirms changes one decision at a time.
Request advisory context
/ak:docs agent-context --advice
Use when:
A root context change should be reviewed by kongming before a proposed write.
Expected:
Gets advisory review for the agent-context proposal while keeping all file writes confirmation-based and scoped.
Mine recurring failures
/ak:docs agents 30d --source
Use when:
Recent git, CI, and source markers should become confirmed DO or DON’T rules.
Expected:
Ranks recurring signals, includes the default kongming review, and distills only corroborated rules into root agent context.
Dry-run rule mining
/ak:docs agents 30d --dry-run
Use when:
You want ranked recurring signals without advisor proposals or file writes.
Expected:
Stops after signal ranking, makes no rule proposals, spawns no advisor, and writes no file.

Handled Scope

  • Docs initialization
  • Evidence-backed updates
  • Agent context files
  • History and CI rule mining
  • llms.txt generation

Related skills

Next