### Install VibeGuard Source: https://github.com/majiayu000/vibeguard/blob/main/site/index.html Commands to clone the VibeGuard repository and run the setup script for installation. ```bash $ git clone https://github.com/majiayu000/vibeguard.git ~/vibeguard $ bash ~/vibeguard/setup.sh ``` -------------------------------- ### Install VibeGuard Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Clone the repository and run the setup script to install VibeGuard. Requires Python 3 and Rust/Cargo. ```bash git clone https://github.com/majiayu000/vibeguard.git ~/vibeguard bash ~/vibeguard/setup.sh ``` -------------------------------- ### Task Startup Check Example Source: https://github.com/majiayu000/vibeguard/blob/main/skills/vibeguard/SKILL.md Provides a checklist for task startup, ensuring goals are clear, data sources are identified, and acceptance criteria are testable. This is used before starting development tasks. ```yaml Refer to references/task-contract.yaml and confirm: 1. Goals are clear and verifiable 2. The data source has been determined 3. Acceptance criteria can be tested ``` -------------------------------- ### Clone and Install VibeGuard Source: https://github.com/majiayu000/vibeguard/blob/main/CONTRIBUTING.md Clone the VibeGuard repository, add the upstream remote, and run the setup script to install the system locally. This script installs VibeGuard into your ~/.claude/ and ~/.codex/ directories. ```bash git clone https://github.com//vibeguard.git cd vibeguard git remote add upstream https://github.com/majiayu000/vibeguard.git bash setup.sh ``` -------------------------------- ### Run VibeGuard setup script Source: https://github.com/majiayu000/vibeguard/blob/main/docs/linux-setup.md Executes the standard installation script which detects the OS and configures the systemd timer. ```bash bash setup.sh ``` -------------------------------- ### Run Setup Tests Source: https://github.com/majiayu000/vibeguard/blob/main/plan/2026-05-01_18-56-41-vibeguard-audit-remediation.md Execute tests for the VibeGuard setup process. Verifies that the setup script functions correctly. ```bash bash tests/test_setup.sh ``` ```bash bash tests/test_setup.sh ``` ```bash bash tests/test_setup.sh ``` ```bash bash tests/test_setup.sh ``` -------------------------------- ### Install Codex Hooks and Skills Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Copies agent templates and runs the setup script to install VibeGuard skills and Codex hooks. ```bash cp ~/vibeguard/templates/AGENTS.md ./AGENTS.md && bash ~/vibeguard/setup.sh ``` -------------------------------- ### Check VibeGuard Installation Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Verify the VibeGuard installation using the setup script with the --check flag. Use --strict for a more thorough check. ```bash bash ~/vibeguard/setup.sh --check ``` ```bash bash setup.sh --check --strict ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/majiayu000/vibeguard/blob/main/templates/language/typescript-CLAUDE.md Command to start the frontend development server on a specified port. ```bash npm run dev -- --port 7788 ``` -------------------------------- ### Install Dependencies and Record Demo Source: https://github.com/majiayu000/vibeguard/blob/main/docs/assets/README.md Installs necessary tools (asciinema, agg) on macOS using Homebrew and then runs the recording script. ```bash # macOS brew install asciinema agg bash docs/assets/record-demo.sh ``` -------------------------------- ### Install VibeGuard (Default Profile) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Installs VibeGuard with the default core profile. ```bash bash ~/vibeguard/setup.sh ``` -------------------------------- ### Install VibeGuard (Minimal Profile) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Installs VibeGuard with the minimal profile, including only pre-hooks. ```bash bash ~/vibeguard/setup.sh --profile minimal ``` -------------------------------- ### Install systemd units manually Source: https://github.com/majiayu000/vibeguard/blob/main/docs/linux-setup.md Installs only the systemd unit files without running the full setup script. ```bash bash scripts/install-systemd.sh ``` -------------------------------- ### Install VibeGuard (Full Profile, Specific Languages) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Installs VibeGuard with the full profile and specifies Rust and TypeScript for rule/guard installation. ```bash bash ~/vibeguard/setup.sh --profile full --languages rust,typescript ``` -------------------------------- ### Install VibeGuard Source: https://github.com/majiayu000/vibeguard/blob/main/site/index.html Run this script to set up VibeGuard. It copies necessary files to your system. ```bash bash ~/vibeguard/setup.sh copy ``` -------------------------------- ### Install VibeGuard (Full Profile) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Installs VibeGuard with the full profile, adding Stop signal, Build Check, and learning capabilities. ```bash bash ~/vibeguard/setup.sh --profile full ``` -------------------------------- ### Check Setup Script Source: https://github.com/majiayu000/vibeguard/blob/main/plan/2026-05-01_18-56-41-vibeguard-audit-remediation.md Perform a check on the setup script without making changes. Reports existing drift warnings. ```bash bash setup.sh --check ``` ```bash bash setup.sh --check ``` ```bash bash setup.sh --check ``` -------------------------------- ### Start Auto-Run Agent Source: https://github.com/majiayu000/vibeguard/blob/main/workflows/auto-optimize/SKILL.md Navigates to the auto-run-agent directory and starts the orchestrator with specified parameters. ```bash cd "${AUTO_RUN_AGENT_DIR}" ./orchestrator --dir --max-iterations 50 --max-cost 0 --max-duration 6 ``` -------------------------------- ### Run Setup Tests for Rule File Protection Source: https://github.com/majiayu000/vibeguard/blob/main/plan/2026-05-01_18-56-41-vibeguard-audit-remediation.md Execute tests to ensure that local modifications to rule files are protected against accidental overwrites during setup. ```bash bash tests/test_setup.sh test_rule_file_local_copy_protection ``` -------------------------------- ### Example Command in Step-level Test Source: https://github.com/majiayu000/vibeguard/blob/main/workflows/plan-flow/references/execplan-template.md This example shows how a command is presented within the 'Step-level test commands' section of an ExecPlan. It includes the command to be executed and its expected outcome. ```shell `` — Expected: ``` -------------------------------- ### Verification Command Examples Source: https://github.com/majiayu000/vibeguard/blob/main/rules/claude-rules/common/workflow.md Examples of commands used for quick verification of task completion. These commands should ideally finish within 60 seconds. ```shell cargo test --lib ``` ```shell curl -s localhost:8080/health ``` ```shell python -m pytest tests/test_x.py -x ``` -------------------------------- ### Copy CLAUDE.md Example Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Copies an example CLAUDE.md file for use with rules only, applicable to any project. ```bash cp ~/vibeguard/docs/CLAUDE.md.example ./CLAUDE.md ``` -------------------------------- ### Verify VibeGuard Installation (JSON Output) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Checks the VibeGuard installation and outputs the results in a machine-readable JSON format, suitable for CI. ```bash bash ~/vibeguard/setup.sh --check --json ``` -------------------------------- ### Update settings and inject content in setup script Source: https://github.com/majiayu000/vibeguard/blob/main/docs/internal/research/2026-05-01-codebase-audit.md These lines from `claude-home.sh` demonstrate how the setup script modifies user configuration files (`settings.json` and `CLAUDE.md`) without showing a diff or requiring explicit user confirmation, violating SEC-13. Consider implementing a dry-run mode with diff output or interactive prompts. ```shell settings_upsert "${SETTINGS_FILE}" "${PROFILE}" ``` ```shell python3 "${CLAUDE_MD_HELPER}" inject "${CLAUDE_DIR}/CLAUDE.md" ... ``` -------------------------------- ### Install VibeGuard for Specific Languages Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Installs VibeGuard rules and guards only for the specified languages. ```bash bash ~/vibeguard/setup.sh --languages rust,python ``` -------------------------------- ### Publish Target Confirmation Example Source: https://github.com/majiayu000/vibeguard/blob/main/rules/claude-rules/common/publish-action-confirmation.md Clearly state the artifact and its target environment for publishing operations. ```text Publish target: my-crate v0.3.1 -> crates.io ``` -------------------------------- ### Install VibeGuard (Strict Profile) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Installs VibeGuard with the strict profile, enforcing maximum enforcement with Claude Code constraints. ```bash bash ~/vibeguard/setup.sh --profile strict ``` -------------------------------- ### Shell script for managing install state Source: https://github.com/majiayu000/vibeguard/blob/main/docs/internal/research/2026-05-01-codebase-audit.md This shell script snippet manages the installation state, writing a version number to `install-state.json`. Ensure that migration code exists if version changes are introduced. ```bash echo "version:1" > "$INSTALL_STATE_FILE" ``` -------------------------------- ### Skill Validate Command Line Examples Source: https://github.com/majiayu000/vibeguard/blob/main/docs/command-schemas.md Examples of how to invoke the `skill_validate` command for format checking, with and without JSON output. The `--check-repo-format` option scans multiple skill files. ```bash python3 scripts/skill_validate.py --format-only --proposed-skill path/to/SKILL.md --json ``` ```bash python3 scripts/skill_validate.py --check-repo-format --repo-root . --json ``` -------------------------------- ### Change Scope Confirmation Example Source: https://github.com/majiayu000/vibeguard/blob/main/rules/claude-rules/common/publish-action-confirmation.md Summarize the changes included in the operation, noting file modifications and breaking changes. ```text Scope: - Adds the insights command - Fixes session-ingestion retry logic - 3 files changed, 0 breaking changes ``` -------------------------------- ### Initiate Accumulative Learning Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Starts the accumulative learning mode to extract non-obvious solutions as Skill files. ```text /vibeguard:learn extract ``` -------------------------------- ### Run Backend Service Source: https://github.com/majiayu000/vibeguard/blob/main/templates/language/python-CLAUDE.md Command to start the FastAPI backend service with hot-reloading on a specific port. ```bash uvicorn app.main:app --reload --port 5566 ``` -------------------------------- ### Execution Approval Confirmation Example Source: https://github.com/majiayu000/vibeguard/blob/main/rules/claude-rules/common/publish-action-confirmation.md Directly ask for explicit affirmative response after presenting the summary of changes and the intended command. ```text If the summary above is correct, I will run `cargo publish`. Continue? ``` -------------------------------- ### Bootstrap Project with VibeGuard Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Initializes a new repository with project-specific guidance and the pre-commit wrapper. Use this command to set up a new project. ```bash bash ~/vibeguard/scripts/project-init.sh /path/to/project ``` -------------------------------- ### Install Local Contract Gate as Pre-commit Hook Source: https://github.com/majiayu000/vibeguard/blob/main/CONTRIBUTING.md Wire the local contract gate as a git pre-commit hook for automated checks before each commit. This is a one-time setup. ```bash bash scripts/install-pre-commit-hook.sh ``` -------------------------------- ### Safe Bash Guard Pack Commands Source: https://github.com/majiayu000/vibeguard/blob/main/packs/safe-bash/README.md A collection of commands for managing the Safe Bash Guard Pack, including setup, explanation, receipt generation, auditing, installation, uninstallation, and demonstration. ```bash bash setup.sh packs explain safe-bash ``` ```bash bash setup.sh packs receipt safe-bash --target claude-code ``` ```bash bash setup.sh packs audit safe-bash --target claude-code ``` ```bash bash setup.sh install --target claude-code --pack safe-bash --dry-run ``` ```bash bash setup.sh install --target claude-code --pack safe-bash ``` ```bash bash setup.sh packs uninstall safe-bash --target claude-code ``` ```bash bash setup.sh demo safe-bash ``` -------------------------------- ### Verify VibeGuard Installation Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Checks the current VibeGuard installation for any issues. ```bash bash ~/vibeguard/setup.sh --check ``` -------------------------------- ### Compile Install State Scripts Source: https://github.com/majiayu000/vibeguard/blob/main/plan/2026-05-01_18-56-41-vibeguard-audit-remediation.md Compiles shell scripts related to install state. ```shell bash -n scripts/lib/install-state.sh scripts/setup/lib.sh scripts/setup/install.sh scripts/setup/targets/claude-home.sh scripts/setup/targets/codex-home.sh tests/test_setup.sh ``` -------------------------------- ### Diagnose Codex Installation Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Runs a doctor script to diagnose Codex installation and hook capabilities. ```bash bash ~/vibeguard/scripts/doctors/codex-doctor.sh ``` -------------------------------- ### Task Startup Checklist Configuration Source: https://github.com/majiayu000/vibeguard/blob/main/docs/internal/history/spec.md YAML configuration for the task startup checklist, defining required, forbidden, and warning criteria for development tasks. ```yaml task_contract: required: - objective: "clear and verifiable goal" - data_source: "Data source (file/API/database)" - acceptance: "Acceptance criteria (at least 1 testable)" forbidden: - "Write first and then talk" - "Probably/might/should work" - "Direct copy" warnings: - no_search_before_create: "Existing implementations are not searched before creating new files/classes/functions" - no_test_evidence: "Step completed but no test evidence" - large_diff: "More than 300 lines of net changes in a single step" ``` -------------------------------- ### Verify VibeGuard Installation (Quiet Mode) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Checks the VibeGuard installation and shows only problems and a rollup summary. ```bash bash ~/vibeguard/setup.sh --check --quiet ``` -------------------------------- ### VibeGuard Runner Configuration Example Source: https://github.com/majiayu000/vibeguard/blob/main/workflows/auto-optimize/SKILL.md Default configuration settings for the VibeGuard runner, including iteration limits, cost controls, and timeout durations. ```yaml max_iterations: 50 max_cost_usd: 0 max_duration: 6h consecutive_no_progress: 3 stop_when_empty: true cooldown_duration: 15s worker_timeout: 30m use_git_detection: true ``` -------------------------------- ### Verify Healthy Codex Install Source: https://github.com/majiayu000/vibeguard/blob/main/docs/internal/plans/agent-rules-distribution.md Checks the health of a Codex installation with managed hooks and AGENTS on the current machine. ```bash bash setup.sh --check ``` -------------------------------- ### Load Configuration Safely in Rust Source: https://github.com/majiayu000/vibeguard/blob/main/rules/claude-rules/rust/quality.md Ensure configuration is loaded correctly during startup. Avoid using `Default::default()` when a configuration file should be loaded, as this may ignore the file content. ```Rust // Bad: config exists but is never loaded let config = MyConfig::default(); // config file ignored // Good: explicit load during startup let config = MyConfig::load_from_file("config.toml") .unwrap_or_else(|_| MyConfig::default()); // intentional fallback ``` -------------------------------- ### Verify VibeGuard Installation (Strict Mode) Source: https://github.com/majiayu000/vibeguard/blob/main/README.md Checks the VibeGuard installation and exits with a non-zero status code on warnings or broken states. ```bash bash ~/vibeguard/setup.sh --check --strict ``` -------------------------------- ### Search for Existing Code Before Creating Source: https://github.com/majiayu000/vibeguard/blob/main/templates/language/typescript-CLAUDE.md Before creating new components, hooks, or utilities, search the codebase to avoid duplication. Use `grep` for efficient searching. ```bash grep -rn "export.*function.*" src/ --include="*.ts" --include="*.tsx" grep -rn "export.*const.*" src/ --include="*.ts" --include="*.tsx" ``` -------------------------------- ### Reference Implementation for Planning Source: https://github.com/majiayu000/vibeguard/blob/main/docs/internal/research/learn/external/boristane-how-i-use-claude-code/index.html Provides an example of sharing external code as a reference when requesting a plan. This helps Claude adopt proven solutions rather than designing from scratch. ```text If I want to add sortable IDs, I paste the ID generation code from a project that does it well and say “this is how they do sortable IDs, write a plan.md explaining how we can adopt a similar approach.” ``` -------------------------------- ### Example Regression Test Command Source: https://github.com/majiayu000/vibeguard/blob/main/workflows/plan-flow/references/execplan-template.md This demonstrates the format for specifying a full regression test command within the 'Validation' section of an ExecPlan. ```shell `` ``` -------------------------------- ### Example Command Execution in Log Source: https://github.com/majiayu000/vibeguard/blob/main/workflows/plan-flow/references/plan-template.md This snippet shows how to record command execution results within the execution log. It includes the command string and its pass/fail status, as well as the files modified and a summary of main changes. ```markdown - - Step A1: `completed` - Modify files: - `` -Main changes: - - Execute tests: - `` -> pass/fail - `` -> pass/fail ``` -------------------------------- ### V1 Guard Message Example Source: https://github.com/majiayu000/vibeguard/blob/main/docs/known-issues/systemic-issues-report.md An example of a v1 guard message format that was interpreted literally by an AI agent, leading to unintended code reconstruction. ```text # ❌ v1 — Agent when the command is executed [TS-03] src/cli.ts:42 console remains. Fix: Use project logger instead, or remove debugging code ``` -------------------------------- ### JSON schema for install modules Source: https://github.com/majiayu000/vibeguard/blob/main/docs/internal/research/2026-05-01-codebase-audit.md This JSON snippet represents a schema for installing modules. Making this schema load-bearing, rather than purely documentary, is recommended for improving configuration management. ```json { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Install Modules Schema", "type": "object", "properties": { "modules": { "type": "array", "items": { "type": "object", "properties": { "name": {"type": "string"}, "version": {"type": "string"} }, "required": ["name", "version"] } } }, "required": ["modules"] } ``` -------------------------------- ### Run Constraint Recommender and Eval Unit Tests Source: https://github.com/majiayu000/vibeguard/blob/main/plan/2026-05-01_18-56-41-vibeguard-audit-remediation.md Execute unit tests for the constraint recommender and evaluation scripts. This verifies changes made in Step P0.5. ```bash python3 -m unittest scripts/test_constraint_recommender.py eval/test_run_eval.py ``` -------------------------------- ### Skill Reuse and Learning Recommendations Source: https://github.com/majiayu000/vibeguard/blob/main/docs/how/learning-skill-generation.md Illustrates the output format for VibeGuard's learning recommendations and detected skills upon the first 'Read' operation in a new session. ```text [VibeGuard Learning Recommendations] 3 cross-session learning signals detected: - High frequency warning: 1 build error (37 times) - Hot files: .../src/scrapers/candidate-scraper.ts (42 times) - Hot files: .../src/components/DealDocsTab.tsx (113 times) Run /vibeguard:learn to extract guard rules or skills from these signals. [VibeGuard Skills] 5 related Skills detected: - vibeguard: AI-assisted development of anti-hallucination specifications... - eval-harness: Evaluation-driven development... ``` -------------------------------- ### Example TOML Input for Legacy Vibeguard MCP Source: https://github.com/majiayu000/vibeguard/blob/main/plan/signal-report-legacy-vibeguard-mcp-cleanup.md This TOML structure represents the input configuration before cleanup, including legacy Vibeguard MCP settings. ```toml [features] foo = true [mcp_servers.vibeguard] command = "node" [mcp_servers.vibeguard.env] FOO = "bar" [other] value = 1 ``` -------------------------------- ### Example Language Rule Path Scoping Source: https://github.com/majiayu000/vibeguard/blob/main/docs/how/memory-files.md This YAML frontmatter example demonstrates how to scope language-specific rules using the 'paths' directive. This ensures rules are only loaded when Claude Code reads matching files. ```yaml --- paths: "**/*.rs,**/Cargo.toml,**/Cargo.lock" --- ``` -------------------------------- ### Go Project Verification Command Source: https://github.com/majiayu000/vibeguard/blob/main/rules/go.md This command is used to verify the Go project by running vet, golangci-lint, and go test. ```bash go vet ./... && golangci-lint run && go test ./... ``` -------------------------------- ### VibeGuard Interception Example Source: https://github.com/majiayu000/vibeguard/blob/main/site/index.html This example shows a blocked git push command due to a commit discipline rule violation. It suggests a fix using 'git push --force-with-lease' and provides the reason for the block. ```bash ┌─ VibeGuard ─────────────────────────────────────────┐ ✗ blocked pre-bash-guard → command: git push --force origin main → rule: L7 · commit discipline · W-force-destructive → reason: destructive overwrite on protected ref ⚠ fix use git push --force-with-lease instead or resolve upstream locally before pushing └─────────────────────────────────────────────────────┘ agent: retrying with --force-with-lease ```