@tyroneross/build-loop 0.34.0 → 0.36.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/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +1 -1
- package/AGENTS.md +71 -18
- package/README.md +208 -299
- package/agents/advisor.md +2 -0
- package/agents/alignment-checker.md +2 -0
- package/agents/api-assessor.md +3 -1
- package/agents/architecture-scout.md +2 -0
- package/agents/assessment-orchestrator.md +2 -0
- package/agents/build-orchestrator.md +13 -8
- package/agents/database-assessor.md +107 -3
- package/agents/design-contract-specialist.md +2 -0
- package/agents/fact-checker.md +2 -0
- package/agents/fix-critique.md +26 -5
- package/agents/frontend-assessor.md +3 -1
- package/agents/implementer.md +2 -0
- package/agents/independent-auditor.md +2 -0
- package/agents/mock-scanner.md +2 -0
- package/agents/optimize-runner.md +2 -0
- package/agents/overfitting-reviewer.md +2 -0
- package/agents/performance-assessor.md +3 -1
- package/agents/plan-critic.md +5 -2
- package/agents/promotion-reviewer.md +2 -0
- package/agents/recurring-pattern-detector.md +4 -1
- package/agents/retrospective-synthesizer.md +14 -0
- package/agents/root-cause-investigator.md +39 -2
- package/agents/scope-auditor.md +2 -0
- package/agents/security-reviewer.md +3 -0
- package/agents/self-improvement-architect.md +2 -0
- package/agents/synthesis-critic.md +2 -0
- package/agents/transcript-pattern-miner.md +2 -0
- package/agents/ui-validator.md +2 -0
- package/assets/build-loop-plugin-icon.png +0 -0
- package/bin/build-loop-install.js +234 -0
- package/commands/run.md +1 -1
- package/hooks/git/pre-commit +40 -0
- package/hooks/git/pre-push +35 -10
- package/hooks/hooks.json +42 -5
- package/hooks/pre-edit-architecture.sh +2 -2
- package/hooks/route-guard.sh +15 -0
- package/hooks/route_guard.py +221 -0
- package/hooks/session-start-extensions.sh +10 -0
- package/hooks/session-start-git-hooks.sh +6 -1
- package/hooks/session-start-rally-point.sh +23 -1
- package/hooks/test_session_start_rally_version.sh +123 -0
- package/package.json +7 -2
- package/plugin-artifacts/codex/.codex-plugin/plugin.json +1 -1
- package/plugin-artifacts/codex/AGENTS.md +77 -16
- package/plugin-artifacts/codex/README.md +208 -299
- package/plugin-artifacts/codex/assets/build-loop-plugin-icon.png +0 -0
- package/plugin-artifacts/codex/references/agent-role-taxonomy.md +34 -0
- package/plugin-artifacts/codex/references/backlog-system.md +285 -0
- package/plugin-artifacts/codex/references/capability-routing.md +49 -0
- package/plugin-artifacts/codex/references/coordination-file-template.md +2 -2
- package/plugin-artifacts/codex/references/coordination-rules.md +275 -6
- package/plugin-artifacts/codex/references/memory-systems.md +25 -2
- package/plugin-artifacts/codex/references/memory.md +16 -0
- package/plugin-artifacts/codex/references/model-tier-mapping.md +45 -6
- package/plugin-artifacts/codex/references/phase-1-assess.md +19 -1
- package/plugin-artifacts/codex/references/phase-2-plan.md +10 -1
- package/plugin-artifacts/codex/references/phase-3-execute.md +5 -3
- package/plugin-artifacts/codex/references/phase-4-review.md +22 -1
- package/plugin-artifacts/codex/references/phase-5-iterate.md +4 -3
- package/plugin-artifacts/codex/references/phase-6-learn.md +3 -1
- package/plugin-artifacts/codex/references/verify-dispatch.md +85 -0
- package/plugin-artifacts/codex/skills/build-loop/SKILL.md +19 -10
- package/plugin-artifacts/codex/skills/build-loop/fallbacks.md +1 -1
- package/plugin-artifacts/codex/skills/build-loop/references/capability-routing.md +49 -0
- package/plugin-artifacts/codex/skills/build-loop/references/experiment-results-template.md +101 -0
- package/plugin-artifacts/codex/skills/build-loop/references/memory.md +16 -0
- package/plugin-artifacts/codex/skills/build-loop/references/output-style.md +98 -5
- package/plugin-artifacts/codex/skills/build-loop/references/phase-1-assess.md +19 -1
- package/plugin-artifacts/codex/skills/build-loop/references/phase-2-plan.md +10 -1
- package/plugin-artifacts/codex/skills/build-loop/references/phase-3-execute.md +5 -3
- package/plugin-artifacts/codex/skills/build-loop/references/phase-4-review.md +22 -1
- package/plugin-artifacts/codex/skills/build-loop/references/phase-5-iterate.md +4 -3
- package/plugin-artifacts/codex/skills/build-loop/references/phase-6-learn.md +3 -1
- package/plugin-artifacts/codex/skills/build-loop/references/verify-dispatch.md +85 -0
- package/plugin-artifacts/codex/skills/build-loop/templates/codex-worker-prompt.md +4 -0
- package/scripts/build_codex_plugin_artifact.py +7 -0
- package/scripts/embed_backend.py +17 -13
- package/scripts/lessons_index/query.py +1 -1
- package/scripts/memory_graph/__init__.py +2 -2
- package/scripts/sync_navgator_lessons.py +4 -4
- package/skills/api-registry-bridge/SKILL.md +1 -1
- package/skills/auto-decision-capture/SKILL.md +4 -3
- package/skills/auto-finding-capture/SKILL.md +119 -0
- package/skills/build-loop/SKILL.md +19 -10
- package/skills/build-loop/fallbacks.md +1 -1
- package/skills/build-loop/references/capability-routing.md +49 -0
- package/skills/build-loop/references/experiment-results-template.md +101 -0
- package/skills/build-loop/references/memory.md +14 -0
- package/skills/build-loop/references/output-style.md +98 -5
- package/skills/build-loop/references/phase-1-assess.md +19 -1
- package/skills/build-loop/references/phase-2-plan.md +10 -1
- package/skills/build-loop/references/phase-3-execute.md +5 -3
- package/skills/build-loop/references/phase-4-review.md +20 -1
- package/skills/build-loop/references/phase-5-iterate.md +4 -3
- package/skills/build-loop/references/phase-6-learn.md +2 -0
- package/skills/build-loop/references/verify-dispatch.md +85 -0
- package/skills/build-loop/templates/codex-worker-prompt.md +4 -0
- package/skills/debug-loop/SKILL.md +4 -2
- package/skills/debugging-memory/SKILL.md +24 -12
- package/skills/{debugging/assess/SKILL.md → debugging-memory/references/assess.md} +6 -13
- package/skills/{debugging/memory/SKILL.md → debugging-memory/references/search.md} +10 -17
- package/skills/{debugging/store/SKILL.md → debugging-memory/references/store.md} +5 -13
- package/skills/debugging-memory/references/subagent-integration.md +3 -3
- package/skills/defenseclaw-bridge/SKILL.md +1 -1
- package/skills/{loop-builder → focused-loop-builder}/SKILL.md +6 -6
- package/skills/ibr-bridge/SKILL.md +1 -1
- package/skills/knowledge/SKILL.md +13 -2
- package/skills/{knowledge-review/SKILL.md → knowledge/references/review-mode.md} +8 -20
- package/skills/logging-tracer/SKILL.md +20 -4
- package/skills/model-bakeoff/SKILL.md +44 -0
- package/skills/model-tiering/SKILL.md +55 -20
- package/skills/optimize/SKILL.md +2 -2
- package/skills/prd-bridge/SKILL.md +1 -1
- package/skills/recursive-retrospective/SKILL.md +46 -0
- package/skills/recursive-retrospective/references/01-retrospective.md +136 -0
- package/skills/recursive-retrospective/references/02-learning-capture.md +72 -0
- package/skills/recursive-retrospective/references/03-judge.md +45 -0
- package/skills/research/SKILL.md +1 -1
- package/skills/root-cause-analysis/SKILL.md +42 -0
- package/skills/security-methodology/SKILL.md +10 -1
- package/skills/security-scan/SKILL.md +55 -0
- package/skills/spec-writing/SKILL.md +42 -1
- package/skills/sync-skills/SKILL.md +8 -7
- package/commands/assess.md +0 -41
- package/commands/compose-handoff.md +0 -113
- package/commands/debug.md +0 -20
- package/commands/debugger-detail.md +0 -34
- package/commands/debugger-scan.md +0 -15
- package/commands/debugger-status.md +0 -20
- package/commands/debugger.md +0 -32
- package/commands/optimize-run.md +0 -31
- package/commands/promote-experiment.md +0 -129
- package/commands/rally-point.md +0 -301
- package/commands/research-run.md +0 -22
- package/commands/review-knowledge.md +0 -16
- package/commands/self-review.md +0 -51
- package/commands/setup-memory.md +0 -32
- package/commands/start-prd.md +0 -57
- package/commands/test.md +0 -34
- package/commands/verify-plan.md +0 -39
- package/skills/debugging/debug-loop/SKILL.md +0 -231
- package/skills/logging-tracer-bridge/SKILL.md +0 -70
- /package/skills/{loop-builder → focused-loop-builder}/presets/active-project-evidence.yaml +0 -0
- /package/skills/{loop-builder → focused-loop-builder}/presets/generic-artifact-loop.yaml +0 -0
- /package/skills/{loop-builder → focused-loop-builder}/presets/presentation-audit.yaml +0 -0
- /package/skills/{loop-builder → focused-loop-builder}/presets/research-synthesis.yaml +0 -0
- /package/skills/{loop-builder → focused-loop-builder}/presets/source-ingestion-raw-data-audit.yaml +0 -0
- /package/skills/{loop-builder → focused-loop-builder}/references/spec-format.md +0 -0
- /package/skills/{loop-builder → focused-loop-builder}/scripts/loop_builder.py +0 -0
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Compose a complete build-loop handoff from current run state. Optional --launch starts a fresh session in the stable checkout with the handoff injected."
|
|
3
|
-
argument-hint: "[--launch] [--workdir DIR]"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
7
|
-
|
|
8
|
-
{{#if ARGUMENTS}}
|
|
9
|
-
{{#contains ARGUMENTS "--launch"}}
|
|
10
|
-
|
|
11
|
-
## Step 1 — Compose the handoff doc
|
|
12
|
-
|
|
13
|
-
Run from the STABLE checkout (not a worktree):
|
|
14
|
-
```bash
|
|
15
|
-
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/handoff --workdir "$PWD" --output .build-loop/handoff-latest.md
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Report the sources used and any warnings from stderr.
|
|
19
|
-
|
|
20
|
-
## Step 2 — Identify the stable checkout path
|
|
21
|
-
|
|
22
|
-
Run:
|
|
23
|
-
```bash
|
|
24
|
-
git worktree list --porcelain | grep "^worktree" | head -1 | awk '{print $2}'
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This is the canonical repo root. The new session MUST open there, not in any `.build-loop/worktrees/` sub-path (those may be GC'd).
|
|
28
|
-
|
|
29
|
-
## Step 3 — Launch a fresh session with handoff injected
|
|
30
|
-
|
|
31
|
-
Determine the host. Then:
|
|
32
|
-
|
|
33
|
-
**Claude Code host** — use `claude --print` in a new terminal:
|
|
34
|
-
```bash
|
|
35
|
-
HANDOFF=$(cat .build-loop/handoff-latest.md)
|
|
36
|
-
echo "RESUME_FROM_HANDOFF: The following handoff document captures the current build-loop run state. Use it to resume work.\n\n${HANDOFF}" | claude --print
|
|
37
|
-
```
|
|
38
|
-
If the trust prompt fires on the new session, type `y` and press Enter.
|
|
39
|
-
|
|
40
|
-
**Codex host** — pass the doc as context:
|
|
41
|
-
```bash
|
|
42
|
-
codex --context "$(cat .build-loop/handoff-latest.md)" "Resume from the attached handoff document."
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Unknown / unsupported host** — print the path and instructions:
|
|
46
|
-
```
|
|
47
|
-
Handoff doc written to: .build-loop/handoff-latest.md
|
|
48
|
-
To resume: open a fresh session at <stable-checkout-path>, share the handoff doc as your opening message, and load the build-loop:build-loop skill.
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
In all cases: exit 0 (degrade gracefully — the doc is the deliverable, launch is a convenience).
|
|
52
|
-
|
|
53
|
-
{{else}}
|
|
54
|
-
|
|
55
|
-
## Compose the handoff document
|
|
56
|
-
|
|
57
|
-
Run:
|
|
58
|
-
```bash
|
|
59
|
-
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/handoff --workdir "$PWD"
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Present the full output as your response. Also report:
|
|
63
|
-
- Sources used (from the `sources` field if `--json` was used)
|
|
64
|
-
- Any warnings
|
|
65
|
-
|
|
66
|
-
{{/contains}}
|
|
67
|
-
{{else}}
|
|
68
|
-
|
|
69
|
-
## Compose the handoff document
|
|
70
|
-
|
|
71
|
-
Run:
|
|
72
|
-
```bash
|
|
73
|
-
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/handoff --workdir "$PWD"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Present the full output. Also note:
|
|
77
|
-
- What sources were found vs missing
|
|
78
|
-
- Any errors/warnings
|
|
79
|
-
|
|
80
|
-
To launch a fresh session after handoff, re-run with `--launch`:
|
|
81
|
-
```
|
|
82
|
-
/build-loop:compose-handoff --launch
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
{{/if}}
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Reference
|
|
90
|
-
|
|
91
|
-
**Emit to stdout (default)**
|
|
92
|
-
```
|
|
93
|
-
/build-loop:compose-handoff
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Write to file**
|
|
97
|
-
```
|
|
98
|
-
/build-loop:compose-handoff --workdir /path/to/repo
|
|
99
|
-
```
|
|
100
|
-
(Use `--output` flag in the script directly for file output.)
|
|
101
|
-
|
|
102
|
-
**Emit + launch fresh session**
|
|
103
|
-
```
|
|
104
|
-
/build-loop:compose-handoff --launch
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**JSON envelope (for programmatic use)**
|
|
108
|
-
```bash
|
|
109
|
-
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/handoff --workdir "$PWD" --json
|
|
110
|
-
```
|
|
111
|
-
Returns `{document, sources, errors, ts}`.
|
|
112
|
-
|
|
113
|
-
See `skills/handoff/SKILL.md` for the full 8-section template, source table, and host-agnostic design notes.
|
package/commands/debug.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "(Advanced override — `/build-loop:run` auto-routes here on symptom language; use this to force debug mode.) Deep iterative debugging — causal-tree investigation, fix, verify, critique. Up to 5 iterations."
|
|
3
|
-
argument-hint: "<symptom>"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
7
|
-
|
|
8
|
-
{{#if ARGUMENTS}}
|
|
9
|
-
Load the `build-loop:debug-loop` skill. Symptom: `{{ARGUMENTS}}`
|
|
10
|
-
{{else}}
|
|
11
|
-
Load the `build-loop:debug-loop` skill. Ask the user what failure to investigate.
|
|
12
|
-
|
|
13
|
-
Examples:
|
|
14
|
-
- `/build-loop:debug tests pass locally but fail in CI`
|
|
15
|
-
- `/build-loop:debug login works once then breaks on refresh`
|
|
16
|
-
- `/build-loop:debug API returns wrong data intermittently`
|
|
17
|
-
|
|
18
|
-
For quick memory lookup, use `/build-loop:debugger` instead.
|
|
19
|
-
For multi-domain assessment, use `/build-loop:assess` instead.
|
|
20
|
-
{{/if}}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Load full build-loop incident or pattern details from native debugging memory"
|
|
3
|
-
allowed-tools: Read, Grep
|
|
4
|
-
argument-hint: "<INC_* or PTN_* id>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
8
|
-
|
|
9
|
-
# Debugger Detail
|
|
10
|
-
|
|
11
|
-
Load full details for a specific incident or pattern from debugging memory.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
/debugger-detail <ID>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Where `<ID>` is an incident ID (INC_*) or pattern ID (PTN_*).
|
|
20
|
-
|
|
21
|
-
## What to do
|
|
22
|
-
|
|
23
|
-
1. Search `.build-loop/issues/` for the requested incident or pattern ID.
|
|
24
|
-
|
|
25
|
-
2. Present the result to the user in a readable format:
|
|
26
|
-
- For incidents: show symptom, root cause, fix approach, file changes, verification status
|
|
27
|
-
- For patterns: show detection signature, solution template, success rate, usage history
|
|
28
|
-
|
|
29
|
-
3. If the ID is from a progressive search result, explain how this detail relates to the user's current issue.
|
|
30
|
-
|
|
31
|
-
## Examples
|
|
32
|
-
|
|
33
|
-
- `/debugger-detail INC_API_20260215_143022_a1b2` — loads full incident
|
|
34
|
-
- `/debugger-detail PTN_REACT_HOOKS` — loads full pattern
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Capture recent debugging incidents into build-loop native memory"
|
|
3
|
-
allowed-tools: Read, Grep, Bash
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
7
|
-
|
|
8
|
-
Review recent build-loop run notes, reports, and validation failures for debugging work from the past 7 days. Store confirmed incidents as Markdown files under `.build-loop/issues/`.
|
|
9
|
-
|
|
10
|
-
Prioritize:
|
|
11
|
-
- Root cause analysis documents
|
|
12
|
-
- Error tracking logs
|
|
13
|
-
- Fix reports
|
|
14
|
-
|
|
15
|
-
Do not call external debugger packages by default. Use standalone Coding Debugger only when the user explicitly asks for cross-project memory.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Show build-loop native debugging memory statistics"
|
|
3
|
-
allowed-tools: Bash, Read
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
7
|
-
|
|
8
|
-
Display the current state of build-loop's native debugging memory:
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
find .build-loop/issues -type f -name '*.md' 2>/dev/null | wc -l
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
This shows:
|
|
15
|
-
- Number of stored incidents
|
|
16
|
-
- Number of extracted patterns
|
|
17
|
-
- Storage size
|
|
18
|
-
- Recent activity
|
|
19
|
-
|
|
20
|
-
Use this to understand what debugging knowledge has been accumulated and whether the memory system is working correctly.
|
package/commands/debugger.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Search build-loop native debugging memory before debugging"
|
|
3
|
-
allowed-tools: Read, Grep
|
|
4
|
-
argument-hint: "<symptom>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
8
|
-
|
|
9
|
-
Search build-loop's native debugging memory for similar past incidents before investigating a new bug.
|
|
10
|
-
|
|
11
|
-
{{#if ARGUMENTS}}
|
|
12
|
-
|
|
13
|
-
Run the native memory-first workflow with the provided symptom:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
Skill("build-loop:debugging-memory-search") with input { symptom: "{{ARGUMENTS}}" }
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
After running the search:
|
|
20
|
-
1. If a match is found with >70% confidence, try that solution first
|
|
21
|
-
2. Review the root cause and fix approach from past incidents
|
|
22
|
-
3. Apply the documented fix, adapting as needed for the current context
|
|
23
|
-
4. If the fix works, no need to store again (already in memory)
|
|
24
|
-
5. If a different fix is needed, document it as a new incident
|
|
25
|
-
|
|
26
|
-
{{else}}
|
|
27
|
-
|
|
28
|
-
No symptom provided. Read recent local incidents from `.build-loop/issues/` if present, then ask the user to describe what they are debugging.
|
|
29
|
-
|
|
30
|
-
Use standalone Coding Debugger only when the user explicitly asks for cross-project debugger memory.
|
|
31
|
-
|
|
32
|
-
{{/if}}
|
package/commands/optimize-run.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: optimize-run
|
|
3
|
-
description: "(Advanced override — `/build-loop:run` auto-routes here; use this only to force the mode.) Run autonomous metric-driven optimization. Detects available targets or accepts a specific one."
|
|
4
|
-
argument-hint: "[target]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
8
|
-
|
|
9
|
-
Load the `build-loop:optimize` skill.
|
|
10
|
-
|
|
11
|
-
{{#if ARGUMENTS}}
|
|
12
|
-
Target: `{{ARGUMENTS}}`
|
|
13
|
-
|
|
14
|
-
Run all three phases:
|
|
15
|
-
1. **Setup** — configure the optimization for the specified target
|
|
16
|
-
2. **Loop** — iterate: hypothesize → edit → measure → keep or revert
|
|
17
|
-
3. **Review** — check for overfitting, summarize results
|
|
18
|
-
|
|
19
|
-
If the target matches a known profile (`simplify`, `optimize-build`, `optimize-tests`, `optimize-bundle`, `optimize-perf`, `semantic-search-latency`), use the pre-configured settings from `profiles.md`.
|
|
20
|
-
|
|
21
|
-
For custom targets, run Phase 1 (Setup) interactively.
|
|
22
|
-
For latency-sensitive targets, prefer repeated sampling with warmups and a stable aggregate such as `median` or `p95` instead of a single timing sample.
|
|
23
|
-
{{else}}
|
|
24
|
-
No target specified.
|
|
25
|
-
|
|
26
|
-
1. Run `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/optimize_loop.py --detect --workdir "$PWD"` to discover available targets
|
|
27
|
-
2. Check for existing `.build-loop/optimize/experiment.json` — offer to resume if found
|
|
28
|
-
3. Present available targets and let the user choose
|
|
29
|
-
4. The `simplify` target is always available (reduces line count in changed files)
|
|
30
|
-
5. For response-time work, initialize a custom target with `--metric-samples`, `--metric-warmups`, and `--metric-aggregate` so the loop compares stable latency numbers instead of one noisy run
|
|
31
|
-
{{/if}}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-loop:promote-experiment
|
|
3
|
-
description: Promote an auto-promoted experimental skill or agent from project-local `.build-loop/skills/active/` into the build-loop plugin repo, making it available across every project. Requires user confirmation and opens a PR on the plugin repo for review.
|
|
4
|
-
argument-hint: <artifact-name>
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
8
|
-
|
|
9
|
-
# /build-loop:promote-experiment <name>
|
|
10
|
-
|
|
11
|
-
Promote a proven experimental artifact into the build-loop plugin itself. This is the manual, user-approved counterpart to Phase 6 Learn's auto-promote — which stays local to the project. Cross-project promotion modifies the plugin repo and affects every user, so it is never automatic.
|
|
12
|
-
|
|
13
|
-
## Prerequisites
|
|
14
|
-
|
|
15
|
-
1. The artifact must exist at `.build-loop/skills/active/<name>/SKILL.md` (already auto-promoted within the project), OR at `.build-loop/skills/experimental/<name>/SKILL.md` (user is fast-tracking without waiting for A/B completion — require explicit confirmation).
|
|
16
|
-
|
|
17
|
-
2. The build-loop plugin repo must be writable. Check:
|
|
18
|
-
```bash
|
|
19
|
-
BUILD_LOOP_REPO="${CLAUDE_PLUGIN_ROOT:-$HOME/Desktop/git-folder/build-loop}"
|
|
20
|
-
[ -d "$BUILD_LOOP_REPO/.git" ] && [ -w "$BUILD_LOOP_REPO/skills" ]
|
|
21
|
-
```
|
|
22
|
-
If false, abort with "build-loop plugin repo not writable at $BUILD_LOOP_REPO".
|
|
23
|
-
|
|
24
|
-
3. The user must supply `<name>` as an argument. If missing, list current candidates:
|
|
25
|
-
```bash
|
|
26
|
-
ls .build-loop/skills/active/ 2>/dev/null
|
|
27
|
-
ls .build-loop/skills/experimental/ 2>/dev/null
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Steps
|
|
31
|
-
|
|
32
|
-
### 1. Read the evidence
|
|
33
|
-
|
|
34
|
-
Collect:
|
|
35
|
-
- The artifact's SKILL.md content
|
|
36
|
-
- Its experiments jsonl (`.build-loop/experiments/<name>.jsonl`)
|
|
37
|
-
- All `applied` entries across this project (and, if a global index exists at `~/.build-loop/experiments/<name>.jsonl`, append those too)
|
|
38
|
-
- Any `auto_promote` or `extend_sample` decisions from `.build-loop/experiments/decisions.jsonl`
|
|
39
|
-
|
|
40
|
-
Compute:
|
|
41
|
-
- Total applied runs (across projects)
|
|
42
|
-
- Aggregate win rate vs baseline
|
|
43
|
-
- Any regression signals (reversed auto-promotes, discard attempts)
|
|
44
|
-
|
|
45
|
-
### 2. Synthesize a promotion dossier
|
|
46
|
-
|
|
47
|
-
Build a markdown summary for the user:
|
|
48
|
-
|
|
49
|
-
```markdown
|
|
50
|
-
## Promotion dossier: <name>
|
|
51
|
-
|
|
52
|
-
**Type**: skill | agent
|
|
53
|
-
**Auto-promoted in this project**: <date>, after N runs
|
|
54
|
-
**Cross-project evidence**: P projects, Q applied runs, R wins, S regressions
|
|
55
|
-
**Aggregate metric delta**: +X% vs baseline (target was +Y%)
|
|
56
|
-
**SKILL.md length**: N lines
|
|
57
|
-
**Dependencies declared**: (none | list)
|
|
58
|
-
**Last modified**: <date>
|
|
59
|
-
|
|
60
|
-
**What the skill does** (from description frontmatter):
|
|
61
|
-
<one line>
|
|
62
|
-
|
|
63
|
-
**Recommended promotion target**:
|
|
64
|
-
- Name on promote: build-loop:<name> (or rename to: build-loop:<suggested-name>)
|
|
65
|
-
- Target path: skills/<name>/SKILL.md in the plugin repo
|
|
66
|
-
- Triggers on: <extracted trigger phrases>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### 3. Ask the user
|
|
70
|
-
|
|
71
|
-
Use `AskUserQuestion`:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
Question: "Promote '<name>' into the build-loop plugin repo?"
|
|
75
|
-
Header: "Promote"
|
|
76
|
-
Options:
|
|
77
|
-
- "Promote as drafted" — copy SKILL.md verbatim, open PR
|
|
78
|
-
- "Promote with rename" — user provides new name, then copy + PR
|
|
79
|
-
- "Review first" — output the dossier but do not copy (user decides after reading)
|
|
80
|
-
- Cancel (implicit via AskUserQuestion "Other")
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 4. Execute
|
|
84
|
-
|
|
85
|
-
If user approved promotion:
|
|
86
|
-
|
|
87
|
-
1. Determine target path: `$BUILD_LOOP_REPO/skills/<final-name>/SKILL.md` (plus any references/ subdirectory from source).
|
|
88
|
-
2. If target already exists:
|
|
89
|
-
- Abort and ask user to choose a new name, OR confirm overwrite.
|
|
90
|
-
3. Create a feature branch on the plugin repo: `feat/promote-<name>-from-<project-slug>`.
|
|
91
|
-
4. Copy files. Edit frontmatter: remove `experimental: true`, `promoted_at`, `promoted_from_project`; add `promoted_at: <ISO>`, `promoted_from_project: <project-name>`, `original_baseline: <N>`, `aggregate_delta: <percent>`.
|
|
92
|
-
5. Update the plugin's `skills/build-loop/SKILL.md` capability routing table to reference the new skill if it fits an existing row, OR add a new row (ask the user which).
|
|
93
|
-
6. Commit:
|
|
94
|
-
```
|
|
95
|
-
feat(skills): promote <name> from Phase 6 Learn
|
|
96
|
-
|
|
97
|
-
Originated as auto-drafted experimental skill in <project>.
|
|
98
|
-
Aggregate track record: P projects, Q runs, +X% vs baseline
|
|
99
|
-
(target was +Y%). SKILL.md copied verbatim with promotion
|
|
100
|
-
metadata added to frontmatter.
|
|
101
|
-
|
|
102
|
-
Evidence log: .build-loop/experiments/<name>.jsonl (N entries)
|
|
103
|
-
Signed off by Opus 4.7 on <auto-promote date>.
|
|
104
|
-
```
|
|
105
|
-
7. Push the branch and open a PR with the promotion dossier as the body.
|
|
106
|
-
|
|
107
|
-
### 5. Record in project
|
|
108
|
-
|
|
109
|
-
Append to `.build-loop/experiments/decisions.jsonl`:
|
|
110
|
-
|
|
111
|
-
```jsonl
|
|
112
|
-
{"event": "cross_project_promote", "date": "ISO", "name": "<name>", "plugin_pr_url": "<url>", "aggregate_evidence": { runs, projects, delta }}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Do not delete the local artifact — it stays in `.build-loop/skills/active/<name>/`. The plugin version will shadow it once installed; the local copy is retained as the historical source.
|
|
116
|
-
|
|
117
|
-
## Safety rails
|
|
118
|
-
|
|
119
|
-
- **Never auto-invoke**. Phase 6 Learn auto-promote stops at the project boundary. This command is the only path to the plugin repo.
|
|
120
|
-
- **Require user confirmation**. AskUserQuestion is mandatory.
|
|
121
|
-
- **Always open a PR**, never commit to main directly. Plugin maintainers review before merge.
|
|
122
|
-
- **Preserve provenance**. Frontmatter records the source project, baseline, and delta. If the promoted skill regresses in a cross-project context, the track record makes rollback decisions clear.
|
|
123
|
-
- **Never overwrite without confirmation**. If a skill with the same name exists, abort and let the user rename or approve overwrite.
|
|
124
|
-
|
|
125
|
-
## Related
|
|
126
|
-
|
|
127
|
-
- Phase 6 Learn auto-promote (project-local): `skills/self-improve/SKILL.md`
|
|
128
|
-
- User removal override: `.build-loop/skills/.demoted` file or `rm -rf .build-loop/skills/active/<name>/`
|
|
129
|
-
- Global cross-project evidence index: `~/.build-loop/experiments/<name>.jsonl` (appended on every applied run across projects)
|