Quick Ref / Command

Engineer Kit

/ak:docs

Create and audit project docs

Create, refresh, summarize, audit, and optimize project documentation and root agent context from current evidence.

01

Bound Intent

02

Route Operation

03

Load Rules

04

Discover Contract

Rule 01

Code owns WHAT and HOW; docs own WHY and WHERE.

Rule 02

Documentation is a thin navigation layer, not a duplicate code inventory.

Rule 03

Do not assume filenames, file counts, or a universal documentation layout.

Rule 04

Delete stale guidance instead of preserving it for history.

Rule 05

Root agent context is process memory, not a project-documentation substitute.

Execution Map

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

01

Start

Input, scope, route

  1. 1 Bound Intent Establish consumers, decisions enabled, proof sources, evergreen vs stateful content, and acceptance criteria.
  2. 2 Route Operation Parse init, update, summarize, agent-context, agents, llms, or ask when empty/unclear.
  3. 3 Load Rules Load doc-content-rules for doc writing or agent-context-rules for CLAUDE.md/AGENTS.md work.
02

Work

Agent / skill execution

  1. 4 Discover Contract Read repo instructions, README, docs index, docs files, then source/tests/scripts/generated artifacts/live state that prove claims.
  2. 5 Separate Authority Let code own WHAT/HOW; docs own WHY/WHERE, decisions, rejected alternatives, business rules, terminology, and constraints.
  3. 6 Edit Thinly Update only impacted docs, delete stale or duplicate guidance, and link to owning scripts or manifests instead of copying inventories.
03

Verify

Gate, review, validation

  1. 7 Handle Agent Context For root CLAUDE.md/AGENTS.md, keep imperative process memory separate from general project documentation.
  2. 8 Verify Claims Check every path, command, configuration key, and behavioral statement against current evidence before delivery.
  3. 9 Summarize Delta Report what changed, what was removed, the evidence used, and any stale/stateful material kept outside evergreen authority.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:docs <init|update|summarize|agent-context|agents|llms> [request] [--advice]

Arguments

<operation> Required

Docs operation

Required first word: init, update, summarize, agent-context, agents, or llms. Empty or unclear input asks the user to choose instead of assuming init.

/ak:docs update "Reconcile onboarding docs with the current authentication flow"
[request]

Docs request

Optional natural-language scope, changed behavior, audience, evidence, or acceptance criteria for the selected operation.

Shared options

--advice

Advisory counsel

Ask kongming for counsel before proposed documentation or root-context writes. It advises only; ak:docs still owns edits and confirmations.

/ak:docs update --advice "Reconcile onboarding docs with the current authentication flow"

Subcommands

init Initialize docs
/ak:docs init [request] [--advice]

Establish the smallest project-specific documentation route. It does not impose a fixed template tree.

[request]
Audience, outcome, evidence, navigation, or acceptance criteria for the new route.

Outcome: Creates, retains, replaces, or removes only the authority surfaces needed for working navigation and verified claims.

/ak:docs init
update Update docs
/ak:docs update [changed contract] [--advice]

Reconcile impacted documentation with current intent and evidence. It touches only affected authority surfaces.

[changed contract]
Behavior, architecture, configuration, or operating guidance that changed and needs docs reconciliation.

Outcome: Minimal documentation diff with changed claims mapped to evidence and stale duplication removed.

/ak:docs update "Reconcile onboarding docs with the current authentication flow"
summarize Summarize evidence
/ak:docs summarize [focus] [--advice]

Produce an evidence-backed project summary. It does not force a new file unless requested or already designated by the project.

[focus]
Optional topic, subsystem, or decision the summary should cover.

Outcome: Focused summary that separates current behavior, intended direction, and stateful evidence.

/ak:docs summarize auth flow
agent-context Root agent context
/ak:docs agent-context [--advice] [--audit]

Author, audit, or optimize repository-root CLAUDE.md or AGENTS.md process memory. It is separate from general project docs.

--audit
Get a kongming audit, then ask one keep, cut, fix, or migrate decision at a time before applying confirmed changes.

Outcome: Confirmed root-context changes only, with secrets excluded and automated settings or Hook configuration kept as recommendations only.

/ak:docs agent-context --advice
agents Mine agent rules
/ak:docs agents [bound] [--source] [--dry-run] [--audit]

Mine bounded git and CI history for recurring failures and gotchas that should become root process rules. This operation includes advisory counsel by default.

[bound]
Optional days such as 30d or commit count such as 500. Defaults to the smaller of 90 days or 300 commits plus 200 CI runs.
--source
Add read-only source-tree mining through ak:scout to corroborate git and CI signals.
--dry-run
Stop after ranking signals. No adviser is spawned and no file is written.
--audit
Ask one keep, cut, fix, or migrate decision per proposed rule before writing.

Outcome: Ranked signals and confirmed DO/DON'T root-context rules only; dry-run reports without writing.

/ak:docs agents 30d --source
llms AI-readable indexes
/ak:docs llms [--advice]

Create or update llms.txt and llms-full.txt from the discovered documentation route.

Outcome: Valid indexes in the site's public/static directory or repository root, with links verified and full-content size reported.

/ak:docs llms

Modes / Routes

init

Create route

Research:
init-workflow
Review:
Avoid fixed layout
Validate:
Minimal docs route proven
update

Refresh impacted docs

Research:
update-workflow
Review:
Check stale duplicates
Validate:
Changed evidence reconciled
summarize

Summarize evidence

Research:
summarize-workflow
Review:
No forced new file
Validate:
Summary cites sources
agent-context

Root agent context

Research:
agent-context-rules
Review:
Keep imperative only
Validate:
Confirmed changes only
agents

Mine recurring rules

Research:
agents-workflow
Review:
Corroborate git/CI/source
Validate:
Confirmed DO/DON'T rules
llms

llms.txt

Research:
llms.md
Review:
Check public doc shape
Validate:
llms files current

Special Operations

Agents mining bounds

agents accepts a days or commits bound and defaults to the smaller of 90 days or 300 commits plus 200 CI runs.

Diagram only when useful

Use the installed diagram skill only when a visual materially improves understanding, then visually review the output.

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 project needs its first coherent documentation route without a fixed template tree.
Expected:
Confirms the documentation contract, discovers existing authority surfaces, and creates only the smallest evidence-backed route needed for navigation and decisions.
Refresh changed docs with advice
/ak:docs update --advice "Reconcile onboarding docs with the current authentication flow"
Use when:
Behavior, architecture, configuration, or operating guidance changed and impacted docs must be reconciled.
Expected:
Runs the bounded contract check, factors in kongming counsel before writing, maps changed claims to current evidence, and removes stale duplication.
Audit root agent context
/ak:docs agent-context --audit
Use when:
The root CLAUDE.md or AGENTS.md needs a keep, cut, fix, or migrate review before edits.
Expected:
Loads agent-context-rules, gets a kongming audit, asks one confirmed decision at a time, excludes secrets, and applies only accepted root-context changes.
Mine source-backed agent rules
/ak:docs agents 30d --source
Use when:
Recurring failures should become root process rules only when git, CI, and source markers corroborate them.
Expected:
Mines bounded git and CI history, layers read-only ak:scout source-marker mining, applies corroboration gates, and writes only confirmed DO/DON'T rules.
Summarize evidence
/ak:docs summarize
Use when:
Existing docs and source evidence should be condensed without forcing a new file layout.
Expected:
Reads the current documentation contract, cites existing sources, and writes a summary only when the summarize workflow requires an artifact.
Generate llms.txt
/ak:docs llms
Use when:
The project needs an llmstxt.org index generated from current docs or code.
Expected:
Scans docs or the codebase, writes llms.txt following llmstxt.org, and reports the output path without inventing extra doc trees.

Handled Scope

  • Docs init/update/summarize workflows
  • CLAUDE.md and AGENTS.md authoring, audit, and optimization
  • Git/CI/source mining for recurring DO/DON'T agent rules
  • llms.txt and llms-full.txt generation per llmstxt.org
  • Evidence-backed documentation pruning and navigation design

Related skills

Next