2.13.0-beta.20). Features may change before the next stable release.Switch to stable →Skills
Maintain project knowledge with ak:docs
Create, reconcile, or summarize the smallest evidence-backed documentation route for a project without imposing a fixed template.
Use ak:docs to establish, update, or summarize project documentation while
keeping code and executable artifacts as the owners of current behavior. The
Skill discovers the repository's real authority surfaces, preserves durable
rationale and constraints, and removes documentation that merely duplicates
implementation details.
Choose ak:docs for project documentation
Use ak:docs when
- A project needs its first coherent documentation route.
- User-visible behavior, architecture, configuration, or operating guidance has changed and impacted docs must be reconciled.
- You need an evidence-backed project summary without forcing a new file.
- Existing docs contain stale paths, duplicate guidance, or copied inventories.
Choose another workflow when
- You need current documentation for an external library. Use the documentation discovery workflow instead.
- You need a generated visual but no documentation change. Use
ak:preview. - You need product code changed. Use the relevant planning or implementation
workflow;
ak:docsmust not implement product code. - You only need to learn which Skill fits. Use
ak:help.
Prepare the project and runtime
Before you start:
- Complete Onboarding, and confirm Engineer Kit is installed for the runtime and scope you are using.
- Open the project and make repository instructions, the root README, and the existing documentation navigation available.
- State the audience, outcome, affected decisions, evidence, and acceptance criteria for the documentation operation.
- Separate evergreen guidance from plans, audits, release evidence, and other stateful records.
- Identify any generated or machine-owned documentation that must be changed through its owner rather than hand-edited.
| Runtime | Invocation | Availability boundary |
|---|---|---|
| Claude Code | /ak:docs ... | The workflow can use the installed docs-manager through runtime delegation when available. |
| Cursor | /ak:docs ... | Uses the user-verified slash spelling; delegation and diagram tooling parity are not established. |
| Codex | $ak:docs ... | Uses native Codex discovery and performs the work locally when compatible delegation is unavailable. |
Run the Skill
/ak:docs update "Reconcile onboarding docs with the current authentication flow. Preserve generated CLI pages, remove duplicated command lists, and verify links."/ak:docs update "Reconcile onboarding docs with the current authentication flow. Preserve generated CLI pages, remove duplicated command lists, and verify links."$ak:docs update "Reconcile onboarding docs with the current authentication flow. Preserve generated CLI pages, remove duplicated command lists, and verify links."The first argument selects the operation:
| Input | Outcome | Default behavior |
|---|---|---|
init | Establishes the smallest project-specific documentation route | Reuses coherent existing routes and avoids empty template files |
update | Reconciles impacted docs with current intent and evidence | Touches only affected authority surfaces and removes stale duplication |
summarize | Produces an evidence-backed summary | Answers in the conversation unless the project already designates a summary or you explicitly request a durable file |
agent-context | Authors, audits, or optimizes repository-root process memory | Targets Claude Code CLAUDE.md or Codex AGENTS.md; asks before every write |
| Empty or unclear | No operation is assumed | Asks you to choose the operation |
Manage root agent context
Use agent-context for repository-root instructions; keep
ak:folder-context for subfolders.
/ak:docs agent-context --advice
/ak:docs agent-context --auditUse the $ak:docs spelling in Codex. --advice asks kongming for counsel
before presenting a proposed write. --audit gets an audit, then asks one
keep, cut, fix, or migrate decision at a time and applies only confirmed
changes. The Skill verifies current runtime behavior, excludes secrets, and
keeps deterministic settings and Hook configuration recommend-only. This
release defines no root context filename for Cursor.
Define the documentation contract
Before writing, the Skill establishes:
- Audience: Identify whether people, AI collaborators, or both consume the route.
- Outcome: State which decisions or tasks the documentation must make possible.
- Authority: Identify the repository surfaces that own durable guidance.
- Evidence: Name source, tests, scripts, manifests, generated artifacts, or live state that prove current behavior.
- State boundary: Separate evergreen intent from temporary plans, reports, audits, and release records.
- Acceptance criteria: Define the paths, links, examples, or decisions that must be verifiable afterward.
The Skill reuses an accepted plan or prior documentation contract when it already settles these questions.
Understand what happens during a run
- The Skill confirms the contract. It runs a bounded documentation brainstorm and reopens only material missing decisions.
- The Skill discovers the route. It reads repository instructions, the root README, the current docs index, linked docs, and relevant evidence.
- The Skill maps ownership. It distinguishes durable why and where guidance from executable what and how details.
- The Skill selects the smallest change.
initdesigns a minimal route;updatemaps changed claims to their owners;summarizescopes a focused evidence read. - The Skill presents material authority changes. It shows a proposed route before replacing existing docs or changing their authority.
- The Skill writes or summarizes. It can use a
docs-managerdelegate when available or perform the same evidence-first work locally. - The Skill validates the result. It verifies links, paths, examples, configuration keys, commands, and owning generators or contract scripts.
Keep documentation safe and maintainable
Documentation changes can remove stale files
ak:docs may create, edit, or delete documentation within the accepted
contract. Review proposed route or authority changes before the Skill replaces
existing docs. It must not edit product code.
Important boundaries:
- Documentation owns durable rationale, decisions, terminology, constraints, and navigation. It should point to executable owners for current behavior.
- Machine-owned inventories and generated reference output must be changed through their manifest, generator, or source layer.
- The Skill must not create ADR collections, roadmaps, generators, bots, or docs-only CI gates unless you explicitly request that operating surface.
- Diagrams are added only when a visual materially improves understanding and must be reviewed after generation.
- No external provider, publication, credential, or paid service is required by the source-defined workflow.
Verify the result
Evidence depends on the selected operation:
| Operation | Expected evidence |
|---|---|
init | The created, retained, replaced, and removed authority surfaces; working navigation; verified claims and links |
update | Changed claims mapped to current evidence; a minimal diff; stale duplication removed; existing validators or generators run where applicable |
summarize | A focused summary that separates current behavior, intended direction, and stateful evidence; a file only when requested or already designated |
A complete result also reports unresolved questions last. Short documentation is valid when the project contains little durable rationale that code cannot express.
Troubleshoot or continue
| Symptom | Safe next step |
|---|---|
| The Skill proposes a standard file tree | Point it back to repository instructions and existing navigation; reject template placeholders. |
| An update touches every document | Narrow the changed contract and map each affected claim to its current owner. |
| Prose duplicates code or commands | Replace the prose with a stable pointer to source, tests, a manifest, or generated reference. |
| A summary creates an unwanted file | Use summarize without requesting durable output; conversation output is the default. |
| Generated docs would be hand-edited | Stop and locate the generator or machine-owned source before continuing. |
| The runtime does not recognize the Skill | Confirm target and scope, restart the runtime session, then follow Runtime cannot find a Skill or Agent. |
Know the current limits
- The Skill cannot recover undocumented rationale that is absent from the repository and available project context.
- Live-state claims remain limited by accessible tools, credentials, and evidence.
- Delegated documentation work depends on runtime capability and must receive the same ownership and drift-resistance rules.
- Cursor slash invocation is user-verified evidence, not proof of delegation or diagram-tool parity.
- Stable and beta package the same
ak:docsmodes and documentation rules.
Scan secrets, dependencies, and code patterns with ak:security-scan
Run a lightweight read-only security scan, verify likely matches in context, and receive a redacted severity-ranked report.
Turn decisions into durable documents with ak:interview-docs
Interview a user for their own vision, principles, strategy, or architectural decision and preserve each answer in a maintained project document.