sinapse-ai 7.1.0 → 7.3.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/.sinapse-ai/data/entity-registry.yaml +777 -881
- package/.sinapse-ai/data/registry-update-log.jsonl +2 -0
- package/.sinapse-ai/development/agents/sinapse-orqx.md +599 -443
- package/.sinapse-ai/install-manifest.yaml +6 -6
- package/bin/cli.js +116 -75
- package/package.json +2 -1
- package/packages/installer/src/wizard/i18n.js +2 -2
- package/packages/installer/src/wizard/index.js +14 -0
- package/packages/installer/src/wizard/questions.js +3 -3
- package/sinapse/agents/sinapse-orqx.md +32 -14
- package/squads/claude-code-mastery/CHANGELOG.md +22 -0
- package/squads/claude-code-mastery/README.md +146 -0
- package/squads/claude-code-mastery/agents/claude-mastery-chief.md +554 -0
- package/squads/claude-code-mastery/agents/config-engineer.md +865 -0
- package/squads/claude-code-mastery/agents/hooks-architect.md +1013 -0
- package/squads/claude-code-mastery/agents/mcp-integrator.md +791 -0
- package/squads/claude-code-mastery/agents/project-integrator.md +1196 -0
- package/squads/claude-code-mastery/agents/roadmap-sentinel.md +931 -0
- package/squads/claude-code-mastery/agents/skill-craftsman.md +1250 -0
- package/squads/claude-code-mastery/agents/swarm-orqx.md +1008 -0
- package/squads/claude-code-mastery/checklists/agent-team-readiness-checklist.md +88 -0
- package/squads/claude-code-mastery/checklists/brownfield-readiness-checklist.md +91 -0
- package/squads/claude-code-mastery/checklists/change-checklist.md +75 -0
- package/squads/claude-code-mastery/checklists/context-rot-checklist.md +114 -0
- package/squads/claude-code-mastery/checklists/integration-audit-checklist.md +104 -0
- package/squads/claude-code-mastery/checklists/multi-agent-review-checklist.md +77 -0
- package/squads/claude-code-mastery/checklists/pre-push-checklist.md +79 -0
- package/squads/claude-code-mastery/data/ci-cd-patterns.yaml +412 -0
- package/squads/claude-code-mastery/data/claude-code-quick-ref.yaml +314 -0
- package/squads/claude-code-mastery/data/hook-patterns.yaml +512 -0
- package/squads/claude-code-mastery/data/mcp-integration-catalog.yaml +323 -0
- package/squads/claude-code-mastery/data/project-type-signatures.yaml +335 -0
- package/squads/claude-code-mastery/scripts/validate-setup.js +163 -0
- package/squads/claude-code-mastery/squad.yaml +205 -0
- package/squads/claude-code-mastery/tasks/audit-integration.md +219 -0
- package/squads/claude-code-mastery/tasks/audit-settings.md +206 -0
- package/squads/claude-code-mastery/tasks/audit-setup.md +225 -0
- package/squads/claude-code-mastery/tasks/brownfield-setup.md +322 -0
- package/squads/claude-code-mastery/tasks/ci-cd-setup.md +335 -0
- package/squads/claude-code-mastery/tasks/claude-md-engineer.md +334 -0
- package/squads/claude-code-mastery/tasks/configure-claude-code.md +215 -0
- package/squads/claude-code-mastery/tasks/context-rot-audit.md +329 -0
- package/squads/claude-code-mastery/tasks/create-agent-definition.md +278 -0
- package/squads/claude-code-mastery/tasks/create-rules.md +206 -0
- package/squads/claude-code-mastery/tasks/create-team-topology.md +258 -0
- package/squads/claude-code-mastery/tasks/diagnose.md +166 -0
- package/squads/claude-code-mastery/tasks/enterprise-config.md +346 -0
- package/squads/claude-code-mastery/tasks/hook-designer.md +272 -0
- package/squads/claude-code-mastery/tasks/integrate-project.md +304 -0
- package/squads/claude-code-mastery/tasks/mcp-integration-plan.md +229 -0
- package/squads/claude-code-mastery/tasks/mcp-workflow.md +285 -0
- package/squads/claude-code-mastery/tasks/multi-project-setup.md +228 -0
- package/squads/claude-code-mastery/tasks/optimize-context.md +217 -0
- package/squads/claude-code-mastery/tasks/optimize-workflow.md +226 -0
- package/squads/claude-code-mastery/tasks/parallel-decomposition.md +293 -0
- package/squads/claude-code-mastery/tasks/permission-strategy.md +266 -0
- package/squads/claude-code-mastery/tasks/sandbox-setup.md +279 -0
- package/squads/claude-code-mastery/tasks/setup-repository.md +230 -0
- package/squads/claude-code-mastery/tasks/setup-wizard.md +236 -0
- package/squads/claude-code-mastery/tasks/worktree-strategy.md +320 -0
- package/squads/claude-code-mastery/templates/claude-md-fullstack.md +147 -0
- package/squads/claude-code-mastery/templates/claude-md-library.md +175 -0
- package/squads/claude-code-mastery/templates/claude-md-microservices.md +186 -0
- package/squads/claude-code-mastery/templates/claude-md-mobile.md +198 -0
- package/squads/claude-code-mastery/templates/claude-md-monorepo.md +139 -0
- package/squads/claude-code-mastery/templates/github-actions-claude-ci.yml +348 -0
- package/squads/claude-code-mastery/templates/github-actions-claude-review.yml +179 -0
- package/squads/claude-code-mastery/workflows/wf-audit-complete.yaml +140 -0
- package/squads/claude-code-mastery/workflows/wf-knowledge-update.yaml +165 -0
- package/squads/claude-code-mastery/workflows/wf-project-setup.yaml +192 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Agent Team Readiness Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-003
|
|
4
|
+
**Referenced by:** swarm-orqx
|
|
5
|
+
**Purpose:** Pre-spawn validation before launching parallel or sequential agent teams. Ensures task decomposition is sound, agents are configured, isolation is planned, and failure recovery is defined.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - AGENT TEAM READINESS
|
|
8
|
+
|
|
9
|
+
This checklist validates that a multi-agent execution plan is safe
|
|
10
|
+
to launch. It prevents wasted compute, merge conflicts, and orphaned
|
|
11
|
+
work by catching configuration issues before any agent spawns.
|
|
12
|
+
|
|
13
|
+
EXECUTION APPROACH:
|
|
14
|
+
1. Review the task decomposition plan
|
|
15
|
+
2. Validate each agent's configuration and tool access
|
|
16
|
+
3. Confirm isolation strategy prevents conflicts
|
|
17
|
+
4. Verify resource limits and cost estimates
|
|
18
|
+
5. Ensure communication and merge strategies are defined
|
|
19
|
+
6. All CRITICAL items must pass before any agent spawns
|
|
20
|
+
|
|
21
|
+
Spawning agents without validation creates expensive cleanup work.]]
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 1. Task Decomposition
|
|
26
|
+
|
|
27
|
+
- [ ] All subtasks are identified with clear scope boundaries (CRITICAL)
|
|
28
|
+
- [ ] Dependencies between subtasks are mapped (which must finish before others start)
|
|
29
|
+
- [ ] No circular dependencies exist between subtasks (CRITICAL)
|
|
30
|
+
- [ ] Each subtask has a single responsible agent assigned
|
|
31
|
+
- [ ] Subtask outputs are well-defined (files, artifacts, status reports)
|
|
32
|
+
- [ ] Estimated complexity per subtask is documented (small/medium/large)
|
|
33
|
+
- [ ] Parallel-safe subtasks are identified (no shared file modifications)
|
|
34
|
+
|
|
35
|
+
## 2. Agent Configuration
|
|
36
|
+
|
|
37
|
+
- [ ] Agent definition files (.md) exist for every assigned agent (CRITICAL)
|
|
38
|
+
- [ ] Model selection is appropriate for each agent's task complexity
|
|
39
|
+
- [ ] Tool restrictions match each agent's needs (no unnecessary tool access)
|
|
40
|
+
- [ ] Agent personas do not conflict with subtask requirements
|
|
41
|
+
- [ ] System prompts or CLAUDE.md content is compatible with agent roles
|
|
42
|
+
- [ ] Each agent has access to the specific files it needs to read/modify
|
|
43
|
+
|
|
44
|
+
## 3. Isolation Strategy
|
|
45
|
+
|
|
46
|
+
- [ ] Worktree vs shared workspace decision is made and documented (CRITICAL)
|
|
47
|
+
- [ ] Branch naming convention defined (e.g., agent/{agent-id}/{subtask-id})
|
|
48
|
+
- [ ] If shared workspace: file-level locking strategy defined to prevent conflicts
|
|
49
|
+
- [ ] If worktree isolation: base branch for each worktree identified
|
|
50
|
+
- [ ] Agents working on the same codebase have non-overlapping file scopes
|
|
51
|
+
- [ ] Temporary files and build artifacts have agent-specific paths
|
|
52
|
+
|
|
53
|
+
## 4. Resource Planning
|
|
54
|
+
|
|
55
|
+
- [ ] max_turns is set for each agent to prevent runaway execution (CRITICAL)
|
|
56
|
+
- [ ] Background vs foreground execution decided per agent
|
|
57
|
+
- [ ] Total estimated cost calculated across all agents
|
|
58
|
+
- [ ] Cost ceiling defined (max spend before halting)
|
|
59
|
+
- [ ] Timeout limits set for each agent spawn
|
|
60
|
+
- [ ] Memory/context budget per agent assessed (large codebases may hit limits)
|
|
61
|
+
|
|
62
|
+
## 5. Communication Plan
|
|
63
|
+
|
|
64
|
+
- [ ] How agents share intermediate results is defined (files, status files, stdout)
|
|
65
|
+
- [ ] Merge strategy for combining agent outputs is documented (CRITICAL)
|
|
66
|
+
- [ ] Conflict resolution procedure exists for overlapping changes
|
|
67
|
+
- [ ] Status reporting mechanism defined (polling, completion files, events)
|
|
68
|
+
- [ ] Final integration point identified (which agent or process merges everything)
|
|
69
|
+
- [ ] Handoff artifacts between sequential agents are specified
|
|
70
|
+
|
|
71
|
+
## 6. Rollback Plan
|
|
72
|
+
|
|
73
|
+
- [ ] What happens if an individual agent fails is defined (CRITICAL)
|
|
74
|
+
- [ ] Cleanup procedure for failed agent's partial work is documented
|
|
75
|
+
- [ ] Other agents can continue independently if one fails (graceful degradation)
|
|
76
|
+
- [ ] Worktree cleanup command is prepared for post-execution
|
|
77
|
+
- [ ] Git state can be restored to pre-spawn baseline if entire team fails
|
|
78
|
+
- [ ] Orphaned branch detection and cleanup is planned
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## PASS/FAIL Criteria
|
|
83
|
+
|
|
84
|
+
**PASS:** All items marked (CRITICAL) are checked. All agents have valid definitions. Task decomposition has no circular dependencies. Merge strategy is documented.
|
|
85
|
+
|
|
86
|
+
**FAIL:** Any (CRITICAL) item unchecked. Missing agent definition file. Circular dependency detected. No merge strategy defined.
|
|
87
|
+
|
|
88
|
+
**Action on FAIL:** Fix all critical gaps before spawning any agent. If task decomposition has circular dependencies, restructure the plan. If agent definitions are missing, create them first.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Brownfield Readiness Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-006
|
|
4
|
+
**Referenced by:** project-integrator
|
|
5
|
+
**Purpose:** Readiness check before integrating Claude Code into an existing (brownfield) project. Ensures the repository is analyzed, conventions are discovered, sensitive files are mapped, and risks are mitigated.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - BROWNFIELD READINESS
|
|
8
|
+
|
|
9
|
+
This checklist is used BEFORE adding Claude Code configuration to an
|
|
10
|
+
existing project. It ensures we understand the codebase, protect
|
|
11
|
+
sensitive files, and integrate without disrupting existing workflows.
|
|
12
|
+
|
|
13
|
+
EXECUTION APPROACH:
|
|
14
|
+
1. Analyze the repository structure and existing tooling
|
|
15
|
+
2. Discover conventions and patterns already in use
|
|
16
|
+
3. Map ALL sensitive files and secrets
|
|
17
|
+
4. Assess team considerations for configuration choices
|
|
18
|
+
5. Document risks and prepare rollback plan
|
|
19
|
+
6. All CRITICAL items must pass before starting integration
|
|
20
|
+
|
|
21
|
+
Brownfield integration done carelessly exposes secrets and breaks workflows.
|
|
22
|
+
Take the time to understand before modifying.]]
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 1. Repository Analysis
|
|
27
|
+
|
|
28
|
+
- [ ] Git repository is initialized and has commit history
|
|
29
|
+
- [ ] `.gitignore` exists and covers common patterns (node_modules, build output, OS files)
|
|
30
|
+
- [ ] CI/CD pipeline is present (GitHub Actions, GitLab CI, Jenkins, etc.)
|
|
31
|
+
- [ ] Repository has a defined branching strategy (main/develop, trunk-based, etc.)
|
|
32
|
+
- [ ] Package manager is identified (npm, yarn, pnpm, bun) with lockfile present
|
|
33
|
+
- [ ] Build system is identified and functional (`npm run build` or equivalent works)
|
|
34
|
+
- [ ] Project language and framework are documented or identifiable
|
|
35
|
+
|
|
36
|
+
## 2. Existing Tooling
|
|
37
|
+
|
|
38
|
+
- [ ] Linter is configured (ESLint, Prettier, etc.) with existing rules
|
|
39
|
+
- [ ] Test framework is present (Jest, Vitest, Mocha, pytest, etc.)
|
|
40
|
+
- [ ] Code formatting rules are defined and enforced
|
|
41
|
+
- [ ] Pre-commit hooks exist (husky, lint-staged, etc.)
|
|
42
|
+
- [ ] IDE configuration files are present (.vscode/, .idea/, etc.)
|
|
43
|
+
- [ ] Other AI coding tools are configured (Copilot, Cursor rules, etc.)
|
|
44
|
+
|
|
45
|
+
## 3. Convention Discovery
|
|
46
|
+
|
|
47
|
+
- [ ] Naming patterns identified (camelCase, PascalCase, kebab-case for files)
|
|
48
|
+
- [ ] Directory structure mapped (src/, lib/, app/, components/, etc.)
|
|
49
|
+
- [ ] Import style identified (absolute vs relative, path aliases)
|
|
50
|
+
- [ ] Error handling patterns documented (try/catch, Result types, error boundaries)
|
|
51
|
+
- [ ] State management approach identified (if frontend project)
|
|
52
|
+
- [ ] API patterns documented (REST, GraphQL, tRPC, etc.)
|
|
53
|
+
- [ ] Test file naming convention identified (*.test.ts, *.spec.ts, __tests__/)
|
|
54
|
+
|
|
55
|
+
## 4. Sensitive Files
|
|
56
|
+
|
|
57
|
+
- [ ] All `.env` files located and cataloged (CRITICAL)
|
|
58
|
+
- [ ] Credentials files identified (service accounts, API keys, certificates) (CRITICAL)
|
|
59
|
+
- [ ] Secret management approach documented (vault, env vars, config files)
|
|
60
|
+
- [ ] `.gitignore` already excludes secret files (verify, do not assume)
|
|
61
|
+
- [ ] No committed secrets found in git history (run secret scanner if available)
|
|
62
|
+
- [ ] Private key files (*.key, *.pem, *.p12) located and mapped
|
|
63
|
+
- [ ] Database connection strings identified and their storage method documented
|
|
64
|
+
|
|
65
|
+
## 5. Team Considerations
|
|
66
|
+
|
|
67
|
+
- [ ] Team size documented (solo, small team, large team)
|
|
68
|
+
- [ ] Permission mode preference decided (explore for solo, ask for teams, auto for trusted CI)
|
|
69
|
+
- [ ] Shared vs local settings strategy decided (settings.json vs settings.local.json)
|
|
70
|
+
- [ ] Existing code review process documented (PR reviews, pair programming)
|
|
71
|
+
- [ ] Team familiarity with AI coding tools assessed
|
|
72
|
+
- [ ] Communication plan for introducing Claude Code to team members defined
|
|
73
|
+
|
|
74
|
+
## 6. Risk Assessment
|
|
75
|
+
|
|
76
|
+
- [ ] Critical paths identified (auth, payments, data processing) that need extra deny rules
|
|
77
|
+
- [ ] Rollback plan exists (can remove .claude/ directory cleanly) (CRITICAL)
|
|
78
|
+
- [ ] No existing .claude/ directory that would be overwritten
|
|
79
|
+
- [ ] Integration will not modify existing CI/CD without explicit approval
|
|
80
|
+
- [ ] First integration scope is limited (start with CLAUDE.md + settings, add rules incrementally)
|
|
81
|
+
- [ ] Test environment available for validating integration before team-wide rollout
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## PASS/FAIL Criteria
|
|
86
|
+
|
|
87
|
+
**PASS:** All items marked (CRITICAL) are checked. Sensitive files are fully mapped. Rollback plan documented. Risk assessment complete with mitigations for each identified risk.
|
|
88
|
+
|
|
89
|
+
**FAIL:** Any (CRITICAL) item unchecked. Sensitive files not fully identified. No rollback plan. Risk assessment incomplete.
|
|
90
|
+
|
|
91
|
+
**Action on FAIL:** Complete sensitive file mapping before any integration work. Document rollback plan. If secrets are found in git history, address that security issue before proceeding with Claude Code integration.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Change Impact Assessment Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-002
|
|
4
|
+
**Referenced by:** config-engineer, roadmap-sentinel
|
|
5
|
+
**Purpose:** Systematically assess the impact of Claude Code configuration modifications before applying them. Ensures backward compatibility, security integrity, and context budget discipline.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - CHANGE IMPACT ASSESSMENT
|
|
8
|
+
|
|
9
|
+
This checklist is used BEFORE applying configuration changes to Claude Code
|
|
10
|
+
artifacts (.claude/ directory, settings, rules, hooks, MCP config).
|
|
11
|
+
|
|
12
|
+
EXECUTION APPROACH:
|
|
13
|
+
1. Identify all files that will change
|
|
14
|
+
2. For each category, assess impact and document findings
|
|
15
|
+
3. Security impacts must be explicitly assessed -- never skip
|
|
16
|
+
4. A rollback plan is mandatory for any change touching deny rules or hooks
|
|
17
|
+
5. Present the completed assessment to the user for approval
|
|
18
|
+
|
|
19
|
+
Changes to Claude Code configuration affect ALL agents and sessions.
|
|
20
|
+
Treat configuration changes with the same rigor as production deployments.]]
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. Scope Assessment
|
|
25
|
+
|
|
26
|
+
- [ ] List all settings files affected by this change (settings.json, settings.local.json, CLAUDE.md, rules/)
|
|
27
|
+
- [ ] Identify which agents are impacted (check agent definitions for dependencies on changed files)
|
|
28
|
+
- [ ] Determine if the change affects only the current project or all projects (global vs local scope)
|
|
29
|
+
- [ ] Verify the change does not touch framework-protected paths (L1/L2 boundary)
|
|
30
|
+
- [ ] Document the motivation for the change (bug fix, optimization, new capability, security hardening)
|
|
31
|
+
|
|
32
|
+
## 2. Backward Compatibility
|
|
33
|
+
|
|
34
|
+
- [ ] Existing agent activation workflows still function after the change
|
|
35
|
+
- [ ] No permission regressions (agents that could previously access files still can)
|
|
36
|
+
- [ ] Custom commands defined in agent files still resolve to valid task paths
|
|
37
|
+
- [ ] Workflows referencing changed rules or settings still execute correctly
|
|
38
|
+
- [ ] Hook integrations (PreToolUse, PostToolUse) remain functional
|
|
39
|
+
- [ ] If removing a rule or setting, confirm no agent or workflow depends on it
|
|
40
|
+
|
|
41
|
+
## 3. Security Impact
|
|
42
|
+
|
|
43
|
+
- [ ] Deny rules are not weakened or removed without explicit security justification (CRITICAL)
|
|
44
|
+
- [ ] No new sensitive file patterns exposed by allow rule additions (CRITICAL)
|
|
45
|
+
- [ ] Permission mode changes are intentional (explore/ask/auto transitions documented)
|
|
46
|
+
- [ ] Secret file patterns (.env, credentials.json, *.key, *.pem) remain in deny rules
|
|
47
|
+
- [ ] MCP server access is not broadened beyond intended scope
|
|
48
|
+
- [ ] Hook scripts do not introduce new file system write access to protected areas
|
|
49
|
+
|
|
50
|
+
## 4. Context Impact
|
|
51
|
+
|
|
52
|
+
- [ ] Calculate CLAUDE.md line count delta (before vs after change)
|
|
53
|
+
- [ ] Count rules files delta (added, removed, modified)
|
|
54
|
+
- [ ] Assess MCP context budget delta (new servers add context overhead)
|
|
55
|
+
- [ ] Verify total always-loaded context stays within performance budget
|
|
56
|
+
- [ ] If adding new always-loaded content, identify what can be moved to path-scoped rules
|
|
57
|
+
- [ ] No unnecessary duplication introduced between CLAUDE.md, rules, and agent definitions
|
|
58
|
+
|
|
59
|
+
## 5. Rollback Plan
|
|
60
|
+
|
|
61
|
+
- [ ] Changes can be reverted with a single git checkout or documented manual steps
|
|
62
|
+
- [ ] Backup of current configuration exists before applying changes (CRITICAL)
|
|
63
|
+
- [ ] Rollback procedure is documented in change notes
|
|
64
|
+
- [ ] If the change involves hook modifications, the previous hook version is preserved
|
|
65
|
+
- [ ] Database or persistent state changes (if any) have a reversal path
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## PASS/FAIL Criteria
|
|
70
|
+
|
|
71
|
+
**PASS:** All impacts assessed and mitigated. Security section has zero unchecked items. Rollback plan exists.
|
|
72
|
+
|
|
73
|
+
**FAIL:** Any item in Security Impact is unchecked without justification, OR no rollback plan documented, OR scope assessment incomplete.
|
|
74
|
+
|
|
75
|
+
**Action on FAIL:** Address all security gaps and document rollback plan before proceeding. Escalate to config-engineer if unsure about security implications.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Context Rot Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-007
|
|
4
|
+
**Referenced by:** project-integrator
|
|
5
|
+
**Purpose:** Detect staleness, bloat, and outdated references in CLAUDE.md and rules files. Produces a Rot Score (0-100, lower = more rot) to quantify context health and prioritize cleanup.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - CONTEXT ROT DETECTION
|
|
8
|
+
|
|
9
|
+
Context rot occurs when CLAUDE.md, rules, and memory files accumulate
|
|
10
|
+
stale references, outdated instructions, and redundant content over time.
|
|
11
|
+
This degrades agent accuracy and wastes context budget.
|
|
12
|
+
|
|
13
|
+
EXECUTION APPROACH:
|
|
14
|
+
1. Measure CLAUDE.md size against budget limits
|
|
15
|
+
2. Validate every file path and reference mentioned in context files
|
|
16
|
+
3. Check instructions against current codebase reality
|
|
17
|
+
4. Verify rules match current directory structure
|
|
18
|
+
5. Audit memory files for relevance
|
|
19
|
+
6. Check for redundancy across all context sources
|
|
20
|
+
7. Calculate Rot Score from findings
|
|
21
|
+
|
|
22
|
+
Context rot is gradual and invisible until agent behavior degrades.
|
|
23
|
+
Regular audits prevent accumulation.]]
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 1. Size Check
|
|
28
|
+
|
|
29
|
+
- [ ] CLAUDE.md is under 200 lines (for auto-memory projects)
|
|
30
|
+
- [ ] CLAUDE.md is under 500 lines total (absolute maximum)
|
|
31
|
+
- [ ] No single rule file exceeds 200 lines
|
|
32
|
+
- [ ] Total always-loaded rules content is under 1000 lines combined
|
|
33
|
+
- [ ] No unnecessary code blocks or verbose examples (could be in rules instead)
|
|
34
|
+
- [ ] Managed sections are concise (tables preferred over prose)
|
|
35
|
+
|
|
36
|
+
## 2. Reference Validity
|
|
37
|
+
|
|
38
|
+
- [ ] All file paths mentioned in CLAUDE.md resolve to existing files (CRITICAL)
|
|
39
|
+
- [ ] All directory paths mentioned in CLAUDE.md resolve to existing directories
|
|
40
|
+
- [ ] All command examples reference valid scripts or binaries
|
|
41
|
+
- [ ] All agent names referenced in CLAUDE.md match actual agent definitions
|
|
42
|
+
- [ ] All checklist references resolve to existing checklist files
|
|
43
|
+
- [ ] All task references resolve to existing task files
|
|
44
|
+
- [ ] URLs and links (if any) are accessible and current
|
|
45
|
+
|
|
46
|
+
## 3. Instruction Currency
|
|
47
|
+
|
|
48
|
+
- [ ] No references to deprecated APIs or libraries (CRITICAL)
|
|
49
|
+
- [ ] No references to removed or renamed files
|
|
50
|
+
- [ ] Command syntax matches current tool versions (e.g., CLI flags still valid)
|
|
51
|
+
- [ ] Framework version references are current
|
|
52
|
+
- [ ] Workflow descriptions match actual implemented behavior
|
|
53
|
+
- [ ] Testing instructions use current test runner and patterns
|
|
54
|
+
- [ ] Build commands match current package.json scripts
|
|
55
|
+
|
|
56
|
+
## 4. Rule Health
|
|
57
|
+
|
|
58
|
+
- [ ] Rule `paths:` frontmatter matches current directory structure (CRITICAL)
|
|
59
|
+
- [ ] No rules reference file patterns that no longer exist in the project
|
|
60
|
+
- [ ] Rule content aligns with current coding standards
|
|
61
|
+
- [ ] Path-scoped rules correctly scope to their intended files
|
|
62
|
+
- [ ] No rule has been untouched for more than 90 days in an active project
|
|
63
|
+
- [ ] Rules do not reference removed agents or deprecated workflows
|
|
64
|
+
|
|
65
|
+
## 5. Memory Hygiene
|
|
66
|
+
|
|
67
|
+
- [ ] Auto-memory files (MEMORY.md, agent memory) contain relevant content
|
|
68
|
+
- [ ] No stale entries referencing completed or abandoned work
|
|
69
|
+
- [ ] Memory entries are organized by topic (not chronological dumps)
|
|
70
|
+
- [ ] No memory entries contradict current CLAUDE.md instructions
|
|
71
|
+
- [ ] Memory file sizes are within limits (MEMORY.md under 200 lines)
|
|
72
|
+
- [ ] Temporary notes (session-specific) have been cleaned up
|
|
73
|
+
|
|
74
|
+
## 6. Redundancy Check
|
|
75
|
+
|
|
76
|
+
- [ ] No duplicate instructions between CLAUDE.md and rules files (CRITICAL)
|
|
77
|
+
- [ ] No duplicate instructions between CLAUDE.md and agent definitions
|
|
78
|
+
- [ ] No duplicate instructions between different rule files
|
|
79
|
+
- [ ] Common patterns are defined once and referenced (not copied)
|
|
80
|
+
- [ ] If the same instruction appears in multiple places, consolidate to one source
|
|
81
|
+
- [ ] Settings in settings.json are not re-stated as prose in CLAUDE.md
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Rot Score Calculation
|
|
86
|
+
|
|
87
|
+
For each category, count failed items (excluding N/A). Apply weights:
|
|
88
|
+
|
|
89
|
+
| Category | Weight | Max Deduction |
|
|
90
|
+
|----------|--------|---------------|
|
|
91
|
+
| Size Check | 1x per fail | 10 points |
|
|
92
|
+
| Reference Validity | 3x per fail | 21 points |
|
|
93
|
+
| Instruction Currency | 2x per fail | 14 points |
|
|
94
|
+
| Rule Health | 2x per fail | 12 points |
|
|
95
|
+
| Memory Hygiene | 1x per fail | 6 points |
|
|
96
|
+
| Redundancy Check | 2x per fail | 12 points |
|
|
97
|
+
|
|
98
|
+
**Rot Score** = 100 - (total deductions, capped at 100)
|
|
99
|
+
|
|
100
|
+
| Score Range | Health Status | Action Required |
|
|
101
|
+
|-------------|--------------|-----------------|
|
|
102
|
+
| 80-100 | Healthy | Routine maintenance only |
|
|
103
|
+
| 60-79 | Aging | Schedule cleanup within 1-2 sprints |
|
|
104
|
+
| 40-59 | Rotting | Immediate cleanup sprint needed |
|
|
105
|
+
| 0-39 | Critical | Full context rebuild recommended |
|
|
106
|
+
|
|
107
|
+
## Priority Fix Order
|
|
108
|
+
|
|
109
|
+
1. **Reference Validity** failures -- broken paths cause agent errors
|
|
110
|
+
2. **Instruction Currency** failures -- outdated instructions cause wrong behavior
|
|
111
|
+
3. **Redundancy** failures -- duplicates waste context budget and cause conflicts
|
|
112
|
+
4. **Rule Health** failures -- stale rules load unnecessary content
|
|
113
|
+
5. **Size Check** failures -- bloat degrades all operations
|
|
114
|
+
6. **Memory Hygiene** failures -- stale memory misleads agents
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Integration Audit Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-005
|
|
4
|
+
**Referenced by:** project-integrator
|
|
5
|
+
**Purpose:** Audit the quality of an existing Claude Code integration in a project. Produces a scored grade (A-F) to identify gaps and prioritize improvements.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - INTEGRATION AUDIT
|
|
8
|
+
|
|
9
|
+
This checklist evaluates how well Claude Code is integrated into a project.
|
|
10
|
+
Use it to audit existing setups and identify improvement opportunities.
|
|
11
|
+
|
|
12
|
+
EXECUTION APPROACH:
|
|
13
|
+
1. Check each item against the actual project state
|
|
14
|
+
2. Mark [x] for present and correct, [ ] for missing or incorrect, [N/A] for not applicable
|
|
15
|
+
3. Count checked items vs total applicable items
|
|
16
|
+
4. Calculate score and grade
|
|
17
|
+
5. Prioritize gaps by category (security first, then structure, then optimization)
|
|
18
|
+
|
|
19
|
+
This audit is non-destructive -- it only reads and reports.]]
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. Directory Structure
|
|
24
|
+
|
|
25
|
+
- [ ] `.claude/` directory exists at project root
|
|
26
|
+
- [ ] `.claude/settings.json` is present and valid JSON
|
|
27
|
+
- [ ] `.claude/rules/` directory exists with at least one rule file
|
|
28
|
+
- [ ] `.claude/CLAUDE.md` exists
|
|
29
|
+
- [ ] `.claude/agents/` directory exists (if project uses custom agents)
|
|
30
|
+
- [ ] `.claude/skills/` directory exists (if project uses custom skills)
|
|
31
|
+
|
|
32
|
+
## 2. Configuration Quality
|
|
33
|
+
|
|
34
|
+
- [ ] Deny rules exist for `.env` and common secret file patterns (CRITICAL)
|
|
35
|
+
- [ ] Deny rules exist for `node_modules/`, `.git/objects`, and large binary directories
|
|
36
|
+
- [ ] Permission mode is set to an appropriate level (not `auto` for untrusted repos)
|
|
37
|
+
- [ ] Allow rules are scoped narrowly (not blanket `*` patterns)
|
|
38
|
+
- [ ] Settings follow the principle of least privilege
|
|
39
|
+
- [ ] Local overrides (`settings.local.json`) are gitignored
|
|
40
|
+
|
|
41
|
+
## 3. CLAUDE.md Health
|
|
42
|
+
|
|
43
|
+
- [ ] CLAUDE.md exists and is not empty (CRITICAL)
|
|
44
|
+
- [ ] CLAUDE.md is under 500 lines (under 200 preferred)
|
|
45
|
+
- [ ] No stale file path references (all mentioned paths resolve to existing files)
|
|
46
|
+
- [ ] Instructions are specific to this project (not generic boilerplate)
|
|
47
|
+
- [ ] Managed sections (if present) have matching start/end markers
|
|
48
|
+
- [ ] No contradictory instructions within the document
|
|
49
|
+
- [ ] Code examples are syntactically valid and use current project patterns
|
|
50
|
+
|
|
51
|
+
## 4. Hook Coverage
|
|
52
|
+
|
|
53
|
+
- [ ] At least one damage-control hook exists (PreToolUse for destructive commands)
|
|
54
|
+
- [ ] Hooks have been tested (not just written and never validated)
|
|
55
|
+
- [ ] Hook scripts handle errors gracefully (no unhandled exceptions)
|
|
56
|
+
- [ ] Hooks have explicit timeouts to prevent blocking
|
|
57
|
+
- [ ] PostToolUse hooks do not silently swallow errors
|
|
58
|
+
|
|
59
|
+
## 5. MCP Integration
|
|
60
|
+
|
|
61
|
+
- [ ] MCP servers are configured in `.claude/mcp.json` or equivalent (if MCP is used)
|
|
62
|
+
- [ ] Configured servers are reachable and authenticated
|
|
63
|
+
- [ ] Context budget for MCP tools is documented or within reasonable limits
|
|
64
|
+
- [ ] MCP tool selection priority is documented (native tools preferred)
|
|
65
|
+
- [ ] No redundant MCP servers (each serves a distinct purpose)
|
|
66
|
+
|
|
67
|
+
## 6. Rules Coverage
|
|
68
|
+
|
|
69
|
+
- [ ] Path-based rules exist for major source directories (src/, lib/, tests/)
|
|
70
|
+
- [ ] No orphaned rules (rules that reference non-existent file patterns)
|
|
71
|
+
- [ ] Rules use frontmatter `paths:` for path-scoped loading (not always-loaded)
|
|
72
|
+
- [ ] Total always-loaded rule content stays under 1000 lines combined
|
|
73
|
+
- [ ] Rules do not duplicate content already in CLAUDE.md
|
|
74
|
+
- [ ] Rule file naming follows kebab-case convention
|
|
75
|
+
|
|
76
|
+
## 7. Agent Definitions
|
|
77
|
+
|
|
78
|
+
- [ ] If `.claude/agents/` exists, each agent file has valid structure
|
|
79
|
+
- [ ] Agent definitions include clear role and scope descriptions
|
|
80
|
+
- [ ] Agent tool access is restricted to what each agent needs
|
|
81
|
+
- [ ] Agent command lists reference valid task files
|
|
82
|
+
- [ ] No conflicting instructions between agent definitions
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Scoring
|
|
87
|
+
|
|
88
|
+
**Calculation:** (Checked items) / (Total items - N/A items) x 100
|
|
89
|
+
|
|
90
|
+
| Grade | Score Range | Interpretation |
|
|
91
|
+
|-------|------------|----------------|
|
|
92
|
+
| A | 90-100% | Excellent integration, production-ready |
|
|
93
|
+
| B | 80-89% | Good integration, minor improvements needed |
|
|
94
|
+
| C | 70-79% | Adequate integration, several gaps to address |
|
|
95
|
+
| D | 60-69% | Below average, significant gaps present |
|
|
96
|
+
| F | Below 60% | Poor integration, major rework needed |
|
|
97
|
+
|
|
98
|
+
## Priority Fix Order
|
|
99
|
+
|
|
100
|
+
1. **CRITICAL items** (security deny rules, CLAUDE.md existence) -- fix immediately
|
|
101
|
+
2. **Hook coverage** -- prevents accidental damage
|
|
102
|
+
3. **Rules coverage** -- improves agent accuracy
|
|
103
|
+
4. **Configuration quality** -- optimizes performance
|
|
104
|
+
5. **Agent definitions** -- enhances team workflow
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Multi-Agent Review Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-004
|
|
4
|
+
**Referenced by:** swarm-orqx
|
|
5
|
+
**Purpose:** Post-completion validation after an agent team finishes work. Ensures all outputs are present, merged without conflict, meet quality standards, and all temporary resources are cleaned up.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - MULTI-AGENT REVIEW
|
|
8
|
+
|
|
9
|
+
This checklist validates the combined output of a multi-agent execution.
|
|
10
|
+
Run this AFTER all agents have completed or timed out.
|
|
11
|
+
|
|
12
|
+
EXECUTION APPROACH:
|
|
13
|
+
1. Verify every agent returned a result (or document why it did not)
|
|
14
|
+
2. Check for merge conflicts between agent outputs
|
|
15
|
+
3. Validate each output against its acceptance criteria
|
|
16
|
+
4. Clean up all worktrees, branches, and temporary artifacts
|
|
17
|
+
5. Run integration tests on the combined result
|
|
18
|
+
6. All CRITICAL items must pass for the team execution to be considered successful
|
|
19
|
+
|
|
20
|
+
Skipping post-execution review leads to orphaned resources and hidden failures.]]
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. Output Completeness
|
|
25
|
+
|
|
26
|
+
- [ ] All spawned agents returned results (no silent failures) (CRITICAL)
|
|
27
|
+
- [ ] Agents that timed out have their partial work documented
|
|
28
|
+
- [ ] Each agent's output matches its assigned subtask scope
|
|
29
|
+
- [ ] No agent produced empty or placeholder output
|
|
30
|
+
- [ ] Status reports from each agent are collected and reviewed
|
|
31
|
+
- [ ] Agents that encountered errors logged their failure reason
|
|
32
|
+
|
|
33
|
+
## 2. Merge Validation
|
|
34
|
+
|
|
35
|
+
- [ ] No file-level conflicts between agent outputs (CRITICAL)
|
|
36
|
+
- [ ] If conflicts exist, they are resolved with documented rationale
|
|
37
|
+
- [ ] Consistent code formatting across all agent outputs (same lint config applied)
|
|
38
|
+
- [ ] No duplicate function/variable/component names introduced by different agents
|
|
39
|
+
- [ ] Import statements are consistent (no conflicting dependency versions)
|
|
40
|
+
- [ ] Shared configuration files (package.json, tsconfig, etc.) are merged correctly
|
|
41
|
+
|
|
42
|
+
## 3. Quality Check
|
|
43
|
+
|
|
44
|
+
- [ ] Each agent's output meets its subtask acceptance criteria (CRITICAL)
|
|
45
|
+
- [ ] `npm run lint` passes on the combined codebase
|
|
46
|
+
- [ ] `npm run typecheck` passes on the combined codebase (if TypeScript)
|
|
47
|
+
- [ ] Unit tests from each agent's work pass individually
|
|
48
|
+
- [ ] No regressions introduced (existing tests still pass)
|
|
49
|
+
- [ ] Code follows project coding standards and patterns
|
|
50
|
+
|
|
51
|
+
## 4. Worktree Cleanup
|
|
52
|
+
|
|
53
|
+
- [ ] All worktrees created for this execution are merged or removed (CRITICAL)
|
|
54
|
+
- [ ] No orphaned branches remain from agent work
|
|
55
|
+
- [ ] Temporary files created by agents are cleaned up
|
|
56
|
+
- [ ] Agent-specific build artifacts are removed
|
|
57
|
+
- [ ] `.git/worktrees/` directory has no stale entries
|
|
58
|
+
- [ ] Branch protection rules are restored if temporarily modified
|
|
59
|
+
|
|
60
|
+
## 5. Integration Test
|
|
61
|
+
|
|
62
|
+
- [ ] Combined output compiles/builds successfully (CRITICAL)
|
|
63
|
+
- [ ] `npm test` passes on the full integrated codebase
|
|
64
|
+
- [ ] End-to-end workflows affected by the changes still function
|
|
65
|
+
- [ ] API contracts between components written by different agents are compatible
|
|
66
|
+
- [ ] No circular dependencies introduced between new modules
|
|
67
|
+
- [ ] Performance benchmarks are within acceptable range (no significant degradation)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## PASS/FAIL Criteria
|
|
72
|
+
|
|
73
|
+
**PASS:** All agents returned results. No unresolved merge conflicts. Combined codebase passes lint, typecheck, and tests. All worktrees cleaned up.
|
|
74
|
+
|
|
75
|
+
**FAIL:** Any agent produced no output without documented reason. Unresolved merge conflicts exist. Combined tests fail. Orphaned worktrees or branches remain.
|
|
76
|
+
|
|
77
|
+
**Action on FAIL:** For missing outputs, determine root cause and re-run individual agent if needed. For merge conflicts, resolve manually and document. For test failures, identify which agent's output causes the failure and fix. For orphaned resources, run cleanup commands.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Pre-Push Quality Gate Checklist
|
|
2
|
+
|
|
3
|
+
**Checklist ID:** CCM-CL-001
|
|
4
|
+
**Referenced by:** config-engineer, roadmap-sentinel
|
|
5
|
+
**Purpose:** Validate Claude Code configuration changes before pushing to remote. Ensures settings integrity, CLAUDE.md quality, rule correctness, hook safety, and MCP sanity.
|
|
6
|
+
|
|
7
|
+
[[LLM: INITIALIZATION INSTRUCTIONS - PRE-PUSH VALIDATION
|
|
8
|
+
|
|
9
|
+
This checklist validates Claude Code configuration changes specifically.
|
|
10
|
+
It complements the SINAPSE framework pre-push-checklist but focuses on
|
|
11
|
+
.claude/ directory artifacts, settings.json, rules, hooks, and MCP config.
|
|
12
|
+
|
|
13
|
+
EXECUTION APPROACH:
|
|
14
|
+
1. For each category, verify every item against the current file state
|
|
15
|
+
2. Mark items as [x] Pass, [ ] Fail, or [N/A] Not Applicable
|
|
16
|
+
3. Any CRITICAL item failure blocks the push
|
|
17
|
+
4. Non-critical failures should be documented with justification
|
|
18
|
+
|
|
19
|
+
CRITICAL items are marked with (CRITICAL) suffix.]]
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. Settings Validation
|
|
24
|
+
|
|
25
|
+
- [ ] `settings.json` is valid JSON with no syntax errors (CRITICAL)
|
|
26
|
+
- [ ] `settings.json` contains `deny` rules for `.env`, credentials, and secrets (CRITICAL)
|
|
27
|
+
- [ ] `settings.json` contains `deny` rules for framework-protected paths (L1/L2 boundary)
|
|
28
|
+
- [ ] No API keys, tokens, or secrets hardcoded in `settings.json`
|
|
29
|
+
- [ ] `settings.local.json` is listed in `.gitignore` if it contains user-specific overrides
|
|
30
|
+
- [ ] Permission defaults (`allow`/`deny`) are intentional and match project security posture
|
|
31
|
+
- [ ] All `allow` rules have corresponding deny rules that they override (no open holes)
|
|
32
|
+
|
|
33
|
+
## 2. CLAUDE.md Quality
|
|
34
|
+
|
|
35
|
+
- [ ] CLAUDE.md exists at `.claude/CLAUDE.md` (CRITICAL)
|
|
36
|
+
- [ ] CLAUDE.md is under 500 lines total (recommended under 200 for auto-memory projects)
|
|
37
|
+
- [ ] All `SINAPSE-MANAGED-START` sections have matching `SINAPSE-MANAGED-END` markers (CRITICAL)
|
|
38
|
+
- [ ] No stale file path references (all mentioned paths exist in the repository)
|
|
39
|
+
- [ ] No duplicate instructions between CLAUDE.md and `.claude/rules/` files
|
|
40
|
+
- [ ] Code examples in CLAUDE.md are syntactically valid
|
|
41
|
+
- [ ] No TODO or FIXME comments left in CLAUDE.md content
|
|
42
|
+
|
|
43
|
+
## 3. Rules Validation
|
|
44
|
+
|
|
45
|
+
- [ ] All `.claude/rules/*.md` files have valid YAML frontmatter (if path-scoped)
|
|
46
|
+
- [ ] Frontmatter `paths:` values match existing directories or file patterns
|
|
47
|
+
- [ ] No always-loaded rules exceed 200 lines (context budget discipline)
|
|
48
|
+
- [ ] Path-scoped rules only load for their intended file types
|
|
49
|
+
- [ ] No conflicting instructions between different rule files
|
|
50
|
+
- [ ] Rule file names follow kebab-case convention
|
|
51
|
+
- [ ] No orphaned rules (rule references files/patterns that no longer exist)
|
|
52
|
+
|
|
53
|
+
## 4. Hook Safety
|
|
54
|
+
|
|
55
|
+
- [ ] All registered hooks have explicit timeout configuration (CRITICAL)
|
|
56
|
+
- [ ] No hook contains infinite loops or unbounded recursion (CRITICAL)
|
|
57
|
+
- [ ] Hook exit codes follow convention (0 = success, non-zero = failure)
|
|
58
|
+
- [ ] Hooks that modify files use atomic write patterns (temp + rename)
|
|
59
|
+
- [ ] PreToolUse hooks do not block essential tool operations
|
|
60
|
+
- [ ] PostToolUse hooks handle errors gracefully (no silent swallowing)
|
|
61
|
+
- [ ] Hook file paths in settings.json resolve to existing scripts
|
|
62
|
+
|
|
63
|
+
## 5. MCP Configuration
|
|
64
|
+
|
|
65
|
+
- [ ] All configured MCP servers respond to health checks (if enabled)
|
|
66
|
+
- [ ] MCP context budget stays within project limits (check core-config.yaml)
|
|
67
|
+
- [ ] No duplicate MCP server entries in configuration
|
|
68
|
+
- [ ] MCP servers requiring authentication have valid credentials configured
|
|
69
|
+
- [ ] Docker-based MCPs have container running and accessible
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## PASS/FAIL Criteria
|
|
74
|
+
|
|
75
|
+
**PASS:** All items marked (CRITICAL) are checked. Non-critical items have fewer than 3 failures, each with documented justification.
|
|
76
|
+
|
|
77
|
+
**FAIL:** Any item marked (CRITICAL) is unchecked, OR more than 3 non-critical items fail without justification.
|
|
78
|
+
|
|
79
|
+
**Action on FAIL:** Fix all critical issues before push. Document non-critical issues as tech debt if deferring.
|