@tyroneross/build-loop 0.30.3
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 +10 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.claude-plugin/plugin.json +30 -0
- package/.codex-plugin/plugin.json +41 -0
- package/.cursor/rules/build-loop-surface.mdc +22 -0
- package/AGENTS.md +498 -0
- package/LICENSE +202 -0
- package/README.md +403 -0
- package/agents/alignment-checker.md +124 -0
- package/agents/api-assessor.md +136 -0
- package/agents/architecture-scout.md +185 -0
- package/agents/assessment-orchestrator.md +163 -0
- package/agents/build-orchestrator.md +198 -0
- package/agents/database-assessor.md +133 -0
- package/agents/design-contract-specialist.md +239 -0
- package/agents/fact-checker.md +69 -0
- package/agents/fix-critique.md +161 -0
- package/agents/frontend-assessor.md +136 -0
- package/agents/implementer.md +185 -0
- package/agents/independent-auditor.md +143 -0
- package/agents/mock-scanner.md +78 -0
- package/agents/optimize-runner.md +112 -0
- package/agents/overfitting-reviewer.md +96 -0
- package/agents/performance-assessor.md +159 -0
- package/agents/plan-critic.md +85 -0
- package/agents/promotion-reviewer.md +121 -0
- package/agents/recurring-pattern-detector.md +248 -0
- package/agents/retrospective-synthesizer.md +109 -0
- package/agents/root-cause-investigator.md +285 -0
- package/agents/scope-auditor.md +121 -0
- package/agents/security-reviewer.md +151 -0
- package/agents/self-improvement-architect.md +125 -0
- package/agents/synthesis-critic.md +99 -0
- package/agents/transcript-pattern-miner.md +165 -0
- package/agents/ui-validator.md +193 -0
- package/codex-skills/build-loop/SKILL.md +20 -0
- package/codex-skills/debug-loop/SKILL.md +18 -0
- package/codex-skills/handoff/SKILL.md +22 -0
- package/codex-skills/knowledge/SKILL.md +21 -0
- package/codex-skills/optimize/SKILL.md +18 -0
- package/codex-skills/research/SKILL.md +18 -0
- package/commands/agent-rally-point.md +301 -0
- package/commands/assess.md +41 -0
- package/commands/debug.md +20 -0
- package/commands/debugger-detail.md +34 -0
- package/commands/debugger-scan.md +15 -0
- package/commands/debugger-status.md +20 -0
- package/commands/debugger.md +32 -0
- package/commands/handoff.md +113 -0
- package/commands/knowledge-review.md +16 -0
- package/commands/optimize.md +31 -0
- package/commands/plan-verify.md +39 -0
- package/commands/promote-experiment.md +129 -0
- package/commands/research.md +22 -0
- package/commands/run.md +12 -0
- package/commands/self-review.md +51 -0
- package/commands/start-prd.md +57 -0
- package/commands/test.md +34 -0
- package/dist/src/assessment-orchestrator.d.ts +78 -0
- package/dist/src/assessment-orchestrator.d.ts.map +1 -0
- package/dist/src/assessment-orchestrator.js +304 -0
- package/dist/src/assessment-orchestrator.js.map +1 -0
- package/dist/src/audit-miner.d.ts +21 -0
- package/dist/src/audit-miner.d.ts.map +1 -0
- package/dist/src/audit-miner.js +421 -0
- package/dist/src/audit-miner.js.map +1 -0
- package/dist/src/batch-operations.d.ts +30 -0
- package/dist/src/batch-operations.d.ts.map +1 -0
- package/dist/src/batch-operations.js +339 -0
- package/dist/src/batch-operations.js.map +1 -0
- package/dist/src/config.d.ts +83 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +176 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context-engine.d.ts +45 -0
- package/dist/src/context-engine.d.ts.map +1 -0
- package/dist/src/context-engine.js +135 -0
- package/dist/src/context-engine.js.map +1 -0
- package/dist/src/debug-wrapper.d.ts +58 -0
- package/dist/src/debug-wrapper.d.ts.map +1 -0
- package/dist/src/debug-wrapper.js +285 -0
- package/dist/src/debug-wrapper.js.map +1 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +149 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interactive-verifier.d.ts +26 -0
- package/dist/src/interactive-verifier.d.ts.map +1 -0
- package/dist/src/interactive-verifier.js +435 -0
- package/dist/src/interactive-verifier.js.map +1 -0
- package/dist/src/lessons.d.ts +59 -0
- package/dist/src/lessons.d.ts.map +1 -0
- package/dist/src/lessons.js +172 -0
- package/dist/src/lessons.js.map +1 -0
- package/dist/src/log-reader.d.ts +39 -0
- package/dist/src/log-reader.d.ts.map +1 -0
- package/dist/src/log-reader.js +291 -0
- package/dist/src/log-reader.js.map +1 -0
- package/dist/src/logger.d.ts +59 -0
- package/dist/src/logger.d.ts.map +1 -0
- package/dist/src/logger.js +328 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/parallel-retrieval.d.ts +52 -0
- package/dist/src/parallel-retrieval.d.ts.map +1 -0
- package/dist/src/parallel-retrieval.js +309 -0
- package/dist/src/parallel-retrieval.js.map +1 -0
- package/dist/src/pattern-extractor.d.ts +30 -0
- package/dist/src/pattern-extractor.d.ts.map +1 -0
- package/dist/src/pattern-extractor.js +386 -0
- package/dist/src/pattern-extractor.js.map +1 -0
- package/dist/src/result-aggregator.d.ts +44 -0
- package/dist/src/result-aggregator.d.ts.map +1 -0
- package/dist/src/result-aggregator.js +315 -0
- package/dist/src/result-aggregator.js.map +1 -0
- package/dist/src/retrieval.d.ts +139 -0
- package/dist/src/retrieval.d.ts.map +1 -0
- package/dist/src/retrieval.js +724 -0
- package/dist/src/retrieval.js.map +1 -0
- package/dist/src/setup/auto-setup.d.ts +15 -0
- package/dist/src/setup/auto-setup.d.ts.map +1 -0
- package/dist/src/setup/auto-setup.js +157 -0
- package/dist/src/setup/auto-setup.js.map +1 -0
- package/dist/src/setup/configure-hooks.d.ts +8 -0
- package/dist/src/setup/configure-hooks.d.ts.map +1 -0
- package/dist/src/setup/configure-hooks.js +16 -0
- package/dist/src/setup/configure-hooks.js.map +1 -0
- package/dist/src/setup/create-slash-commands.d.ts +8 -0
- package/dist/src/setup/create-slash-commands.d.ts.map +1 -0
- package/dist/src/setup/create-slash-commands.js +101 -0
- package/dist/src/setup/create-slash-commands.js.map +1 -0
- package/dist/src/setup/index.d.ts +8 -0
- package/dist/src/setup/index.d.ts.map +1 -0
- package/dist/src/setup/index.js +17 -0
- package/dist/src/setup/index.js.map +1 -0
- package/dist/src/setup/inject-claude-md.d.ts +10 -0
- package/dist/src/setup/inject-claude-md.d.ts.map +1 -0
- package/dist/src/setup/inject-claude-md.js +150 -0
- package/dist/src/setup/inject-claude-md.js.map +1 -0
- package/dist/src/setup/uninstall.d.ts +22 -0
- package/dist/src/setup/uninstall.d.ts.map +1 -0
- package/dist/src/setup/uninstall.js +235 -0
- package/dist/src/setup/uninstall.js.map +1 -0
- package/dist/src/storage.d.ts +192 -0
- package/dist/src/storage.d.ts.map +1 -0
- package/dist/src/storage.js +1037 -0
- package/dist/src/storage.js.map +1 -0
- package/dist/src/string-similarity.d.ts +8 -0
- package/dist/src/string-similarity.d.ts.map +1 -0
- package/dist/src/string-similarity.js +57 -0
- package/dist/src/string-similarity.js.map +1 -0
- package/dist/src/traces/adapters/browser.d.ts +69 -0
- package/dist/src/traces/adapters/browser.d.ts.map +1 -0
- package/dist/src/traces/adapters/browser.js +280 -0
- package/dist/src/traces/adapters/browser.js.map +1 -0
- package/dist/src/traces/adapters/index.d.ts +23 -0
- package/dist/src/traces/adapters/index.d.ts.map +1 -0
- package/dist/src/traces/adapters/index.js +67 -0
- package/dist/src/traces/adapters/index.js.map +1 -0
- package/dist/src/traces/adapters/langchain.d.ts +42 -0
- package/dist/src/traces/adapters/langchain.d.ts.map +1 -0
- package/dist/src/traces/adapters/langchain.js +151 -0
- package/dist/src/traces/adapters/langchain.js.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts +46 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.js +164 -0
- package/dist/src/traces/adapters/opentelemetry.js.map +1 -0
- package/dist/src/traces/adapters/sentry.d.ts +58 -0
- package/dist/src/traces/adapters/sentry.d.ts.map +1 -0
- package/dist/src/traces/adapters/sentry.js +212 -0
- package/dist/src/traces/adapters/sentry.js.map +1 -0
- package/dist/src/traces/index.d.ts +10 -0
- package/dist/src/traces/index.d.ts.map +1 -0
- package/dist/src/traces/index.js +45 -0
- package/dist/src/traces/index.js.map +1 -0
- package/dist/src/traces/storage.d.ts +78 -0
- package/dist/src/traces/storage.d.ts.map +1 -0
- package/dist/src/traces/storage.js +399 -0
- package/dist/src/traces/storage.js.map +1 -0
- package/dist/src/traces/summarizer.d.ts +83 -0
- package/dist/src/traces/summarizer.d.ts.map +1 -0
- package/dist/src/traces/summarizer.js +247 -0
- package/dist/src/traces/summarizer.js.map +1 -0
- package/dist/src/traces/types.d.ts +365 -0
- package/dist/src/traces/types.d.ts.map +1 -0
- package/dist/src/traces/types.js +14 -0
- package/dist/src/traces/types.js.map +1 -0
- package/dist/src/types.d.ts +495 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +27 -0
- package/dist/src/types.js.map +1 -0
- package/docs/agent-surface-policy.md +45 -0
- package/docs/memory-setup.md +226 -0
- package/hooks/_arch_scan_bg.py +88 -0
- package/hooks/_plugin_drift_check_bg.py +85 -0
- package/hooks/_session_start_lib.sh +42 -0
- package/hooks/git/pre-push +141 -0
- package/hooks/hooks.json +126 -0
- package/hooks/post-commit +30 -0
- package/hooks/pre-commit +29 -0
- package/hooks/pre-edit-apppulse.sh +6 -0
- package/hooks/pre-edit-architecture.sh +106 -0
- package/hooks/pre-edit-rally-point.sh +92 -0
- package/hooks/session-start-apppulse.sh +6 -0
- package/hooks/session-start-architecture.sh +10 -0
- package/hooks/session-start-git-hooks.sh +12 -0
- package/hooks/session-start-plugin-drift.sh +27 -0
- package/hooks/session-start-rally-point.sh +44 -0
- package/hooks/session-start-retrieval.sh +24 -0
- package/hooks/session-start-worktree-gc.sh +105 -0
- package/hooks/test_apppulse_hooks.sh +6 -0
- package/hooks/test_rally_point_hooks.sh +388 -0
- package/hooks/test_sec008_hooks.sh +66 -0
- package/package.json +111 -0
- package/scripts/README.md +301 -0
- package/scripts/_db_url.py +61 -0
- package/scripts/_paths.py +445 -0
- package/scripts/blm.py +162 -0
- package/scripts/blm_api.py +263 -0
- package/scripts/check_cache_sync.py +490 -0
- package/scripts/embed_backend.py +475 -0
- package/scripts/install_memory.py +556 -0
- package/scripts/lessons_index/__init__.py +77 -0
- package/scripts/lessons_index/__main__.py +135 -0
- package/scripts/lessons_index/ingest.py +288 -0
- package/scripts/lessons_index/query.py +285 -0
- package/scripts/lessons_index/schema.py +114 -0
- package/scripts/memory_context/__init__.py +610 -0
- package/scripts/memory_graph/__init__.py +393 -0
- package/scripts/project_resolver.py +172 -0
- package/scripts/prune_codex_plugin_cache.py +23 -0
- package/scripts/prune_plugin_cache.py +359 -0
- package/scripts/semantic_index/__init__.py +482 -0
- package/scripts/semantic_index/_bench_hybrid.py +175 -0
- package/scripts/semantic_index/backfill.py +263 -0
- package/scripts/semantic_index/hybrid.py +174 -0
- package/scripts/semantic_index/test_backfill.py +292 -0
- package/scripts/semantic_index/test_hybrid.py +541 -0
- package/scripts/sync_navgator_lessons.py +666 -0
- package/scripts/sync_plugin_cache.py +388 -0
- package/skills/agent-rally-point/SKILL.md +165 -0
- package/skills/agent-rally-watcher/SKILL.md +83 -0
- package/skills/api-registry-bridge/SKILL.md +59 -0
- package/skills/architecture/dead/SKILL.md +56 -0
- package/skills/architecture/impact/SKILL.md +88 -0
- package/skills/architecture/review/SKILL.md +227 -0
- package/skills/architecture/rules/SKILL.md +72 -0
- package/skills/architecture/scan/SKILL.md +79 -0
- package/skills/architecture/trace/SKILL.md +65 -0
- package/skills/attribution-standard/SKILL.md +122 -0
- package/skills/authentication/SKILL.md +81 -0
- package/skills/authentication/references/better-auth-magic-link.md +135 -0
- package/skills/authentication/references/better-auth-setup.md +224 -0
- package/skills/authentication/references/google-calendar-sync.md +278 -0
- package/skills/authentication/references/google-cloud-console.md +159 -0
- package/skills/authentication/references/google-geocoding-directions.md +126 -0
- package/skills/authentication/references/google-lessons-example-web-app.md +177 -0
- package/skills/authentication/references/google-maps.md +162 -0
- package/skills/authentication/references/google-oauth-setup.md +343 -0
- package/skills/authentication/references/google-places.md +173 -0
- package/skills/authentication/references/lessons-example-web-app-better-auth.md +126 -0
- package/skills/authentication/references/resend-email.md +227 -0
- package/skills/authentication/references/resend-otp-magic-link.md +153 -0
- package/skills/authentication/references/supabase-auth.md +172 -0
- package/skills/auto-decision-capture/SKILL.md +419 -0
- package/skills/build-loop/SKILL.md +516 -0
- package/skills/build-loop/detect-plugins.mjs +82 -0
- package/skills/build-loop/eval-guide.md +65 -0
- package/skills/build-loop/fallbacks.md +549 -0
- package/skills/build-loop/phases/fact-check.md +42 -0
- package/skills/build-loop/phases/ui-validation.md +267 -0
- package/skills/build-loop/references/apple-native-planning.md +439 -0
- package/skills/build-loop/references/capability-routing.md +181 -0
- package/skills/build-loop/references/codex-subagents.md +98 -0
- package/skills/build-loop/references/coordination.md +161 -0
- package/skills/build-loop/references/correction-aware-capture.md +177 -0
- package/skills/build-loop/references/independent-auditor.md +72 -0
- package/skills/build-loop/references/intent-capability-pack.md +170 -0
- package/skills/build-loop/references/intent-exploration-prompts.md +96 -0
- package/skills/build-loop/references/leadership.md +72 -0
- package/skills/build-loop/references/memory.md +284 -0
- package/skills/build-loop/references/modular-systems-pack.md +96 -0
- package/skills/build-loop/references/output-style.md +129 -0
- package/skills/build-loop/references/pay-it-forward-arch.md +98 -0
- package/skills/build-loop/references/phase-1-assess.md +218 -0
- package/skills/build-loop/references/phase-2-plan.md +77 -0
- package/skills/build-loop/references/phase-3-execute.md +47 -0
- package/skills/build-loop/references/phase-4-review.md +310 -0
- package/skills/build-loop/references/phase-5-iterate.md +71 -0
- package/skills/build-loop/references/phase-6-learn.md +56 -0
- package/skills/build-loop/references/recent-design-structures.md +274 -0
- package/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
- package/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
- package/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
- package/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
- package/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
- package/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
- package/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
- package/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
- package/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
- package/skills/build-loop/references/self-recursive-dev.md +77 -0
- package/skills/build-loop/references/self-review.md +232 -0
- package/skills/build-loop/references/ui-io-contract.md +116 -0
- package/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
- package/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
- package/skills/build-loop/templates/backlog-item.md +35 -0
- package/skills/build-loop/templates/codex-worker-prompt.md +89 -0
- package/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
- package/skills/build-loop/templates/ux-fix-plan.md +40 -0
- package/skills/building-with-deepagents/SKILL.md +195 -0
- package/skills/building-with-deepagents/references/anti-patterns.md +141 -0
- package/skills/building-with-deepagents/references/api-quick-reference.md +184 -0
- package/skills/capabilities/SKILL.md +91 -0
- package/skills/debug-loop/SKILL.md +278 -0
- package/skills/debug-loop/references/convergence-rules.md +145 -0
- package/skills/debug-loop/references/swiftui-macos-clunky-ui-debugger.html +823 -0
- package/skills/debugging/assess/SKILL.md +111 -0
- package/skills/debugging/debug-loop/SKILL.md +231 -0
- package/skills/debugging/memory/SKILL.md +147 -0
- package/skills/debugging/store/SKILL.md +153 -0
- package/skills/debugging-memory/SKILL.md +440 -0
- package/skills/debugging-memory/examples/incident-example.json +67 -0
- package/skills/debugging-memory/references/incident-documentation.md +280 -0
- package/skills/debugging-memory/references/ios-notification-alarm-playbook.md +300 -0
- package/skills/debugging-memory/references/pattern-extraction.md +163 -0
- package/skills/debugging-memory/references/subagent-integration.md +312 -0
- package/skills/defenseclaw-bridge/SKILL.md +156 -0
- package/skills/defenseclaw-bridge/references/dc-config-mapping.md +162 -0
- package/skills/defenseclaw-bridge/references/output-format.md +108 -0
- package/skills/handoff/SKILL.md +94 -0
- package/skills/ibr-bridge/SKILL.md +68 -0
- package/skills/knowledge/SKILL.md +127 -0
- package/skills/knowledge/references/recall-integration.md +83 -0
- package/skills/knowledge/templates/madr-minimal.md +56 -0
- package/skills/knowledge-review/SKILL.md +112 -0
- package/skills/logging-tracer/SKILL.md +202 -0
- package/skills/logging-tracer/references/log-analysis.md +128 -0
- package/skills/logging-tracer/references/stack-templates.md +274 -0
- package/skills/logging-tracer-bridge/SKILL.md +70 -0
- package/skills/mcp-builder/SKILL.md +278 -0
- package/skills/mcp-builder/references/mcp-security.md +106 -0
- package/skills/model-tiering/SKILL.md +216 -0
- package/skills/native-ax-driver/SKILL.md +220 -0
- package/skills/native-ax-driver/scripts/layout_fill.py +222 -0
- package/skills/native-ax-driver/scripts/native_driver.py +495 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Package.swift +20 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Sources/main.swift +542 -0
- package/skills/optimize/SKILL.md +202 -0
- package/skills/optimize/profiles.md +61 -0
- package/skills/plan-verify/SKILL.md +115 -0
- package/skills/plan-verify/test-fixtures/example-app-v20-findings.json +27 -0
- package/skills/plan-verify/test-fixtures/example-app-v20.md +42 -0
- package/skills/plan-verify/test-fixtures/example-app-v22-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/example-app-v22.md +1608 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan.md +55 -0
- package/skills/plugin-builder/SKILL.md +329 -0
- package/skills/plugin-builder/references/authoritative-sources.md +104 -0
- package/skills/plugin-builder/references/build-loop-phase-guidance.md +94 -0
- package/skills/plugin-builder/references/components-guide.md +221 -0
- package/skills/plugin-builder/references/distribution.md +317 -0
- package/skills/plugin-builder/references/dual-host-claude-codex.md +220 -0
- package/skills/plugin-builder/references/hooks-reference.md +210 -0
- package/skills/plugin-builder/references/manifest-schema.md +111 -0
- package/skills/plugin-builder/references/plugin-hygiene-lessons.md +307 -0
- package/skills/plugin-tests/SKILL.md +94 -0
- package/skills/prd-bridge/SKILL.md +135 -0
- package/skills/research/SKILL.md +80 -0
- package/skills/security-methodology/SKILL.md +105 -0
- package/skills/security-methodology/references/cross-source-matrix.md +77 -0
- package/skills/security-methodology/references/mitre-atlas-starter.md +83 -0
- package/skills/security-methodology/references/nist-600-1-mapping.md +119 -0
- package/skills/security-methodology/references/owasp-agentic-top-10.md +157 -0
- package/skills/security-methodology/references/owasp-llm-top-10.md +144 -0
- package/skills/security-methodology/references/owasp-web-top-10.md +65 -0
- package/skills/self-improve/SKILL.md +298 -0
- package/skills/spec-writing/SKILL.md +548 -0
- package/skills/spec-writing/scripts/check_checklist.py +478 -0
- package/skills/sync-skills/SKILL.md +132 -0
- package/skills/telemetry/SKILL.md +66 -0
- package/skills/ui-design/SKILL.md +75 -0
- package/skills/ui-design/references/design-patterns-multi.md +165 -0
- package/skills/ui-design/references/design-preferences-from-owned-apps.md +150 -0
- package/skills/ui-design/references/evidence-capture-policy.md +55 -0
- package/skills/ui-design/references/ui-guidance-sources.md +330 -0
- package/skills/ui-design/references/universal-design-principles.alt.md +182 -0
- package/skills/ui-design/references/universal-design-principles.md +419 -0
- package/templates/memory/MEMORY.md.template +55 -0
- package/templates/memory/constitution.md.template +64 -0
- package/templates/memory/manifest.json +47 -0
package/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Scenario 3: Multi-failure stuck iteration with logging-tracer rescue
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
- **Project**: Node.js backend + NavGator installed + claude-code-debugger installed
|
|
8
|
+
- **Goal**: "Add rate limiting to `/api/search` endpoint — 100 req/min per IP, Redis-backed"
|
|
9
|
+
- **Scope**: 4 files, ~200 lines, touches middleware, Redis client, tests
|
|
10
|
+
- **Criteria**:
|
|
11
|
+
1. Integration tests pass
|
|
12
|
+
2. Rate-limit correctness (custom assertion: burst of 101 requests → first 100 succeed, 101st returns 429)
|
|
13
|
+
3. Lint/type clean
|
|
14
|
+
4. NavGator rules pass (no new layer violations)
|
|
15
|
+
|
|
16
|
+
## Expected failure trajectory
|
|
17
|
+
|
|
18
|
+
**First Review:**
|
|
19
|
+
- Critic (A) clean
|
|
20
|
+
- Validate (B): criterion 2 (rate-limit correctness) FAILS with test output: `assertion failed: expected 429, got 500`. No stack trace, no error message — the server returned 500 but the test didn't capture the cause. Memory-first gate synthesizes "500 on 101st request, no stack". `read_logs` MCP returns 0 entries (project is silent — `console.log` only). `evidence_gap: true` flagged.
|
|
21
|
+
- Fact-Check (D) and later sub-steps skipped due to B fail
|
|
22
|
+
- Route to Iterate
|
|
23
|
+
|
|
24
|
+
**Iterate attempt 1:**
|
|
25
|
+
- Debugger-bridge Iterate sees `evidence_gap: true` from previous attempt
|
|
26
|
+
- Invokes logging-tracer-bridge with `{phase: "iterate", action: "repair"}`. Ephemeral mechanism A: wraps new `trace(...)` calls in the Redis client behind `DEBUG_TRACE=1` env gate.
|
|
27
|
+
- Re-runs criterion 2 with `DEBUG_TRACE=1 npm test`. Now stderr captures: `Redis connection dropped after 98 ops, reconnect latency > 1s, causes burst to fail at 98 not 100`.
|
|
28
|
+
- Now a real root cause. Fix plan: add connection keep-alive + retry wrapper.
|
|
29
|
+
- Execute fix.
|
|
30
|
+
|
|
31
|
+
**Second Review:**
|
|
32
|
+
- Validate: criterion 2 now passes. But criterion 3 (lint) fails — the retry wrapper introduced `any` types.
|
|
33
|
+
- Route to Iterate.
|
|
34
|
+
|
|
35
|
+
**Iterate attempt 2:**
|
|
36
|
+
- Same criterion? No, different (lint vs rate-limit). No debugger escalation triggered (not 2 same-root-cause).
|
|
37
|
+
- Fix types.
|
|
38
|
+
- Execute.
|
|
39
|
+
|
|
40
|
+
**Third Review:**
|
|
41
|
+
- Validate all pass.
|
|
42
|
+
- Optimize (C): has mechanical metric (test runtime), runs 3-5 iterations. One win: -12% test time after connection pooling tuned.
|
|
43
|
+
- Fact-Check (D): NavGator rules check — new `database-isolation` violation? No, Redis already in allowed db layer. Clean.
|
|
44
|
+
- Simplify (E): remove an unused retry-count parameter.
|
|
45
|
+
- Report (F): scorecard PASS with notes. Debugger `store` called for the Redis burst bug. Logging-tracer instrumentation reverted per "ephemeral by default" (no user approval sought to keep). NavGator `dead` orphan scan: 1 new resolved orphan (the keep-alive wrapper is now wired in).
|
|
46
|
+
|
|
47
|
+
## What should fire vs NOT
|
|
48
|
+
|
|
49
|
+
**Fires:**
|
|
50
|
+
- Critic, Validate, Fact-Check, Simplify, Report across two final-Review passes
|
|
51
|
+
- Logging-tracer repair (evidence_gap trigger)
|
|
52
|
+
- NavGator sub-steps (Assess blast-radius + Review-D rules + Report dead scan)
|
|
53
|
+
- Debugger gate + store; outcome N/A (no prior KNOWN_FIX applied)
|
|
54
|
+
- Optimize (C) — mechanical metric exists
|
|
55
|
+
- 2 Iterate attempts
|
|
56
|
+
|
|
57
|
+
**Does NOT fire:**
|
|
58
|
+
- Parallel `/assess` domain assessors (not 2+ same-root-cause failures on one criterion)
|
|
59
|
+
- `debug-loop` causal-tree (not 3+ same-criterion failures)
|
|
60
|
+
- Learn (skipped unless `runs[] >= 3`)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Scenario 4: UI build, IBR absent (exercises `fallbacks.md#web-ui`)
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
- **Project**: Next.js app, no IBR installed, no claude-code-debugger, no NavGator
|
|
8
|
+
- **Goal**: "Add a settings-panel nav item with active-state indicator"
|
|
9
|
+
- **Files to touch**: `src/components/SettingsNav.tsx` (new), `src/styles/nav.module.css` (new)
|
|
10
|
+
- **Criteria**:
|
|
11
|
+
1. Tests pass
|
|
12
|
+
2. Lint/type check clean
|
|
13
|
+
3. UI meets Calm Precision principles (a11y, touch targets, handlers)
|
|
14
|
+
4. No mock data
|
|
15
|
+
|
|
16
|
+
## Pre-fallback behavior (before commit 76f9a26)
|
|
17
|
+
|
|
18
|
+
**Review sub-step B Validate**:
|
|
19
|
+
- `availablePlugins.ibr` is false
|
|
20
|
+
- Bridge: (no bridge existed — IBR path skipped silently)
|
|
21
|
+
- Criterion 3 (Calm Precision): orchestrator had `fallbacks.md#web-ui` available but no explicit instruction to paste it into the validation subagent. Default behavior: subagent does a best-effort review without structured guidance.
|
|
22
|
+
- Output: "Criterion 3 reviewed informally; recommend installing IBR for deep verification." No specific findings.
|
|
23
|
+
- Verdict: **soft pass** — nothing concrete flagged, but nothing verified either.
|
|
24
|
+
|
|
25
|
+
## Post-fallback behavior (after commit 76f9a26)
|
|
26
|
+
|
|
27
|
+
**Review sub-step B Validate**:
|
|
28
|
+
- `availablePlugins.ibr` is false AND build touched UI files (`*.tsx`, `*.module.css`)
|
|
29
|
+
- Orchestrator pastes `fallbacks.md#web-ui` into the validation subagent prompt
|
|
30
|
+
- Subagent runs the 10 grep checks against the diff:
|
|
31
|
+
- Check 5 (icon-only buttons missing aria-label) matches: `<button><ChevronIcon /></button>` in SettingsNav.tsx:24
|
|
32
|
+
- Check 6 (status as background pill) matches: `bg-blue-500 text-white` on the active-state indicator in nav.module.css — suspicious, could be a signal-to-noise violation
|
|
33
|
+
- Check 3 (button missing onClick/submit) clean
|
|
34
|
+
- Check 7 (hardcoded hex) clean
|
|
35
|
+
- Remaining 6 checks clean
|
|
36
|
+
- Findings written to Review-F with paths + line numbers
|
|
37
|
+
- Verdict: **fail** on criterion 3 with 2 concrete findings → routes to Iterate
|
|
38
|
+
- Flag in report: `⚠️ static-analysis only — install IBR for computed-CSS verification`
|
|
39
|
+
|
|
40
|
+
## Concrete delta
|
|
41
|
+
|
|
42
|
+
| Aspect | Pre-fallback | Post-fallback |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| Criterion 3 result | Soft pass ("recommend install") | Fail with 2 specific file:line findings |
|
|
45
|
+
| Orchestrator action | None | Route to Iterate, fix aria-label + reconsider pill |
|
|
46
|
+
| User visibility | "IBR would have found issues" | "File X line Y is missing aria-label" |
|
|
47
|
+
| False positives | 0 (no findings emitted) | 1-2 possible (pill check is heuristic) |
|
|
48
|
+
| Time to catch | Post-deploy user bug report | Phase 4 Review, before merge |
|
|
49
|
+
| Install IBR? | Recommended | Still recommended for computed-CSS verification |
|
|
50
|
+
|
|
51
|
+
**Net**: fallback catches real bugs that would otherwise ship. False-positive tolerance is acceptable because findings are file:line-specific and the user can trivially dismiss.
|
package/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Scenario 5: Large refactor, NavGator absent (exercises `fallbacks.md#architecture`)
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
- **Project**: Node.js + Next.js monorepo, no NavGator, no debugger, no IBR
|
|
8
|
+
- **Goal**: "Rename `User.email` → `User.primaryEmail` across the codebase"
|
|
9
|
+
- **Expected scope**: ~40 files across db models, API routes, frontend components
|
|
10
|
+
- **Criteria**:
|
|
11
|
+
1. Tests pass
|
|
12
|
+
2. Type check clean
|
|
13
|
+
3. No orphan references to old field name (grep audit)
|
|
14
|
+
|
|
15
|
+
## Pre-fallback behavior
|
|
16
|
+
|
|
17
|
+
**Assess (Phase 1)**:
|
|
18
|
+
- `.navgator/architecture/index.json` doesn't exist
|
|
19
|
+
- navgator-bridge `Pre-flight`: "NO_NAVGATOR" → emit "NavGator: no architecture snapshot found" → skip
|
|
20
|
+
- `.build-loop/state.json.navgator` not written
|
|
21
|
+
- Phase 2 Plan proceeds blind: no blast-radius data, scoping based on goal text only
|
|
22
|
+
|
|
23
|
+
**Plan (Phase 2)**:
|
|
24
|
+
- Breaks work by grep of current field usage: finds ~40 files
|
|
25
|
+
- No signal about layer crossings or hotspots
|
|
26
|
+
- Dispatches one subagent per directory cluster
|
|
27
|
+
|
|
28
|
+
**Review-D Fact-Check** (after Execute):
|
|
29
|
+
- No NavGator rules check (bridge skipped silently pre-fallback)
|
|
30
|
+
- Other gates (fact-checker, mock-scanner) run normally
|
|
31
|
+
- Scorecard PASS if tests + types clean
|
|
32
|
+
|
|
33
|
+
**Risk**: the rename touches `src/db/User.ts` + `src/components/Profile.tsx` directly without going through `src/api/` — a potential `frontend-direct-db` violation is **not detected**.
|
|
34
|
+
|
|
35
|
+
## Post-fallback behavior
|
|
36
|
+
|
|
37
|
+
**Assess (Phase 1)**:
|
|
38
|
+
- navgator-bridge `Pre-flight`: "NO_NAVGATOR" → runs `fallbacks.md#architecture`
|
|
39
|
+
- Executes the grep/git commands:
|
|
40
|
+
- Check 1 (changed files): ~40 files enumerated
|
|
41
|
+
- Check 2 (layer classification): 12 db / 8 backend / 18 frontend / 2 test
|
|
42
|
+
- Check 3 (1-hop dependents): for each changed file, grep import paths
|
|
43
|
+
- Check 4 (hotspot churn): top-10 includes `src/db/User.ts` and `src/lib/auth.ts` — both touched
|
|
44
|
+
- Check 5 (circular-import): defer to type check
|
|
45
|
+
- Risk flags:
|
|
46
|
+
- ≥3 layers crossed (db + backend + frontend) → "high blast radius"
|
|
47
|
+
- `src/db/User.ts` is a top-5 hotspot → "concentration risk"
|
|
48
|
+
- `src/db/User.ts` imported directly from `src/components/Profile.tsx` without going through API → "possible frontend-direct-db layer violation"
|
|
49
|
+
- Writes to `.build-loop/state.json.architecture.standalone` with these flags
|
|
50
|
+
|
|
51
|
+
**Plan (Phase 2)**:
|
|
52
|
+
- Reads the standalone state. Sees blast radius + layer violation flag.
|
|
53
|
+
- Splits work into 3 chunks with explicit integration tests between them (normally would have been one monolithic PR).
|
|
54
|
+
- Adds a plan task: "Introduce API layer between Profile.tsx and User model before renaming" — the layer violation would have shipped without this.
|
|
55
|
+
|
|
56
|
+
**Review-F report**:
|
|
57
|
+
- Includes `⚠️ architecture analysis via static fallback — install NavGator for AST-aware dependency graph + rule enforcement`
|
|
58
|
+
- Flags the possible layer violation as an observed concern
|
|
59
|
+
|
|
60
|
+
## Concrete delta
|
|
61
|
+
|
|
62
|
+
| Aspect | Pre-fallback | Post-fallback |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| Assess architecture output | Nothing | Layer counts + hotspots + risk flags |
|
|
65
|
+
| Layer violation detection | Missed | Flagged (frontend-direct-db pattern) |
|
|
66
|
+
| Plan scoping | Monolithic subagent dispatch | Chunked with integration checkpoints |
|
|
67
|
+
| Cost if violation ships | Future bug + refactor | Caught pre-commit |
|
|
68
|
+
| Analysis quality | None | Directional — false positives possible, but useful |
|
|
69
|
+
| Install NavGator? | Silent loss | Explicit report note |
|
|
70
|
+
|
|
71
|
+
**Net**: fallback converts a silent gap into a surfaced risk. Heuristic rather than authoritative (NavGator would be exact), but 10× better than nothing.
|
package/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Scenario 6: Recurring bug, debugger absent (exercises `fallbacks.md#bug-memory`)
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
- **Project**: Node.js backend, no claude-code-debugger, no NavGator, no IBR
|
|
8
|
+
- **Prior state**: `.build-loop/issues/2026-03-18-redis-reconnect.md` exists from a prior build, recording a Redis connection reset bug with fix notes
|
|
9
|
+
- **Goal**: "Add a batch-process job that pushes to Redis in a loop"
|
|
10
|
+
- **Criteria**: standard tests + lint + type
|
|
11
|
+
|
|
12
|
+
## First failure (during Review-B Validate)
|
|
13
|
+
|
|
14
|
+
Integration test fails: `Error: Connection is closed` when the batch hits 50 items. Same error class as the prior recorded bug, different call site.
|
|
15
|
+
|
|
16
|
+
## Pre-fallback behavior
|
|
17
|
+
|
|
18
|
+
**Review-B memory-first gate**:
|
|
19
|
+
- `availablePlugins.claudeCodeDebugger` is false
|
|
20
|
+
- debugger-bridge Pre-flight: "Debugger memory: not installed. Using inline debug fallback." → skip with generic message
|
|
21
|
+
- Verdict: none — falls through to standard Iterate with no memory context
|
|
22
|
+
- Orchestrator begins from scratch: reproduce, isolate, hypothesize
|
|
23
|
+
- Eventually rediscovers the same Redis-disconnect root cause. Cost: 2-3 Iterate attempts, ~6-10 min wall clock.
|
|
24
|
+
|
|
25
|
+
## Post-fallback behavior
|
|
26
|
+
|
|
27
|
+
**Review-B memory-first gate**:
|
|
28
|
+
- debugger-bridge Pre-flight: runs `fallbacks.md#bug-memory`
|
|
29
|
+
- Extracts tokens from symptom: `Error`, `Connection`, `closed`, `batch`, `Redis`
|
|
30
|
+
- Greps `.build-loop/issues/`, `feedback.md`, `.bookmark/` for each token
|
|
31
|
+
- `.build-loop/issues/2026-03-18-redis-reconnect.md` matches 4 tokens (`Error`, `Connection`, `closed`, `Redis`)
|
|
32
|
+
- Verdict: `LOCAL_HIT_PARTIAL` (≥2 tokens co-occur in the same file)
|
|
33
|
+
- Orchestrator reads the prior issue file: includes a recorded fix (add keep-alive config, retry wrapper)
|
|
34
|
+
- Iterate plan: adapt the prior fix to this call site. No direct-apply (the new call path is different), but informed starting point.
|
|
35
|
+
- Iterate attempt 1 succeeds on first try.
|
|
36
|
+
|
|
37
|
+
## Concrete delta
|
|
38
|
+
|
|
39
|
+
| Aspect | Pre-fallback | Post-fallback |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| Memory lookup | Disabled | Enabled via local file grep |
|
|
42
|
+
| Verdict granularity | None | 4 states mirroring upstream shape |
|
|
43
|
+
| Iterate attempts to resolve | 2-3 | 1 |
|
|
44
|
+
| Cross-session learning | None even within this project | Yes, per-project (no cross-project) |
|
|
45
|
+
| Prior fix notes surfaced | No — rediscovered from scratch | Yes — read and adapted |
|
|
46
|
+
| Install debugger? | Strong recommend for cross-project | Still recommend for classifier + cross-project memory |
|
|
47
|
+
|
|
48
|
+
**Net**: fallback cuts recurring-bug resolution time roughly in half on projects with any prior `.build-loop/issues/` history. The upstream debugger adds cross-project memory and a classifier; the fallback has neither but captures most of the per-project value.
|
|
49
|
+
|
|
50
|
+
## Where the fallback gives up
|
|
51
|
+
|
|
52
|
+
When the project has no prior `.build-loop/issues/` files, there's nothing to grep. Fallback returns `LOCAL_NO_MATCH` and orchestrator proceeds normally. This is correct behavior — no false-positive reuse of unrelated prior issues.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Old 9-Phase vs New 5-Phase Trace Comparison
|
|
4
|
+
|
|
5
|
+
For each scenario, the linear sequence of orchestrator actions. "→" = sequential; indentation = sub-step.
|
|
6
|
+
|
|
7
|
+
## Scenario 1: Simple bugfix (no failures, no plugins installed)
|
|
8
|
+
|
|
9
|
+
### Old 9-phase
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Phase 1 ASSESS → detect tooling, no plugins, load memory
|
|
13
|
+
Phase 2 DEFINE → write goal.md with 3 criteria
|
|
14
|
+
Phase 3 PLAN → 1-task plan
|
|
15
|
+
Phase 4 EXECUTE → sonnet implementer dispatched
|
|
16
|
+
Phase 4.5 CRITIC → sonnet-critic on diff: pass
|
|
17
|
+
Phase 4.7 OPTIMIZE → skipped (no mechanical metric)
|
|
18
|
+
Phase 5 VALIDATE → 3 graders, all pass; memory-first gate skipped (no debugger)
|
|
19
|
+
Phase 6 ITERATE → skipped (all passed)
|
|
20
|
+
Phase 7 FACT CHECK → fact-checker + mock-scanner parallel; clean
|
|
21
|
+
Phase 8 REPORT → scorecard, append runs[], store (no debugger — noop)
|
|
22
|
+
Phase 8.5 SIMPLIFY → trim diff
|
|
23
|
+
Phase 9 REVIEW → skipped (runs[] < 3)
|
|
24
|
+
```
|
|
25
|
+
**Headings touched**: 9. **Transitions**: 9 (each phase logs a header).
|
|
26
|
+
|
|
27
|
+
### New 5-phase
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Phase 1 Assess → detect tooling, no plugins, write goal.md with 3 criteria
|
|
31
|
+
Phase 2 Plan → 1-task plan
|
|
32
|
+
Phase 3 Execute → sonnet implementer dispatched
|
|
33
|
+
Phase 4 Review
|
|
34
|
+
4A Critic → sonnet-critic on diff: pass
|
|
35
|
+
4B Validate → 3 graders, all pass
|
|
36
|
+
4C Optimize → skipped
|
|
37
|
+
4D Fact-Check → fact-checker + mock-scanner parallel; clean
|
|
38
|
+
4E Simplify → trim diff
|
|
39
|
+
4F Report → scorecard, append runs[]
|
|
40
|
+
Phase 5 Iterate → skipped
|
|
41
|
+
Phase 6 Learn → skipped (runs[] < 3)
|
|
42
|
+
```
|
|
43
|
+
**Headings touched**: 5 phases + 6 sub-steps. **Transitions**: 5 top-level.
|
|
44
|
+
|
|
45
|
+
### Fidelity check
|
|
46
|
+
|
|
47
|
+
| Old artifact | New location | Preserved? |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Phase 1 state summary | Phase 1 Assess output | ✅ |
|
|
50
|
+
| Phase 2 goal.md | Phase 1 Assess (define sub-section) | ✅ — same file |
|
|
51
|
+
| Phase 3 plan | Phase 2 Plan | ✅ |
|
|
52
|
+
| Phase 4 diff | Phase 3 Execute | ✅ |
|
|
53
|
+
| Phase 4.5 critic output | Review 4A | ✅ — same agent |
|
|
54
|
+
| Phase 5 scorecard | Review 4B evidence | ✅ |
|
|
55
|
+
| Phase 7 fact-check report | Review 4D | ✅ — same gates |
|
|
56
|
+
| Phase 8 scorecard file | Review 4F | ✅ — same path `.build-loop/evals/YYYY-MM-DD-<topic>.md` |
|
|
57
|
+
| Phase 8.5 simplified diff | Review 4E | ✅ |
|
|
58
|
+
| state.json.runs[] append | Review 4F | ✅ — same schema |
|
|
59
|
+
|
|
60
|
+
**Result**: zero regression. New flow produces all old artifacts.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Scenario 2: UI build with one iteration (IBR + debugger installed)
|
|
65
|
+
|
|
66
|
+
### Old 9-phase
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Phase 1 ASSESS → detect IBR + debugger. Debugger list MCP: 0 recent. IBR capture UI baseline.
|
|
70
|
+
Phase 2 DEFINE → 4 criteria
|
|
71
|
+
Phase 3 PLAN → 3-task plan
|
|
72
|
+
Phase 4 EXECUTE → sonnet implementers
|
|
73
|
+
Phase 4.5 CRITIC → pass
|
|
74
|
+
Phase 4.7 OPTIMIZE → skipped
|
|
75
|
+
Phase 5 VALIDATE → tests pass, IBR scan FAILS (Gestalt violation on card)
|
|
76
|
+
└ memory-first gate → NO_MATCH → fallthrough
|
|
77
|
+
Phase 6 ITERATE → diagnose "individual borders"; fix plan; execute fix
|
|
78
|
+
Phase 5 VALIDATE (re-run) → all 4 criteria pass
|
|
79
|
+
Phase 7 FACT CHECK → clean
|
|
80
|
+
Phase 8 REPORT → scorecard, runs[] append, store(Gestalt fix)
|
|
81
|
+
Phase 8.5 SIMPLIFY → trim
|
|
82
|
+
Phase 9 REVIEW → runs[] count check
|
|
83
|
+
```
|
|
84
|
+
**Transitions**: 9+1 (Phase 5 re-enters after Iterate) = 10 top-level.
|
|
85
|
+
|
|
86
|
+
### New 5-phase
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
Phase 1 Assess → detect IBR + debugger. Debugger list MCP: 0 recent. IBR capture UI baseline. Write goal.md with 4 criteria.
|
|
90
|
+
Phase 2 Plan → 3-task plan
|
|
91
|
+
Phase 3 Execute → sonnet implementers
|
|
92
|
+
Phase 4 Review (first pass)
|
|
93
|
+
4A Critic → pass
|
|
94
|
+
4B Validate → tests pass, IBR scan FAILS (Gestalt violation)
|
|
95
|
+
└ memory-first gate → NO_MATCH → route to Iterate
|
|
96
|
+
(4C-4F skipped, failure routed)
|
|
97
|
+
Phase 5 Iterate (attempt 1)
|
|
98
|
+
└ debugger-bridge Iterate → no evidence_gap, no escalation trigger
|
|
99
|
+
└ diagnose: "individual borders"
|
|
100
|
+
└ fix plan + execute
|
|
101
|
+
Phase 4 Review (second pass, final)
|
|
102
|
+
4A Critic → skipped (same files)
|
|
103
|
+
4B Validate → all 4 pass
|
|
104
|
+
4C Optimize → skipped
|
|
105
|
+
4D Fact-Check → clean
|
|
106
|
+
4E Simplify → trim
|
|
107
|
+
4F Report → scorecard, runs[] append, debugger store(Gestalt fix), outcome N/A
|
|
108
|
+
Phase 6 Learn → runs[] count check
|
|
109
|
+
```
|
|
110
|
+
**Transitions**: 5 top-level (Review fires twice but as the same heading).
|
|
111
|
+
|
|
112
|
+
### Fidelity check
|
|
113
|
+
|
|
114
|
+
All artifacts preserved. One behavior change:
|
|
115
|
+
- **Old**: `Phase 5 VALIDATE` re-runs just failed criteria after Iterate.
|
|
116
|
+
- **New**: `Review 4B Validate` re-runs just failed criteria after Iterate (same behavior). Critic 4A skipped on re-runs — this is new and intentional; avoids burning tokens re-reviewing an unchanged scope. Documented in SKILL.md.
|
|
117
|
+
|
|
118
|
+
**Result**: zero regression; one optimization (skip Critic on re-runs).
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Scenario 3: Multi-failure with logging-tracer rescue (NavGator + debugger)
|
|
123
|
+
|
|
124
|
+
### Old 9-phase
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Phase 1 ASSESS → detect NavGator + debugger. navgator-bridge.phase1 writes blast radius. debugger list: 2 prior. observability: "silent" (project uses console.log).
|
|
128
|
+
Phase 2 DEFINE → 4 criteria
|
|
129
|
+
Phase 3 PLAN → 4-task plan
|
|
130
|
+
Phase 4 EXECUTE → sonnet implementers
|
|
131
|
+
Phase 4.5 CRITIC → pass
|
|
132
|
+
Phase 4.7 OPTIMIZE → defer (post-validation)
|
|
133
|
+
Phase 5 VALIDATE → tests fail, criterion 2 assertion 429 vs 500; read_logs empty → evidence_gap: true; memory-first NO_MATCH
|
|
134
|
+
Phase 6 ITERATE (1) → sees evidence_gap → logging-tracer-bridge repair (Mechanism A, DEBUG_TRACE gate)
|
|
135
|
+
→ re-validate with trace: real cause Redis disconnect
|
|
136
|
+
→ fix plan + execute
|
|
137
|
+
Phase 5 VALIDATE → criterion 2 passes; criterion 3 (lint) fails
|
|
138
|
+
Phase 6 ITERATE (2) → different root cause, no escalation
|
|
139
|
+
→ fix types
|
|
140
|
+
Phase 5 VALIDATE → all pass
|
|
141
|
+
Phase 4.7 OPTIMIZE → runs (mechanical metric exists): test runtime -12%
|
|
142
|
+
Phase 7 FACT CHECK → fact + mock + NavGator rules; clean
|
|
143
|
+
Phase 8 REPORT → scorecard, runs[] append, store(Redis bug), outcome N/A, NavGator dead: 1 resolved orphan
|
|
144
|
+
Phase 8.5 SIMPLIFY → trim retry-count arg
|
|
145
|
+
Phase 9 REVIEW → runs[] < 3, skip
|
|
146
|
+
```
|
|
147
|
+
**Transitions**: 9 + 2 Phase 5 re-entries + 1 Phase 4.7 delayed = ~12.
|
|
148
|
+
|
|
149
|
+
### New 5-phase
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Phase 1 Assess → NavGator + debugger detected; blast radius; debugger list (2); observability=silent; goal.md + 4 criteria
|
|
153
|
+
Phase 2 Plan → 4-task plan
|
|
154
|
+
Phase 3 Execute → sonnet implementers
|
|
155
|
+
Phase 4 Review (first pass)
|
|
156
|
+
4A Critic → pass
|
|
157
|
+
4B Validate → criterion 2 FAIL; read_logs empty; evidence_gap: true; NO_MATCH → Iterate
|
|
158
|
+
Phase 5 Iterate (attempt 1)
|
|
159
|
+
└ evidence_gap detected → logging-tracer-bridge repair (Mechanism A)
|
|
160
|
+
└ re-validate trigger criterion with DEBUG_TRACE=1 → informative output
|
|
161
|
+
└ diagnose: Redis disconnect → fix plan → execute
|
|
162
|
+
Phase 4 Review (second pass)
|
|
163
|
+
4A skipped (same files)
|
|
164
|
+
4B Validate → criterion 2 pass, criterion 3 (lint) FAIL → Iterate
|
|
165
|
+
Phase 5 Iterate (attempt 2)
|
|
166
|
+
└ different criterion, no escalation
|
|
167
|
+
└ fix types → execute
|
|
168
|
+
Phase 4 Review (third pass, final)
|
|
169
|
+
4A skipped
|
|
170
|
+
4B Validate → all 4 pass
|
|
171
|
+
4C Optimize → mechanical metric (test runtime): runs, -12%
|
|
172
|
+
4D Fact-Check → fact + mock + NavGator rules; clean
|
|
173
|
+
4E Simplify → trim retry-count arg
|
|
174
|
+
4F Report → scorecard, runs[] append, debugger store(Redis bug), NavGator dead: 1 resolved orphan, logging-tracer instrumentation reverted (no keep-in-diff approval sought)
|
|
175
|
+
Phase 6 Learn → runs[] < 3, skip
|
|
176
|
+
```
|
|
177
|
+
**Transitions**: 5 top-level (Review fires 3x, Iterate 2x).
|
|
178
|
+
|
|
179
|
+
### Fidelity check
|
|
180
|
+
|
|
181
|
+
All artifacts preserved. Behavior differences:
|
|
182
|
+
|
|
183
|
+
1. **Old Phase 4.7 Optimize** ran pre-Validate deferred to post-Validate. New 4C runs **inside** Review, after Validate passes. Same effective ordering.
|
|
184
|
+
2. **Old Phase 7 NavGator rules** was Gate C of Phase 7. New 4D NavGator rules is one of three parallel gates in sub-step D. Same.
|
|
185
|
+
3. **Old Phase 8 orphan scan** ran after scorecard. New 4F orphan scan runs as part of Report. Same artifacts.
|
|
186
|
+
4. **Old Phase 8.5 Simplify** ran after Report. New 4E Simplify runs **before** Report. Semantic change: Report now reflects the simplified diff, not the pre-simplified diff. Arguably better — the scorecard matches what actually ships. Document in SKILL.md as intentional.
|
|
187
|
+
|
|
188
|
+
**Result**: zero regression. One semantic improvement (scorecard reflects simplified diff).
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Summary verdict
|
|
193
|
+
|
|
194
|
+
| Check | Result |
|
|
195
|
+
|---|---|
|
|
196
|
+
| Every old artifact has a new-flow equivalent | ✅ |
|
|
197
|
+
| No silent phase elimination | ✅ (everything rehoused as sub-step) |
|
|
198
|
+
| Intentional behavior changes documented | ✅ (Critic-skip on re-run, Simplify-before-Report) |
|
|
199
|
+
| Transition count reduced | ✅ (9 → 5 top-level headings) |
|
|
200
|
+
| Flow comprehensibility | Better (one Review heading, sub-steps clearly ordered) |
|
|
201
|
+
|
|
202
|
+
**No regressions detected across 3 scenarios.** PR #4 safe to merge on this criterion.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
# Self-recursive build-loop dev (dogfooding)
|
|
3
|
+
|
|
4
|
+
A run is **self-recursive** when the build-loop working tree IS the loaded runtime. That's the signal that arms per-commit mode and the self-modification safety machinery — without it, both stay dormant.
|
|
5
|
+
|
|
6
|
+
## How to load the working tree as the live runtime
|
|
7
|
+
|
|
8
|
+
Recommended: pass the working tree directly to Claude Code at session start.
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
claude --plugin-dir ~/dev/git-folder/build-loop
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`--plugin-dir` takes session precedence over any cached marketplace copy, and Claude Code sets `CLAUDE_PLUGIN_ROOT` to that directory. The detector reads it. No symlink, no `~/.claude/` mutation.
|
|
15
|
+
|
|
16
|
+
Convenience alias (optional, in `~/.zshrc` or `~/.bashrc`):
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
alias claude-bl='claude --plugin-dir ~/dev/git-folder/build-loop'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use the alias when you intend to dogfood build-loop changes; use plain `claude` for normal work that should run against the released cache version.
|
|
23
|
+
|
|
24
|
+
## Why not symlink into `~/.claude/plugins/`
|
|
25
|
+
|
|
26
|
+
Marketplace plugins are installed by **copy**, not symlink, into `~/.claude/plugins/cache/<marketplace>/<name>/<version>/`. A manual symlink there is fragile:
|
|
27
|
+
|
|
28
|
+
- Auto-update GC removes orphans after 7 days.
|
|
29
|
+
- A version bump replaces the cache directory and clobbers the symlink.
|
|
30
|
+
- `~/.claude/` is a per-user config surface — drift between machines breaks reproducibility.
|
|
31
|
+
|
|
32
|
+
The detector still walks the symlink layout as a **fallback** so existing setups keep working, but it is not the recommended path.
|
|
33
|
+
|
|
34
|
+
## How detection works
|
|
35
|
+
|
|
36
|
+
`scripts/detect_self_recursive.py` (called from Phase 1 Assess) checks signals in precedence:
|
|
37
|
+
|
|
38
|
+
1. **`--runtime-root <path>` arg** (Phase 1 passes `"$CLAUDE_PLUGIN_ROOT"`). `self_recursive = (realpath(runtime_root) == realpath(workdir))`. Method = `runtime_root_arg`.
|
|
39
|
+
2. **`CLAUDE_PLUGIN_ROOT` env var** when the arg is absent. Same check. Method = `plugin_root_env`.
|
|
40
|
+
3. **`__file__` self-location** — `Path(__file__).resolve().parents[1]` gives the plugin root of the running script copy (the script lives at `<plugin_root>/scripts/<name>.py`). If that resolves to `workdir`, this is ground truth — env-independent, because `CLAUDE_PLUGIN_ROOT` is not propagated to Bash-tool subprocesses. Mismatch falls through (heuristic, not operator assertion). Method = `self_location`.
|
|
41
|
+
4. **Legacy fallback** — walk `~/.claude/plugins/` for a symlink resolving to the workdir. Method = `cache_symlink`.
|
|
42
|
+
|
|
43
|
+
Both manifest (`.claude-plugin/plugin.json` with a `name`) and `.git/` must be present in the workdir regardless of method.
|
|
44
|
+
|
|
45
|
+
When an explicit signal (arg or env) is present and **does not** match the workdir, detection returns `self_recursive: false` with `reason_if_false: no_runtime_link` — the explicit signal has answered the question and we do not fall through to the symlink walk.
|
|
46
|
+
|
|
47
|
+
Output JSON keys: `self_recursive`, `plugin_name`, `runtime_symlink_path`, `working_copy_branch`, `working_copy_sha`, `reason_if_false`, `detection_method`.
|
|
48
|
+
|
|
49
|
+
## Restart-boundary caveat
|
|
50
|
+
|
|
51
|
+
Changing how build-loop is loaded (cache → `--plugin-dir`, or vice versa) takes effect **only at a fresh Claude Code session**. Do not switch mid-session: the live cache copy continues to serve your skills/agents until restart, and switching can GC the in-use cache and break the current session (`Agent not found` mid-run). Deploy plugin updates at a restart boundary; the same rule applies here.
|
|
52
|
+
|
|
53
|
+
## Dogfood reload checkpoint
|
|
54
|
+
|
|
55
|
+
When a self-recursive stage changes skills, agents, commands, hooks, MCP,
|
|
56
|
+
Rally, memory/research, plugin manifests, or the self-recursive detector, the
|
|
57
|
+
next stage must prove it is using the updated runtime. Use
|
|
58
|
+
`references/dogfood-reload-checkpoint.md` and
|
|
59
|
+
`scripts/dogfood_reload_checkpoint.py`:
|
|
60
|
+
|
|
61
|
+
1. Finish and validate the runtime-changing stage.
|
|
62
|
+
2. Create the checkpoint and post its path/instructions to Rally.
|
|
63
|
+
3. Restart or reload each participating terminal.
|
|
64
|
+
4. ACK with runtime root, runtime commit, reload method, and Rally status.
|
|
65
|
+
5. Continue only after all expected tools ACK, or after an explicit fallback
|
|
66
|
+
decision records the stale/unmanaged terminal.
|
|
67
|
+
|
|
68
|
+
## Quick verification
|
|
69
|
+
|
|
70
|
+
After launching with `--plugin-dir`, from inside the working tree:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
python3 "$CLAUDE_PLUGIN_ROOT/scripts/detect_self_recursive.py" \
|
|
74
|
+
--workdir "$PWD" --runtime-root "$CLAUDE_PLUGIN_ROOT" --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Expect `"self_recursive": true` and `"detection_method": "runtime_root_arg"`. Phase 1 surfaces the same in `.build-loop/state.json.selfRecursive`.
|