From attune-ai
Authors a single-source feature master that projects to help kinds and docs pages, with code verification and continuous auditing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/attune-ai:author-feature <feature slug, e.g. 'discovery-sweep'><feature slug, e.g. 'discovery-sweep'>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**IMPORTANT: Start your response by telling the user:**
IMPORTANT: Start your response by telling the user:
Author-feature — I'll author a single-source master for this feature, grounding every claim in live code and running the gates as I go, then project it to the help kinds + docs pages. No LLM generation, no API credits.
This skill makes the driving session a disciplined author of a
single-source master (content/features/<feature>.md). One master
projects deterministically to 10 .help kinds + 4 docs/ pages — no
generator, no API. The empirical result that motivates it: the session
is a superior polish layer to an LLM pass and the only one that
catches correctness bugs (PR #1188). The risk it manages: a master is a
single point of failure, so verification is the spine — grep the
symbol before you write it, run the audit before you commit, fix the
master not the output.
This is judgment, not plumbing. It calls the deterministic tools (the in-repo projector, the audits); it never re-implements them and never emits prose for blind rubber-stamping.
locate/scaffold → author section-by-section (grounded in code)
→ verify continuously → project → preview → commit
The master lives at content/features/<feature>.md. If it exists,
you're revising — open it. If not, create it by copying a canonical
projected page for structure — e.g. content/features/security-audit.md
— then replacing its content. Do not invent the layout; the projector
expects a fixed section contract (below).
Frontmatter (required):
---
feature: <slug>
summary: <one line>
tags: [<tag>, <tag>]
source_globs:
- src/attune/workflows/<feature>.py
nav:
help: <slug>
mkdocs:
how-to: how-to/<slug>
architecture: architecture/<slug>
reference: reference/<slug>
---
Declare how-to / architecture / reference but not tutorial:
the projector drops tutorial (a guided tutorial resists pure section
projection — it stays hand-authored).
Then add a .help/features.yaml entry under features: with
description, tags, and status: manual — and no files:.
manual means projector-owned, so staleness/maintenance never
overwrites it with LLM output.
Write each section the projector expects (the section contract):
| Heading | Holds |
|---|---|
## Overview | what the feature is, 1–2 paragraphs |
## Concepts | the model — ### subsections for each idea |
## Quickstart | the shortest real path to using it |
## Tasks | ### task blocks with runnable CLI / Python |
## Reference | API tables — classes, params, entry points |
## Comparison | when to use this vs the alternatives |
## Failure modes | risk areas + diagnosis order |
## FAQ seeds | seed Q&A (the FAQ kind is projector-skipped today) |
## Notes & tips | operational asides |
## Design & extension | design decisions + extension points |
Verification is the spine of this step (D2). Before you write a claim, find the truth:
grep the __all__, the class, the enum,
the tool schema. Never confabulate a symbol or a field.
grep -rn "class <Name>" src/attune/grep -n "<Name>" src/attune/workflows/__init__.py (re-exports)python -c "import inspect, attune.X as m; print(inspect.signature(m.Cls.__init__))"attune <cmd> --help, or grep the argparse).import_repair canonicalizes
from attune.workflows.foo import Bar → from attune.workflows import Bar and the fact-check flags the un-canonical form. Write the
package-level import.Run the gates as you author, not at the end. A fact-check finding means fix the claim in the master — never "ship the warning."
# Dry-run the projection: fact-check + example check + plan, no writes.
python scripts/project_features.py <feature> --dry-run
# Authoritative import resolution (repo src on sys.path).
python scripts/audit_doc_imports.py --paths content/features/<feature>.md
The dry-run runs the in-repo projector
(attune.authoring.projector.validate_master_file + project_feature)
and prints fact-check findings + runnable-example problems alongside the
planned outputs. Resolve every error-severity finding before building.
python scripts/project_features.py <feature> # writes 10 .help kinds + 4 docs pages
python scripts/sync_help_bundle.py # copy templates → served bundle
sync_help_bundle.py is required — it copies the projected
templates into plugin/help/generated/ (the bundle that reaches pip
users; .help/templates is only the source). Skipping it fails
tests/unit/help/test_help_bundle_sync.py ("N bundle file(s) out of
sync"). The mkdocs build job auto-wires the new hub via
docs/hooks/feature_nav.py — no manual mkdocs.yml nav edit.
Show the projected hub + pages to the user before staging (the "show generated output sooner" discipline), then confirm the gates:
python scripts/audit_doc_imports.py
python scripts/audit_docs_wiring.py
pytest tests/unit/help
attune importable. The projector is in-repo
(attune.authoring, pure — no jinja/anthropic), so from a worktree the
robust invocation is PYTHONPATH=src python scripts/project_features.py <feature> — it puts the worktree's own src/ ahead of the editable
mapping. (The audits already do this themselves.) If you skip
PYTHONPATH=src, a bare python resolving via the editable mapping
can miss worktree-only modules.python -c. From a worktree a bare
python -c "from attune.X import …" can falsely ModuleNotFoundError
(the editable MAPPING points at main's possibly-older src/) WHILE
scripts/audit_doc_imports.py (which puts the worktree src/ on
sys.path) correctly reports all imports resolve. The audit is
authoritative.attune-author generate or any LLM-polish path, stop — that path is retired; the
session is the author.The skill is "done" for a feature when a fresh session, given only this
skill, authors a master that projects byte-clean and passes
doc-import-audit + the bundle sync on the first real attempt — the
#1188 outcome, reproduced without out-of-band knowledge. Registered ≠
working: dogfood the real flow; the green projection is the receipt.
npx claudepluginhub smart-ai-memory/attune-ai --plugin attune-aiCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.