Skip to content

Add /generate-feature-docs skill for spec-to-docs generation#675

Open
jevansnyc wants to merge 17 commits intomainfrom
feature/generate-feature-docs-skill
Open

Add /generate-feature-docs skill for spec-to-docs generation#675
jevansnyc wants to merge 17 commits intomainfrom
feature/generate-feature-docs-skill

Conversation

@jevansnyc
Copy link
Copy Markdown
Collaborator

Summary

Adds a Claude Code skill that converts implemented engineering specs into publisher-facing documentation pages on the Trusted Server VitePress site. Closes a recurring gap where specs get written and code ships, but the docs at iabtechlab.github.io/trusted-server do not get updated.

The skill is invoked as /generate-feature-docs <spec-path> and runs in two interactive stages: an extraction pass that produces a structured outline for user review, and a generation pass that writes prose, applies mechanical updates to reference docs, and commits on user approval. Built entirely on Claude Code's existing skill and slash-command primitives. No new runtime infrastructure.

What's in this PR

  • Skill at .claude/skills/generate-feature-docs/SKILL.md and slash command at .claude/commands/generate-feature-docs.md.
  • Spec lifecycle convention: docs/superpowers/specs/drafts/ for brainstorm output, docs/superpowers/specs/implemented/ for post-implementation truth, with status: frontmatter (draft, in-progress, implemented).
  • One-time migration of 12 existing specs into drafts/ with status: draft.
  • VitePress srcExclude for superpowers/** so internal specs no longer render on the public docs site.
  • Documentation of the convention in CLAUDE.md.
  • Design spec at docs/superpowers/specs/drafts/2026-04-28-generate-feature-docs-skill-design.md and implementation plan at docs/superpowers/plans/2026-04-28-generate-feature-docs-skill.md.

What is NOT in this PR

  • No Rust application code changes.
  • No JavaScript application code changes.
  • No skill behavior changes to the trusted-server runtime.
  • The only build-time change is the VitePress srcExclude config; the only runtime impact is on the public docs site (which removes internal spec pages, the desired outcome).

Risk profile

Low. The skill is markdown-only, no compilation, no execution path through the runtime. The most material change is to the public docs site (internal specs no longer indexed). External links to those spec URLs will break, but they were never intended to be public.

Test plan

  • Pull this branch, open Claude Code in the repo, run /generate-feature-docs docs/superpowers/specs/drafts/2026-04-28-generate-feature-docs-skill-design.md to confirm the slash command is auto-discovered. Reply abort at the readiness prompt; expect a clean exit with no files written.
  • After merge, deploy the docs site and confirm iabtechlab.github.io/trusted-server no longer serves any URL under /superpowers/.
  • Verify CI passes: cargo fmt, cargo clippy, vitest, npm run format in docs/, npm run build in docs/. The cargo test --workspace Viceroy failure is pre-existing and unrelated to this branch.
  • (Optional) Run a real spec through the skill end-to-end on a feature branch. Validation runs documented in the design spec Section 11.

Follow-up issues

How to use the skill

After this lands, any team member who pulls main can invoke /generate-feature-docs <spec-path> against any spec under docs/superpowers/specs/implemented/ (with status: implemented frontmatter) to generate or augment its publisher-facing guide page. The skill verifies handles (config keys, endpoints, headers, error variants) against crates/, surfaces drift before writing prose, and commits the result on user approval. See the design spec for the full behavior contract.

jevansnyc and others added 17 commits April 30, 2026 10:57
Two-stage skill that converts implemented engineering specs into publisher-facing
docs at docs/guide/, with handle verification against code, augment-in-place
behavior for existing pages, and mechanical updates to configuration.md,
api-reference.md, and error-reference.md. Establishes a spec-readiness convention
(status frontmatter) and a directory split between drafts and implemented specs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sixteen tasks across three phases: prerequisites (VitePress exclusion,
directory layout, spec migration, CLAUDE.md update), skill implementation
(slash command + SKILL.md built up incrementally), and validation
(greenfield, idempotency, augmentation, non-feature, and drift cases).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… SKILL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Section 16 documenting three amendments motivated by the JS Asset
Auditor greenfield validation: verification-rate threshold (Section 16.1),
branch-state heuristic (Section 16.2), and verified_against_commit audit
field (Section 16.3). Section 6 updated to list the third optional field
and to use chat-native prompt phrasing consistent with SKILL.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…SKILL

- Edit 1: add optional frontmatter fields block (implemented_in, last_reviewed,
  verified_against_commit) to the spec readiness check section; specify that
  verified_against_commit is surfaced in the Stage 1 outline header
- Edit 2: add Step 1.7a with verification-rate computation and a hard prompt
  when fewer than 50% of handles verify against the codebase
- Edit 3: add Step 1.7b with a branch-state heuristic using git log from
  merge-base; surfaced as an informational note in the Stage 1 outline header
- Step 1.9 outline template updated to include Verified against commit metadata
  and the conditional branch-state note

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the optional field added in design Section 16.3 and SKILL.md, so
the documented schema stays in sync with what the skill recognizes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Auto-formatted by prettier --write to satisfy the docs/format CI check.
Mechanical changes only: trailing whitespace, table column padding, blank
lines around fenced code blocks, italic style normalized to underscores.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant