@boshu2/vibe-check 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.agents/plans/2025-12-28-ai-safety-integration-plan.md +326 -0
  2. package/.agents/plans/2025-12-29-complexity-driver-plan.md +225 -0
  3. package/.agents/plans/2025-12-29-complexity-drivers-plan.md +253 -0
  4. package/.agents/research/2025-12-28-ai-platform-security-integration.md +295 -0
  5. package/.agents/research/2025-12-29-complexity-driver-architecture.md +392 -0
  6. package/.agents/research/2025-12-29-complexity-drivers.md +227 -0
  7. package/.beads/README.md +81 -0
  8. package/.beads/config.yaml +62 -0
  9. package/.beads/interactions.jsonl +0 -0
  10. package/.beads/issues.jsonl +21 -0
  11. package/.beads/metadata.json +4 -0
  12. package/.gitattributes +3 -0
  13. package/AGENTS.md +40 -0
  14. package/CHANGELOG.md +69 -0
  15. package/CLAUDE.md +75 -0
  16. package/README.md +71 -0
  17. package/dist/ai-safety/contract-drift.d.ts +14 -0
  18. package/dist/ai-safety/contract-drift.d.ts.map +1 -0
  19. package/dist/ai-safety/contract-drift.js +230 -0
  20. package/dist/ai-safety/contract-drift.js.map +1 -0
  21. package/dist/ai-safety/index.d.ts +43 -0
  22. package/dist/ai-safety/index.d.ts.map +1 -0
  23. package/dist/ai-safety/index.js +177 -0
  24. package/dist/ai-safety/index.js.map +1 -0
  25. package/dist/ai-safety/scope-violation.d.ts +18 -0
  26. package/dist/ai-safety/scope-violation.d.ts.map +1 -0
  27. package/dist/ai-safety/scope-violation.js +150 -0
  28. package/dist/ai-safety/scope-violation.js.map +1 -0
  29. package/dist/ai-safety/secret-leakage.d.ts +18 -0
  30. package/dist/ai-safety/secret-leakage.d.ts.map +1 -0
  31. package/dist/ai-safety/secret-leakage.js +188 -0
  32. package/dist/ai-safety/secret-leakage.js.map +1 -0
  33. package/dist/ai-safety/token-spiral.d.ts +17 -0
  34. package/dist/ai-safety/token-spiral.d.ts.map +1 -0
  35. package/dist/ai-safety/token-spiral.js +183 -0
  36. package/dist/ai-safety/token-spiral.js.map +1 -0
  37. package/dist/ai-safety/types.d.ts +122 -0
  38. package/dist/ai-safety/types.d.ts.map +1 -0
  39. package/dist/ai-safety/types.js +32 -0
  40. package/dist/ai-safety/types.js.map +1 -0
  41. package/dist/analyzers/complexity.d.ts +92 -0
  42. package/dist/analyzers/complexity.d.ts.map +1 -0
  43. package/dist/analyzers/complexity.js +79 -0
  44. package/dist/analyzers/complexity.js.map +1 -0
  45. package/dist/analyzers/modularity.d.ts +3 -1
  46. package/dist/analyzers/modularity.d.ts.map +1 -1
  47. package/dist/analyzers/modularity.js +32 -6
  48. package/dist/analyzers/modularity.js.map +1 -1
  49. package/dist/cli.js +2 -1
  50. package/dist/cli.js.map +1 -1
  51. package/dist/commands/driver.d.ts +18 -0
  52. package/dist/commands/driver.d.ts.map +1 -0
  53. package/dist/commands/driver.js +58 -0
  54. package/dist/commands/driver.js.map +1 -0
  55. package/dist/commands/index.d.ts +1 -0
  56. package/dist/commands/index.d.ts.map +1 -1
  57. package/dist/commands/index.js +1 -0
  58. package/dist/commands/index.js.map +1 -1
  59. package/dist/commands/modularity.d.ts +2 -0
  60. package/dist/commands/modularity.d.ts.map +1 -1
  61. package/dist/commands/modularity.js +86 -7
  62. package/dist/commands/modularity.js.map +1 -1
  63. package/dist/commands/session.d.ts +9 -0
  64. package/dist/commands/session.d.ts.map +1 -1
  65. package/dist/commands/session.js +42 -0
  66. package/dist/commands/session.js.map +1 -1
  67. package/dist/commands/watch.d.ts.map +1 -1
  68. package/dist/commands/watch.js +59 -0
  69. package/dist/commands/watch.js.map +1 -1
  70. package/drivers/README.md +327 -0
  71. package/drivers/go.sh +131 -0
  72. package/drivers/java.sh +137 -0
  73. package/drivers/javascript.sh +134 -0
  74. package/drivers/php.sh +132 -0
  75. package/drivers/python.sh +90 -0
  76. package/drivers/rust.sh +132 -0
  77. package/package.json +4 -1
@@ -0,0 +1,62 @@
1
+ # Beads Configuration File
2
+ # This file configures default behavior for all bd commands in this repository
3
+ # All settings can also be set via environment variables (BD_* prefix)
4
+ # or overridden with command-line flags
5
+
6
+ # Issue prefix for this repository (used by bd init)
7
+ # If not set, bd init will auto-detect from directory name
8
+ # Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
9
+ # issue-prefix: ""
10
+
11
+ # Use no-db mode: load from JSONL, no SQLite, write back after each command
12
+ # When true, bd will use .beads/issues.jsonl as the source of truth
13
+ # instead of SQLite database
14
+ # no-db: false
15
+
16
+ # Disable daemon for RPC communication (forces direct database access)
17
+ # no-daemon: false
18
+
19
+ # Disable auto-flush of database to JSONL after mutations
20
+ # no-auto-flush: false
21
+
22
+ # Disable auto-import from JSONL when it's newer than database
23
+ # no-auto-import: false
24
+
25
+ # Enable JSON output by default
26
+ # json: false
27
+
28
+ # Default actor for audit trails (overridden by BD_ACTOR or --actor)
29
+ # actor: ""
30
+
31
+ # Path to database (overridden by BEADS_DB or --db)
32
+ # db: ""
33
+
34
+ # Auto-start daemon if not running (can also use BEADS_AUTO_START_DAEMON)
35
+ # auto-start-daemon: true
36
+
37
+ # Debounce interval for auto-flush (can also use BEADS_FLUSH_DEBOUNCE)
38
+ # flush-debounce: "5s"
39
+
40
+ # Git branch for beads commits (bd sync will commit to this branch)
41
+ # IMPORTANT: Set this for team projects so all clones use the same sync branch.
42
+ # This setting persists across clones (unlike database config which is gitignored).
43
+ # Can also use BEADS_SYNC_BRANCH env var for local override.
44
+ # If not set, bd sync will require you to run 'bd config set sync.branch <branch>'.
45
+ # sync-branch: "beads-sync"
46
+
47
+ # Multi-repo configuration (experimental - bd-307)
48
+ # Allows hydrating from multiple repositories and routing writes to the correct JSONL
49
+ # repos:
50
+ # primary: "." # Primary repo (where this database lives)
51
+ # additional: # Additional repos to hydrate from (read-only)
52
+ # - ~/beads-planning # Personal planning repo
53
+ # - ~/work-planning # Work planning repo
54
+
55
+ # Integration settings (access with 'bd config get/set')
56
+ # These are stored in the database, not in this file:
57
+ # - jira.url
58
+ # - jira.project
59
+ # - linear.url
60
+ # - linear.api-key
61
+ # - github.org
62
+ # - github.repo
File without changes
@@ -0,0 +1,21 @@
1
+ {"id":"vibe-check-1qb","title":"Create JavaScript/TypeScript driver","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-29T15:44:12.584697-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:30:56.020994-05:00","closed_at":"2025-12-29T16:30:56.020994-05:00","close_reason":"Completed JavaScript/TypeScript driver using cyclomatic-complexity tool. Supports both JS and TS, integrated with CLI, all tests passing.","comments":[{"id":13,"issue_id":"vibe-check-1qb","author":"fullerbt","text":"Will use complexity-report tool (wraps escomplex). Output structure:\n- reports[0].functions[] contains function-level metrics\n- reports[0].path contains file path\n- Need to transform to match ComplexityReport schema","created_at":"2025-12-29T21:24:58Z"},{"id":14,"issue_id":"vibe-check-1qb","author":"fullerbt","text":"BLOCKER: complexity-report doesn't handle TypeScript files - hangs during analysis. Need alternative approach:\n1. Use typescript-complexity or ts-complexity\n2. Or transpile TS-\u003eJS first\n3. Or skip .ts files and only analyze .js/.jsx","created_at":"2025-12-29T21:26:20Z"},{"id":15,"issue_id":"vibe-check-1qb","author":"fullerbt","text":"✓ Switched to cyclomatic-complexity tool (supports both JS and TS)\n✓ Driver successfully analyzes vibe-check codebase: 81 files, 1409 functions, avg 3.8 complexity\n✓ Output matches ComplexityReport schema\nReady for integration testing","created_at":"2025-12-29T21:28:14Z"},{"id":16,"issue_id":"vibe-check-1qb","author":"fullerbt","text":"✓ COMPLETED\n- Created drivers/javascript.sh using cyclomatic-complexity tool\n- Supports both JavaScript and TypeScript files\n- Updated CLI commands (driver.ts, modularity.ts) with ESM __dirname compatibility\n- Updated documentation (drivers/README.md, README.md)\n- All tests passing (163 passed)\n- Tested: driver subcommand, modularity --with-complexity javascript","created_at":"2025-12-29T21:30:50Z"}]}
2
+ {"id":"vibe-check-1yr","title":"Create Java complexity driver","description":"Wrap PMD to produce ComplexityReport JSON. JSON output via '-f json' flag. Requires JRE. Install: download PMD JAR from pmd.github.io","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-29T16:48:19.421973-05:00","created_by":"fullerbt","updated_at":"2025-12-29T17:11:49.527974-05:00","closed_at":"2025-12-29T17:11:49.527974-05:00","close_reason":"Completed Java driver using PMD. Parses violations JSON, extracts complexity via regex, transforms to ComplexityReport schema. CLI and docs updated.","comments":[{"id":19,"issue_id":"vibe-check-1yr","author":"fullerbt","text":"Files: drivers/java.sh, drivers/README.md, README.md, src/commands/*.ts\nTool: pmd check -d /path -R category/java/design.xml -f json\nInstall: Download PMD JAR (requires JRE)","created_at":"2025-12-29T21:48:56Z"},{"id":22,"issue_id":"vibe-check-1yr","author":"fullerbt","text":"✓ COMPLETED\n- Created drivers/java.sh wrapping PMD\n- Filters PMD JSON violations for CyclomaticComplexity rule\n- Uses jq regex capture to extract method name and complexity from description\n- Updated CLI integration (driver.ts, modularity.ts)\n- Updated documentation (drivers/README.md, README.md)\n- All tests passing (163 passed)\n\nNote: PMD only reports violations above threshold (default 10). Low-complexity methods won't appear. Requires JRE and PMD installed.","created_at":"2025-12-29T22:11:41Z"}]}
3
+ {"id":"vibe-check-263","title":"Session end AI safety integration","description":"Integrate AI safety analysis into session end command. Add ai_safety section to JSON output. Show warnings in terminal output with recommendations.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-28T12:07:22.458246-05:00","created_by":"fullerbt","updated_at":"2025-12-28T12:32:10.15324-05:00","closed_at":"2025-12-28T12:32:10.15324-05:00","close_reason":"Completed: AI safety integrated into session end. JSON output includes ai_safety section. Terminal shows warnings and recommendations. Follows inner-loop pattern.","dependencies":[{"issue_id":"vibe-check-263","depends_on_id":"vibe-check-swh","type":"blocks","created_at":"2025-12-28T12:07:42.272223-05:00","created_by":"daemon"}],"comments":[{"id":6,"issue_id":"vibe-check-263","author":"fullerbt","text":"✅ Implementation complete:\n\nUpdated src/commands/session.ts:\n- Imported analyzeAISafety and formatAISafetyAnalysis from ai-safety module\n- Added ai_safety field to SessionMetricsOutput interface\n- Integrated AI safety analysis in runSessionEnd() (parallel with inner-loop)\n- Added ai_safety section to JSON output with:\n - health: 'healthy' | 'warning' | 'critical'\n - issues_detected, secrets_leaked, scope_violations counts\n - contract_drift_detected, token_spiral_detected booleans\n - recommendations array\n- Added terminal output showing:\n - Health status with emoji (🚨/⚠️/✅)\n - Individual detector messages (🔐/🎯/📉/💥)\n - Top 3 recommendations\n- Follows exact same pattern as inner-loop integration\n\nTesting:\n- Build passes ✅\n- Session start/end commands work ✅\n- JSON output structure confirmed (no commits = expected behavior)","created_at":"2025-12-28T17:32:04Z"}]}
4
+ {"id":"vibe-check-56v","title":"Contract drift detector","description":"Track commit message format compliance over time. Detect degradation from conventional commits. Report drift percentage and trend. Warning at \u003e30% drift.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-28T12:07:24.054553-05:00","created_by":"fullerbt","updated_at":"2025-12-28T13:21:58.451526-05:00","closed_at":"2025-12-28T13:21:58.451526-05:00","close_reason":"Contract drift detector with compliance scoring and trend detection","dependencies":[{"issue_id":"vibe-check-56v","depends_on_id":"vibe-check-ash","type":"blocks","created_at":"2025-12-28T12:07:42.336535-05:00","created_by":"daemon"}]}
5
+ {"id":"vibe-check-58i","title":"Create Go complexity driver","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-29T16:32:18.00354-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:35:57.60124-05:00","closed_at":"2025-12-29T16:35:57.60124-05:00","close_reason":"Completed Go complexity driver using gocyclo. Supports all Go files, transforms text output to JSON, integrated with CLI."}
6
+ {"id":"vibe-check-5s1","title":"Scope violation detector","description":"Detect commits touching files outside declared scope. Support scope config via .vibe-check/scope.yaml. Use glob patterns. Warning severity.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-28T12:07:23.888845-05:00","created_by":"fullerbt","updated_at":"2025-12-28T13:15:03.887086-05:00","closed_at":"2025-12-28T13:15:03.887086-05:00","close_reason":"Scope violation detector with YAML config and glob matching","dependencies":[{"issue_id":"vibe-check-5s1","depends_on_id":"vibe-check-ash","type":"blocks","created_at":"2025-12-28T12:07:42.3013-05:00","created_by":"daemon"}]}
7
+ {"id":"vibe-check-5vc","title":"Integrate complexity data into modularity scoring","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-29T15:44:12.438929-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:03:31.509851-05:00","closed_at":"2025-12-29T16:03:31.509851-05:00","close_reason":"Completed: Complexity data integrated into modularity scoring with full test coverage","dependencies":[{"issue_id":"vibe-check-5vc","depends_on_id":"vibe-check-nk3","type":"blocks","created_at":"2025-12-29T15:44:22.517099-05:00","created_by":"daemon"}],"comments":[{"id":9,"issue_id":"vibe-check-5vc","author":"fullerbt","text":"COMPLETED: Integrated complexity data into modularity scoring\n\nModified Files:\n- src/analyzers/modularity.ts:\n - Added ComplexityReport import\n - Added 3 new ModularityFlag types: moderate-complexity, high-complexity, extreme-complexity\n - Updated ModularityOptions to accept optional complexityData parameter\n - Updated analyzeFile() to accept and pass complexityData\n - Updated calculateScore() to apply complexity-based scoring:\n - Grade A/B: +2 bonus\n - Grade C: -1 penalty, moderate-complexity flag\n - Grade D/E: -2 penalty, high-complexity flag\n - Grade F: -4 penalty, extreme-complexity flag\n - Updated analyzeModularity() to pass complexity data through call chain\n\nCreated Files:\n- tests/modularity-complexity.test.ts (6 tests, all passing)\n\nTest Results:\n- All 163 tests pass\n- Backwards compatible: works without complexity data\n- Correctly applies bonuses/penalties based on grades\n- Handles missing files in complexity report gracefully","created_at":"2025-12-29T21:03:23Z"}]}
8
+ {"id":"vibe-check-88z","title":"Create PHP complexity driver","description":"Wrap PHPMD to produce ComplexityReport JSON. Native JSON output via 'phpmd /path json codesize'. Install: composer global require phpmd/phpmd","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-29T16:48:12.741187-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:59:31.035948-05:00","closed_at":"2025-12-29T16:59:31.035948-05:00","close_reason":"Completed PHP driver using PHPMD. Parses violations JSON, extracts complexity via regex, transforms to ComplexityReport schema. CLI and docs updated.","comments":[{"id":18,"issue_id":"vibe-check-88z","author":"fullerbt","text":"Files: drivers/php.sh, drivers/README.md, README.md, src/commands/*.ts\nTool: phpmd /path/to/src json codesize\nInstall: composer global require phpmd/phpmd","created_at":"2025-12-29T21:48:46Z"},{"id":21,"issue_id":"vibe-check-88z","author":"fullerbt","text":"✓ COMPLETED\n- Created drivers/php.sh wrapping PHPMD\n- Extracts cyclomatic complexity violations from PHPMD JSON output\n- Uses jq regex capture to parse complexity from description text\n- Updated CLI integration (driver.ts, modularity.ts)\n- Updated documentation (drivers/README.md, README.md)\n- All tests passing (163 passed)\n\nNote: PHPMD only reports violations (methods above threshold), so low-complexity methods won't appear in output. This is expected behavior.","created_at":"2025-12-29T21:59:22Z"}]}
9
+ {"id":"vibe-check-8no","title":"Create Rust complexity driver","description":"Wrap rust-code-analysis-cli to produce ComplexityReport JSON. Native JSON output makes this simplest to implement. Follow pattern from python.sh/javascript.sh/go.sh","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-29T16:48:05.624738-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:53:15.011168-05:00","closed_at":"2025-12-29T16:53:15.011168-05:00","close_reason":"Completed Rust driver using rust-code-analysis-cli. Wraps tool output, merges multi-file JSONs, transforms to ComplexityReport schema. CLI and docs updated.","comments":[{"id":17,"issue_id":"vibe-check-8no","author":"fullerbt","text":"Files to modify:\n- drivers/rust.sh (new)\n- drivers/README.md (add Rust section)\n- README.md (add Rust to Available Drivers)\n- src/commands/driver.ts (update available list)\n- src/commands/modularity.ts (update available list)\n\nTool: rust-code-analysis-cli -m -O json -p /path/to/src\nInstall: cargo install rust-code-analysis-cli\nPattern: Follow python.sh/javascript.sh/go.sh","created_at":"2025-12-29T21:48:40Z"},{"id":20,"issue_id":"vibe-check-8no","author":"fullerbt","text":"✓ COMPLETED\n- Created drivers/rust.sh wrapping rust-code-analysis-cli\n- Handles temp dir for multi-file JSON outputs, merges with jq\n- Updated CLI integration (driver.ts, modularity.ts)\n- Updated documentation (drivers/README.md, README.md)\n- All tests passing (163 passed)\n- Build successful\n\nNote: Driver tested with design but not against actual Rust code (cargo not available in environment). User will need to test with actual Rust codebase.","created_at":"2025-12-29T21:53:04Z"}]}
10
+ {"id":"vibe-check-8zt","title":"Add CLI complexity flags (--with-complexity, driver subcommand)","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-29T15:44:12.537306-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:15:25.573766-05:00","closed_at":"2025-12-29T16:15:25.573766-05:00","close_reason":"Completed: CLI complexity flags with driver subcommand and integration options","dependencies":[{"issue_id":"vibe-check-8zt","depends_on_id":"vibe-check-5vc","type":"blocks","created_at":"2025-12-29T15:44:22.571068-05:00","created_by":"daemon"},{"issue_id":"vibe-check-8zt","depends_on_id":"vibe-check-9th","type":"blocks","created_at":"2025-12-29T15:44:22.599196-05:00","created_by":"daemon"}],"comments":[{"id":11,"issue_id":"vibe-check-8zt","author":"fullerbt","text":"COMPLETED: Added CLI complexity flags for driver integration\n\nModified Files:\n- src/commands/modularity.ts:\n - Added --with-complexity \u003clang\u003e option (runs driver, saves to .vibe-check/complexity.json)\n - Added --complexity-file \u003cpath\u003e option (loads existing complexity data)\n - Added runComplexityDriver() function (uses execFile for security)\n - Added loadComplexityFromFile() function\n - Updated printTerminalOutput() to show complexity integration status\n - Added flag labels for moderate/high/extreme complexity\n- src/cli.ts:\n - Added createDriverCommand import and registration\n\nCreated Files:\n- src/commands/driver.ts:\n - New 'driver' subcommand for running drivers directly\n - Usage: vibe-check driver python ./src \u003e complexity.json\n - Uses execFile (secure, no shell injection)\n - Outputs JSON to stdout for piping\n\n- src/commands/index.ts:\n - Exported createDriverCommand and runDriver\n\nTest Results:\n- All 163 tests pass\n- Build succeeds without errors\n- Help text verified for both commands\n\nAcceptance Criteria Met:\n✅ --with-complexity runs driver, saves to .vibe-check/complexity.json\n✅ --complexity-file uses existing file\n✅ driver subcommand outputs to stdout\n✅ Help text updated\n✅ Uses execFile (secure) instead of exec","created_at":"2025-12-29T21:15:19Z"}]}
11
+ {"id":"vibe-check-9th","title":"Create Python driver (radon wrapper)","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-29T15:44:12.487081-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:09:48.351483-05:00","closed_at":"2025-12-29T16:09:48.351483-05:00","close_reason":"Completed: Python driver (radon wrapper) with full error handling and documentation","comments":[{"id":10,"issue_id":"vibe-check-9th","author":"fullerbt","text":"COMPLETED: Created Python driver (radon wrapper)\n\nCreated Files:\n- drivers/python.sh (executable shell script)\n - Checks radon is installed, exits 1 with JSON error if not\n - Runs 'radon cc' with JSON output\n - Transforms with jq to standard ComplexityReport schema\n - Handles empty directories (outputs empty files object)\n - Handles missing directories (exits 1 with error JSON)\n- drivers/README.md\n - Documents driver architecture and contract\n - Shows standard schema and grade thresholds\n - Provides usage examples and template for new drivers\n\nManual Testing Results:\n- Tested with sample Python file (3 functions, complexity 1-7)\n- Output validates against ComplexityReport schema\n- Error handling works (missing radon, missing directory)\n- Empty directory handling works\n- Grade calculation correct (avg 4 = grade A)\n\nAcceptance Criteria Met:\n✅ Exits 0 on success\n✅ Exits 1 with error JSON if radon not installed\n✅ Output validates against schema\n✅ Handles empty directories gracefully","created_at":"2025-12-29T21:09:42Z"}]}
12
+ {"id":"vibe-check-9yp","title":"Document driver architecture in README","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-29T15:44:12.631846-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:18:55.698064-05:00","closed_at":"2025-12-29T16:18:55.698064-05:00","close_reason":"Completed: Driver architecture documented in main README with examples and architecture diagram","dependencies":[{"issue_id":"vibe-check-9yp","depends_on_id":"vibe-check-8zt","type":"blocks","created_at":"2025-12-29T15:44:22.654954-05:00","created_by":"daemon"}],"comments":[{"id":12,"issue_id":"vibe-check-9yp","author":"fullerbt","text":"COMPLETED: Documented driver architecture in main README\n\nModified Files:\n- README.md:\n - Added 'Complexity Analysis (v2.3.0)' subsection under 'Code Quality'\n - Quick start examples for all three usage patterns:\n - --with-complexity python (run driver + analysis)\n - --complexity-file \u003cpath\u003e (use existing data)\n - driver subcommand (generate data only)\n - Driver architecture diagram (kernel ← drivers ← tools)\n - Complexity grading table with score impacts\n - Available drivers list (Python + coming soon)\n - Example output showing complexity integration\n - Links to drivers/README.md for authoring guide\n\nDocumentation Structure:\n1. Quick Start (3 usage patterns)\n2. How It Works (architecture diagram)\n3. Complexity Grading (A-F with score impacts)\n4. Available Drivers (Python + roadmap)\n5. Example Output (terminal output with complexity flags)\n\nAcceptance Criteria Met:\n✅ README shows basic usage\n✅ Documents all three CLI patterns\n✅ Explains driver architecture\n✅ Shows complexity grading system\n✅ Links to drivers/README.md for details\n✅ Positioned in Code Quality section (logical location)","created_at":"2025-12-29T21:18:48Z"}]}
13
+ {"id":"vibe-check-ash","title":"AI Safety types and orchestrator","description":"Create src/ai-safety/types.ts and src/ai-safety/index.ts. Define AISafetyAnalysis interface matching inner-loop pattern. Foundation for all other detectors.","status":"closed","priority":0,"issue_type":"feature","created_at":"2025-12-28T12:07:20.710124-05:00","created_by":"fullerbt","updated_at":"2025-12-28T12:12:30.564652-05:00","closed_at":"2025-12-28T12:12:30.564652-05:00","close_reason":"Completed: AI Safety types and orchestrator foundation. Created types.ts with all interfaces and index.ts with orchestrator following inner-loop pattern. Build passes.","dependencies":[{"issue_id":"vibe-check-ash","depends_on_id":"vibe-check-lqb","type":"blocks","created_at":"2025-12-28T12:07:42.213339-05:00","created_by":"daemon"}],"comments":[{"id":2,"issue_id":"vibe-check-ash","author":"fullerbt","text":"Files to create:\n- src/ai-safety/types.ts\n- src/ai-safety/index.ts\n\nPattern: Follow src/inner-loop/ structure exactly","created_at":"2025-12-28T17:07:57Z"},{"id":4,"issue_id":"vibe-check-ash","author":"fullerbt","text":"✅ Implementation complete:\n\nCreated src/ai-safety/types.ts:\n- AISafetyAnalysis interface (matches inner-loop pattern)\n- 4 detector result types: SecretLeakageResult, ScopeViolationResult, ContractDriftResult, TokenSpiralResult\n- Config types with DEFAULT_AI_SAFETY_CONFIG\n- SECRET_PATTERNS constants for 8 secret types\n\nCreated src/ai-safety/index.ts:\n- analyzeAISafety() orchestrator function\n- generateRecommendations() helper\n- quickAISafetyCheck() fast check function\n- formatAISafetyAnalysis() terminal output formatter\n- Stub implementations for all detectors (to be filled by dependent issues)\n\nBuild verified: npm run build passes ✅","created_at":"2025-12-28T17:12:18Z"}]}
14
+ {"id":"vibe-check-blw","title":"Add complexity driver architecture for language-specific tools","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-29T15:43:52.020758-05:00","created_by":"fullerbt","updated_at":"2025-12-29T16:20:04.291733-05:00","closed_at":"2025-12-29T16:20:04.291733-05:00","close_reason":"Epic completed: Complexity driver architecture fully implemented with Python driver, CLI integration, and documentation. JavaScript driver remains as future enhancement (P2).","comments":[{"id":7,"issue_id":"vibe-check-blw","author":"fullerbt","text":"## Overview\nEnable vibe-check to consume complexity metrics from language-specific tools (radon, gocyclo, complexity-report) via a driver/plugin architecture.\n\n## Research\nSee: .agents/research/2025-12-29-complexity-driver-architecture.md\n\n## Plan\nSee: .agents/plans/2025-12-29-complexity-driver-plan.md\n\n## Why\nLine count is a poor proxy for code quality. Real cyclomatic complexity tells us if code is actually hard to test/maintain.\n\n## Architecture\n- vibe-check stays language-agnostic (kernel)\n- Drivers wrap language tools and output standard JSON schema\n- Modularity analyzer reads .vibe-check/complexity.json if present","created_at":"2025-12-29T20:44:02Z"}]}
15
+ {"id":"vibe-check-gon","title":"Token spiral estimator","description":"Estimate token usage from commit size (~4 chars/token). Track cumulative session tokens. Detect explosion patterns (\u003e2x baseline). Advisory info severity.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-12-28T12:07:25.111778-05:00","created_by":"fullerbt","updated_at":"2025-12-28T13:27:24.916118-05:00","closed_at":"2025-12-28T13:27:24.916118-05:00","close_reason":"Token spiral estimator with 3 estimation methods and explosion detection","dependencies":[{"issue_id":"vibe-check-gon","depends_on_id":"vibe-check-ash","type":"blocks","created_at":"2025-12-28T12:07:42.370654-05:00","created_by":"daemon"}]}
16
+ {"id":"vibe-check-gy2","title":"Watch command AI safety integration","description":"Add real-time secret detection alerts to watch mode. Red/bold for critical. Show file and pattern matched. Rate-limited alerts.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-28T12:07:26.399789-05:00","created_by":"fullerbt","updated_at":"2025-12-28T13:08:55.854894-05:00","closed_at":"2025-12-28T13:08:55.854894-05:00","close_reason":"Watch mode now detects secrets in real-time with rate-limited alerts","dependencies":[{"issue_id":"vibe-check-gy2","depends_on_id":"vibe-check-swh","type":"blocks","created_at":"2025-12-28T12:07:42.399267-05:00","created_by":"daemon"}]}
17
+ {"id":"vibe-check-lqb","title":"Epic: AI Safety Detection Module","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-28T12:07:01.674933-05:00","created_by":"fullerbt","updated_at":"2025-12-28T12:08:14.746447-05:00","closed_at":"2025-12-28T12:08:14.746447-05:00","close_reason":"Epic container - work tracked in child issues","comments":[{"id":1,"issue_id":"vibe-check-lqb","author":"fullerbt","text":"Research: .agents/research/2025-12-28-ai-platform-security-integration.md\nPlan: .agents/plans/2025-12-28-ai-safety-integration-plan.md\nSource patterns: ai-platform/tests/agents/test_agent_security.py","created_at":"2025-12-28T17:07:56Z"}]}
18
+ {"id":"vibe-check-nk3","title":"Add complexity schema types and loader function","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-29T15:44:12.39308-05:00","created_by":"fullerbt","updated_at":"2025-12-29T15:51:24.559741-05:00","closed_at":"2025-12-29T15:51:24.559741-05:00","close_reason":"Completed: Complexity schema types and loader function implemented with full test coverage","comments":[{"id":8,"issue_id":"vibe-check-nk3","author":"fullerbt","text":"COMPLETED: Created src/analyzers/complexity.ts with:\n- ComplexityReport schema (tool, language, files, summary)\n- FunctionComplexity and FileComplexity types\n- ComplexityGrade type (A-F)\n- loadComplexityData() function (graceful null on missing/invalid)\n- getFileComplexity() helper\n- complexityToGrade() converter\n- Full test coverage in tests/complexity.test.ts (12 tests, all passing)\n- TypeScript compilation verified","created_at":"2025-12-29T20:51:17Z"}]}
19
+ {"id":"vibe-check-no1","title":"Epic: Additional Complexity Drivers","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-29T16:47:52.844188-05:00","created_by":"fullerbt","updated_at":"2025-12-29T17:12:20.339182-05:00","closed_at":"2025-12-29T17:12:20.339182-05:00","close_reason":"Epic completed: All 3 complexity drivers implemented (Rust, PHP, Java). vibe-check now supports 6 languages total."}
20
+ {"id":"vibe-check-swh","title":"Secret leakage detector","description":"Detect exposed secrets in commit diffs: OpenAI keys, GitHub PATs, GitLab PATs, AWS keys, Slack tokens. Port patterns from ai-platform test_agent_security.py. Critical severity.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-28T12:07:21.42346-05:00","created_by":"fullerbt","updated_at":"2025-12-28T12:18:57.212488-05:00","closed_at":"2025-12-28T12:18:57.212488-05:00","close_reason":"Completed: Secret leakage detector with 8 pattern types. Detects OpenAI, GitHub, GitLab, AWS, Slack tokens. Masks secrets, extracts file context. Tested and working.","dependencies":[{"issue_id":"vibe-check-swh","depends_on_id":"vibe-check-ash","type":"blocks","created_at":"2025-12-28T12:07:42.242965-05:00","created_by":"daemon"}],"comments":[{"id":3,"issue_id":"vibe-check-swh","author":"fullerbt","text":"Secret patterns to detect:\n- sk-[a-zA-Z0-9]{48} (OpenAI)\n- ghp_[a-zA-Z0-9]{36} (GitHub PAT)\n- glpat-[a-zA-Z0-9]{20} (GitLab PAT)\n- AKIA[0-9A-Z]{16} (AWS)\n- xox[baprs]-* (Slack)\n\nSource: ai-platform/tests/agents/test_agent_security.py:297-306","created_at":"2025-12-28T17:07:58Z"},{"id":5,"issue_id":"vibe-check-swh","author":"fullerbt","text":"✅ Implementation complete:\n\nCreated src/ai-safety/secret-leakage.ts:\n- detectSecretLeakage() - Async version that scans full commit diffs using simple-git\n- detectSecretLeakageFromMessages() - Sync version that scans commit messages only\n- Detects 8 secret patterns: OpenAI, GitHub PAT, GitLab PAT, AWS, Slack, Generic API keys, Secrets, Passwords\n- Masks secrets (shows first 8 chars + ***)\n- Extracts file context from diffs\n- Determines severity (critical vs warning)\n\nUpdated src/ai-safety/index.ts:\n- Imported and wired detectSecretLeakageFromMessages into orchestrator\n- Re-exported detector functions for external use\n- Replaced stub with real implementation\n\nTesting:\n- Build passes ✅\n- Verified with sample commit containing OpenAI key\n- Correctly detected, masked (sk-12345***), and marked as critical\n- Message-based detection working (1 secret found)","created_at":"2025-12-28T17:18:42Z"}]}
21
+ {"id":"vibe-check-vn7","title":"AI Safety tests and documentation","description":"Unit tests for each detector, integration test for orchestrator. Update CLAUDE.md and README.md with AI safety features. Target \u003e80% coverage.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T12:07:26.586099-05:00","created_by":"fullerbt","updated_at":"2025-12-28T13:35:48.191735-05:00","closed_at":"2025-12-28T13:35:48.191735-05:00","close_reason":"31 tests + documentation for AI Safety module","dependencies":[{"issue_id":"vibe-check-vn7","depends_on_id":"vibe-check-gon","type":"blocks","created_at":"2025-12-28T12:07:42.428834-05:00","created_by":"daemon"}]}
@@ -0,0 +1,4 @@
1
+ {
2
+ "database": "beads.db",
3
+ "jsonl_export": "issues.jsonl"
4
+ }
package/.gitattributes ADDED
@@ -0,0 +1,3 @@
1
+
2
+ # Use bd merge for beads JSONL files
3
+ .beads/issues.jsonl merge=beads
package/AGENTS.md ADDED
@@ -0,0 +1,40 @@
1
+ # Agent Instructions
2
+
3
+ This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started.
4
+
5
+ ## Quick Reference
6
+
7
+ ```bash
8
+ bd ready # Find available work
9
+ bd show <id> # View issue details
10
+ bd update <id> --status in_progress # Claim work
11
+ bd close <id> # Complete work
12
+ bd sync # Sync with git
13
+ ```
14
+
15
+ ## Landing the Plane (Session Completion)
16
+
17
+ **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
18
+
19
+ **MANDATORY WORKFLOW:**
20
+
21
+ 1. **File issues for remaining work** - Create issues for anything that needs follow-up
22
+ 2. **Run quality gates** (if code changed) - Tests, linters, builds
23
+ 3. **Update issue status** - Close finished work, update in-progress items
24
+ 4. **PUSH TO REMOTE** - This is MANDATORY:
25
+ ```bash
26
+ git pull --rebase
27
+ bd sync
28
+ git push
29
+ git status # MUST show "up to date with origin"
30
+ ```
31
+ 5. **Clean up** - Clear stashes, prune remote branches
32
+ 6. **Verify** - All changes committed AND pushed
33
+ 7. **Hand off** - Provide context for next session
34
+
35
+ **CRITICAL RULES:**
36
+ - Work is NOT complete until `git push` succeeds
37
+ - NEVER stop before pushing - that leaves work stranded locally
38
+ - NEVER say "ready to push when you are" - YOU must push
39
+ - If push fails, resolve and retry until it succeeds
40
+
package/CHANGELOG.md CHANGED
@@ -7,6 +7,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.4.0] - 2025-12-29
11
+
12
+ ### Added
13
+
14
+ - **Complexity Driver Architecture** - Shell-based drivers for language-specific complexity analysis
15
+ - **Python Driver** (`drivers/python.sh`) - Wraps [radon](https://radon.readthedocs.io/) for cyclomatic complexity
16
+ - **JavaScript/TypeScript Driver** (`drivers/javascript.sh`) - Wraps [cyclomatic-complexity](https://github.com/pilotpirxie/cyclomatic-complexity)
17
+ - **Go Driver** (`drivers/go.sh`) - Wraps [gocyclo](https://github.com/fzipp/gocyclo)
18
+ - **Rust Driver** (`drivers/rust.sh`) - Wraps [rust-code-analysis](https://mozilla.github.io/rust-code-analysis/)
19
+ - **PHP Driver** (`drivers/php.sh`) - Wraps [PHPMD](https://phpmd.org/)
20
+ - **Java Driver** (`drivers/java.sh`) - Wraps [PMD](https://pmd.github.io/)
21
+ - All drivers output unified `ComplexityReport` JSON schema
22
+ - Grade thresholds: A (1-5), B (6-10), C (11-20), D (21-30), E (31-40), F (41+)
23
+
24
+ - **CLI Integration** - `vibe-check driver <language> [directory]` command
25
+ - Runs any driver and outputs JSON
26
+ - Helpful error messages when tools not installed
27
+
28
+ - **Modularity Integration** - `--with-complexity <driver>` flag for modularity command
29
+ - Combines complexity data with module analysis
30
+ - Weighted scoring includes complexity grades
31
+
32
+ ### Developer
33
+
34
+ - 6 shell drivers in `drivers/` directory
35
+ - `drivers/README.md` with installation and usage docs
36
+
37
+ ## [2.3.0] - 2025-12-28
38
+
39
+ ### Added
40
+
41
+ - **AI Safety Detection Module** - Detects LLM-specific security antipatterns in commit history
42
+ - **Secret Leakage Detector** - Scans commits for exposed credentials
43
+ - 8 patterns: OpenAI API keys, GitHub PATs, GitLab PATs, AWS keys, Slack tokens, generic secrets
44
+ - Two modes: full diff scanning (async) and message-only scanning (sync)
45
+ - Masks secrets in output (first 8 chars + `***`)
46
+ - Critical severity for high-value secrets (API keys, tokens)
47
+ - **Scope Violation Detector** - Detects files modified outside declared scope
48
+ - Configure via `.vibe-check/scope.yaml` with glob patterns
49
+ - Supports allowed patterns, directories, and exceptions
50
+ - Uses minimatch for flexible pattern matching
51
+ - **Contract Drift Detector** - Tracks commit message format compliance
52
+ - Scores commits against conventional commit format (0-100)
53
+ - Detects issues: missing_type, invalid_type, vague_message, too_short, etc.
54
+ - Calculates baseline vs current compliance with trend detection
55
+ - Configurable drift threshold (default: 30%)
56
+ - **Token Spiral Estimator** - Estimates token usage and detects explosions
57
+ - Three estimation methods: char_count, lines, diff_size
58
+ - Baseline from first 5 commits, explosion at >2x baseline
59
+ - Indicators: large_diff, many_files, massive_additions, bulk_additions
60
+
61
+ - **Watch Mode Integration** - Real-time secret detection with severity-based alerts
62
+ - Rate-limited alerts via commit:pattern:file tracking
63
+ - Red/bold for critical secrets, yellow for warnings
64
+
65
+ - **Session Integration** - AI Safety included in session end metrics
66
+ - New `ai_safety` section in JSON output
67
+ - Terminal output with health status and recommendations
68
+
69
+ ### Changed
70
+
71
+ - `analyzeAISafety()` orchestrator runs all 4 detectors and aggregates results
72
+ - Added `minimatch` and `js-yaml` dependencies for scope configuration
73
+
74
+ ### Developer
75
+
76
+ - 31 new unit and integration tests for AI Safety module
77
+ - Updated CLAUDE.md with AI Safety documentation and architecture
78
+
10
79
  ## [2.2.1] - 2025-12-27
11
80
 
12
81
  ### Added
package/CLAUDE.md CHANGED
@@ -169,6 +169,13 @@ src/
169
169
  │ ├── context-amnesia.ts # Context Amnesia detector
170
170
  │ ├── instruction-drift.ts # Instruction Drift detector
171
171
  │ └── logging-only.ts # Debug Loop Spiral detector
172
+ ├── ai-safety/
173
+ │ ├── index.ts # AI Safety orchestrator
174
+ │ ├── types.ts # AI Safety types and config
175
+ │ ├── secret-leakage.ts # Secret/credential detection
176
+ │ ├── scope-violation.ts # Scope boundary detection
177
+ │ ├── contract-drift.ts # Commit format compliance
178
+ │ └── token-spiral.ts # Token usage estimation
172
179
  ├── analyzers/
173
180
  │ ├── audit.ts # Codebase audit (monoliths, test gaps, TODOs)
174
181
  │ ├── eldritch.ts # Eldritch horror detector (oversized functions)
@@ -337,6 +344,74 @@ EMERGENCY PROTOCOL: Multiple inner loop failures detected.
337
344
  STOP → git status → backup → start simple
338
345
  ```
339
346
 
347
+ ## AI Safety Detection
348
+
349
+ vibe-check detects LLM-specific security antipatterns in commit history:
350
+
351
+ | Detector | Detects | Severity |
352
+ |----------|---------|----------|
353
+ | **Secret Leakage** | API keys, tokens, credentials in commits | Critical |
354
+ | **Scope Violation** | Files modified outside declared scope | Warning |
355
+ | **Contract Drift** | Commit message format degrading | Warning |
356
+ | **Token Spiral** | Token usage explosion (>2x baseline) | Advisory |
357
+
358
+ ### Secret Patterns Detected
359
+
360
+ - OpenAI API Keys (`sk-...`)
361
+ - GitHub Personal Access Tokens (`ghp_...`)
362
+ - GitLab Personal Access Tokens (`glpat-...`)
363
+ - AWS Access Keys (`AKIA...`)
364
+ - Slack Tokens (`xox...`)
365
+ - Generic API keys and passwords
366
+
367
+ ### Scope Configuration
368
+
369
+ Define allowed scope in `.vibe-check/scope.yaml`:
370
+
371
+ ```yaml
372
+ scope:
373
+ allowed_patterns:
374
+ - "src/feature/**"
375
+ - "tests/feature/**"
376
+ allowed_dirs:
377
+ - "src/feature"
378
+ description: "Only modify feature module"
379
+ exceptions:
380
+ - "package.json"
381
+ - "*.md"
382
+ ```
383
+
384
+ ### Integration Points
385
+
386
+ **Session End Output:**
387
+ ```json
388
+ {
389
+ "ai_safety": {
390
+ "health": "healthy",
391
+ "issues_detected": 0,
392
+ "secrets_leaked": 0,
393
+ "scope_violations": 0,
394
+ "contract_drift_detected": false,
395
+ "token_spiral_detected": false,
396
+ "recommendations": []
397
+ }
398
+ }
399
+ ```
400
+
401
+ **Watch Mode:** Real-time secret detection with severity-based alerts.
402
+
403
+ ### Architecture
404
+
405
+ ```
406
+ src/ai-safety/
407
+ ├── index.ts # Orchestrator and exports
408
+ ├── types.ts # Types, patterns, config
409
+ ├── secret-leakage.ts # Secret/credential detection
410
+ ├── scope-violation.ts # Scope boundary enforcement
411
+ ├── contract-drift.ts # Commit format compliance
412
+ └── token-spiral.ts # Token usage estimation
413
+ ```
414
+
340
415
  ---
341
416
 
342
417
  # Vibe-Coding Methodology
package/README.md CHANGED
@@ -222,6 +222,77 @@ vibe-check modularity --verbose # Detailed breakdown with metrics
222
222
  vibe-check modularity -f json # JSON output for CI integration
223
223
  ```
224
224
 
225
+ #### Complexity Analysis (v2.3.0)
226
+
227
+ Modularity analysis can now integrate **cyclomatic complexity** data from language-specific tools to identify truly problematic code—not just large files, but complex ones.
228
+
229
+ **Quick Start:**
230
+
231
+ ```bash
232
+ # Python projects (requires: pip install radon)
233
+ vibe-check modularity --with-complexity python
234
+
235
+ # Use existing complexity data
236
+ vibe-check modularity --complexity-file .vibe-check/complexity.json
237
+
238
+ # Generate complexity data only
239
+ vibe-check driver python ./src > complexity.json
240
+ ```
241
+
242
+ **How It Works:**
243
+
244
+ vibe-check uses a **driver architecture** to stay language-agnostic while leveraging language-specific complexity tools:
245
+
246
+ ```
247
+ vibe-check (kernel) ← reads .vibe-check/complexity.json
248
+
249
+ │ Standard JSON schema
250
+
251
+ Drivers (python, javascript, etc.)
252
+
253
+ │ Tool-specific format
254
+
255
+ Tools (radon, complexity-report, etc.)
256
+ ```
257
+
258
+ **Complexity Grading:**
259
+
260
+ All drivers normalize to standard grades:
261
+
262
+ | Grade | Complexity | Score Impact | Meaning |
263
+ |-------|------------|--------------|---------|
264
+ | A | 1-5 | **+2 bonus** | Simple, low risk |
265
+ | B | 6-10 | **+2 bonus** | Slightly complex, acceptable |
266
+ | C | 11-20 | **-1 penalty** | Complex, consider refactoring |
267
+ | D | 21-30 | **-2 penalty** | Very complex, refactor |
268
+ | E | 31-40 | **-2 penalty** | Extremely complex, high risk |
269
+ | F | 41+ | **-4 penalty** | Unmaintainable, must refactor |
270
+
271
+ **Available Drivers:**
272
+
273
+ - **Python** (`drivers/python.sh`) — wraps [radon](https://radon.readthedocs.io/)
274
+ - **JavaScript/TypeScript** (`drivers/javascript.sh`) — wraps [cyclomatic-complexity](https://github.com/pilotpirxie/cyclomatic-complexity)
275
+ - **Go** (`drivers/go.sh`) — wraps [gocyclo](https://github.com/fzipp/gocyclo)
276
+ - **Rust** (`drivers/rust.sh`) — wraps [rust-code-analysis](https://mozilla.github.io/rust-code-analysis/)
277
+ - **PHP** (`drivers/php.sh`) — wraps [PHPMD](https://phpmd.org/)
278
+ - **Java** (`drivers/java.sh`) — wraps [PMD](https://pmd.github.io/)
279
+
280
+ See `drivers/README.md` for driver authoring guide.
281
+
282
+ **Example Output:**
283
+
284
+ ```
285
+ 📐 Modularity Analysis
286
+ ────────────────────────────────────────────────────────────
287
+ Analyzed 47 files (12,453 lines)
288
+ Average modularity score: 7.2/10
289
+ ✓ Complexity data integrated
290
+
291
+ ⚠️ Files Needing Attention (3):
292
+ 5/10 src/sync.py 1,117 lines [store]
293
+ ⚠ extreme complexity (F), ⚠ no sections/organization
294
+ ```
295
+
225
296
  #### Audit Command (v2.2.0)
226
297
 
227
298
  The `audit` command now includes **Eldritch Horror Detection**—identifying oversized functions that are symptomatic of AI-generated code gone wrong:
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Contract Drift Detector
3
+ *
4
+ * Tracks commit message format compliance over time.
5
+ * Detects degradation from conventional commits format.
6
+ * Reports drift percentage and trend.
7
+ */
8
+ import { Commit } from '../types.js';
9
+ import { ContractDriftResult, AISafetyConfig } from './types.js';
10
+ /**
11
+ * Detect contract drift in commit messages.
12
+ */
13
+ export declare function detectContractDrift(commits: Commit[], config?: Partial<AISafetyConfig>): ContractDriftResult;
14
+ //# sourceMappingURL=contract-drift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-drift.d.ts","sourceRoot":"","sources":["../../src/ai-safety/contract-drift.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACf,MAAM,YAAY,CAAC;AA8IpB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,GAAE,OAAO,CAAC,cAAc,CAAM,GACnC,mBAAmB,CAsHrB"}