agentleFS
jaroslawherodjaroslawherod/micold-ai-ide/.claude/skills/speckit-docguard-generate/SKILL.md

speckit-docguard-generate

Skill1 starsChanged 3 days agoApache-2.0View on GitHub

Reverse-engineer canonical documentation from existing codebase

  • Reads credentials

The file

Files
SKILL.md

Docguard Generate Skill

DocGuard Generate

Scans your codebase (JS/TS, Python, Rust, Go, Java/Kotlin, Ruby, PHP, C# — polyglot/monorepo-aware) and generates the canonical documentation memory: ARCHITECTURE.md, DATA-MODEL.md, TEST-SPEC.md, SECURITY.md, ENVIRONMENT.md, API-REFERENCE.md, SCREENS.md.

Two modes:

  • --plan (AI-powered, recommended) — emits a structured agent task manifest + writes the code-truth skeleton inside <!-- docguard:section --> markers. The AI agent then writes the prose grounded in scanned facts. Human prose is preserved.
  • default — purely deterministic generation: writes templated docs with TODO placeholders. Use when no AI agent is available.

User Input

$ARGUMENTS

Steps

  1. Preview the plan — what code-truth facts were captured + what the agent will write:
npx --yes docguard-cli@latest generate --plan $ARGUMENTS
  1. Scaffold the skeleton docs (marked sections filled with code-truth, prose sections as agent-task placeholders):
npx --yes docguard-cli@latest generate --plan --write $ARGUMENTS
  1. Or get the machine-readable manifest to drive an agent:
npx --yes docguard-cli@latest generate --plan --format json $ARGUMENTS
  1. Fallback (no AI, deterministic generation):
npx --yes docguard-cli@latest generate $ARGUMENTS
  1. Review the generated docs in docs-canonical/. Each document includes:
    • Structured sections based on industry standards
    • Data extracted from your actual codebase (routes, schemas, configs)
    • Standards citation footer referencing relevant specifications
    • DocGuard metadata headers for freshness tracking
  2. Customize with --doc <name> to generate a specific document only.

Generated Documents

DocumentSourceStandard
ARCHITECTURE.mdRoutes, configs, dependenciesarc42 / C4 Model
DATA-MODEL.mdSchema files, type definitionsC4 Component / ER
TEST-SPEC.mdTest files, test configsISO/IEC/IEEE 29119-3
SECURITY.mdAuth modules, .gitignore, secretsOWASP ASVS v4.0
ENVIRONMENT.md.env files, Docker, CI/CD configs12-Factor App
API-REFERENCE.mdRoute handlers, OpenAPI specsOpenAPI 3.1

Flags

  • --doc <name> — Generate a specific document only
  • --dir <path> — Run on a different directory

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.