@hivehub/rulebook 5.8.1 → 6.0.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.
- package/README.md +86 -216
- package/dist/cli/commands/claude.d.ts.map +1 -1
- package/dist/cli/commands/claude.js +10 -4
- package/dist/cli/commands/claude.js.map +1 -1
- package/dist/cli/commands/context-intelligence.d.ts.map +1 -1
- package/dist/cli/commands/context-intelligence.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -2
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +16 -91
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/misc.d.ts +0 -1
- package/dist/cli/commands/misc.d.ts.map +1 -1
- package/dist/cli/commands/misc.js +0 -76
- package/dist/cli/commands/misc.js.map +1 -1
- package/dist/cli/commands/plans.d.ts.map +1 -1
- package/dist/cli/commands/plans.js.map +1 -1
- package/dist/cli/commands/skills.d.ts.map +1 -1
- package/dist/cli/commands/skills.js +6 -2
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +3 -1
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/update.d.ts +7 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +61 -165
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/workspace.d.ts.map +1 -1
- package/dist/cli/commands/workspace.js +4 -3
- package/dist/cli/commands/workspace.js.map +1 -1
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +0 -40
- package/dist/cli/prompts.js.map +1 -1
- package/dist/core/claude/claude-mcp.d.ts.map +1 -1
- package/dist/core/claude/claude-mcp.js +1 -1
- package/dist/core/claude/claude-mcp.js.map +1 -1
- package/dist/core/claude/claude-md-generator.d.ts.map +1 -1
- package/dist/core/claude/claude-md-generator.js.map +1 -1
- package/dist/core/claude/claude-settings-manager.d.ts.map +1 -1
- package/dist/core/claude/claude-settings-manager.js +9 -6
- package/dist/core/claude/claude-settings-manager.js.map +1 -1
- package/dist/core/custom-templates.d.ts.map +1 -1
- package/dist/core/custom-templates.js.map +1 -1
- package/dist/core/detect/detector.d.ts +0 -28
- package/dist/core/detect/detector.d.ts.map +1 -1
- package/dist/core/detect/detector.js +5 -84
- package/dist/core/detect/detector.js.map +1 -1
- package/dist/core/detect/library-registry.d.ts.map +1 -1
- package/dist/core/detect/library-registry.js.map +1 -1
- package/dist/core/docs/docs-generator.d.ts.map +1 -1
- package/dist/core/docs/docs-generator.js.map +1 -1
- package/dist/core/docs/mcp-reference-generator.d.ts.map +1 -1
- package/dist/core/docs/mcp-reference-generator.js.map +1 -1
- package/dist/core/generators/generator.d.ts.map +1 -1
- package/dist/core/generators/generator.js +0 -72
- package/dist/core/generators/generator.js.map +1 -1
- package/dist/core/generators/gitignore-generator.d.ts.map +1 -1
- package/dist/core/generators/gitignore-generator.js +12 -1
- package/dist/core/generators/gitignore-generator.js.map +1 -1
- package/dist/core/generators/minimal-scaffolder.d.ts.map +1 -1
- package/dist/core/generators/minimal-scaffolder.js.map +1 -1
- package/dist/core/generators/rules-generator.d.ts.map +1 -1
- package/dist/core/generators/rules-generator.js.map +1 -1
- package/dist/core/generators/workflow-generator.d.ts +0 -10
- package/dist/core/generators/workflow-generator.d.ts.map +1 -1
- package/dist/core/generators/workflow-generator.js +0 -307
- package/dist/core/generators/workflow-generator.js.map +1 -1
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js.map +1 -1
- package/dist/core/merger.d.ts.map +1 -1
- package/dist/core/merger.js.map +1 -1
- package/dist/core/migrator.d.ts.map +1 -1
- package/dist/core/migrator.js +2 -1
- package/dist/core/migrator.js.map +1 -1
- package/dist/core/quality/coverage-checker.d.ts.map +1 -1
- package/dist/core/quality/coverage-checker.js.map +1 -1
- package/dist/core/quality/dependency-checker.d.ts.map +1 -1
- package/dist/core/quality/dependency-checker.js +3 -1
- package/dist/core/quality/dependency-checker.js.map +1 -1
- package/dist/core/quality/doctor.d.ts.map +1 -1
- package/dist/core/quality/doctor.js.map +1 -1
- package/dist/core/quality/validator.d.ts.map +1 -1
- package/dist/core/quality/validator.js.map +1 -1
- package/dist/core/rule-engine.d.ts +5 -21
- package/dist/core/rule-engine.d.ts.map +1 -1
- package/dist/core/rule-engine.js +9 -191
- package/dist/core/rule-engine.js.map +1 -1
- package/dist/core/skills/skills-manager.d.ts.map +1 -1
- package/dist/core/skills/skills-manager.js.map +1 -1
- package/dist/core/state/config-manager.d.ts.map +1 -1
- package/dist/core/state/config-manager.js +6 -50
- package/dist/core/state/config-manager.js.map +1 -1
- package/dist/core/state/override-manager.js.map +1 -1
- package/dist/core/state/state-writer.d.ts.map +1 -1
- package/dist/core/state/state-writer.js.map +1 -1
- package/dist/core/state/version-bumper.d.ts.map +1 -1
- package/dist/core/state/version-bumper.js.map +1 -1
- package/dist/core/tasks/decision-manager.d.ts.map +1 -1
- package/dist/core/tasks/decision-manager.js +6 -1
- package/dist/core/tasks/decision-manager.js.map +1 -1
- package/dist/core/tasks/knowledge-manager.d.ts.map +1 -1
- package/dist/core/tasks/knowledge-manager.js.map +1 -1
- package/dist/core/tasks/learn-manager.d.ts.map +1 -1
- package/dist/core/tasks/learn-manager.js.map +1 -1
- package/dist/core/tasks/plans-manager.d.ts.map +1 -1
- package/dist/core/tasks/plans-manager.js.map +1 -1
- package/dist/core/tasks/task-manager.d.ts.map +1 -1
- package/dist/core/tasks/task-manager.js.map +1 -1
- package/dist/core/workspace/legacy-migrator.d.ts.map +1 -1
- package/dist/core/workspace/legacy-migrator.js.map +1 -1
- package/dist/core/workspace/project-worker.d.ts +0 -4
- package/dist/core/workspace/project-worker.d.ts.map +1 -1
- package/dist/core/workspace/project-worker.js +0 -28
- package/dist/core/workspace/project-worker.js.map +1 -1
- package/dist/core/workspace/workspace-manager.d.ts +0 -11
- package/dist/core/workspace/workspace-manager.d.ts.map +1 -1
- package/dist/core/workspace/workspace-manager.js +6 -30
- package/dist/core/workspace/workspace-manager.js.map +1 -1
- package/dist/core/workspace/workspace-types.d.ts +0 -1
- package/dist/core/workspace/workspace-types.d.ts.map +1 -1
- package/dist/hooks/safe-flag-io.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -82
- package/dist/index.js.map +1 -1
- package/dist/mcp/rulebook-server.d.ts.map +1 -1
- package/dist/mcp/rulebook-server.js +55 -1634
- package/dist/mcp/rulebook-server.js.map +1 -1
- package/dist/mcp/tools/context.d.ts +23 -0
- package/dist/mcp/tools/context.d.ts.map +1 -0
- package/dist/mcp/tools/context.js +2 -0
- package/dist/mcp/tools/context.js.map +1 -0
- package/dist/mcp/tools/decision-tools.d.ts +5 -0
- package/dist/mcp/tools/decision-tools.d.ts.map +1 -0
- package/dist/mcp/tools/decision-tools.js +220 -0
- package/dist/mcp/tools/decision-tools.js.map +1 -0
- package/dist/mcp/tools/knowledge-tools.d.ts +5 -0
- package/dist/mcp/tools/knowledge-tools.d.ts.map +1 -0
- package/dist/mcp/tools/knowledge-tools.js +157 -0
- package/dist/mcp/tools/knowledge-tools.js.map +1 -0
- package/dist/mcp/tools/learn-tools.d.ts +5 -0
- package/dist/mcp/tools/learn-tools.d.ts.map +1 -0
- package/dist/mcp/tools/learn-tools.js +150 -0
- package/dist/mcp/tools/learn-tools.js.map +1 -0
- package/dist/mcp/tools/rules-tools.d.ts +4 -0
- package/dist/mcp/tools/rules-tools.d.ts.map +1 -0
- package/dist/mcp/tools/rules-tools.js +47 -0
- package/dist/mcp/tools/rules-tools.js.map +1 -0
- package/dist/mcp/tools/skill-tools.d.ts +5 -0
- package/dist/mcp/tools/skill-tools.d.ts.map +1 -0
- package/dist/mcp/tools/skill-tools.js +330 -0
- package/dist/mcp/tools/skill-tools.js.map +1 -0
- package/dist/mcp/tools/task-tools.d.ts +5 -0
- package/dist/mcp/tools/task-tools.d.ts.map +1 -0
- package/dist/mcp/tools/task-tools.js +185 -0
- package/dist/mcp/tools/task-tools.js.map +1 -0
- package/dist/mcp/tools/workspace-tools.d.ts +6 -0
- package/dist/mcp/tools/workspace-tools.d.ts.map +1 -0
- package/dist/mcp/tools/workspace-tools.js +118 -0
- package/dist/mcp/tools/workspace-tools.js.map +1 -0
- package/dist/types.d.ts +1 -46
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/git-hooks.d.ts.map +1 -1
- package/dist/utils/git-hooks.js.map +1 -1
- package/dist/utils/gitignore.d.ts.map +1 -1
- package/dist/utils/gitignore.js.map +1 -1
- package/dist/utils/rulesignore.d.ts.map +1 -1
- package/dist/utils/rulesignore.js.map +1 -1
- package/package.json +25 -27
- package/templates/agents/architect.md +51 -51
- package/templates/agents/build-engineer.md +36 -36
- package/templates/agents/code-reviewer.md +47 -47
- package/templates/agents/docs-writer.md +38 -38
- package/templates/agents/implementer.md +42 -42
- package/templates/agents/performance-engineer.md +49 -49
- package/templates/agents/researcher.md +38 -38
- package/templates/agents/security-reviewer.md +40 -40
- package/templates/agents/team-lead.md +37 -37
- package/templates/agents/tester.md +48 -48
- package/templates/ci/rulebook-review.yml +26 -26
- package/templates/claude-workflows/review-fanout.js +2 -2
- package/templates/claude-workflows/rulebook-driver.js +16 -4
- package/templates/cli/CLAUDE.md +102 -117
- package/templates/cli/_GENERIC_TEMPLATE.md +29 -29
- package/templates/commands/rulebook-decision-create.md +55 -55
- package/templates/commands/rulebook-decision-list.md +15 -15
- package/templates/commands/rulebook-knowledge-add.md +41 -41
- package/templates/commands/rulebook-knowledge-list.md +15 -15
- package/templates/commands/rulebook-learn-capture.md +1 -2
- package/templates/commands/rulebook-task-apply.md +67 -67
- package/templates/commands/rulebook-task-archive.md +94 -94
- package/templates/commands/rulebook-task-create.md +93 -93
- package/templates/commands/rulebook-task-list.md +42 -42
- package/templates/commands/rulebook-task-show.md +52 -52
- package/templates/commands/rulebook-task-validate.md +53 -53
- package/templates/compact-context/_default.md +23 -23
- package/templates/compact-context/cpp.md +26 -26
- package/templates/compact-context/go.md +26 -26
- package/templates/compact-context/python.md +26 -26
- package/templates/compact-context/rust.md +28 -28
- package/templates/compact-context/typescript.md +29 -29
- package/templates/core/AGENTS_LEAN.md +4 -9
- package/templates/core/AGENTS_OVERRIDE.md +16 -16
- package/templates/core/AGENT_AUTOMATION.md +273 -296
- package/templates/core/CLAUDE_MD_v2.md +85 -90
- package/templates/core/DAG.md +304 -304
- package/templates/core/DECISIONS.md +38 -38
- package/templates/core/DOCUMENTATION_RULES.md +36 -36
- package/templates/core/KNOWLEDGE.md +49 -49
- package/templates/core/MULTI_AGENT.md +74 -74
- package/templates/core/PLANS.md +28 -28
- package/templates/core/QUALITY_ENFORCEMENT.md +68 -68
- package/templates/core/RULEBOOK.md +1936 -1947
- package/templates/core/TIER1_PROHIBITIONS.md +154 -154
- package/templates/core/TOKEN_OPTIMIZATION.md +49 -49
- package/templates/core/WORKSPACE.md +4 -8
- package/templates/git/CI_CD_PATTERNS.md +661 -661
- package/templates/git/GITHUB_ACTIONS.md +728 -728
- package/templates/git/GITLAB_CI.md +730 -730
- package/templates/git/GIT_WORKFLOW.md +1192 -1192
- package/templates/git/SECRETS_MANAGEMENT.md +585 -585
- package/templates/hooks/COMMIT_MSG.md +530 -530
- package/templates/hooks/POST_CHECKOUT.md +546 -546
- package/templates/hooks/PREPARE_COMMIT_MSG.md +619 -619
- package/templates/hooks/PRE_COMMIT.md +414 -414
- package/templates/hooks/PRE_PUSH.md +601 -601
- package/templates/hooks/enforce-pre-tool.sh +26 -9
- package/templates/hooks/update-check.ps1 +84 -84
- package/templates/hooks/update-check.sh +45 -21
- package/templates/languages/C.md +333 -333
- package/templates/languages/CPP.md +743 -743
- package/templates/languages/CSHARP.md +417 -417
- package/templates/languages/ELIXIR.md +454 -454
- package/templates/languages/ERLANG.md +361 -361
- package/templates/languages/GO.md +645 -645
- package/templates/languages/HASKELL.md +177 -177
- package/templates/languages/JAVA.md +607 -607
- package/templates/languages/JAVASCRIPT.md +631 -631
- package/templates/languages/JULIA.md +97 -97
- package/templates/languages/KOTLIN.md +511 -511
- package/templates/languages/LISP.md +100 -100
- package/templates/languages/LUA.md +74 -74
- package/templates/languages/OBJECTIVEC.md +90 -90
- package/templates/languages/PHP.md +416 -416
- package/templates/languages/PYTHON.md +682 -682
- package/templates/languages/RUBY.md +421 -421
- package/templates/languages/RUST.md +477 -477
- package/templates/languages/SAS.md +73 -73
- package/templates/languages/SCALA.md +348 -348
- package/templates/languages/SOLIDITY.md +580 -580
- package/templates/languages/SQL.md +137 -137
- package/templates/languages/SWIFT.md +466 -466
- package/templates/languages/TYPESCRIPT.md +591 -591
- package/templates/languages/ZIG.md +265 -265
- package/templates/modules/CONTEXT7.md +54 -54
- package/templates/modules/GITHUB_MCP.md +64 -64
- package/templates/modules/PLAYWRIGHT.md +90 -90
- package/templates/modules/RULEBOOK_MCP.md +208 -208
- package/templates/modules/SERENA.md +337 -337
- package/templates/modules/SUPABASE.md +223 -223
- package/templates/modules/SYNAP.md +69 -69
- package/templates/modules/VECTORIZER.md +63 -63
- package/templates/modules/sequential-thinking.md +42 -42
- package/templates/rules/consult-analysis-before-implementing.md +21 -23
- package/templates/rules/cpp.md +46 -46
- package/templates/rules/csharp.md +44 -44
- package/templates/rules/diagnostic-first.md +39 -39
- package/templates/rules/fail-twice-escalate.md +46 -46
- package/templates/rules/follow-task-sequence.md +36 -36
- package/templates/rules/git-safety.md +29 -29
- package/templates/rules/go.md +40 -40
- package/templates/rules/incremental-implementation.md +56 -56
- package/templates/rules/incremental-tests.md +29 -29
- package/templates/rules/java.md +43 -43
- package/templates/rules/javascript.md +39 -39
- package/templates/rules/knowledge-base-usage.md +41 -41
- package/templates/rules/multi-agent-teams.md +75 -75
- package/templates/rules/no-deferred.md +31 -31
- package/templates/rules/no-shortcuts.md +30 -30
- package/templates/rules/python.md +43 -43
- package/templates/rules/research-first.md +30 -30
- package/templates/rules/respect-handoff-trigger.md +41 -41
- package/templates/rules/rust.md +40 -40
- package/templates/rules/sequential-editing.md +21 -21
- package/templates/rules/session-workflow.md +24 -24
- package/templates/rules/task-decomposition.md +32 -32
- package/templates/rules/typescript.md +40 -40
- package/templates/skills/cli/claude/SKILL.md +42 -42
- package/templates/skills/core/agent-automation/SKILL.md +194 -194
- package/templates/skills/core/dag/SKILL.md +314 -314
- package/templates/skills/core/documentation-rules/SKILL.md +46 -46
- package/templates/skills/core/quality-enforcement/SKILL.md +78 -78
- package/templates/skills/core/rulebook/SKILL.md +176 -176
- package/templates/skills/core/rulebook-terse/SKILL.md +116 -116
- package/templates/skills/core/rulebook-terse-commit/SKILL.md +96 -96
- package/templates/skills/core/rulebook-terse-review/SKILL.md +112 -112
- package/templates/skills/dev/accessibility/SKILL.md +17 -17
- package/templates/skills/dev/analysis/SKILL.md +19 -19
- package/templates/skills/dev/api-design/SKILL.md +15 -15
- package/templates/skills/dev/architect/SKILL.md +17 -17
- package/templates/skills/dev/build-fix/SKILL.md +17 -17
- package/templates/skills/dev/db-design/SKILL.md +15 -15
- package/templates/skills/dev/debug/SKILL.md +16 -16
- package/templates/skills/dev/deploy/SKILL.md +17 -17
- package/templates/skills/dev/docs/SKILL.md +17 -17
- package/templates/skills/dev/handoff/SKILL.md +27 -27
- package/templates/skills/dev/migrate/SKILL.md +15 -15
- package/templates/skills/dev/perf/SKILL.md +17 -17
- package/templates/skills/dev/refactor/SKILL.md +17 -17
- package/templates/skills/dev/research/SKILL.md +14 -14
- package/templates/skills/dev/review/SKILL.md +18 -18
- package/templates/skills/dev/security-audit/SKILL.md +17 -17
- package/templates/skills/languages/c/SKILL.md +343 -343
- package/templates/skills/languages/cpp/SKILL.md +753 -753
- package/templates/skills/languages/csharp/SKILL.md +427 -427
- package/templates/skills/languages/elixir/SKILL.md +464 -464
- package/templates/skills/languages/erlang/SKILL.md +371 -371
- package/templates/skills/languages/go/SKILL.md +655 -655
- package/templates/skills/languages/haskell/SKILL.md +187 -187
- package/templates/skills/languages/java/SKILL.md +617 -617
- package/templates/skills/languages/javascript/SKILL.md +641 -641
- package/templates/skills/languages/julia/SKILL.md +107 -107
- package/templates/skills/languages/kotlin/SKILL.md +521 -521
- package/templates/skills/languages/lisp/SKILL.md +110 -110
- package/templates/skills/languages/lua/SKILL.md +84 -84
- package/templates/skills/languages/objectivec/SKILL.md +100 -100
- package/templates/skills/languages/php/SKILL.md +426 -426
- package/templates/skills/languages/python/SKILL.md +692 -692
- package/templates/skills/languages/ruby/SKILL.md +431 -431
- package/templates/skills/languages/rust/SKILL.md +487 -487
- package/templates/skills/languages/sas/SKILL.md +83 -83
- package/templates/skills/languages/scala/SKILL.md +358 -358
- package/templates/skills/languages/solidity/SKILL.md +590 -590
- package/templates/skills/languages/sql/SKILL.md +147 -147
- package/templates/skills/languages/swift/SKILL.md +476 -476
- package/templates/skills/languages/typescript/SKILL.md +302 -302
- package/templates/skills/languages/zig/SKILL.md +275 -275
- package/templates/skills/modules/context7/SKILL.md +64 -64
- package/templates/skills/modules/github-mcp/SKILL.md +74 -74
- package/templates/skills/modules/playwright/SKILL.md +100 -100
- package/templates/skills/modules/rulebook-mcp/SKILL.md +166 -166
- package/templates/skills/modules/serena/SKILL.md +347 -347
- package/templates/skills/modules/supabase/SKILL.md +233 -233
- package/templates/skills/modules/synap/SKILL.md +79 -79
- package/templates/skills/modules/vectorizer/SKILL.md +73 -73
- package/.claude/commands/analysis.md +0 -35
- package/.claude/commands/continue.md +0 -33
- package/.claude/commands/rulebook-decision-create.md +0 -55
- package/.claude/commands/rulebook-decision-list.md +0 -15
- package/.claude/commands/rulebook-knowledge-add.md +0 -41
- package/.claude/commands/rulebook-knowledge-list.md +0 -15
- package/.claude/commands/rulebook-learn-capture.md +0 -41
- package/.claude/commands/rulebook-learn-list.md +0 -13
- package/.claude/commands/rulebook-memory-save.md +0 -48
- package/.claude/commands/rulebook-memory-search.md +0 -47
- package/.claude/commands/rulebook-task-apply.md +0 -67
- package/.claude/commands/rulebook-task-archive.md +0 -94
- package/.claude/commands/rulebook-task-create.md +0 -93
- package/.claude/commands/rulebook-task-list.md +0 -42
- package/.claude/commands/rulebook-task-show.md +0 -52
- package/.claude/commands/rulebook-task-validate.md +0 -53
- package/.claude-plugin/marketplace.json +0 -28
- package/.claude-plugin/plugin.json +0 -8
- package/dist/agents/claude-code.d.ts +0 -69
- package/dist/agents/claude-code.d.ts.map +0 -1
- package/dist/agents/claude-code.js +0 -180
- package/dist/agents/claude-code.js.map +0 -1
- package/dist/agents/cursor-agent.d.ts +0 -184
- package/dist/agents/cursor-agent.d.ts.map +0 -1
- package/dist/agents/cursor-agent.js +0 -299
- package/dist/agents/cursor-agent.js.map +0 -1
- package/dist/agents/gemini-cli.d.ts +0 -69
- package/dist/agents/gemini-cli.d.ts.map +0 -1
- package/dist/agents/gemini-cli.js +0 -180
- package/dist/agents/gemini-cli.js.map +0 -1
- package/dist/cli/commands/memory.d.ts +0 -30
- package/dist/cli/commands/memory.d.ts.map +0 -1
- package/dist/cli/commands/memory.js +0 -259
- package/dist/cli/commands/memory.js.map +0 -1
- package/dist/core/console/cli-bridge.d.ts +0 -113
- package/dist/core/console/cli-bridge.d.ts.map +0 -1
- package/dist/core/console/cli-bridge.js +0 -1094
- package/dist/core/console/cli-bridge.js.map +0 -1
- package/dist/core/ide/multi-tool-generator.d.ts +0 -59
- package/dist/core/ide/multi-tool-generator.d.ts.map +0 -1
- package/dist/core/ide/multi-tool-generator.js +0 -157
- package/dist/core/ide/multi-tool-generator.js.map +0 -1
- package/dist/core/ide/opencode-generator.d.ts +0 -72
- package/dist/core/ide/opencode-generator.d.ts.map +0 -1
- package/dist/core/ide/opencode-generator.js +0 -450
- package/dist/core/ide/opencode-generator.js.map +0 -1
- package/dist/core/indexer/background-indexer.d.ts +0 -35
- package/dist/core/indexer/background-indexer.d.ts.map +0 -1
- package/dist/core/indexer/background-indexer.js +0 -267
- package/dist/core/indexer/background-indexer.js.map +0 -1
- package/dist/core/indexer/file-parser.d.ts +0 -28
- package/dist/core/indexer/file-parser.d.ts.map +0 -1
- package/dist/core/indexer/file-parser.js +0 -171
- package/dist/core/indexer/file-parser.js.map +0 -1
- package/dist/core/indexer/indexer-types.d.ts +0 -37
- package/dist/core/indexer/indexer-types.d.ts.map +0 -1
- package/dist/core/indexer/indexer-types.js +0 -8
- package/dist/core/indexer/indexer-types.js.map +0 -1
- package/dist/memory/file-search.d.ts +0 -43
- package/dist/memory/file-search.d.ts.map +0 -1
- package/dist/memory/file-search.js +0 -228
- package/dist/memory/file-search.js.map +0 -1
- package/dist/memory/file-store.d.ts +0 -99
- package/dist/memory/file-store.d.ts.map +0 -1
- package/dist/memory/file-store.js +0 -615
- package/dist/memory/file-store.js.map +0 -1
- package/dist/memory/legacy-migrator.d.ts +0 -27
- package/dist/memory/legacy-migrator.d.ts.map +0 -1
- package/dist/memory/legacy-migrator.js +0 -185
- package/dist/memory/legacy-migrator.js.map +0 -1
- package/dist/memory/memory-hooks.d.ts +0 -48
- package/dist/memory/memory-hooks.d.ts.map +0 -1
- package/dist/memory/memory-hooks.js +0 -248
- package/dist/memory/memory-hooks.js.map +0 -1
- package/dist/memory/memory-manager.d.ts +0 -65
- package/dist/memory/memory-manager.d.ts.map +0 -1
- package/dist/memory/memory-manager.js +0 -223
- package/dist/memory/memory-manager.js.map +0 -1
- package/dist/memory/memory-types.d.ts +0 -85
- package/dist/memory/memory-types.d.ts.map +0 -1
- package/dist/memory/memory-types.js +0 -7
- package/dist/memory/memory-types.js.map +0 -1
- package/templates/agents/accessibility-reviewer.md +0 -43
- package/templates/agents/api-designer.md +0 -42
- package/templates/agents/compiler/codegen-debugger.md +0 -34
- package/templates/agents/compiler/stdlib-engineer.md +0 -28
- package/templates/agents/compiler/test-coverage-guardian.md +0 -31
- package/templates/agents/context-intelligence.md +0 -50
- package/templates/agents/database-architect.md +0 -41
- package/templates/agents/devops-engineer.md +0 -42
- package/templates/agents/game-engine/cpp-core-expert.md +0 -35
- package/templates/agents/game-engine/render-engineer.md +0 -22
- package/templates/agents/game-engine/shader-engineer.md +0 -38
- package/templates/agents/game-engine/systems-integration.md +0 -43
- package/templates/agents/generic/code-reviewer.md +0 -41
- package/templates/agents/generic/docs-writer.md +0 -25
- package/templates/agents/generic/project-manager.md +0 -36
- package/templates/agents/generic/researcher.md +0 -34
- package/templates/agents/generic/test-engineer.md +0 -41
- package/templates/agents/i18n-engineer.md +0 -42
- package/templates/agents/migration-engineer.md +0 -42
- package/templates/agents/mobile/platform-specialist.md +0 -22
- package/templates/agents/mobile/ui-engineer.md +0 -22
- package/templates/agents/project-manager.md +0 -217
- package/templates/agents/refactoring-agent.md +0 -41
- package/templates/agents/ux-reviewer.md +0 -43
- package/templates/agents/web-app/api-designer.md +0 -22
- package/templates/agents/web-app/backend-engineer.md +0 -30
- package/templates/agents/web-app/database-engineer.md +0 -22
- package/templates/agents/web-app/frontend-engineer.md +0 -29
- package/templates/agents/web-app/security-reviewer.md +0 -32
- package/templates/cli/AIDER.md +0 -49
- package/templates/cli/AMAZON_Q.md +0 -25
- package/templates/cli/AUGGIE.md +0 -32
- package/templates/cli/CLINE.md +0 -99
- package/templates/cli/CODEBUDDY.md +0 -20
- package/templates/cli/CODEIUM.md +0 -20
- package/templates/cli/CODEX.md +0 -21
- package/templates/cli/CONTINUE.md +0 -34
- package/templates/cli/CURSOR_CLI.md +0 -62
- package/templates/cli/FACTORY.md +0 -18
- package/templates/cli/GEMINI.md +0 -35
- package/templates/cli/KILOCODE.md +0 -18
- package/templates/cli/OPENCODE.md +0 -85
- package/templates/cli/gemini-extension.json +0 -77
- package/templates/commands/rulebook-memory-save.md +0 -48
- package/templates/commands/rulebook-memory-search.md +0 -47
- package/templates/ides/CONTINUE_RULES.md +0 -16
- package/templates/ides/COPILOT_INSTRUCTIONS.md +0 -23
- package/templates/ides/GEMINI_RULES.md +0 -17
- package/templates/ides/OPENCODE.md +0 -63
- package/templates/ides/WINDSURF_RULES.md +0 -14
- package/templates/modules/ATLASSIAN.md +0 -255
- package/templates/modules/FIGMA.md +0 -267
- package/templates/modules/GRAFANA.md +0 -328
- package/templates/modules/MEMORY.md +0 -126
- package/templates/modules/NOTION.md +0 -247
- package/templates/skills/cli/aider/SKILL.md +0 -59
- package/templates/skills/cli/amazon-q/SKILL.md +0 -35
- package/templates/skills/cli/auggie/SKILL.md +0 -42
- package/templates/skills/cli/cline/SKILL.md +0 -42
- package/templates/skills/cli/codebuddy/SKILL.md +0 -30
- package/templates/skills/cli/codeium/SKILL.md +0 -30
- package/templates/skills/cli/codex/SKILL.md +0 -31
- package/templates/skills/cli/continue/SKILL.md +0 -44
- package/templates/skills/cli/cursor-cli/SKILL.md +0 -38
- package/templates/skills/cli/factory/SKILL.md +0 -28
- package/templates/skills/cli/gemini/SKILL.md +0 -45
- package/templates/skills/cli/kilocode/SKILL.md +0 -28
- package/templates/skills/cli/opencode/SKILL.md +0 -82
- package/templates/skills/ides/copilot/SKILL.md +0 -47
- package/templates/skills/ides/cursor/SKILL.md +0 -53
- package/templates/skills/ides/jetbrains-ai/SKILL.md +0 -45
- package/templates/skills/ides/replit/SKILL.md +0 -46
- package/templates/skills/ides/tabnine/SKILL.md +0 -39
- package/templates/skills/ides/vscode/SKILL.md +0 -50
- package/templates/skills/ides/windsurf/SKILL.md +0 -46
- package/templates/skills/ides/zed/SKILL.md +0 -42
- package/templates/skills/modules/atlassian/SKILL.md +0 -265
- package/templates/skills/modules/figma/SKILL.md +0 -277
- package/templates/skills/modules/grafana/SKILL.md +0 -338
- package/templates/skills/modules/memory/SKILL.md +0 -73
- package/templates/skills/modules/notion/SKILL.md +0 -257
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory Manager - File-backed orchestrator (v5.6).
|
|
3
|
-
*
|
|
4
|
-
* Public API kept stable for callers (saveMemory, searchMemories,
|
|
5
|
-
* getTimeline, getFullDetails, startSession, endSession, getStats,
|
|
6
|
-
* cleanup, exportMemories, plus the indexer code-graph methods).
|
|
7
|
-
*
|
|
8
|
-
* Internally uses the FileStore + FileSearch implementations under
|
|
9
|
-
* `.rulebook/memory/{memories,sessions,codegraph}/...` instead of
|
|
10
|
-
* SQLite + HNSW. On startup, an existing legacy `memory.db` is
|
|
11
|
-
* auto-detected and migrated to markdown one time, then renamed to
|
|
12
|
-
* `memory.db.legacy`.
|
|
13
|
-
*/
|
|
14
|
-
import { randomUUID } from 'crypto';
|
|
15
|
-
import { existsSync } from 'fs';
|
|
16
|
-
import { rename } from 'fs/promises';
|
|
17
|
-
import { join, dirname } from 'path';
|
|
18
|
-
import { FileStore } from './file-store.js';
|
|
19
|
-
import { FileSearch } from './file-search.js';
|
|
20
|
-
const DEFAULT_DB_PATH = '.rulebook/memory/memory.db';
|
|
21
|
-
const DEFAULT_MAX_SIZE = 524288000; // 500MB — kept for getStats compatibility
|
|
22
|
-
const PRIVATE_TAG_REGEX = /<private>[\s\S]*?<\/private>/g;
|
|
23
|
-
export class MemoryManager {
|
|
24
|
-
store = null;
|
|
25
|
-
search = null;
|
|
26
|
-
initialized = false;
|
|
27
|
-
migrated = false;
|
|
28
|
-
/** Resolved root for the file-based store (sibling of legacy `memory.db`). */
|
|
29
|
-
memoryRoot;
|
|
30
|
-
/** Path to the legacy DB file, used for one-shot migration on first init. */
|
|
31
|
-
legacyDbPath;
|
|
32
|
-
maxSizeBytes;
|
|
33
|
-
constructor(projectRoot, config) {
|
|
34
|
-
const dbRel = config.dbPath ?? DEFAULT_DB_PATH;
|
|
35
|
-
const dbAbs = join(projectRoot, dbRel);
|
|
36
|
-
this.legacyDbPath = dbAbs;
|
|
37
|
-
this.memoryRoot = dirname(dbAbs);
|
|
38
|
-
this.maxSizeBytes = config.maxSizeBytes ?? DEFAULT_MAX_SIZE;
|
|
39
|
-
}
|
|
40
|
-
initPromise = null;
|
|
41
|
-
async ensureInitialized() {
|
|
42
|
-
if (this.initialized)
|
|
43
|
-
return;
|
|
44
|
-
if (!this.initPromise) {
|
|
45
|
-
this.initPromise = this.doInit().catch((err) => {
|
|
46
|
-
this.initPromise = null;
|
|
47
|
-
throw err;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
await this.initPromise;
|
|
51
|
-
}
|
|
52
|
-
async doInit() {
|
|
53
|
-
this.store = new FileStore(this.memoryRoot);
|
|
54
|
-
await this.store.initialize();
|
|
55
|
-
this.search = new FileSearch(this.store);
|
|
56
|
-
// One-shot legacy DB migration. The runtime never reads SQLite again.
|
|
57
|
-
if (!this.migrated && existsSync(this.legacyDbPath)) {
|
|
58
|
-
try {
|
|
59
|
-
const { migrateLegacyDb } = await import('./legacy-migrator.js');
|
|
60
|
-
await migrateLegacyDb(this.legacyDbPath, this.store);
|
|
61
|
-
await rename(this.legacyDbPath, this.legacyDbPath + '.legacy');
|
|
62
|
-
this.store.invalidateCaches();
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
// Non-fatal: surface but keep the manager functional.
|
|
66
|
-
console.error('[MemoryManager] legacy DB migration failed; continuing with file-only store:', err instanceof Error ? err.message : String(err));
|
|
67
|
-
}
|
|
68
|
-
this.migrated = true;
|
|
69
|
-
}
|
|
70
|
-
this.initialized = true;
|
|
71
|
-
}
|
|
72
|
-
filterPrivate(content) {
|
|
73
|
-
return content.replace(PRIVATE_TAG_REGEX, '[REDACTED]');
|
|
74
|
-
}
|
|
75
|
-
// ── public API ─────────────────────────────────────────────────────
|
|
76
|
-
async saveMemory(input) {
|
|
77
|
-
await this.ensureInitialized();
|
|
78
|
-
const now = Date.now();
|
|
79
|
-
const memory = {
|
|
80
|
-
id: randomUUID(),
|
|
81
|
-
type: input.type,
|
|
82
|
-
title: input.title,
|
|
83
|
-
summary: input.summary,
|
|
84
|
-
content: this.filterPrivate(input.content),
|
|
85
|
-
project: input.project ?? '',
|
|
86
|
-
tags: input.tags ?? [],
|
|
87
|
-
sessionId: input.sessionId,
|
|
88
|
-
createdAt: now,
|
|
89
|
-
updatedAt: now,
|
|
90
|
-
accessedAt: now,
|
|
91
|
-
};
|
|
92
|
-
await this.store.saveMemory(memory);
|
|
93
|
-
// Refresh the inverted-index sidecar lazily for large corpora.
|
|
94
|
-
try {
|
|
95
|
-
await this.search.maybeRebuildIndex();
|
|
96
|
-
}
|
|
97
|
-
catch {
|
|
98
|
-
// non-fatal — search falls back to in-memory build per call
|
|
99
|
-
}
|
|
100
|
-
return memory;
|
|
101
|
-
}
|
|
102
|
-
async getMemory(id) {
|
|
103
|
-
await this.ensureInitialized();
|
|
104
|
-
const memory = await this.store.getMemory(id);
|
|
105
|
-
if (memory)
|
|
106
|
-
await this.store.updateAccessedAt(id);
|
|
107
|
-
return memory;
|
|
108
|
-
}
|
|
109
|
-
async deleteMemory(id) {
|
|
110
|
-
await this.ensureInitialized();
|
|
111
|
-
await this.store.deleteMemory(id);
|
|
112
|
-
}
|
|
113
|
-
async searchMemories(options) {
|
|
114
|
-
await this.ensureInitialized();
|
|
115
|
-
return this.search.search(options);
|
|
116
|
-
}
|
|
117
|
-
async getTimeline(memoryId, window = 5) {
|
|
118
|
-
await this.ensureInitialized();
|
|
119
|
-
return this.search.getTimeline(memoryId, window);
|
|
120
|
-
}
|
|
121
|
-
async getFullDetails(ids) {
|
|
122
|
-
await this.ensureInitialized();
|
|
123
|
-
return this.search.getFullDetails(ids);
|
|
124
|
-
}
|
|
125
|
-
async startSession(project) {
|
|
126
|
-
await this.ensureInitialized();
|
|
127
|
-
const session = {
|
|
128
|
-
id: randomUUID(),
|
|
129
|
-
project,
|
|
130
|
-
status: 'active',
|
|
131
|
-
startedAt: Date.now(),
|
|
132
|
-
toolCalls: 0,
|
|
133
|
-
};
|
|
134
|
-
await this.store.saveSession(session);
|
|
135
|
-
return session;
|
|
136
|
-
}
|
|
137
|
-
async endSession(sessionId, summary) {
|
|
138
|
-
await this.ensureInitialized();
|
|
139
|
-
const existing = await this.store.getSession(sessionId);
|
|
140
|
-
if (!existing)
|
|
141
|
-
return;
|
|
142
|
-
existing.status = 'completed';
|
|
143
|
-
existing.endedAt = Date.now();
|
|
144
|
-
if (summary !== undefined)
|
|
145
|
-
existing.summary = summary;
|
|
146
|
-
await this.store.saveSession(existing);
|
|
147
|
-
}
|
|
148
|
-
async getStats() {
|
|
149
|
-
await this.ensureInitialized();
|
|
150
|
-
const stats = await this.store.getStats();
|
|
151
|
-
return {
|
|
152
|
-
dbSizeBytes: stats.totalBytes,
|
|
153
|
-
memoryCount: stats.memoryCount,
|
|
154
|
-
sessionCount: stats.sessionCount,
|
|
155
|
-
fileCount: stats.fileCount,
|
|
156
|
-
oldestMemory: stats.oldestMemory,
|
|
157
|
-
newestMemory: stats.newestMemory,
|
|
158
|
-
maxSizeBytes: this.maxSizeBytes,
|
|
159
|
-
usagePercent: this.maxSizeBytes > 0 ? (stats.totalBytes / this.maxSizeBytes) * 100 : 0,
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Age-based retention. With no `maxAgeDays` arg, this is a no-op (the
|
|
164
|
-
* legacy LRU byte-budget eviction was removed in v5.6).
|
|
165
|
-
*/
|
|
166
|
-
async cleanup(arg) {
|
|
167
|
-
await this.ensureInitialized();
|
|
168
|
-
const maxAgeDays = typeof arg === 'object' && arg !== null ? arg.maxAgeDays : undefined;
|
|
169
|
-
if (maxAgeDays === undefined || maxAgeDays <= 0) {
|
|
170
|
-
return { evictedCount: 0, freedBytes: 0 };
|
|
171
|
-
}
|
|
172
|
-
const cutoff = Date.now() - maxAgeDays * 24 * 60 * 60 * 1000;
|
|
173
|
-
const all = await this.store.listAllMemories();
|
|
174
|
-
let evicted = 0;
|
|
175
|
-
let freed = 0;
|
|
176
|
-
const before = (await this.store.getStats()).totalBytes;
|
|
177
|
-
for (const m of all) {
|
|
178
|
-
if (m.createdAt < cutoff) {
|
|
179
|
-
await this.store.deleteMemory(m.id);
|
|
180
|
-
evicted++;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const after = (await this.store.getStats()).totalBytes;
|
|
184
|
-
freed = Math.max(0, before - after);
|
|
185
|
-
return { evictedCount: evicted, freedBytes: freed };
|
|
186
|
-
}
|
|
187
|
-
async exportMemories(format = 'json') {
|
|
188
|
-
await this.ensureInitialized();
|
|
189
|
-
const memories = await this.store.listMemories({ limit: 10000 });
|
|
190
|
-
if (format === 'csv') {
|
|
191
|
-
const header = 'id,type,title,content,project,tags,createdAt,updatedAt';
|
|
192
|
-
const rows = memories.map((m) => `"${m.id}","${m.type}","${m.title.replace(/"/g, '""')}","${m.content.replace(/"/g, '""')}","${m.project}","${m.tags.join(';')}",${m.createdAt},${m.updatedAt}`);
|
|
193
|
-
return [header, ...rows].join('\n');
|
|
194
|
-
}
|
|
195
|
-
return JSON.stringify(memories, null, 2);
|
|
196
|
-
}
|
|
197
|
-
// ── background indexer code-graph (JSONL log) ─────────────────────
|
|
198
|
-
async saveCodeNode(node) {
|
|
199
|
-
await this.ensureInitialized();
|
|
200
|
-
const existing = await this.store.getCodeNodeHash(node.id);
|
|
201
|
-
if (existing === node.hash)
|
|
202
|
-
return;
|
|
203
|
-
await this.store.appendCodeNode(node);
|
|
204
|
-
}
|
|
205
|
-
async saveCodeEdge(edge) {
|
|
206
|
-
await this.ensureInitialized();
|
|
207
|
-
await this.store.appendCodeEdge(edge);
|
|
208
|
-
}
|
|
209
|
-
async deleteCodeNodesByFile(filePath) {
|
|
210
|
-
await this.ensureInitialized();
|
|
211
|
-
await this.store.deleteCodeNodesByFile(filePath);
|
|
212
|
-
}
|
|
213
|
-
async close() {
|
|
214
|
-
this.initialized = false;
|
|
215
|
-
this.store = null;
|
|
216
|
-
this.search = null;
|
|
217
|
-
this.initPromise = null;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
export function createMemoryManager(projectRoot, config) {
|
|
221
|
-
return new MemoryManager(projectRoot, config);
|
|
222
|
-
}
|
|
223
|
-
//# sourceMappingURL=memory-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-manager.js","sourceRoot":"","sources":["../../src/memory/memory-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAa9C,MAAM,eAAe,GAAG,4BAA4B,CAAC;AACrD,MAAM,gBAAgB,GAAG,SAAS,CAAC,CAAC,0CAA0C;AAE9E,MAAM,iBAAiB,GAAG,+BAA+B,CAAC;AAE1D,MAAM,OAAO,aAAa;IAChB,KAAK,GAAqB,IAAI,CAAC;IAC/B,MAAM,GAAsB,IAAI,CAAC;IACjC,WAAW,GAAG,KAAK,CAAC;IACpB,QAAQ,GAAG,KAAK,CAAC;IAEzB,8EAA8E;IAC7D,UAAU,CAAS;IACpC,6EAA6E;IAC5D,YAAY,CAAS;IACrB,YAAY,CAAS;IAEtC,YAAY,WAAmB,EAAE,MAAoB;QACnD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,eAAe,CAAC;QAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,gBAAgB,CAAC;IAC9D,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iB,EAAE,CAAC;QAC/B,MAAM,IAAI,CAAC,KAAM,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,UAAU,mBAAmB,CAAC,WAAmB,EAAE,MAAoB;IAC3E,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory System Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Core types for the persistent memory system with BM25 + HNSW hybrid search.
|
|
5
|
-
*/
|
|
6
|
-
export type MemoryType = 'bugfix' | 'feature' | 'refactor' | 'decision' | 'discovery' | 'change' | 'observation';
|
|
7
|
-
export type SearchMode = 'bm25' | 'vector' | 'hybrid';
|
|
8
|
-
export interface Memory {
|
|
9
|
-
id: string;
|
|
10
|
-
type: MemoryType;
|
|
11
|
-
title: string;
|
|
12
|
-
summary?: string;
|
|
13
|
-
content: string;
|
|
14
|
-
project: string;
|
|
15
|
-
tags: string[];
|
|
16
|
-
sessionId?: string;
|
|
17
|
-
createdAt: number;
|
|
18
|
-
updatedAt: number;
|
|
19
|
-
accessedAt: number;
|
|
20
|
-
}
|
|
21
|
-
export interface MemorySession {
|
|
22
|
-
id: string;
|
|
23
|
-
project: string;
|
|
24
|
-
status: 'active' | 'completed';
|
|
25
|
-
startedAt: number;
|
|
26
|
-
endedAt?: number;
|
|
27
|
-
summary?: string;
|
|
28
|
-
toolCalls: number;
|
|
29
|
-
}
|
|
30
|
-
export interface MemorySearchResult {
|
|
31
|
-
id: string;
|
|
32
|
-
title: string;
|
|
33
|
-
type: MemoryType;
|
|
34
|
-
score: number;
|
|
35
|
-
matchType: 'bm25' | 'vector' | 'both';
|
|
36
|
-
createdAt: number;
|
|
37
|
-
}
|
|
38
|
-
export interface MemorySearchOptions {
|
|
39
|
-
query: string;
|
|
40
|
-
mode?: SearchMode;
|
|
41
|
-
type?: MemoryType;
|
|
42
|
-
limit?: number;
|
|
43
|
-
project?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface MemoryConfig {
|
|
46
|
-
enabled?: boolean;
|
|
47
|
-
dbPath?: string;
|
|
48
|
-
maxSizeBytes?: number;
|
|
49
|
-
autoCapture?: boolean;
|
|
50
|
-
vectorDimensions?: number;
|
|
51
|
-
}
|
|
52
|
-
export interface MemoryStats {
|
|
53
|
-
dbSizeBytes: number;
|
|
54
|
-
memoryCount: number;
|
|
55
|
-
sessionCount: number;
|
|
56
|
-
fileCount: number;
|
|
57
|
-
oldestMemory?: number;
|
|
58
|
-
newestMemory?: number;
|
|
59
|
-
maxSizeBytes: number;
|
|
60
|
-
usagePercent: number;
|
|
61
|
-
}
|
|
62
|
-
export interface TimelineEntry {
|
|
63
|
-
id: string;
|
|
64
|
-
title: string;
|
|
65
|
-
type: MemoryType;
|
|
66
|
-
createdAt: number;
|
|
67
|
-
position: 'before' | 'anchor' | 'after';
|
|
68
|
-
distanceFromAnchor: number;
|
|
69
|
-
}
|
|
70
|
-
export interface GraphSearchOptions {
|
|
71
|
-
nodeId: string;
|
|
72
|
-
maxDept?: number;
|
|
73
|
-
edgeTypes?: string[];
|
|
74
|
-
}
|
|
75
|
-
export interface GraphSearchResult {
|
|
76
|
-
nodeId: string;
|
|
77
|
-
nodeName: string;
|
|
78
|
-
filePath: string;
|
|
79
|
-
connectedEdges: {
|
|
80
|
-
targetId: string;
|
|
81
|
-
type: string;
|
|
82
|
-
weight: number;
|
|
83
|
-
}[];
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=memory-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-types.js","sourceRoot":"","sources":["../../src/memory/memory-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: accessibility-reviewer
|
|
3
|
-
model: haiku
|
|
4
|
-
description: Reviews WCAG compliance, ARIA, semantic HTML, and screen reader compatibility. Use for accessibility audits.
|
|
5
|
-
tools: Read, Glob, Grep, Bash
|
|
6
|
-
disallowedTools: Write, Edit
|
|
7
|
-
maxTurns: 15
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Responsibilities
|
|
11
|
-
|
|
12
|
-
- Audit UI components against WCAG 2.1 AA criteria
|
|
13
|
-
- Verify correct ARIA roles, properties, and states on interactive elements
|
|
14
|
-
- Ensure semantic HTML structure with logical heading hierarchy
|
|
15
|
-
- Validate keyboard navigation: focus order, visible focus indicators, no focus traps
|
|
16
|
-
- Review color contrast ratios for text and meaningful graphics
|
|
17
|
-
|
|
18
|
-
## Workflow
|
|
19
|
-
|
|
20
|
-
1. Run automated scan with axe-core or Lighthouse; capture violations list
|
|
21
|
-
2. Manually test keyboard-only navigation through all interactive flows
|
|
22
|
-
3. Check heading hierarchy (`h1`→`h2`→`h3`) for logical document structure
|
|
23
|
-
4. Verify all images have descriptive `alt` text; decorative images use `alt=""`
|
|
24
|
-
5. Test with a screen reader (NVDA, VoiceOver) on primary user flows
|
|
25
|
-
6. Validate color contrast: 4.5:1 for normal text, 3:1 for large text and UI components
|
|
26
|
-
7. Confirm form inputs have associated `<label>` or `aria-labelledby`
|
|
27
|
-
8. Document each finding with WCAG criterion, severity, and remediation steps
|
|
28
|
-
|
|
29
|
-
## Standards
|
|
30
|
-
|
|
31
|
-
- Target: WCAG 2.1 Level AA compliance minimum
|
|
32
|
-
- Severity levels: Critical (blocks access), Major (impedes access), Minor (best practice)
|
|
33
|
-
- Interactive elements: must have accessible name, role, and state
|
|
34
|
-
- Motion: respect `prefers-reduced-motion` media query
|
|
35
|
-
- Timeouts: warn user 20 seconds before expiry; allow extension
|
|
36
|
-
|
|
37
|
-
## Rules
|
|
38
|
-
|
|
39
|
-
- Automated tools find ~30% of issues; manual testing is mandatory
|
|
40
|
-
- `aria-label` must not duplicate visible text unless disambiguation is needed
|
|
41
|
-
- Never use `tabindex` values greater than 0
|
|
42
|
-
- Color must not be the sole means of conveying information
|
|
43
|
-
- Every finding must cite the specific WCAG success criterion
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-designer
|
|
3
|
-
model: sonnet
|
|
4
|
-
description: Designs REST/GraphQL APIs, writes OpenAPI specs, and reviews endpoint consistency. Use when designing or reviewing APIs.
|
|
5
|
-
tools: Read, Glob, Grep, Edit, Write
|
|
6
|
-
maxTurns: 20
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Responsibilities
|
|
10
|
-
|
|
11
|
-
- Design REST or GraphQL APIs following industry conventions
|
|
12
|
-
- Produce OpenAPI 3.1 specifications with complete request/response schemas
|
|
13
|
-
- Define versioning strategy and deprecation lifecycle
|
|
14
|
-
- Specify authentication, authorization, and rate-limiting policies
|
|
15
|
-
- Review existing endpoints for consistency, naming, and error response structure
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
1. Gather resource requirements and identify domain entities and relationships
|
|
20
|
-
2. Define URL structure, HTTP methods, and status codes for each resource
|
|
21
|
-
3. Write OpenAPI 3.1 spec with request bodies, response schemas, and error models
|
|
22
|
-
4. Define pagination strategy (cursor-based preferred over offset for large datasets)
|
|
23
|
-
5. Specify rate limiting tiers: per-user, per-IP, and per-endpoint limits
|
|
24
|
-
6. Document authentication flows (OAuth2, API keys, JWT) with example headers
|
|
25
|
-
7. Review for consistency: naming, casing, error shape, and HTTP semantics
|
|
26
|
-
8. Produce changelog entry for any breaking change with migration guide
|
|
27
|
-
|
|
28
|
-
## Standards
|
|
29
|
-
|
|
30
|
-
- Resource names: plural nouns in kebab-case (`/user-profiles`, not `/getUsers`)
|
|
31
|
-
- HTTP status codes used semantically: 200, 201, 204, 400, 401, 403, 404, 409, 422, 429, 500
|
|
32
|
-
- Error response shape: `{ "error": { "code": string, "message": string, "details"?: object } }`
|
|
33
|
-
- Versioning: URL path prefix (`/v1/`) for REST; `@deprecated` directive for GraphQL
|
|
34
|
-
- All endpoints require explicit auth policy documented in the OpenAPI spec
|
|
35
|
-
|
|
36
|
-
## Rules
|
|
37
|
-
|
|
38
|
-
- Breaking changes require a new API version; never modify existing versioned contracts
|
|
39
|
-
- All input fields must be validated and documented with constraints in the spec
|
|
40
|
-
- Sensitive data must never appear in URL path or query parameters
|
|
41
|
-
- Pagination must be present on all list endpoints returning more than 20 items
|
|
42
|
-
- Rate limit headers (`X-RateLimit-*`) must be returned on every response
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: codegen-debugger
|
|
3
|
-
domain: codegen
|
|
4
|
-
filePatterns: ["*codegen*", "*emit*", "*ir*", "*llvm*", "*mir*"]
|
|
5
|
-
tier: core
|
|
6
|
-
model: opus
|
|
7
|
-
description: "Compiler code generation debugging — IR comparison, type mismatches, codegen state"
|
|
8
|
-
checklist:
|
|
9
|
-
- "Was a minimal reproduction created in .sandbox/?"
|
|
10
|
-
- "Was the reference compiler IR compared side-by-side?"
|
|
11
|
-
- "Was the root cause identified (not just symptoms)?"
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
You are a codegen debugging specialist. You trace values through compilation pipelines to find root causes.
|
|
15
|
-
|
|
16
|
-
## Methodology: Reference IR Comparison
|
|
17
|
-
|
|
18
|
-
1. **Write equivalent code** in `.sandbox/temp_<feature>.rs` (reference) + `.sandbox/temp_<feature>.<lang>` (project)
|
|
19
|
-
2. **Generate IR** from both compilers
|
|
20
|
-
3. **Compare function-by-function**: instruction count, type layouts, alloca patterns
|
|
21
|
-
4. **Fix codegen** to match or exceed reference quality
|
|
22
|
-
|
|
23
|
-
## Common Bug Categories
|
|
24
|
-
|
|
25
|
-
1. **State leakage** — codegen object retains state between different code generation tasks
|
|
26
|
-
2. **Type mismatch** — generated IR type doesn't match expected type
|
|
27
|
-
3. **Missing monomorphization** — generic types not properly specialized
|
|
28
|
-
4. **Stale cache** — cached values from previous compilation not invalidated
|
|
29
|
-
|
|
30
|
-
## Rules
|
|
31
|
-
|
|
32
|
-
- Create minimal reproductions — never debug in full test suite
|
|
33
|
-
- Run tests ONCE, save output, grep the file multiple times
|
|
34
|
-
- Track fixes in agent memory for pattern recognition across sessions
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: stdlib-engineer
|
|
3
|
-
domain: stdlib
|
|
4
|
-
filePatterns: ["lib/**", "stdlib/**", "std/**", "runtime/**"]
|
|
5
|
-
tier: core
|
|
6
|
-
model: opus
|
|
7
|
-
description: "Standard library implementation — pure language code, FFI bridges, test coverage"
|
|
8
|
-
checklist:
|
|
9
|
-
- "Was the language reference consulted before implementing?"
|
|
10
|
-
- "Are existing abstractions used instead of raw primitives?"
|
|
11
|
-
- "Is test coverage complete for the new code?"
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
You are a standard library engineer. You implement correct, efficient library code.
|
|
15
|
-
|
|
16
|
-
## Core Rules
|
|
17
|
-
|
|
18
|
-
1. **Consult the reference** — 500+ types and thousands of functions may already exist
|
|
19
|
-
2. **Use existing abstractions** — don't reinvent what's already implemented
|
|
20
|
-
3. **Pure language preferred** — minimize FFI to C/C++ unless necessary
|
|
21
|
-
4. **Incremental tests** — write 1-3 tests at a time, run immediately
|
|
22
|
-
5. **Complete coverage** — every public function must be tested
|
|
23
|
-
|
|
24
|
-
## FFI Tiers (when external code is needed)
|
|
25
|
-
|
|
26
|
-
1. **Pure language** — STRONGLY PREFERRED
|
|
27
|
-
2. **FFI to existing C library** — acceptable when performance requires it
|
|
28
|
-
3. **New C/C++ code** — LAST RESORT ONLY
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: test-coverage-guardian
|
|
3
|
-
domain: testing
|
|
4
|
-
filePatterns: ["*.test.*", "tests/**", "*_test.*"]
|
|
5
|
-
tier: standard
|
|
6
|
-
model: sonnet
|
|
7
|
-
description: "Test diagnosis, coverage gap analysis, codegen bug dependency tracking"
|
|
8
|
-
checklist:
|
|
9
|
-
- "Is the failure a test bug, codegen bug, or infrastructure issue?"
|
|
10
|
-
- "Are coverage gaps categorized (codegen bug vs test not written)?"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
You are a test coverage specialist. You diagnose failures and track coverage gaps.
|
|
14
|
-
|
|
15
|
-
## Diagnosis Process
|
|
16
|
-
|
|
17
|
-
1. Run the failing test in isolation
|
|
18
|
-
2. Capture FULL output (run ONCE, save to file)
|
|
19
|
-
3. Categorize: **test bug** | **codegen bug** | **infrastructure** | **not written**
|
|
20
|
-
4. If codegen bug → create `.sandbox/repro.tml` reproduction, delegate to codegen-debugger
|
|
21
|
-
5. If test bug → fix the test
|
|
22
|
-
6. If not written → write the test incrementally
|
|
23
|
-
|
|
24
|
-
## Coverage Gap Categories
|
|
25
|
-
|
|
26
|
-
Track gaps by category to focus effort:
|
|
27
|
-
- **Codegen bugs** — blocked until compiler fix (track dependency)
|
|
28
|
-
- **Runtime crashes** — need investigation
|
|
29
|
-
- **Infrastructure** — test runner issues
|
|
30
|
-
- **Not written** — straightforward work
|
|
31
|
-
- **Untestable** — document why
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context-intelligence
|
|
3
|
-
model: haiku
|
|
4
|
-
description: Manages project decisions, knowledge base, and learnings. Use for capturing ADRs, patterns/anti-patterns, and post-implementation learnings.
|
|
5
|
-
tools: Read, Glob, Grep, Bash, Write, Edit
|
|
6
|
-
maxTurns: 15
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
You are a context-intelligence agent. Your primary responsibility is managing the project's institutional knowledge: decisions, patterns, and learnings.
|
|
10
|
-
|
|
11
|
-
## Responsibilities
|
|
12
|
-
|
|
13
|
-
- Create and manage Architecture Decision Records (ADRs) via `rulebook decision`
|
|
14
|
-
- Add patterns and anti-patterns to the knowledge base via `rulebook knowledge`
|
|
15
|
-
- Capture and promote learnings via `rulebook learn`
|
|
16
|
-
- Ensure decisions have proper context, alternatives, and consequences
|
|
17
|
-
|
|
18
|
-
## Workflow
|
|
19
|
-
|
|
20
|
-
### When creating a decision:
|
|
21
|
-
1. Check existing decisions: `rulebook decision list`
|
|
22
|
-
2. Create: `rulebook decision create "<title>" --context "<context>"`
|
|
23
|
-
3. Enrich the `.rulebook/decisions/NNN-<slug>.md` file with full details
|
|
24
|
-
4. Verify: `rulebook decision show <id>`
|
|
25
|
-
|
|
26
|
-
### When adding knowledge:
|
|
27
|
-
1. Check existing entries: `rulebook knowledge list`
|
|
28
|
-
2. Create: `rulebook knowledge add <pattern|anti-pattern> "<title>" --category <cat>`
|
|
29
|
-
3. Enrich `.rulebook/knowledge/<type>s/<slug>.md` with examples and guidelines
|
|
30
|
-
4. Verify: `rulebook knowledge show <slug>`
|
|
31
|
-
|
|
32
|
-
### When capturing learnings:
|
|
33
|
-
1. Capture: `rulebook learn capture --title "<title>" --content "<content>" --tags "tag1,tag2"`
|
|
34
|
-
2. Promote significant learnings: `rulebook learn promote <id> knowledge|decision`
|
|
35
|
-
|
|
36
|
-
## Standards
|
|
37
|
-
|
|
38
|
-
1. Every decision MUST include context, the decision, alternatives, and consequences
|
|
39
|
-
2. Patterns MUST include concrete code examples (not abstract descriptions)
|
|
40
|
-
3. Anti-patterns MUST explain what to do instead
|
|
41
|
-
4. Learnings should be captured immediately after discovery, not batched
|
|
42
|
-
5. Use descriptive titles — they appear in AGENTS.md for AI context
|
|
43
|
-
|
|
44
|
-
## Rules
|
|
45
|
-
|
|
46
|
-
- Do NOT modify production source code — only `.rulebook/` files
|
|
47
|
-
- Do NOT delete decisions — supersede or deprecate them
|
|
48
|
-
- Knowledge entries auto-appear in AGENTS.md after `rulebook update`
|
|
49
|
-
- Tag all entries for searchability
|
|
50
|
-
- When promoting a learning, verify the promoted entry is complete
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: database-architect
|
|
3
|
-
model: sonnet
|
|
4
|
-
description: Designs database schemas, writes migrations, and optimizes queries. Use for data modeling and database performance.
|
|
5
|
-
tools: Read, Glob, Grep, Edit, Write, Bash
|
|
6
|
-
maxTurns: 20
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Responsibilities
|
|
10
|
-
|
|
11
|
-
- Design normalized schemas with appropriate constraints and relationships
|
|
12
|
-
- Write forward-only migration scripts for schema and data changes
|
|
13
|
-
- Identify slow queries and recommend indexes or query rewrites
|
|
14
|
-
- Define indexing strategies for read-heavy vs. write-heavy workloads
|
|
15
|
-
- Review ORM usage and flag N+1 queries, missing eager loads, or full scans
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
1. Review existing schema for normalization issues, missing constraints, and naming inconsistencies
|
|
20
|
-
2. Identify high-frequency queries using slow query logs or EXPLAIN output
|
|
21
|
-
3. Propose index additions, composite keys, or partial indexes based on query patterns
|
|
22
|
-
4. Draft migration scripts with up and down paths; verify idempotency
|
|
23
|
-
5. Validate migration against a staging dataset before applying to production
|
|
24
|
-
6. Benchmark query performance before and after changes with representative data
|
|
25
|
-
7. Document schema decisions in the migration file header
|
|
26
|
-
|
|
27
|
-
## Standards
|
|
28
|
-
|
|
29
|
-
- Table names: plural, snake_case; column names: snake_case
|
|
30
|
-
- Every table must have a primary key; foreign keys must have explicit constraints
|
|
31
|
-
- Migrations are numbered sequentially and never modified after merge
|
|
32
|
-
- Indexes named as `idx_<table>_<columns>` for clarity
|
|
33
|
-
- Avoid nullable columns for required fields; use NOT NULL with defaults
|
|
34
|
-
|
|
35
|
-
## Rules
|
|
36
|
-
|
|
37
|
-
- Never mutate existing migration files; create a new migration for every change
|
|
38
|
-
- Destructive operations (DROP, TRUNCATE) require a separate, reviewed migration
|
|
39
|
-
- All schema changes must be backward-compatible for at least one release cycle
|
|
40
|
-
- Query optimization proposals must include EXPLAIN/EXPLAIN ANALYZE evidence
|
|
41
|
-
- Avoid stored procedures for business logic; keep logic in {{language}} application code
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devops-engineer
|
|
3
|
-
model: sonnet
|
|
4
|
-
description: Manages CI/CD pipelines, Docker, Kubernetes, and infrastructure as code. Use for deployment and infrastructure tasks.
|
|
5
|
-
tools: Read, Glob, Grep, Edit, Write, Bash
|
|
6
|
-
maxTurns: 25
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Responsibilities
|
|
10
|
-
|
|
11
|
-
- Design and implement CI/CD pipelines for {{language}} projects
|
|
12
|
-
- Write Dockerfiles, docker-compose files, and Kubernetes manifests
|
|
13
|
-
- Define infrastructure as code using Terraform, Pulumi, or CloudFormation
|
|
14
|
-
- Establish deployment strategies: blue/green, canary, rolling updates
|
|
15
|
-
- Configure secrets management, environment promotion, and rollback procedures
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
1. Audit existing pipeline configuration and identify bottlenecks or gaps
|
|
20
|
-
2. Define environment stages: dev, staging, production with promotion gates
|
|
21
|
-
3. Write Dockerfile following multi-stage build best practices
|
|
22
|
-
4. Implement CI pipeline: install, lint, test, build, publish artifact
|
|
23
|
-
5. Implement CD pipeline: pull artifact, deploy, smoke test, notify
|
|
24
|
-
6. Add health checks, readiness probes, and liveness probes to all services
|
|
25
|
-
7. Validate manifests with `kubectl dry-run` or `terraform plan` before applying
|
|
26
|
-
8. Document rollback procedure for every deployment target
|
|
27
|
-
|
|
28
|
-
## Standards
|
|
29
|
-
|
|
30
|
-
- Dockerfile: non-root user, minimal base image, pinned digest tags
|
|
31
|
-
- Kubernetes: resource requests/limits on every container, network policies defined
|
|
32
|
-
- CI pipelines: all steps must be reproducible and idempotent
|
|
33
|
-
- Secrets: never hardcoded, always sourced from vault or secret store
|
|
34
|
-
- Artifacts: versioned by git SHA, immutable once published
|
|
35
|
-
|
|
36
|
-
## Rules
|
|
37
|
-
|
|
38
|
-
- Never commit secrets, tokens, or credentials to source control
|
|
39
|
-
- Every pipeline change must include a documented rollback path
|
|
40
|
-
- Infrastructure changes require a plan review step before apply
|
|
41
|
-
- Use `latest` tag only in development; production must use pinned versions
|
|
42
|
-
- All Kubernetes workloads must declare resource limits
|