### Doccraft Configuration with Business Feature Source: https://github.com/alexpialetski/doccraft/blob/main/docs/adr/010-business-module-opt-in.md Example of how to enable the 'business' feature by adding it to the 'features' array in 'doccraft.json'. This configuration is checked by the CLI and install pipeline to determine which optional skills to install and which template blocks to expand. ```json { "features": ["business"] } ``` -------------------------------- ### Install and Initialize Doccraft CLI Source: https://github.com/alexpialetski/doccraft/blob/main/CLAUDE.md Run this command after cloning the repository to install dependencies and scaffold the project configuration files and directories. It skips OpenSpec and includes Claude and Cursor tools. ```bash pnpm install pnpm run dev:cli -- init . --skip-openspec --tools claude,cursor ``` -------------------------------- ### Install Designer Skills Subprocess Source: https://github.com/alexpialetski/doccraft/blob/main/docs/stories/p2-design-feature.md This command is executed as a subprocess during `doccraft init --features design`. It installs the designer-skills package using npx. ```bash npx --yes skills add julianoczkowski/designer-skills --agent claude-code --yes ``` -------------------------------- ### Initialize Doccraft Project Source: https://github.com/alexpialetski/doccraft/blob/main/README.md Use this command to scaffold a new doccraft project, install necessary skills, and initialize OpenSpec. ```bash npx doccraft init ``` -------------------------------- ### Initialize Doccraft with Design Feature Source: https://github.com/alexpialetski/doccraft/blob/main/docs/stories/p2-design-feature.md Use this command to initialize a project with Doccraft and opt into the design feature. This will install designer skills as a subprocess. ```bash doccraft init --features design ``` -------------------------------- ### Example Doccraft Queue Audit Output Source: https://github.com/alexpialetski/doccraft/blob/main/templates/skills/doccraft-queue-audit/SKILL.md This is an example of the expected output format for the Doccraft Queue Audit skill, detailing summary, issues, changes, and remaining proposals. ```text **Summary:** Graph clean (6 stories, 4 edges, 0 cycles). Auto-apply ran. **Issues:** None. **Changes applied:** - `docs/queue.md`: removed row 3 (P0.3, status: done); renumbered rows 4–6 → 3–5. - `docs/queue.md`: moved P2.1 below P1.4 (unfinished prerequisite P1.4). - `docs/backlog.md`: P0.3 Status → "shipped (v0.4.0)". **Remaining proposals:** - P2.5 and P2.6 have equal urgency:soon / impact:M and no dependency edge — consider which to prioritise. **Exit:** Queue and backlog are now consistent with the dependency graph. ``` -------------------------------- ### docs/config.yaml Schema Example Source: https://github.com/alexpialetski/doccraft/blob/main/docs/adr/004-docs-config-schema.md This YAML structure defines configuration settings organized by skill area, with nested objects for related keys. It serves as the project's central configuration file. ```yaml story: areas: […] slices: […] themes: […] id: tiers: […] pattern: '…' adr: path: docs/adr queue: path: docs/queue.md tables: suggestedOrder: Suggested order platformSpikes: Platform spikes backlog: path: docs/backlog.md queueAudit: laneFrom: [area, slice] scale: maxStoryFiles: 5 maxQueueReorderPct: 50 sessionWrap: capture: research: true reference: true business: false ``` -------------------------------- ### Doccraft Configuration File Example Source: https://github.com/alexpialetski/doccraft/blob/main/README.md This JSON file configures doccraft settings, including schema, version, documentation directory, and story configurations. IDEs can validate and describe fields using the $schema URL. ```json { "$schema": "https://cdn.jsdelivr.net/npm/doccraft@0.9.0/schema/doccraft.schema.json", "version": "0.9.0", "_hint": "Edit with the doccraft-config skill.", "docsDir": "docs", "story": { "areas": ["..."], "themes": ["..."] } } ``` -------------------------------- ### ADR Skeleton Example Source: https://github.com/alexpialetski/doccraft/blob/main/templates/skills/doccraft-adr/SKILL.md A standard template for an Architecture Decision Record (ADR) using Markdown. It includes essential frontmatter and sections like Context, Decision, Consequences, and Alternatives considered. ```markdown --- adr: "008" status: Accepted updated: 2026-05-30 supersedes: [] superseded_by: null --- # ADR 008: Adopt managed Postgres for primary datastore **Status:** Accepted ## Context We need durable transactional storage for user and billing data. Running our own Postgres adds oncall burden that doesn't match current team size. ## Decision Use a managed Postgres offering (initial target: the cloud provider already hosting the app). Review annually or when egress costs cross $X/month. ## Consequences - + Backups, failover, and point-in-time recovery handled by the provider. - + One less service to include in the oncall rotation. - - Vendor lock-in on specific extension availability; portability audit required before any future migration. ## Alternatives considered - **Self-hosted on VMs** — lower monthly cost but higher operational load; re-visit if the team grows past a single platform engineer. - **Serverless Postgres (e.g. Neon)** — attractive pricing model but connection-pooling behaviour didn't fit our long-lived worker pattern. ``` -------------------------------- ### Rejected Decision ADR Title Example Source: https://github.com/alexpialetski/doccraft/blob/main/templates/skills/doccraft-adr/SKILL.md An example of how to title an ADR for a rejected decision, clearly stating the outcome. This helps document deferred decisions and the criteria for revisiting them. ```markdown # ADR 009: Do not introduce a separate event bus (for now) ``` -------------------------------- ### Add Doccraft to Monorepo Source: https://github.com/alexpialetski/doccraft/blob/main/openspec/changes/monorepo-support/design.md Install Doccraft as a development dependency in your monorepo to enable monorepo support features. ```bash pnpm add -D doccraft@4.1.0 ``` -------------------------------- ### CLI Initialization with Features Flag Source: https://github.com/alexpialetski/doccraft/blob/main/docs/adr/010-business-module-opt-in.md Enables the 'business' feature during project initialization using the '--features' CLI flag. This command writes the resolved features array into 'doccraft.json', ensuring subsequent 'doccraft update' commands automatically pick up the configuration. ```bash doccraft init --features business ``` -------------------------------- ### Get Doccraft LLM Manifest Source: https://github.com/alexpialetski/doccraft/blob/main/README.md This command emits the JSON manifest used by the doccraft-update skill for reconciliation. It requires no flags or arguments. ```bash doccraft llm ``` -------------------------------- ### Development Commands Source: https://github.com/alexpialetski/doccraft/blob/main/CLAUDE.md Common commands for building, watching, type checking, linting, and testing the project. Use `pnpm run dev:cli` to build and run the local CLI during development. ```bash pnpm run build # Compile TS to dist/ pnpm run dev # tsc --watch pnpm run typecheck # tsc --noEmit pnpm run lint # eslint src/ pnpm run test # vitest run pnpm run test:watch # vitest (watch mode) pnpm run dev:cli # Build + run the local CLI ``` -------------------------------- ### Per-Extension Manifest Structure Source: https://github.com/alexpialetski/doccraft/blob/main/docs/adr/013-extension-framework.md Each extension directory must contain an 'extension.yaml' file defining its name, version, injection points, and scaffold targets. Both 'injects' and 'scaffold' are optional. ```yaml name: business version: 0.1.0 injects: - skill: doccraft-story point: story.instructions fragment: ./fragments/story-instructions.md - skill: doccraft-story point: story.frontmatter.fields fragment: ./fragments/story-frontmatter.md - skill: doccraft-queue-audit point: queue.instructions fragment: ./fragments/queue-instructions.md scaffold: - source: ./scaffold/docs/business/ target: docs/business/ ``` -------------------------------- ### Run Designer Skills Utility Function Source: https://github.com/alexpialetski/doccraft/blob/main/docs/stories/p2-design-feature.md This utility function, `runDesignerSkills`, follows the pattern of `runOpenspec` and spawns the designer skills installation subprocess. ```typescript src/utils/designer-skills.ts ```