Skip to content

Commit 733f8b4

Browse files
ANcpLuaclaude
andauthored
docs(mega-swarm): fix 35 audit findings — dedup, accuracy, modernization (#133)
Executed all 3 phases in parallel via rules-agent, docs-agent, claude-md-agent. Removed: - .claude/rules/engineering-philosophy.md — complete duplicate of engineering-principles.md (~900 tokens/session wasted, P0) Changed: - thought-transparency.md: removed sequential-execution clause contradicting LAW 3, removed duplicate Silent Processing section - devops-calms.md: split Sharing section into Claude vs external-AI channels; MTTR standardized - engineering-principles.md: fixed duplicate #25 tag → #25b for composition-over-inheritance - solid-principles.md: compressed to table format; fixed metacognitive-guard SRP description - error-handling.md: replaced inapplicable retry-with-backoff with re-run-after-fix guidance - docs/ARCHITECTURE.md: fixed directory tree; added passive context layers; replaced Section 5/7 with pointers; fixed coordination channels; updated Last Verified - docs/WORKFLOWS.md: added trigger-docs.yml section; added commit-integrity-hook to pre-commit checklist - docs/QUICK-REFERENCE.md: added /hookify:help; clarified eight-gates/hades are skills; fixed hades agent count - docs/PLUGINS.md: removed fake required fields; added capability declaration fields - CLAUDE.md: replaced directory tree with pointer; added turbo-fix/fix-pipeline to routing; removed plugin structure tree; reduced CI section; added documentation paths section Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 86a4c76 commit 733f8b4

File tree

12 files changed

+125
-211
lines changed

12 files changed

+125
-211
lines changed

.claude/rules/devops-calms.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ Track these DORA-inspired metrics:
2727
| Validation Pass Rate | >95% | CI green on first push |
2828
| Lead Time | <1 hour | Commit to merge time |
2929
| Change Failure Rate | <15% | PRs requiring fixes |
30-
| Recovery Time | <30 min | Time to fix broken build |
30+
| MTTR | <30 min | Time to fix broken build |
3131

3232
## Sharing
3333

3434
- **Document decisions:** ADRs for architecture, specs for features
35-
- **Cross-agent communication:** AGENTS.md, CLAUDE.md, copilot-instructions.md
35+
- **Claude coordination:** `CLAUDE.md`, `.claude/rules/`, `SKILL.md` frontmatter, `SessionStart` hooks
36+
- **External-AI coordination:** `AGENTS.md`, `.github/copilot-instructions.md` (Copilot, CodeRabbit, humans)
3637
- **Knowledge transfer:** Skills encode reusable workflows

.claude/rules/engineering-philosophy.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

.claude/rules/engineering-principles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
- Make invalid states unrepresentable
144144
- Good defaults + clear errors
145145

146-
**IF choosing patterns** → Favor composition over inheritance (#25)
146+
**IF choosing patterns** → Favor composition over inheritance (#25b)
147147
- More flexible, less coupling
148148
- Each module = clear, focused purpose
149149
- Maximize cohesion, minimize coupling

.claude/rules/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When reporting errors, use this format:
3434
1. Parse error output completely
3535
2. Identify root cause (not just symptoms)
3636
3. Attempt automatic fix if deterministic
37-
4. Retry with backoff if transient
37+
4. Re-run after fixing the identified issue; escalate if same error recurs on unchanged input
3838
5. Escalate with full context if persistent
3939

4040
## Never Hide Failures

.claude/rules/solid-principles.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,32 @@ Apply these principles when designing or modifying plugins:
44

55
## Single Responsibility
66

7-
Each plugin should do ONE thing well:
7+
Each plugin does ONE thing well:
88

9-
- `metacognitive-guard` -> Cognitive amplification + commit integrity + CI verification
10-
- `otelwiki` -> OpenTelemetry documentation only
11-
- `dotnet-architecture-lint` -> .NET build patterns only
12-
- `hookify` -> User-configurable hooks
13-
- `feature-dev` -> Guided feature development + code review
14-
- `exodia` -> Multi-agent workflow orchestration
15-
- `ancplua-project-routing` -> Auto-routes to specialist agents
9+
| Plugin | Responsibility |
10+
|--------|----------------|
11+
| `exodia` | Multi-agent orchestration |
12+
| `metacognitive-guard` | Cognitive safety (amplification, integrity, CI — one domain) |
13+
| `otelwiki` | OpenTelemetry documentation |
14+
| `hookify` | User-configurable behavior hooks |
15+
| `feature-dev` | Guided feature development + code review |
16+
| `dotnet-architecture-lint` | .NET build pattern enforcement |
17+
| `ancplua-project-routing` | Cross-repo specialist agent routing |
1618

17-
**Anti-pattern:** A plugin that handles CI, commits, AND reviews.
19+
**Anti-pattern:** A plugin that handles CI, commits, AND reviews simultaneously with no cohesion.
1820

1921
## Open/Closed
2022

21-
Plugins should be extensible without modification:
22-
23-
- Add new skills to extend behavior
24-
- Use hooks for customization points
25-
- Don't modify core plugin logic for edge cases
23+
Extend via new skills/commands. Don't modify core plugin logic for edge cases.
2624

2725
## Liskov Substitution
2826

29-
Skills must be interchangeable within their category:
30-
31-
- Any code-review skill should accept the same inputs
32-
- Any commit skill should produce compatible outputs
27+
Skills must be interchangeable within their category: any code-review skill accepts the same inputs.
3328

3429
## Interface Segregation
3530

36-
Don't force plugins to implement unused features:
37-
38-
- `hooks/` directory is optional
39-
- `commands/` directory is optional
40-
- Only require what's actually used
31+
Only `plugin.json` + `README.md` are required. All other directories (`skills/`, `commands/`, `hooks/`, `agents/`) are optional.
4132

4233
## Dependency Inversion
4334

44-
Plugins depend on abstractions (Skills), not concrete implementations:
45-
46-
- Skills define the contract
47-
- MCP servers provide the implementation
48-
- Plugins orchestrate, never implement low-level operations
35+
Plugins orchestrate via Skills. Skills define the contract. MCP servers implement. Plugins never implement low-level operations.

.claude/rules/thought-transparency.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,10 @@ When executing complex tasks, maintain visibility:
1818
- [ ] Step 4: Validation
1919
```
2020

21-
## Granular Task Decomposition
22-
23-
Break work into atomic units:
24-
25-
- Each step should be independently verifiable
26-
- Steps execute sequentially, not in parallel batches
27-
- Complete one phase before starting the next
28-
2921
## Mental State Bookkeeping
3022

3123
Track internal state explicitly:
3224

3325
- Use `TodoWrite` for task tracking
3426
- Mark completed items immediately
3527
- Never claim completion without evidence
36-
37-
## Silent Processing with Tracked Updates
38-
39-
- Work silently on implementation
40-
- Update progress via `TodoWrite`
41-
- Report results only when complete or blocked

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
66

77
## [Unreleased]
88

9+
### Removed
10+
11+
- **`engineering-philosophy.md`**: Deleted — complete duplicate of `engineering-principles.md` (~900 tokens wasted per session; both auto-loaded)
12+
13+
### Changed
14+
15+
- **`thought-transparency.md`**: Removed "Granular Task Decomposition" section (contradicted LAW 3 parallel execution) and duplicate "Silent Processing" section
16+
- **`devops-calms.md`**: Fixed AGENTS.md incorrectly listed as Claude coordination channel; separated Claude channels (`CLAUDE.md`, `.claude/rules/`, `SKILL.md`, SessionStart hooks) from external-AI channels (`AGENTS.md`, `copilot-instructions.md`); standardized "Recovery Time" → "MTTR"
17+
- **`solid-principles.md`**: Compressed from 49 to ~25 lines; replaced bullet list with responsibility table; fixed metacognitive-guard SRP description
18+
- **`engineering-principles.md`**: Fixed duplicate `#25` tag (second instance is now `#25b`)
19+
- **`error-handling.md`**: Fixed "Retry with backoff if transient" — inapplicable to local tool failures
20+
- **`ARCHITECTURE.md`**: Fixed directory tree (dependabot.yml moved to correct location, added trigger-docs.yml, CODEOWNERS, designs/, ENGINEERING-PRINCIPLES.md); replaced Section 5 SOLID with pointer to rules file; fixed AGENTS.md coordination statement; replaced DORA table with pointer; added SessionStart hooks passive context layer documentation; updated Last Verified date
21+
- **`WORKFLOWS.md`**: Added trigger-docs.yml cross-repo workflow documentation; added commit-integrity-hook note to pre-commit checklist
22+
- **`QUICK-REFERENCE.md`**: Added `/hookify:help` command; clarified eight-gates/hades are skills not slash commands; fixed hades agent count to "12 (base) or 15 (--goggles)"
23+
- **`PLUGINS.md`**: Removed fake required fields (`repository`, `license`); added capability declaration fields example
24+
- **`CLAUDE.md`**: Replaced Section 3 directory tree with pointer to ARCHITECTURE.md; added turbo-fix and fix-pipeline to Section 4 routing tree; removed plugin structure tree from Section 6; reduced Section 8 CI details to pointer; added all doc paths to Section 12; updated Section 15 rules list
25+
926
### Changed
1027

1128
- **hookify: extract shared hook_runner.py**: 4 near-identical handlers (pretooluse/posttooluse/stop/userpromptsubmit) reduced from 60-78 lines each to 18-line thin wrappers. Shared logic in `hookify/core/hook_runner.py` (~197 lines eliminated)

CLAUDE.md

Lines changed: 26 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -101,53 +101,13 @@ but NOT conversation history. All context must be in the spawn prompt.
101101

102102
## 3. Target Architecture (North Star)
103103

104-
```text
105-
ancplua-claude-plugins/
106-
├── CLAUDE.md # This file — operational brain
107-
├── AGENTS.md # Agent catalog for other AIs
108-
├── README.md
109-
├── CHANGELOG.md
110-
├── LICENSE
111-
├── .gitignore
112-
├── .coderabbit.yaml # CodeRabbit config
113-
├── .markdownlint.json # Lint rules
114-
115-
├── .claude/
116-
│ └── rules/ # Auto-loaded rules (SOLID, errors, etc.)
117-
118-
├── .claude-plugin/
119-
│ └── marketplace.json # Plugin registry (source of truth)
120-
121-
├── .github/
122-
│ ├── copilot-instructions.md
123-
│ └── workflows/ # CI, review, auto-merge
124-
125-
├── plugins/ # 7 plugins (22 commands, 5 skills, 9 agents)
126-
│ ├── exodia/ # Multi-agent orchestration — 9 commands + 2 skills (eight-gates, hades)
127-
│ ├── metacognitive-guard/ # Cognitive amplification + commit integrity + CI
128-
│ ├── otelwiki/ # OpenTelemetry docs + sync
129-
│ ├── hookify/ # User-configurable hooks
130-
│ ├── feature-dev/ # Guided feature development + code review
131-
│ ├── dotnet-architecture-lint/# .NET build pattern enforcement
132-
│ └── ancplua-project-routing/ # Cross-repo specialist agent routing
133-
134-
├── docs/
135-
│ ├── ARCHITECTURE.md
136-
│ ├── PLUGINS.md
137-
│ ├── WORKFLOWS.md
138-
│ ├── QUICK-REFERENCE.md
139-
│ ├── ENGINEERING-PRINCIPLES.md
140-
│ ├── specs/ # Feature specs (spec-XXXX-*.md)
141-
│ ├── decisions/ # ADRs (ADR-XXXX-*.md)
142-
│ └── designs/ # Design docs
143-
144-
└── tooling/
145-
├── scripts/
146-
│ ├── weave-validate.sh # Single validation entrypoint
147-
│ └── sync-marketplace.sh
148-
└── templates/
149-
└── plugin-template/
150-
```
104+
See `docs/ARCHITECTURE.md` for the complete repository layout, plugin structure, and ecosystem diagram.
105+
106+
Key paths:
107+
- Plugins: `plugins/<name>/` — 7 plugins (22 commands, 5 skills, 9 agents)
108+
- Rules (auto-loaded): `.claude/rules/`
109+
- Plugin registry: `.claude-plugin/marketplace.json`
110+
- Docs: `docs/` (ARCHITECTURE.md, QUICK-REFERENCE.md, WORKFLOWS.md, PLUGINS.md, ENGINEERING-PRINCIPLES.md)
151111

152112
---
153113

@@ -162,6 +122,12 @@ These decision trees are ALWAYS loaded and guide your task selection.
162122
Use this decision tree to route tasks to the correct skill or agent:
163123

164124
```text
125+
IF P0 critical bug
126+
→ /exodia:turbo-fix (13 agents, maximum parallelism)
127+
128+
IF fixing audit findings
129+
→ /exodia:fix-pipeline (7 agents)
130+
165131
IF struggling > 2 min
166132
→ read metacognitive-guard skill, escalate to deep-think-partner agent
167133
@@ -213,7 +179,9 @@ IF multi-agent orchestration needed
213179
/exodia:eight-gates - maximum discipline (8 progressive gates, composes all others)
214180
/exodia:hades - audited cleanup (3 phases x 4+3 teammates with goggles)
215181
→ exodia commands:
182+
/exodia:turbo-fix - P0 critical bugs (13 agents, maximum parallelism)
216183
/exodia:fix - P1/P2/P3 bugs (8 std, 16 max agents)
184+
/exodia:fix-pipeline - fixing findings from an audit (7 agents)
217185
/exodia:mega-swarm - codebase audit (6/8/12 agents by mode)
218186
/exodia:deep-think - multi-perspective analysis (5 agents)
219187
/exodia:tournament - competitive solutions (N+2 agents)
@@ -549,21 +517,11 @@ When you add/rename/remove a plugin:
549517

550518
### Plugin Structure
551519

552-
Each plugin in `plugins/<name>/` (per [official docs](https://code.claude.com/docs/en/plugins)):
520+
Each plugin in `plugins/<name>/` (per [official docs](https://code.claude.com/docs/en/plugins)).
553521

554-
```text
555-
plugins/<name>/
556-
├── .claude-plugin/
557-
│ └── plugin.json # REQUIRED: name, version, description, author
558-
├── README.md # REQUIRED: User-facing docs
559-
├── skills/
560-
│ └── <skill>/
561-
│ └── SKILL.md # YAML frontmatter required
562-
├── commands/ # Slash commands (.md)
563-
├── agents/ # Custom agents
564-
├── hooks/ # Event hooks (hooks.json)
565-
└── scripts/ # Shell helpers (.sh)
566-
```
522+
See `docs/ARCHITECTURE.md` Section 3 for the full plugin structure and passive context layer documentation.
523+
524+
**Required:** `.claude-plugin/plugin.json` (fields: `name`, `version`, `description`, `author`) + `README.md`
567525

568526
### SKILL.md Format
569527

@@ -627,17 +585,10 @@ You MUST NOT:
627585

628586
## 8. CI & Validation
629587

630-
### CI Jobs (`.github/workflows/ci.yml`)
631-
632-
- `plugin-validation`: `claude plugin validate .` + per-plugin
633-
- `shell-scripts`: `shellcheck` on `*.sh` files
634-
- `markdown`: `markdownlint` on `**/*.md`
635-
- `workflow-syntax`: `actionlint` on workflows
588+
See `docs/WORKFLOWS.md` for complete CI pipeline documentation, exact shell commands, and the cross-repo `trigger-docs.yml` workflow.
636589

637590
### Local Validation
638591

639-
Single entrypoint:
640-
641592
```bash
642593
./tooling/scripts/weave-validate.sh
643594
```
@@ -743,6 +694,10 @@ claude plugin validate .
743694
- Specs: `docs/specs/spec-XXXX-*.md`
744695
- ADRs: `docs/decisions/ADR-XXXX-*.md`
745696
- Architecture: `docs/ARCHITECTURE.md`
697+
- Full command reference: `docs/QUICK-REFERENCE.md`
698+
- CI pipeline details: `docs/WORKFLOWS.md`
699+
- Plugin creation guide: `docs/PLUGINS.md`
700+
- Deep engineering principles: `docs/ENGINEERING-PRINCIPLES.md`
746701

747702
---
748703

@@ -778,7 +733,8 @@ You have SUCCEEDED when:
778733
The following rules are maintained as separate files in `.claude/rules/` and auto-loaded at session start:
779734

780735
- `.claude/rules/solid-principles.md` — SOLID principles for plugin design
781-
- `.claude/rules/thought-transparency.md` — Observable decision making, task decomposition
736+
- `.claude/rules/engineering-principles.md` — IF/THEN routing index for Alexander's 26 engineering principles
737+
- `.claude/rules/thought-transparency.md` — Observable decision making via Processing Log template
782738
- `.claude/rules/devops-calms.md` — CALMS framework, DORA metrics
783739
- `.claude/rules/error-handling.md` — Standardized error responses, validation failures
784740

0 commit comments

Comments
 (0)