Skip to content

Commit 351093b

Browse files
authored
Merge branch 'main' into symphony/pln-228
2 parents a0dfd5b + a7e8049 commit 351093b

59 files changed

Lines changed: 888 additions & 305 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,69 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
## [Unreleased]
88

9+
### bootstrap v1.2.0
10+
11+
#### Changed
12+
- Migrated critic-gates configuration path from `.claude/settings/critic-gates.json` to `.closedloop-ai/settings/critic-gates.json` across `agent-decomposer`, `agent-prompt-validator`, `generation-validator`, and `agent-bootstrap` command
13+
- Migrated schema validation path from `.claude/schemas/` to `.closedloop-ai/schemas/` in `agent-prompt-validator`
14+
- Updated agent output path references from `.claude/runs/` to `.closedloop-ai/runs/` in `agent-prompt-generator`
15+
- Updated bootstrap configuration documentation in `agent-bootstrap.md` to reference `.closedloop-ai/` state directory
16+
17+
### code v1.6.0
18+
19+
#### Changed
20+
- Migrated all remaining `.claude/` path references to `.closedloop-ai/` across hooks, scripts, agents, skills, and orchestrator prompt -- completes the directory migration started in v1.1.0
21+
- Replaced `gawk` FPAT-based TOON parser with portable `csv_split()` function in `pretooluse-hook.sh` and `subagent-start-hook.sh`, removing the hard dependency on GNU awk
22+
- Refactored awk array usage from associative `patterns[n]["key"]` to parallel flat arrays for POSIX awk compatibility
23+
- Updated `install-dependencies.sh` to verify any `awk` instead of requiring `gawk` with FPAT support
24+
- Updated org learnings copy path in `run-loop.sh` to use `.closedloop-ai/learnings/` with workdir-adjacent state directory resolution
25+
26+
#### Removed
27+
- Removed all legacy `.claude/.closedloop/` session/workdir/env fallback paths from `loop-stop-hook.sh`, `pretooluse-hook.sh`, `session-end-hook.sh`, `subagent-start-hook.sh`, `subagent-stop-hook.sh`, and `setup-closedloop.sh`
28+
- Removed legacy `~/.claude/.learnings/org-patterns.toon` fallback from `pretooluse-hook.sh` and `subagent-start-hook.sh`
29+
- Removed legacy cleanup logic from `session-end-hook.sh` (PID cleanup, stale session removal, legacy directory deletion)
30+
31+
#### Added
32+
- Tests for legacy path ignorance in pretooluse and subagent-start hooks, setup-closedloop, and self-learning flag tests
33+
- Tests for portable awk injection (`test_injects_when_only_plain_awk_is_available`) in both hook test suites
34+
35+
### code-review v1.4.0
36+
37+
#### Changed
38+
- Migrated GitHub mode output file paths from `.claude/` to `.closedloop-ai/`: `code-review-findings.json`, `code-review-threads.json`, and `code-review-summary.md`
39+
- Updated `route` subcommand to read critic-gates from `.closedloop-ai/settings/critic-gates.json`
40+
- Simplified fast-path routing to `total_loc <= 200` threshold only (was `<= 150 LOC AND <= 5 files AND no domain critics`); domain critics are now folded into the fast-path agent as an additional pass
41+
42+
#### Added
43+
- Structured reasoning protocol for Premise Reviewer: `AUTHOR'S CLAIM / COUNTER-EVIDENCE / ALTERNATIVE CHECK / CONCLUSION` validation gate before reporting premise findings
44+
- Reasoning certificate for Bug Hunter A: `PREMISE / TRACE / DIVERGENCE / GUARD CHECK / CONCLUSION` trace-based bug confirmation gate with emission filtering
45+
- Domain critic pass injection in fast-path reviewer via `{DOMAIN_CRITIC_PASS}` placeholder, enabling domain expert review within single-agent fast-path runs
46+
- Replaced shared prompt reasoning checklist with structured `PREMISE / EVIDENCE / GUARD CHECK / SEVERITY CHECK` analysis framework
47+
48+
### judges v1.5.0
49+
50+
#### Changed
51+
- Migrated threshold override paths from `.claude/settings/threshold-overrides.json` to `.closedloop-ai/settings/threshold-overrides.json` in `run-judges` skill (both run-specific and repo-level locations)
52+
53+
### platform v1.1.0
54+
55+
#### Changed
56+
- Version bump to align with cross-plugin `.closedloop-ai/` directory migration
57+
58+
### self-learning v1.1.0
59+
60+
#### Changed
61+
- Migrated org learnings paths from `.claude/learnings/` to `.closedloop-ai/learnings/` across `pull-learnings`, `push-learnings`, and `bootstrap-learnings.sh`
62+
- Migrated run path references from `.claude/runs/` to `.closedloop-ai/runs/` in `process-learnings` command
63+
- Simplified `preflight-check.sh` to verify `awk` availability instead of requiring `gawk` with FPAT support
64+
65+
#### Removed
66+
- Removed legacy `~/.claude/.learnings/org-patterns.toon` fallback from `compute_success_rates.py` and `write_merged_patterns.py`
67+
- Removed legacy session file lookup path from `evaluate_goal.py`
68+
69+
#### Added
70+
- Test verifying CLI ignores legacy home TOON path in `test_compute_success_rates.py`
71+
972
### code v1.5.10
1073

1174
#### Changed

docs/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A comprehensive guide to ClosedLoop terminology and concepts.
55
## Orchestration
66

77
**Closed Loop**
8-
The external bash loop (`run-loop.sh`) that drives fresh-context Claude iterations. Each iteration launches `claude -p` with a clean context window, preventing context exhaustion on long tasks. State persists between iterations in `.claude/closedloop-loop.local.md`.
8+
The external bash loop (`run-loop.sh`) that drives fresh-context Claude iterations. Each iteration launches `claude -p` with a clean context window, preventing context exhaustion on long tasks. State persists between iterations in `.closedloop-ai/closedloop-loop.local.md`.
99

1010
**Orchestrator**
1111
The `prompt.md` system prompt loaded by `run-loop.sh` at the start of each iteration. Coordinates 8 workflow phases (discovery, planning, judge review, plan refinement, implementation, verification, build validation, and learning capture) entirely through subagent delegation. The orchestrator never reads project files directly.

plugins/bootstrap/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bootstrap",
33
"description": "Bootstrap plugin for ClosedLoop",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"author": {
66
"name": "ClosedLoop",
77
"email": "support@closedloop.ai"

plugins/bootstrap/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Decomposition is driven by domain complexity (high complexity favors decompositi
9292

9393
Also generates `critic-gates.json`, which defines which agents act as critics in the `code` workflow. Required agents (`test-strategist`, `security-privacy`) and language experts are always base critics. Domain agents are mapped to module patterns so they are only invoked when relevant.
9494

95-
Produces: `synthesis/decomposed-agents.json`, `.claude/settings/critic-gates.json`
95+
Produces: `synthesis/decomposed-agents.json`, `.closedloop-ai/settings/critic-gates.json`
9696

9797
### generation-validator
9898

@@ -214,7 +214,7 @@ Durable outputs written outside the run directory:
214214
<agent-name>.md (one file per generated agent)
215215
.closedloop-ai/
216216
bootstrap-metadata.json (tracks all generated agents for --update mode)
217-
.claude/settings/
217+
.closedloop-ai/settings/
218218
critic-gates.json (critic selection rules for the code workflow)
219219
```
220220

plugins/bootstrap/agents/agent-decomposer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For each decomposable candidate agent, decide: keep as single agent OR split int
2323

2424
### Generating Critic Gates Configuration
2525

26-
After decomposition decisions are made, generate `.claude/settings/critic-gates.json` to define which agents can act as critics.
26+
After decomposition decisions are made, generate `.closedloop-ai/settings/critic-gates.json` to define which agents can act as critics.
2727

2828
**Step 1: Identify Base Critics**
2929

@@ -492,7 +492,7 @@ For each final agent (decomposed or not), define:
492492
}
493493
```
494494

495-
### 2. Critic Gates Configuration: `.claude/settings/critic-gates.json`
495+
### 2. Critic Gates Configuration: `.closedloop-ai/settings/critic-gates.json`
496496

497497
Generated critic configuration for the code workflow:
498498

@@ -543,7 +543,7 @@ Generated critic configuration for the code workflow:
543543
- Only include agents that exist in finalAgents
544544
- Skip moduleCritics entries if no relevant agents exist (e.g., don't add database patterns if no database-architect)
545545
- Only include language experts that were detected (don't add python-pro if no Python found)
546-
- Safe-write: If `.claude/settings/critic-gates.json` already exists, write to `$RUN/settings/critic-gates.json` instead and warn user
546+
- Safe-write: If `.closedloop-ai/settings/critic-gates.json` already exists, write to `$RUN/settings/critic-gates.json` instead and warn user
547547

548548
## Input Validation
549549

@@ -581,7 +581,7 @@ This ensures the upstream `expertise-mapper` produced valid output before decomp
581581
- ✅ Critic-capable agents (from generated critic-gates.json) contain `supportsCriticMode` + `modes` blocks with review metadata
582582
- ✅ Both output files are valid JSON
583583
- ✅ decomposed-agents.json written to synthesis/
584-
- ✅ critic-gates.json written to .claude/settings/ (or $RUN/settings/ if file exists)
584+
- ✅ critic-gates.json written to .closedloop-ai/settings/ (or $RUN/settings/ if file exists)
585585

586586
## Error Handling
587587

plugins/bootstrap/agents/agent-prompt-generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Translate the agent's `requires` and `produces` into clear documentation:
423423
```markdown
424424
## Output Format
425425

426-
Write to `.claude/runs/<timestamp>/arch/database-schema.md`:
426+
Write to `.closedloop-ai/runs/<timestamp>/arch/database-schema.md`:
427427

428428
### Required Sections
429429

plugins/bootstrap/agents/agent-prompt-validator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ Write to `$RUN/synthesis/agent-validation.json`:
378378

379379
## Schema Validation
380380

381-
Before running semantic checks, validate input artifacts against schemas in `.claude/schemas/`:
381+
Before running semantic checks, validate input artifacts against schemas in `.closedloop-ai/schemas/`:
382382

383383
- `$RUN/synthesis/decomposed-agents.json``decomposed-agents.schema.json`
384384
- `.closedloop-ai/bootstrap-metadata.json``bootstrap-metadata.schema.json`

plugins/bootstrap/agents/generation-validator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You validate that the decomposed agent list is ready for generation by checking
1414
## Inputs
1515

1616
- `$RUN/synthesis/decomposed-agents.json` - Final agent list with artifact contracts
17-
- `.claude/settings/critic-gates.json` - Critic configuration (generated by agent-decomposer)
17+
- `.closedloop-ai/settings/critic-gates.json` - Critic configuration (generated by agent-decomposer)
1818

1919
## Task
2020

@@ -39,7 +39,7 @@ Each agent spec must have:
3939
-**parallelizable**: Boolean
4040
-**group**: String or null
4141
-**priority**: Number 0-2 (if has group)
42-
-**supportsCriticMode** and `modes` when agent is in the critic-capable set (dynamically discovered from `.claude/settings/critic-gates.json`).
42+
-**supportsCriticMode** and `modes` when agent is in the critic-capable set (dynamically discovered from `.closedloop-ai/settings/critic-gates.json`).
4343
- To discover critics: Extract all unique agent names from `defaults.baseCritics` and `moduleCritics[].critics`.
4444
- Note: `parityCritics` will be empty at bootstrap time (populated later by orchestrator on first `/code` run), so don't include it in discovery.
4545
- If critic-gates.json doesn't exist, skip critic validation entirely.
@@ -161,7 +161,7 @@ For each critic-capable agent (discovered from critic-gates.json):
161161

162162
#### 9. critic-gates.json Structure Validation
163163

164-
Validate the structure of `.claude/settings/critic-gates.json`:
164+
Validate the structure of `.closedloop-ai/settings/critic-gates.json`:
165165

166166
- `defaults.baseCritics`: must be array of strings
167167
- `moduleCritics`: must be array of objects, each with `patterns` (array of strings) and `critics` (array of strings)

plugins/bootstrap/commands/agent-bootstrap.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"$RUN/discovery/project-context.md",
5151
"$RUN/discovery/domains.json"
5252
],
53-
"produces": ["$RUN/synthesis/decomposed-agents.json", ".claude/settings/critic-gates.json"],
53+
"produces": ["$RUN/synthesis/decomposed-agents.json", ".closedloop-ai/settings/critic-gates.json"],
5454
"parallelizable": false
5555
},
5656
{

plugins/bootstrap/commands/agent-bootstrap.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Maps detected languages and domains to base expert agent roles.
109109

110110
Analyzes candidate agents and decides which should be split into specialists based on complexity and breadth. Generates critic-gates.json configuration for the code workflow.
111111

112-
**Produces:** `synthesis/decomposed-agents.json`, `.claude/settings/critic-gates.json`
112+
**Produces:** `synthesis/decomposed-agents.json`, `.closedloop-ai/settings/critic-gates.json`
113113

114114
### Phase 5: Pre-Generation Validation
115115

@@ -157,7 +157,7 @@ Generated agents written to `.claude/agents/`:
157157

158158
Generated configuration files:
159159

160-
- `.claude/settings/critic-gates.json` - Critic selection rules for the code workflow (safe write)
160+
- `.closedloop-ai/settings/critic-gates.json` - Critic selection rules for the code workflow (safe write)
161161

162162
## Examples
163163

@@ -227,7 +227,7 @@ Constrain analysis to backend domains:
227227

228228
## Configuration
229229

230-
Bootstrap behavior can be customized via `.claude/commands/agent-bootstrap.json` (created automatically on first run).
230+
Bootstrap behavior is defined by `commands/agent-bootstrap.json`; generated run state lives under `.closedloop-ai/`, and generated agents are written to `.claude/agents/`.
231231

232232
## Exit Criteria
233233

0 commit comments

Comments
 (0)