### Install Pi Adapter Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/README.md Installs the Pi adapter from a local checkout of the dotdotgod repository. ```bash pi install /path/to/dotdotgod/packages/pi ``` -------------------------------- ### Verification Command Example Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/TRACEABILITY_CONFIG.md Example commands to verify traceability links using pnpm or node. ```bash pnpm --filter @dotdotgod/cli test ``` ```bash node packages/cli/bin/dotdotgod.mjs validate . --include-local-memory ``` -------------------------------- ### Install Pi Adapter Locally Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/AGENTS.md Installs the Pi adapter for local testing. Ensure you provide the correct path to the dotdotgod packages. ```bash # Test/install the Pi adapter locally pi install /path/to/dotdotgod/packages/pi ``` -------------------------------- ### Initialize Project with dotdotgod Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/pi/README.md After installing the adapter, use this command within Pi to initialize the project with dotdotgod's conventions. ```text Initialize this project with dotdotgod. ``` -------------------------------- ### Pi Package Installation Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/arch/CROSS_AGENT_ARCHITECTURE.md Commands to install the Pi package locally or from npm. ```bash pi install /path/to/dotdotgod/packages/pi pi install npm:@dotdotgod/pi ``` -------------------------------- ### Install Dependencies and Validate Project Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/README.md Installs project dependencies, validates the project structure and links, and runs verification tests. ```bash pnpm install node packages/cli/bin/dotdotgod.mjs validate . --include-local-memory --check-index pnpm run verify ``` -------------------------------- ### Install CLI Globally Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/cli/README.md Install the @dotdotgod/cli package globally to have the `dotdotgod` command available persistently. ```bash npm install -g @dotdotgod/cli ``` -------------------------------- ### Example Code Convention Document Structure Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/arch/DOCS_STRUCTURE.md Shows the initial and promoted structure for code convention documents. Conventions can start as a single file and be promoted to a dedicated directory with a README and supporting files when they expand. ```text docs/arch/CODE_CONVENTIONS.md docs/arch/conventions/README.md ``` -------------------------------- ### Example Domain Directory Promotion Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/arch/DOCS_STRUCTURE.md Illustrates how to promote a growing documentation domain into its own directory structure. This involves creating a README.md for the domain and placing related markdown files within that directory. ```text docs///README.md docs/spec/payment/README.md docs/spec/payment/LIST_API.md docs/spec/payment/SUMMARY_API.md docs/arch/conventions/README.md docs/arch/conventions/COMPONENT_STRUCTURE.md docs/arch/conventions/DATA_LOADING.md ``` -------------------------------- ### Local Development Setup Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/claude-code/README.md Command to run Claude Code with the local plugin directory for development. ```bash claude --plugin-dir /path/to/dotdotgod/packages/claude-code ``` -------------------------------- ### Local Preview Server Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/trello-power-up/README.md Command to start a local HTTP server for previewing the Trello Power-Up. This command serves files from the 'packages/trello-power-up' directory on port 4173. ```bash python3 -m http.server 4173 --directory packages/trello-power-up ``` -------------------------------- ### Install dotdotgod Pi Package Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/README.md Installs the Pi package for the full dotdotgod workflow, including project initialization, loading, Plan Mode, staged plan generation, impact checks, and archive handoff. ```bash pi install npm:@dotdotgod/pi ``` -------------------------------- ### Install and Uninstall Pi Adapter Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/test/manual-smoke/INITIALIZER_AND_PUBLISHING.md Commands to install and uninstall the '@dotdotgod/pi' npm package. These are used to test the publishing and package management functionality. ```bash pi install npm:@dotdotgod/pi ``` ```bash pi uninstall npm:@dotdotgod/pi ``` -------------------------------- ### Initialize Project with dotdotgod Conventions Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/codex/README.md Use the `dd:init` trigger phrase when Codex environments lack slash commands to start a repository with dotdotgod conventions. This creates or normalizes essential project files like AGENTS.md, agent entrypoints, and documentation indexes. ```text dd:init ``` -------------------------------- ### Impact Graph Output Example Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/README.md Shows a sample output from the `graph impact` command, ranking related files, tests, and documentation with reasons for their relevance. ```text docs: - docs/spec/REFERENCE_EXPANSION.md (91; incoming:implemented_by, semantic_similarity) - docs/test/REFERENCE_EXPANSION.md (65.3; verified_by, semantic_similarity) - docs/spec/LOAD_PROJECT.md (35.8; related_doc, semantic_similarity) tests: - packages/cli/test/core.test.mjs (78.6; semantic_similarity, incoming:semantic_similarity, verified_by) - packages/cli/test/e2e.test.mjs (51.4; verified_by) files: - packages/cli/src/core.mjs (100; changed-file) - packages/pi/extensions/plan-mode/index.ts (45; implemented_by, semantic_similarity) ``` -------------------------------- ### Load Project Memory Snapshot Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/pi/README.md Use `/dd:load` to start loading project memory from a snapshot, reading only relevant documents from the fixed memory surface. ```text /dd:load ``` -------------------------------- ### Traceability Example in Dotdotgod Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/concept/GRAPHIFY_COMPARISON.md Illustrates the flow of impact analysis in Dotdotgod, moving from changed files to implementation, tests, architecture, and verification commands. This explicit traceability is reviewable and repairable. ```text changed file -> behavior spec -> implementation -> tests -> architecture docs -> verification command ``` -------------------------------- ### Example Markdown Traceability Links Section Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/TRACEABILITY_CONFIG.md Illustrates the structure of the generated Markdown section for traceability links, including start and end sentinels and human-readable labels. ```markdown ``` -------------------------------- ### Display CLI Init Command Help Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/test/CLI_INTERFACE.md Show the help message for the 'init' command. ```bash node packages/cli/bin/dotdotgod.mjs init --help ``` -------------------------------- ### Display CLI Config Init Command Help Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/test/CLI_INTERFACE.md Show the help message for the 'config init' command. ```bash node packages/cli/bin/dotdotgod.mjs config init --help ``` -------------------------------- ### Initialize Project Configuration File Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/CONFIG_COMMAND.md Creates a `dotdotgod.config.json` file with default policies. Use `--force` to overwrite an existing file. Use `--json` for machine-readable output. ```bash dotdotgod config init [--force] [--json] ``` -------------------------------- ### Initialize Project with dotdotgod CLI Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/claude-code/commands/dd/init.md Use the dotdotgod CLI initializer when it is available in the target environment to set up the project baseline. ```bash dotdotgod init ``` -------------------------------- ### Display CLI Plan Stage Create Command Help Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/test/CLI_INTERFACE.md Show the help message for the 'plan stage create' command. ```bash node packages/cli/bin/dotdotgod.mjs plan stage create --help ``` -------------------------------- ### Resume or Start Staged Work Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/pi/README.md Use `/plan-generator` with a specific plan path to resume or start staged work for that managed plan. ```text /plan-generator docs/plan//README.md ``` -------------------------------- ### Initialize Project (Dry Run) Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/test/README.md Initializes a new project with a fixture name in dry-run mode, showing what would be created without making changes. ```bash node packages/cli/bin/dotdotgod.mjs init . --dry-run --project-name fixture-name ``` -------------------------------- ### CLI Command to Initialize Project with Dotdot Settings Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/DOTDOT_SETTING.md Use this command to initialize a new project with the dotdot documentation structure and code conventions enabled. This is the primary way to activate the setting. ```bash dotdotgod init --dotdot-setting ``` -------------------------------- ### Show Project Configuration (JSON) Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/test/README.md Displays the project's configuration in JSON format. ```bash node packages/cli/bin/dotdotgod.mjs config . --json ``` -------------------------------- ### Advisory Hooks for Session Start and Stop Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/claude-code/hooks/README.md Configures hooks to remind Claude to use specific commands at session start and to check status at session stop. Use this for non-intrusive reminders and status checks. ```json { "hooks": { "SessionStart": [ { "matcher": "startup|resume", "hooks": [ { "type": "command", "command": "printf '%s\n' 'dotdotgod: use /dd:load or dotdotgod load-snapshot when project memory is needed.'", "timeout": 10 } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "dotdotgod status . --json 2>/dev/null || true", "timeout": 20 } ] } ] } } ``` -------------------------------- ### Build Project Index Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/cli/README.md Build the `.dotdotgod/manifest.json` and compact graph shards from project files. ```bash dotdotgod index . ``` -------------------------------- ### Example: Exempt an Archive Index from Size Validation Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/VALIDATION_CONFIG.md This configuration example demonstrates how to exempt a specific file, 'docs/archive/README.md', from markdown size validation checks while maintaining default budgets for other files. The exempted file still undergoes other validation checks. ```json { "validation": { "markdown": { "maxLines": 200, "maxChars": 10000, "exclude": ["docs/archive/README.md"] } } } ``` -------------------------------- ### Advisory Session Start Hook in hooks.json Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/codex/hooks/README.md This JSON snippet configures a hook that runs at session start or resume to remind the user about using `dd:load` or `dotdotgod load-snapshot` when project memory is needed. It specifies a command to print a reminder message with a 10-second timeout. ```json { "hooks": { "SessionStart": [ { "matcher": "startup|resume", "hooks": [ { "type": "command", "command": "printf '%s\n' 'dotdotgod: use dd:load or dotdotgod load-snapshot when project memory is needed.'", "timeout": 10 } ] } ] } } ``` -------------------------------- ### Show Project Configuration Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/CONFIG_COMMAND.md Displays the current project-level configuration. Use `--json` for machine-readable output. ```bash dotdotgod config [--json] ``` -------------------------------- ### Get Project Status Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/cli/README.md Display the current status of the dotdotgod project. ```bash dotdotgod status . ``` -------------------------------- ### Initialize and Validate Project with CLI Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/README.md Provides commands to initialize and validate a project using the dotdotgod CLI. ```bash npx @dotdotgod/cli init . npx @dotdotgod/cli validate . npx @dotdotgod/cli graph impact . --changed --compact ``` -------------------------------- ### Access Local Preview Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/trello-power-up/README.md The URL to access the local preview of the Trello Power-Up after starting the local server. ```text http://localhost:4173/preview.html ``` -------------------------------- ### Initialize Configuration Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/cli/README.md Initialize the dotdotgod configuration for the current directory. ```bash dotdotgod config init . ``` -------------------------------- ### Changed-File Impact Report Example Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/README.md Demonstrates how to use the `dotdotgod graph impact` command to identify related files and documentation after a change. ```bash $ dotdotgod graph impact . --changed packages/cli/src/core.mjs --compact ``` -------------------------------- ### Estimate Useful-Context Density Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/concept/MEASUREMENT_DESIGN.md Calculate useful-context density by dividing relevant tokens by total loaded tokens. Keep the rubric and examples with the measurement due to subjectivity. ```text (directly relevant + indirectly relevant tokens) / total loaded tokens ``` -------------------------------- ### CLI Help and Version Commands Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/cli/README.md Display help information or the current version of the dotdotgod CLI. ```bash dotdotgod --help ``` ```bash dotdotgod --version ``` -------------------------------- ### Common Initial CLI Commands Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/cli/README.md A collection of frequently used commands for initializing, validating, loading snapshots, and analyzing graph impacts. ```bash dotdotgod init . ``` ```bash dotdotgod validate . ``` ```bash dotdotgod load-snapshot . ``` ```bash dotdotgod graph impact . --changed --compact ``` -------------------------------- ### Example Memory Configuration JSON Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/docs/spec/MEMORY_AREA_CONFIG.md This JSON structure represents a valid memory configuration, including traceability links and verification commands. It is used for validating memory area configurations. ```json { "kind": "spec", "implementedBy": [ "packages/cli/src/memory/config.mjs", "packages/cli/src/core.mjs", "packages/cli/src/load-snapshot/summary.mjs" ], "verifiedBy": [ "packages/cli/test/core.test.mjs", "packages/cli/test/e2e.test.mjs", "docs/test/README.md", "docs/test/MEMORY_AREA_CONFIG.md" ], "relatedDocs": [ "docs/spec/CONFIG_COMMAND.md", "docs/arch/MEMORY_AREA_CONFIG.md", "docs/arch/DOCS_STRUCTURE.md", "docs/arch/VALIDATION_ARCHITECTURE.md" ], "verificationCommands": [ "pnpm --filter @dotdotgod/cli test", "node packages/cli/bin/dotdotgod.mjs validate . --include-local-memory" ] } ``` -------------------------------- ### Fallback Project Initialization Script Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/claude-code/commands/dd/init.md If the dotdotgod CLI is unavailable, use this bundled dependency-free shell script to create the baseline docs indexes and local-memory .gitignore entries. ```bash sh "${CLAUDE_PLUGIN_ROOT}/skills/project-initializer/scripts/init_project.sh" ``` -------------------------------- ### Enter Plan Mode Source: https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/pi/README.md Use the `/plan` command when a request might alter source or configuration files. This enters Plan Mode, blocking mutations until a durable plan is created and approved. ```text /plan ```