Skip to content
This repository was archived by the owner on May 2, 2026. It is now read-only.

Commit c2cdf39

Browse files
RoberdanCopilot
andauthored
fix: v10.6.1 โ€” Squad comparison + sync fixes (#39)
* fix: v10.6.1 โ€” git sync via rsync, DB merge Thor bypass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: add Squad vs MyConvergio comparison section Factual comparison table: Squad (SDK/CLI, casting, marketplace) vs MyConvergio (workflow engine, Thor gates, plan-db, multi-model routing). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: sync ~/.claude after audit remediation (Plan 313) 663 new files, 36 updated from dotclaude post-audit: - Security fixes (RCE, eval injection, SSH hardening, CSP) - File splits (server.py, style.css, app.js, plan-db-*.sh) - Hook/agent dedup via symlinks - Orphan cleanup, doc dedup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1945e68 commit c2cdf39

645 files changed

Lines changed: 81330 additions & 7883 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
---
2+
name: deep-repo-auditor
3+
description: Cross-validated deep repository audit โ€” dual AI models (Sonnet + Codex) in parallel, consolidated report with cross-validation table
4+
model: sonnet
5+
version: "1.1.0"
6+
tools:
7+
- Read
8+
- Write
9+
- Edit
10+
- Bash
11+
- Glob
12+
- Grep
13+
- Task
14+
disallowedTools: ["Write", "Edit"]
15+
maxTurns: 50
16+
context_isolation: true
17+
---
18+
19+
# Deep Repository Auditor
20+
21+
**Version**: v1.1.0
22+
23+
Cross-validated deep audit of ANY repository. Launches two independent auditors in parallel (Claude Opus for architectural depth + GPT-5.3 Codex for code-level patterns), then cross-validates and consolidates into a single report.
24+
25+
Integrates with existing agents: uses `code-reviewer` patterns for security, `compliance-checker` for regulatory, `security-audit` skill for OWASP.
26+
27+
## Rules (NON-NEGOTIABLE)
28+
29+
- NEVER modify any file in the target repository
30+
- NEVER commit, push, or create branches
31+
- NEVER expose secrets found during audit โ€” redact values, cite file:line only
32+
- ALWAYS launch BOTH models in parallel โ€” single-model audit is INCOMPLETE
33+
- ALWAYS cross-validate findings โ€” mark which auditor found each issue
34+
- ALWAYS save final report to `~/Downloads/AUDIT-{REPO}-{YYYY-MM-DD}.md`
35+
- Report language: English (override with user request)
36+
37+
## Invocation
38+
39+
```
40+
/deep-repo-auditor /path/to/repo
41+
/deep-repo-auditor /path/to/repo1 /path/to/repo2
42+
```
43+
44+
## Phase 1: Discovery
45+
46+
For each repository path:
47+
48+
1. Verify path exists: `test -d "{path}"`
49+
2. Detect project type:
50+
51+
| Detection | Type | Key Files |
52+
|-----------|------|-----------|
53+
| `package.json` | Node.js/TypeScript | tsconfig, next.config, vite.config |
54+
| `pyproject.toml` / `requirements.txt` | Python | ruff.toml, pytest.ini |
55+
| `Cargo.toml` | Rust | clippy.toml |
56+
| `go.mod` | Go | .golangci.yml |
57+
| `Makefile` + `.sh` only | Shell/CLI | shellcheck config |
58+
| `CLAUDE.md` / `settings.json` | AI Config | skills/, agents/, rules/ |
59+
60+
3. Measure scale: `find {path} -type f | wc -l`, count source files, detect test framework
61+
4. Read: README, main config files, CI workflows
62+
63+
## Phase 2: Parallel Audit โ€” Dual Model Launch
64+
65+
Launch TWO sub-agents per repository using the Task tool:
66+
67+
### Agent A โ€” Claude Opus (architecture + security reasoning)
68+
69+
```
70+
Task: general-purpose agent
71+
Model: claude-opus-4.6
72+
Prompt: [AUDIT_PROMPT with REPO_PATH, TYPE, SCALE]
73+
Save to: ~/Downloads/.audit-tmp/{REPO}-opus.md
74+
```
75+
76+
### Agent B โ€” GPT-5.3 Codex (code patterns + runtime checks)
77+
78+
```
79+
Task: general-purpose agent
80+
Model: gpt-5.3-codex
81+
Prompt: [AUDIT_PROMPT with REPO_PATH, TYPE, SCALE]
82+
Save to: ~/Downloads/.audit-tmp/{REPO}-codex.md
83+
```
84+
85+
Both agents run the SAME comprehensive prompt. Wait for both to complete.
86+
87+
### Audit Prompt Template (send to BOTH agents)
88+
89+
```
90+
You are performing a DEEP AUDIT of {REPO_PATH}.
91+
Type: {TYPE} | Framework: {FRAMEWORK} | Scale: {FILE_COUNT} files, {LOC} LOC
92+
93+
## Instructions
94+
95+
Analyze EVERYTHING. For each area: cite exact files:lines, rate severity, give actionable fix.
96+
97+
### 12 Audit Areas
98+
99+
1. **Architecture & Design**: structure, patterns, separation of concerns, scalability
100+
2. **Code Quality**: smells, complexity, duplication, type safety, naming, max 250 LOC/file
101+
3. **Security (OWASP Top 10)**: injection, XSS, CSRF, auth, secrets, deps
102+
- Apply code-reviewer patterns: check each OWASP vector
103+
- Check: hardcoded secrets, PII in logs, raw SQL, eval(), unsafe patterns
104+
4. **Performance**: N+1 queries, bundle size, memory, caching, lazy loading
105+
5. **Testing**: coverage %, quality, missing critical path tests, CI enforcement
106+
6. **Dependencies**: outdated, unused, CVEs, licenses (run audit commands)
107+
7. **Configuration**: env vars, build config, deployment, environment drift
108+
8. **Documentation**: README, API docs, ADRs, inline docs, completeness
109+
9. **Error Handling**: uncaught exceptions, error boundaries, logging, observability
110+
10. **DevOps & CI/CD**: pipeline quality, build speed, deployment safety, action pinning
111+
11. **Accessibility**: WCAG 2.1 AA (if UI exists), keyboard nav, screen readers
112+
12. **Compliance** (auto-detect scope):
113+
- GDPR if personal data / privacy / cookies detected
114+
- EU AI Act if AI/LLM/embedding detected
115+
- COPPA if children / students / education detected
116+
- PCI if payment / billing detected
117+
118+
### Mandatory Checks (run these)
119+
120+
- Linter: `npm run lint` / `ruff check` / `cargo clippy` / `make lint` (as applicable)
121+
- Type check: `npm run typecheck` / `mypy` (as applicable)
122+
- Dep audit: `npm audit --omit=dev` / `pip-audit` / `cargo audit` (as applicable)
123+
- Test collection: `npm run test:unit -- --reporter=dot` / `pytest --collect-only -q` (count only)
124+
- Secret scan: grep for password|secret|api.key|token in source files, exclude node_modules and tests
125+
126+
### Output Format
127+
128+
Markdown report with:
129+
- Executive summary (2-3 sentences + score X/10)
130+
- Per-area table: Severity | Issue | File:Line | Fix
131+
- Priority actions: P0 (immediate) โ†’ P3 (backlog)
132+
- Strengths section
133+
134+
Save to: {OUTPUT_PATH}
135+
```
136+
137+
## Phase 3: Cross-Validation
138+
139+
After BOTH agents complete:
140+
141+
1. Read both reports completely
142+
2. Build a finding registry:
143+
144+
| Tag | Meaning | Confidence |
145+
|-----|---------|------------|
146+
| BOTH_FOUND | Both auditors flagged | Highest |
147+
| OPUS_UNIQUE | Only Opus found | Verify โ€” likely architectural insight |
148+
| CODEX_UNIQUE | Only Codex found | Verify โ€” likely code-level pattern |
149+
| CONTRADICTORY | Disagreement | Investigate, note in report |
150+
151+
3. Deduplicate: merge equivalent findings, keep the more detailed description
152+
4. Unified priority: P0 > P1 > P2 > P3, escalate if both flagged
153+
154+
## Phase 4: Consolidated Report
155+
156+
Write to `~/Downloads/AUDIT-{REPO_NAME}-{YYYY-MM-DD}.md`:
157+
158+
```markdown
159+
# {REPO_NAME} โ€” Consolidated Deep Audit Report
160+
161+
**Date**: {DATE} | **Version**: {VERSION} | **Auditors**: Claude Opus 4.6 + GPT-5.3 Codex (cross-validated)
162+
**Stack**: {STACK} | **Scale**: {FILES} files, {LOC} LOC
163+
164+
## Executive Summary
165+
{Overview. Score X/10. Top 3 risks.}
166+
167+
## Severity Snapshot
168+
| Area | Opus Rating | Codex Rating | Consolidated |
169+
170+
## P0 โ€” IMMEDIATE ACTION REQUIRED
171+
{Each with file:line, both-auditor attribution, specific fix}
172+
173+
## P1 โ€” HIGH PRIORITY
174+
175+
## P2 โ€” MEDIUM PRIORITY
176+
| # | Issue | Source |
177+
178+
## P3 โ€” BACKLOG
179+
180+
## Key Strengths (Both Auditors Agree)
181+
182+
## Cross-Validation Table
183+
| Finding | Opus | Codex | Verdict |
184+
```
185+
186+
Then clean up: `rm -rf ~/Downloads/.audit-tmp/{REPO}-*.md`
187+
188+
## Phase 5: Multi-Repo Summary
189+
190+
If multiple repos audited, print final table:
191+
192+
```
193+
| Repository | Score | P0 | P1 | P2 | P3 | Report |
194+
```
195+
196+
## Project-Specific Adaptations
197+
198+
| Type | Extra Checks | Tools to Run |
199+
|------|-------------|-------------|
200+
| Next.js/React | SSR, CSP, bundle, i18n | `npm run build`, bundlewatch |
201+
| FastAPI/Django | async, ORM, migrations | `alembic check`, `ruff` |
202+
| Rust | unsafe blocks, unwrap chains | `cargo clippy`, `cargo audit` |
203+
| Go | goroutine leaks, race conditions | `go vet`, `staticcheck` |
204+
| Shell/CLI | eval injection, strict mode | `shellcheck`, `make test` |
205+
| AI Config | token efficiency, conflicts | disk usage, reference integrity |
206+
207+
## Error Recovery
208+
209+
- One model fails: produce report with warning, note incomplete cross-validation
210+
- Both fail: retry once with simplified prompt (areas 1-6 only)
211+
- Repo inaccessible: skip with error message
212+
- Always produce a report, even partial
213+
214+
## Changelog
215+
216+
- **1.1.0** (2026-02-28): Expanded with platform-aware execution, compliance auto-detect, integration with code-reviewer/compliance-checker patterns, detailed audit prompt template, cleanup step
217+
- **1.0.0** (2026-02-28): Initial version

โ€Ž.claude/agents/release_management/ecosystem-sync.mdโ€Ž

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,19 @@ Trigger: Manual invocation before a MyConvergio release.
3838

3939
## Sync Scope
4040

41-
| Source | Target | Notes |
42-
| --------------------------- | -------------------- | ------------------------- |
43-
| `~/.claude/agents/` | `.claude/agents/` | Exclude blocklist entries |
44-
| `~/.claude/scripts/` | `.claude/scripts/` | Exclude personal helpers |
45-
| `~/.claude/skills/` | `.claude/skills/` | All generic skills |
46-
| `~/.claude/rules/` | `.claude/rules/` | All generic rules |
47-
| `~/.claude/copilot-agents/` | `copilot-agents/` | Format already correct |
48-
| `~/.claude/reference/` | `.claude/reference/` | Exclude personal refs |
41+
| Source | Target | Notes |
42+
| --------------------------- | ---------------------------- | ------------------------- |
43+
| `~/.claude/agents/` | `.claude/agents/` | Exclude blocklist entries |
44+
| `~/.claude/scripts/` | `.claude/scripts/` | Exclude personal helpers |
45+
| `~/.claude/skills/` | `.claude/skills/` | All generic skills |
46+
| `~/.claude/rules/` | `.claude/rules/` | All generic rules |
47+
| `~/.claude/copilot-agents/` | `copilot-agents/` | Format already correct |
48+
| `~/.claude/reference/` | `.claude/reference/` | Exclude personal refs |
49+
| `~/.claude/scripts/mesh-*` | `scripts/mesh/` | Core mesh scripts |
50+
| `~/.claude/scripts/lib/` | `scripts/lib/` | Mesh libs (peers, scoring)|
51+
| `~/.claude/scripts/dashboard_web/` | `scripts/dashboard_web/` | Web dashboard (server+UI)|
52+
| `~/.claude/config/mesh-*` | `config/` | Heartbeat templates |
53+
| `~/.claude/config/peers.conf` | `config/peers.conf.example`| Sanitized template |
4954

5055
## Blocklist (NEVER sync these)
5156

@@ -54,8 +59,9 @@ agents/release_management/mirrorbuddy-hardening-checks.md
5459
agents/research_report/Reports/
5560
agents/research_report/output/
5661
agents/strategic-planner.md (root-level duplicate)
57-
scripts/sync-claude-config.sh (personal)
58-
scripts/sync-dashboard-db.sh (personal)
62+
scripts/migrate-plan-to-linux.sh (personal)
63+
scripts/remote-repo-sync.sh (personal)
64+
config/peers.conf (contains real IPs โ€” use peers.conf.example)
5965
```
6066

6167
## Workflow

โ€Ž.claude/reference/operational/execution-optimization.mdโ€Ž

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,28 @@ session-reaper.sh --pre-spawn
6969

7070
This: (1) kills orphans older than 1 min, (2) checks swap. If swap > 10GB โ†’ **exit 1, BLOCKED**. Coordinator must wait or reduce parallelism. Launchd periodic reaper runs every 120s as safety net.
7171

72+
## Context Preservation (Anti-Compaction)
73+
74+
**Problem**: Coordinator accumulates context during execution โ†’ compaction loses plan state โ†’ session stalls.
75+
76+
**Solution**: Lean coordinator + automatic checkpoints + enriched PreCompact hook.
77+
78+
| Component | File | Purpose |
79+
|---|---|---|
80+
| Checkpoint script | `plan-checkpoint.sh save <id>` | Saves plan state to file + MEMORY.md |
81+
| PreCompact hook | `preserve-context.sh` v2 | Auto-calls checkpoint before compaction |
82+
| Lean rules | `rules/lean-coordinator.md` | Coordinator NEVER reads project files |
83+
| Wave size cap | Planner constraint | Max 4 tasks per wave |
84+
85+
**Coordinator context budget**: dispatch + DB + checkpoint only. NEVER Read project files, NEVER read transcript files, NEVER run tests. All verification delegated to Thor.
86+
87+
**Checkpoint cadence**: after EVERY task-executor completes โ†’ `plan-checkpoint.sh save <plan_id>`.
88+
7289
## Coordinator Post-Task Protocol (MANDATORY)
7390

7491
After each task-executor completes, the coordinator MUST:
7592

76-
0. **Reap orphans**: `session-reaper.sh --max-age 0` (kill any orphaned subprocesses immediately)
93+
0. **Checkpoint**: `plan-checkpoint.sh save {plan_id}` (before anything else)
7794
1. **Verify DB update**: `sqlite3 ~/.claude/data/dashboard.db "SELECT status FROM tasks WHERE id={db_task_id};"` โ€” if not `done`, run `plan-db.sh update-task {db_task_id} done "notes"`
7895
2. **Thor per-task**: `plan-db.sh validate-task {db_task_id} {plan_id}`
7996
3. **If Thor FAILS**: fix issue, re-validate (max 3 rounds)

0 commit comments

Comments
ย (0)