@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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Modular Systems Pack
|
|
4
|
+
|
|
5
|
+
Use this pack on every non-trivial build. It makes modular, scalable structure the default while allowing a simpler or more integrated approach when that better serves the use case.
|
|
6
|
+
|
|
7
|
+
## Default
|
|
8
|
+
|
|
9
|
+
Build-loop should prefer systems that are:
|
|
10
|
+
|
|
11
|
+
- **Modular**: each module hides one important design decision behind a stable interface.
|
|
12
|
+
- **Scalable**: the design can grow in data volume, user volume, feature count, or team ownership without immediate redesign.
|
|
13
|
+
- **MECE**: task groups, file ownership, and agent scopes are mutually exclusive and collectively exhaustive.
|
|
14
|
+
- **Pyramid-structured**: plans, handoffs, reports, and repo organization lead with the governing thought, then supporting groups, then details.
|
|
15
|
+
|
|
16
|
+
This is a default, not dogma. The goal is durable user value, not extra architecture.
|
|
17
|
+
|
|
18
|
+
## Exception Rule
|
|
19
|
+
|
|
20
|
+
Do not add modularity for its own sake. Choose a simpler or more integrated approach when:
|
|
21
|
+
|
|
22
|
+
- The change is a one-off script, short-lived migration, or isolated fix.
|
|
23
|
+
- A new boundary would add indirection without reducing real complexity.
|
|
24
|
+
- A performance hot path needs a tightly integrated implementation.
|
|
25
|
+
- The repo is small and the added module structure would obscure the core workflow.
|
|
26
|
+
- The product need is intentionally limited and extra optionality would confuse users.
|
|
27
|
+
|
|
28
|
+
When taking an exception, record:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
MODULARITY EXCEPTION: <why simpler/integrated is better for this use case>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## MECE File And Agent Partition
|
|
35
|
+
|
|
36
|
+
Phase 2 Plan must partition work so every changed file has exactly one owner and every required responsibility has an owner.
|
|
37
|
+
|
|
38
|
+
For each task group, use this packet:
|
|
39
|
+
|
|
40
|
+
```md
|
|
41
|
+
Group: <name>
|
|
42
|
+
Dimension: <domain | layer | workflow | bounded context | adapter | test surface>
|
|
43
|
+
Owns files: <paths>
|
|
44
|
+
Does not own: <paths handled elsewhere>
|
|
45
|
+
Interface contract: <exports/events/API/schema it may change>
|
|
46
|
+
Integration checkpoint: <command or review step>
|
|
47
|
+
Intent link: <north-star or user-value rule this group supports>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
MECE checks:
|
|
51
|
+
|
|
52
|
+
- No overlap: a file or interface is not owned by two agents unless the plan defines a handoff point.
|
|
53
|
+
- No gaps: every required behavior, state, migration, test, and user-facing surface has an owner.
|
|
54
|
+
- One dimension per level: avoid mixing domains, layers, and workflows in the same grouping level.
|
|
55
|
+
- Stable interfaces: agents can change internals, but cross-group contracts are explicit.
|
|
56
|
+
- Integration checkpoint: every boundary has a test, build, visual check, schema check, or reviewer step.
|
|
57
|
+
|
|
58
|
+
## Modular Design Heuristics
|
|
59
|
+
|
|
60
|
+
- Hide volatile decisions behind small interfaces: data shape, provider choice, algorithm, storage, rendering strategy, or external API.
|
|
61
|
+
- Prefer high cohesion: code that changes for the same reason lives together.
|
|
62
|
+
- Prefer loose coupling: callers depend on published interfaces, not internal data structures or side effects.
|
|
63
|
+
- Design around business/domain capabilities when the system is large enough for domains to matter.
|
|
64
|
+
- Keep boundaries small enough to understand and large enough to own a useful capability.
|
|
65
|
+
- Separate deploy/runtime config from code when values vary by environment.
|
|
66
|
+
- Preserve directness when extra layers make the core workflow harder to read, test, or operate.
|
|
67
|
+
|
|
68
|
+
## Pyramid Structure
|
|
69
|
+
|
|
70
|
+
Use pyramid structure for plans, reports, repo notes, and agent handoffs:
|
|
71
|
+
|
|
72
|
+
1. Governing thought: the one decision, result, or recommendation.
|
|
73
|
+
2. MECE key lines: 3-5 non-overlapping supporting claims or work groups.
|
|
74
|
+
3. Evidence/details: commands, files, risks, interfaces, and validation.
|
|
75
|
+
|
|
76
|
+
For repo structure, this means names should communicate purpose, folders should group by one clear dimension, and cross-cutting utilities should stay genuinely shared rather than becoming a junk drawer.
|
|
77
|
+
|
|
78
|
+
## Review Gates
|
|
79
|
+
|
|
80
|
+
Critic and final review should flag:
|
|
81
|
+
|
|
82
|
+
- Avoidable tight coupling or weak cohesion.
|
|
83
|
+
- Hidden cross-file ownership overlap between agents.
|
|
84
|
+
- Missing owner for a required behavior, state, migration, test, or user-facing surface.
|
|
85
|
+
- Abstraction added without user, scalability, testability, security, or maintainability benefit.
|
|
86
|
+
- Simplification that collapses a boundary needed for accuracy, security, scale, testability, or future optionality.
|
|
87
|
+
- Missing `MODULARITY EXCEPTION` when the plan intentionally chooses an integrated shortcut.
|
|
88
|
+
|
|
89
|
+
## Source Basis
|
|
90
|
+
|
|
91
|
+
- Parnas, "On the Criteria to Be Used in Decomposing Systems into Modules" (CACM, 1972): https://cacm.acm.org/research/on-the-criteria-to-be-used-in-decomposing-systems-into-modules/
|
|
92
|
+
- AWS Well-Architected REL04-BP02, "Implement loosely coupled dependencies": https://docs.aws.amazon.com/wellarchitected/2024-06-27/framework/rel_prevent_interaction_failure_loosely_coupled_system.html
|
|
93
|
+
- Microsoft Azure Architecture Center, domain analysis for microservices: https://learn.microsoft.com/en-us/azure/architecture/microservices/model/domain-analysis
|
|
94
|
+
- Microsoft Azure Architecture Center, design principles for Azure applications: https://learn.microsoft.com/en-gb/azure/architecture/guide/design-principles/
|
|
95
|
+
- Twelve-Factor App config guidance: https://12factor.net/config
|
|
96
|
+
- MECE framework overview: https://www.casestar.io/guides/mece
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Output Style Contract — User-Facing Terminal Output
|
|
2
|
+
|
|
3
|
+
Final user-facing output (Phase 4 Review-G report, phase status lines printed to the operator's terminal) must be **clear, direct, concise, and free of internal jargon**. This contract is enforced — `scripts/report_lint.py` runs on the draft before the user sees it, and Review-G auto-revises on findings (warn-and-self-heal, never a hard halt).
|
|
4
|
+
|
|
5
|
+
It extends — does not duplicate — the existing guidance:
|
|
6
|
+
|
|
7
|
+
- `CLAUDE.md` § "Concise output" — say only what the user needs to decide or act
|
|
8
|
+
- `~/.claude/CLAUDE.md` § "Intentional word choice" — every line must transmit information the reader does not already have
|
|
9
|
+
- `~/.claude/CLAUDE.md` § "Reporting Work" — pyramid-principle headline + verification line + impact-by-size
|
|
10
|
+
|
|
11
|
+
Scope: **user-facing output only.** Internal agent-to-agent envelopes (subagent return JSON, judge-decisions, run records, MECE briefs) are structured data and stay as-is — they exist for machines, not the human.
|
|
12
|
+
|
|
13
|
+
## The five rules
|
|
14
|
+
|
|
15
|
+
1. **Headline = one plain full sentence** stating what changed. First non-blank line. Not a noun phrase, not a telegraph fragment, not a heading.
|
|
16
|
+
2. **Bulleted concrete artifacts.** Below the headline: commit hashes, file paths, issue paths. Concrete things the user can grep, open, or `git show`.
|
|
17
|
+
3. **Substance bullets.** What the change captures or does, in plain language. Optional when the artifacts alone are self-explanatory.
|
|
18
|
+
4. **Validation line, explicit.** Name the exact command, method, or observer that verified the work, with a status marker:
|
|
19
|
+
- `✅ Verified by <method>` — ran the script, passing test, curl response, IBR scan, demo
|
|
20
|
+
- `⚠️ Untested — <what couldn't be verified and why>`
|
|
21
|
+
- `❓ Uncertain — <what's assumed and what would close it>`
|
|
22
|
+
5. **Plain language.** No jargon (see blocklist below). No contrastive pivot (`not X — it's Y`, `isn't X, it's Y`, `not just X but Y`) — state the point directly.
|
|
23
|
+
|
|
24
|
+
## Jargon blocklist (user-facing only)
|
|
25
|
+
|
|
26
|
+
These tokens are fine in internal envelopes; they must be translated to plain language in user-facing output:
|
|
27
|
+
|
|
28
|
+
| Internal token | Plain-language translation |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `GAP-1`, `GAP-N` | Name the actual gap (e.g. "missing auditor dispatch") |
|
|
31
|
+
| `auditor_status: not-run:parent-must-dispatch` | "Auditor not run — parent owes it" |
|
|
32
|
+
| `auditor_status: ran:dispatched-agent` | "Auditor ran" or omit if obvious |
|
|
33
|
+
| `sub-step G`, `sub-step F` | "Final report step", "Auto-resolve step", or omit |
|
|
34
|
+
| `MECE` | "ownership split", "one owner per file" |
|
|
35
|
+
| `envelope` | "return data", "result" |
|
|
36
|
+
| `scope=build` | "full build review" or omit |
|
|
37
|
+
| `suggest_correction` / `yay` / `nay` / `look_again` | "approve", "reject", "needs change", "needs another look" |
|
|
38
|
+
| `Phase 4G` / `Phase 5` | "final review", "iterate step" |
|
|
39
|
+
| `state.json.runs[]` | "run record" |
|
|
40
|
+
| Internal phase codenames (C-HEAL, C-RCA, C-FLOW…) | Describe the behavior, not the code |
|
|
41
|
+
|
|
42
|
+
## Good — the exemplar (Codex output, captured 2026-06-04)
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
- ad1ac79a memory(build-loop): capture native ax ui follow-up
|
|
46
|
+
- Issue: dev/git-folder/build-loop-memory/projects/build-loop/issues/bl-native-ax-light-ui-gap-check.md
|
|
47
|
+
- Backlog row added to .../backlog.md
|
|
48
|
+
|
|
49
|
+
It captures:
|
|
50
|
+
- skills/native-ax-driver/ as the home.
|
|
51
|
+
- IBR as the primary/full verifier, native AX as the lighter gap/fill layer.
|
|
52
|
+
- Blockers: clean main/fresh worktree and recovered AX/screencapture.
|
|
53
|
+
|
|
54
|
+
Validation passed: python3 scripts/validate_memory_store.py --strict.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Why this is good: plain-sentence headline implied by the commit subject, bulleted concrete artifacts with paths and a commit hash, an "It captures:" substance block, and an explicit validation line naming the exact command. Scannable, direct, no jargon.
|
|
58
|
+
|
|
59
|
+
## Good — exemplar B (scoped-edit narration, captured 2026-06-06)
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Claim is recorded. I'm keeping the edit scoped: selector scoring plus one regression
|
|
63
|
+
test that reproduces "old handoff masks newer targeted inbox/review request."
|
|
64
|
+
[visible actions: git switch -c …, Explored: read/search …]
|
|
65
|
+
The edit is small: add a typed helper for requires_ack evidence, score direct targeted
|
|
66
|
+
artifacts as inbox-doorbell work, and cover it with a regression where a stale handoff
|
|
67
|
+
used to hide the newer message.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Why it's good: declarative state → scope stated plainly with the bug in plain words → the change in one informed sentence.
|
|
71
|
+
|
|
72
|
+
## Good — exemplar C (closeout note, captured 2026-06-06)
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Commit 4392166 is created on fix/actionable-inbox-next. I'm posting the closeout to
|
|
76
|
+
Rally and releasing the two file claims now.
|
|
77
|
+
[visible actions: rally say release …, rally say artifact …]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Why it's good: states the landed artifact (commit + branch) → then the action-in-progress in one plain line.
|
|
81
|
+
|
|
82
|
+
## Bad — verbose + jargon (rewritten Good)
|
|
83
|
+
|
|
84
|
+
**Bad (jargon + filler):**
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Phase 4G Sub-step G completed for the auditor dispatch ladder. The auditor_status
|
|
88
|
+
field was changed to ran:dispatched-agent based on the GAP-1 contract; the build
|
|
89
|
+
scope=build review-completeness gate passed. We've now wired the MECE envelope
|
|
90
|
+
through the build-orchestrator so it propagates to the runs[] entry. Suggested
|
|
91
|
+
correction verdict from independent-auditor: yay. Want me to push?
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Good (rewrite):**
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Auditor now runs on every build commit; the gap where nested orchestrators
|
|
98
|
+
skipped it is closed.
|
|
99
|
+
|
|
100
|
+
- Commit: 7e54621 fix(audit): close nested-orchestrator audit gap
|
|
101
|
+
- Files: agents/build-orchestrator.md, scripts/audit_before_commit.py
|
|
102
|
+
- Run record: .build-loop/state.json runs[] entry build-2026-06-07-...
|
|
103
|
+
|
|
104
|
+
It captures:
|
|
105
|
+
- Nested orchestrators now hand the audit back to the dispatching parent.
|
|
106
|
+
- Auditor's approve verdict recorded in .build-loop/judge-decisions.json.
|
|
107
|
+
|
|
108
|
+
✅ Verified by python3 scripts/test_audit_before_commit.py — 14 passed.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## What stays internal (do not lint)
|
|
112
|
+
|
|
113
|
+
These are structured data for machines, not user-facing prose:
|
|
114
|
+
|
|
115
|
+
- Subagent return envelopes (JSON return values, `status: blocked | partial`, etc.)
|
|
116
|
+
- `state.json` writes
|
|
117
|
+
- `.build-loop/judge-decisions.json` entries
|
|
118
|
+
- MECE brief packets between orchestrator and implementers
|
|
119
|
+
- Rally Point post bodies on internal channels (peer-to-peer coordination)
|
|
120
|
+
- `auditor_status` and other machine fields embedded in run records
|
|
121
|
+
|
|
122
|
+
The lint targets ONLY the final user-facing report markdown + phase status lines printed to the operator's terminal. Inline backtick spans are NOT exempted — if an internal token appears in prose (even quoted), translate it; use a full fenced block only for verbatim code/trace the user should see literally.
|
|
123
|
+
|
|
124
|
+
## Enforcement summary
|
|
125
|
+
|
|
126
|
+
- `scripts/report_lint.py <draft.md> --json` runs on every Phase 4G draft
|
|
127
|
+
- Findings are WARN (advisory): the orchestrator self-heals by revising the draft once, then emits it
|
|
128
|
+
- Never hard-blocks a run — worst case is one revision pass
|
|
129
|
+
- The structural lint (`scripts/build_report_lint.py`) keeps running in parallel; it is orthogonal (parallel_batch / merge_plan / evidence triplet shape)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Pay-it-Forward Architectural Posture (full protocol)
|
|
4
|
+
|
|
5
|
+
> Loaded from `skills/build-loop/SKILL.md` summary. Encodes the user's preference that scalability and product-roadmap unlocks matter more than short-term build velocity when costs aren't prohibitive.
|
|
6
|
+
|
|
7
|
+
## The rule (verbatim, user-stated 2026-05-11)
|
|
8
|
+
|
|
9
|
+
> *"I'd rather do a slightly harder thing now to avoid a more painful change in the future if not prohibited by costs or other concerns."*
|
|
10
|
+
|
|
11
|
+
When a chunk has two viable implementations:
|
|
12
|
+
|
|
13
|
+
- **Path A** — minimum-viable, working v1, easy to ship now.
|
|
14
|
+
- **Path B** — same user-visible behavior, but extends the typed / structural contract so future surfaces can reuse it.
|
|
15
|
+
|
|
16
|
+
**Default to Path B** unless one of the explicit gates below blocks.
|
|
17
|
+
|
|
18
|
+
## Gates (Path B blocked when ANY is true)
|
|
19
|
+
|
|
20
|
+
| Gate | Condition | Recommendation |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| **Time-budget gate** | Path B blows the immediate time budget by more than 2× (e.g. requires a schema migration when none was needed for Path A). | Fall back to Path A. |
|
|
23
|
+
| **Missing dep / infra** | Path B requires a dependency or infrastructure not yet in the project. | Fall back to Path A. Note the dep as a roadmap item. |
|
|
24
|
+
| **Missing design decision** | Path B requires a product/architecture decision the user has not yet made (multi-tenant boundary, auth model, etc.). | Fall back to Path A. Surface the decision in the plan's Open Questions section. |
|
|
25
|
+
| **Empty foreclosed-future-capability list** | Path B's "what does this unlock?" list is empty — no named future capability needs the typed contract. | Fall back to Path A. The "flexibility" is speculative. |
|
|
26
|
+
|
|
27
|
+
## Anti-pattern explicitly excluded
|
|
28
|
+
|
|
29
|
+
Path B that's flexibility-for-its-own-sake is **NOT** what this rule means. Excluded shapes:
|
|
30
|
+
|
|
31
|
+
- Plugin/extension systems with no named future plugin.
|
|
32
|
+
- Abstract factories / hook architectures for a single current consumer.
|
|
33
|
+
- Generic event buses for a single producer / single consumer pair.
|
|
34
|
+
- Parameterized configs whose only caller hardcodes one value.
|
|
35
|
+
|
|
36
|
+
Path B must be tied to a **NAMED** future capability that's in the roadmap, PRD, intent.md, or stated user goal. "Future flexibility" is not a named capability.
|
|
37
|
+
|
|
38
|
+
## When this fires
|
|
39
|
+
|
|
40
|
+
Phase 2 Plan must trigger a Path A / Path B comparison for any chunk that touches:
|
|
41
|
+
|
|
42
|
+
1. **A typed protocol or interface boundary** — engine types, API contracts, DB schemas, message schemas, envelope shapes, MCP tool input/output schemas, agent return contracts.
|
|
43
|
+
2. **User-facing behavior servable by multiple surfaces** — a feature that could theoretically be exposed via chat + voice + native + email + CLI. Even if today only one surface uses it.
|
|
44
|
+
3. **A consumer where the path of least resistance inlines the contract** — prompt templates that embed business logic, route handlers that JSON-shape ad-hoc, single components that own a state machine.
|
|
45
|
+
4. **A schema change** — any addition/modification to a typed boundary (Prisma schema, Pydantic model, TypeScript interface, JSON Schema, Protobuf message).
|
|
46
|
+
|
|
47
|
+
If the chunk fits NONE of these signals, skip the comparison and proceed.
|
|
48
|
+
|
|
49
|
+
## How to apply (Phase 2 Plan output)
|
|
50
|
+
|
|
51
|
+
For each chunk that fires the signal above, the plan must include:
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
### Path A vs Path B — <chunk name>
|
|
55
|
+
|
|
56
|
+
**Path A (minimum-viable):**
|
|
57
|
+
- <one paragraph: what gets shipped, where the contract lives>
|
|
58
|
+
- Time estimate: <derived from t-shirt size>
|
|
59
|
+
- Limitation: <what future capability is foreclosed if we go this way>
|
|
60
|
+
|
|
61
|
+
**Path B (typed-contract extension):**
|
|
62
|
+
- <one paragraph: what gets shipped, where the contract lives>
|
|
63
|
+
- Time delta vs A: <e.g. "+30 min — adds 1 type definition + 1 module boundary">
|
|
64
|
+
- Unlocks (named future capabilities, NOT generic flexibility):
|
|
65
|
+
- <capability 1, with citation to roadmap/PRD/intent.md>
|
|
66
|
+
- <capability 2, with citation>
|
|
67
|
+
|
|
68
|
+
**Gates check:**
|
|
69
|
+
- Time-budget (>2× A)? <yes/no>
|
|
70
|
+
- Missing dep / infra? <yes — name it / no>
|
|
71
|
+
- Missing design decision? <yes — name it / no>
|
|
72
|
+
- Foreclosed-future list empty? <yes — explain / no — list above>
|
|
73
|
+
|
|
74
|
+
**Recommendation:** **Path B** (default) / **Path A** (because <named gate>).
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The orchestrator's default recommendation is **Path B**. User may override to A on plan acceptance.
|
|
78
|
+
|
|
79
|
+
## Examples (from user's prior decisions)
|
|
80
|
+
|
|
81
|
+
- **Clarifier flow**: prompt-layer (A) vs engine-typed (B) — Decision Doctor C6b. Path B chosen because typed engine output unlocked voice + native surfaces named in the PRD.
|
|
82
|
+
- **Auth checks**: per-route gate (A) vs middleware abstraction (B). Path B chosen when 3+ routes need the check; Path A when only one route.
|
|
83
|
+
- **Theme**: hardcoded primary color (A) vs CSS-var token scaffold (B). Path B chosen when alt-theme is on the roadmap; A otherwise.
|
|
84
|
+
- **Search results**: route-shape JSON (A) vs typed result schema in `lib/` (B). Path B chosen when a second consumer (chat tool, RSS export) is already planned.
|
|
85
|
+
|
|
86
|
+
## Phase 4 Review-A Critic check
|
|
87
|
+
|
|
88
|
+
When reviewing a commit that landed on Path A, the critic asks: did the plan's Path A/B section name a gate that justified A? If the plan lacked the section entirely AND the chunk fits the signals above, flag as a strong checkpoint: **"missing Path-A-vs-B analysis on a typed-boundary commit."**
|
|
89
|
+
|
|
90
|
+
This is a process check, not a re-implementation request — the commit can still ship on A, but the synthesis decision should be on the record.
|
|
91
|
+
|
|
92
|
+
## Relationship to existing packs
|
|
93
|
+
|
|
94
|
+
- **Intent Capability Pack** (`references/intent-capability-pack.md`) — captures user value + non-goals. Provides the named-future-capability list this pack draws on.
|
|
95
|
+
- **UI Input/Output Contract** (`references/ui-io-contract.md`) — names every user input/output. Surfaces the "could be served by multiple surfaces" signal.
|
|
96
|
+
- **Modular Systems Pack** (`references/modular-systems-pack.md`) — MECE/cohesion/coupling defaults. Path B usually advances modularity; Path A often inlines responsibilities.
|
|
97
|
+
|
|
98
|
+
The three packs together establish *what* the build is for and *how* it should be structured. The pay-it-forward pack establishes *which version* to ship when there's a choice.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Phase 1: Assess (full protocol)
|
|
4
|
+
|
|
5
|
+
> Loaded from `skills/build-loop/SKILL.md` summary. Contains the full Assess phase: state understanding, goal definition, and scoring criteria.
|
|
6
|
+
|
|
7
|
+
## Phase 1: Assess — State, Goal, and Criteria
|
|
8
|
+
|
|
9
|
+
**Goal**: Know what exists AND what success looks like before writing any code. Combines situational awareness with goal definition so the plan phase has everything it needs.
|
|
10
|
+
|
|
11
|
+
### Understand current state
|
|
12
|
+
|
|
13
|
+
0. **Peer-detection (cheap fail-fast — runs BEFORE plugin detection so a peer collision is surfaced before any other Phase 1 cost is paid).** Bash, ≤4 commands; output goes into the assess report. **The check is automated end-to-end — never pauses to ask the user.** Any non-empty line is written to `state.json.assess.peerDetect[]` and surfaces in `## Notes from judges`. Phase 2 Plan auto-routes per default policy: if scope overlap is detected, the orchestrator fast-forwards (`git merge --ff-only`) when ancestry allows, otherwise splits the affected chunks out and continues, logging `WARN: peer_collision_<kind>` either way. Operator reviews the report post-hoc. Complements Rally Point session-presence (§"Multi-session concurrency" in `agents/build-orchestrator.md`) — Rally Point covers active *sessions*; this covers dormant *artifacts* (coordination notes, stale worktrees, unmerged branches) those sessions leave behind.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ls .build-loop/coordination/*.md 2>/dev/null | grep -v /archived/ # live coordination notes
|
|
17
|
+
git worktree list --porcelain # all worktrees
|
|
18
|
+
git worktree list --porcelain | awk '/^worktree /{print $2}' \
|
|
19
|
+
| while read -r wt; do [ -d "$wt" ] && echo "$wt dirty=$(git -C "$wt" status --porcelain 2>/dev/null | wc -l | tr -d ' ')"; done # per-worktree dirty (Codex addition: dirty is stronger signal than branch merge status)
|
|
20
|
+
git branch -a --no-merged main | grep -vE 'archive|HEAD' # unmerged branches
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Helper errors (`grep -v`/`awk` non-zero) are NOT a failure — empty output means clean. Any non-empty line surfaces in the assess report for Phase 2 to reason about.
|
|
24
|
+
|
|
25
|
+
0a. **Credential preflight** (fail-soft, names only — no values ever surfaced): run
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/credential_preflight.py" \
|
|
29
|
+
--workdir "$PWD" --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Write the result to `.build-loop/state.json.assess.credentialPreflight`. If `missing[]` is non-empty, surface each name as `[CREDENTIAL REQUIRED] <name>` in the Assess summary and repeat verbatim in the end-of-run readback. A missing credential is a "genuine inability to proceed" under the autonomy policy: log it, continue all work that does not require the key, and surface it in the readback — do NOT stop-and-ask. Script failure (non-zero exit / bad JSON) → log one warning line; never blocks Assess.
|
|
33
|
+
|
|
34
|
+
0b. **Stale-context triage** (fail-soft, proactive drift notice): run
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/stale_context_check.py" \
|
|
38
|
+
--workdir "$PWD" --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Write the result to `.build-loop/state.json.assess.staleContext`. For each path in `docs[]` where the doc is flagged stale, surface it as `[STALE CONTEXT] <path>` in the Assess summary so the agent notes drift before relying on a handoff/orchestration/continuation doc. The user should never have to ask "is this still relevant?" Script failure → log one warning line; never blocks Assess.
|
|
42
|
+
|
|
43
|
+
0c. **Memory-staleness triage** (fail-soft, proactive drift notice): run
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/memory_staleness_check.py" \
|
|
47
|
+
--workdir "$PWD" --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Write the result to `.build-loop/state.json.assess.memoryStaleness`. When `stale: true`, surface `[MEMORY STALE] <slug> N commits behind HEAD — append a milestone/decision` in the Assess summary. Log the finding and continue — do NOT stop. The run should append a milestone or decision entry during Phase 6 Learn (or inline if the goal is memory-focused). Script failure → log one warning line; never blocks Assess.
|
|
51
|
+
|
|
52
|
+
1. **Detect available plugins and personal skills**: Run `node ${CLAUDE_PLUGIN_ROOT}/skills/build-loop/detect-plugins.mjs`. Write the JSON result into `.build-loop/state.json` under `availablePlugins`. All subsequent routing consults this object.
|
|
53
|
+
2. **Detect project type**: web app, API, library, mobile, CLI, monorepo, **Claude Code plugin**, one-shot new app, existing-app iteration. A plugin is detected by the presence of `.claude-plugin/plugin.json`, `hooks/hooks.json`, `skills/*/SKILL.md`, `commands/*.md`, `agents/*.md`, or `.mcp.json`. If detected, mark the build as "plugin work" in state.json and plan to load the `plugin-dev:*` skills before any manifest/hook/skill/agent/MCP/command/**scripts/** edits. **Any change to a file referenced via `${CLAUDE_PLUGIN_ROOT}/...` counts as plugin work** — this includes `scripts/*.py`, `references/*`, or anything else the plugin manifests, agents, or skills invoke at runtime. These files live in `~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/` at run time; editing only the source repo without syncing the cache leaves the runtime invocation broken (Lessons §5 + §5a in `plugin-hygiene-lessons.md`).
|
|
54
|
+
3. **Set sub-routers**: `uiTarget` (web / mobile / **macos** / null), `platform` (web / apple / react-native / null), `migrationSource` (replit / lovable / bolt / v0 / null). See the Capability Routing §Sub-routers rules. **macOS desktop is a first-class `uiTarget`** — distinct from `mobile` — because macOS has no simulator and routes visual-verify to `native-ax-driver` (or IBR `scan_macos` when present), never to `xcrun simctl`. Folding macOS into `mobile` was the routing bug from session-findings 2026-06-04.
|
|
55
|
+
4. **Detect available tools**: test runners (`package.json` scripts, `pytest.ini`, etc.), linters, deploy targets.
|
|
56
|
+
- **Deployment policy**: read `.build-loop/config.json.deploymentPolicy` if present. Defaults are `preview: auto`, `testflight: auto`, `production: confirm`, `unknown: confirm`. Use `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/deployment_policy.py --workdir "$PWD" --command "<candidate push/deploy command>"` before any push/deploy. Treat helper errors as `confirm`.
|
|
57
|
+
5. **Map architecture** using best available approach:
|
|
58
|
+
- If `.navgator/architecture/index.json` exists → invoke `Skill("build-loop:architecture-scan")` to refresh data, then `Skill("build-loop:architecture-impact")` on up to 5 highest-risk components for blast-radius. Output goes to `.build-loop/state.json.architecture.{scan,impact}`. Phase 2 Plan consults this for scoping. Flags high-fan-in hotspots, 2-hop dependents, layer-crossing risks, and prompts-in-scope when `triggers.promptAuthoring` is true.
|
|
59
|
+
- Else if `gator:*` is available → use those commands.
|
|
60
|
+
- Else → Explore agents → file reading.
|
|
61
|
+
5a. **Architecture portable handoff** (read on resume; write on fresh scan): after the architecture baseline above, the scan result must also be written to `.build-loop/architecture/handoff.md` as a self-contained snapshot — component map, key connections, runtime topology, LLM use-cases, and data flows — that a FRESH session can consume WITHOUT re-scanning. On a resumed or fresh session, Phase 1 reads `.build-loop/architecture/handoff.md` if it exists and its `updated_at` timestamp is within the staleness threshold (default: same as stale-context check), and skips the full re-scan. The format and field schema are specified in `agents/build-orchestrator.md` (architecture-scout section); this step only wires the read/write reference. Write failure → log one warning; never blocks.
|
|
62
|
+
|
|
63
|
+
5b. **Reads-from dependency enumeration**: For each component the build will change or add, enumerate every data path, contract, or invariant it reads (config files, state keys, schema fields, API contracts). For each, verify something writes it — grep the repo, check test fixtures, or confirm the schema. Record results in `.build-loop/state.json.assess.readsDependencies[]` as `{path, writer_found: true|false}`. Any path with `writer_found: false` is a BLOCKING unknown that must appear as `unverified` in the plan's `## Depends-on (reads-from)` section and be resolved before Phase 3.
|
|
64
|
+
|
|
65
|
+
6. **Observability baseline** (informational, no changes): run a stack-appropriate grep to classify the project's logging level (well-instrumented / print-only / silent) and write to `.build-loop/state.json.observability.level`. The orchestrator handles this inline — `Skill("build-loop:logging-tracer")` is reactive only and is loaded later if Review-B / Iterate hits a silent failure.
|
|
66
|
+
6b. **Attribution-layers detection** (informational, advisory only — never blocks, never pauses): run `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/detect_attribution_layers.py --workdir "$PWD"` when the repo has a GitHub origin remote. Write the result to `.build-loop/state.json.attribution`. When `should_advise: true`, surface the returned `advisory` line in the Phase 1 Assess report under `## Notes from judges`. Phase 2 Plan queues an automatic chunk to run `scripts/attribution_stamp.py` when the build scope is ≥ S; smaller scopes only surface the advisory and let the user run it manually. Per `feedback_advisory_checks_are_automated`: this routes to the run report, never to AskUserQuestion or `## Held`. Helper failure → treat as `should_advise: false` and log a one-line warning. The full procedure for stamping is in `skills/attribution-standard/SKILL.md`.
|
|
67
|
+
|
|
68
|
+
6a. **Runtime-server detection** (informational, no changes): run `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/detect_runtime_server.py --workdir "$PWD" --json` and write the result to `.build-loop/state.json.triggers.runtimeServer` (boolean) plus `.build-loop/state.json.runtimeServerInfo` (full envelope: `server_module`, `sse_route`, `default_port`, `embedded_ui_module`, `event_handler_locations[]`, `evidence[]`). Phase 4 sub-step B Validate consults these for the live HTTP/SSE smoke gate. Helper failure → treat as `runtimeServer: false` and log a one-line warning; never blocks. Silent default for CLIs, libraries, plugins, and static-render web apps. Implements decision `_unscoped/0003` (live smoke required when build-loop touches a runtime server) — closes the pytest-with-mocks blind spot that let example-app ship 27 commits with two real bugs.
|
|
69
|
+
7. **Debugger context priming** (always; native to build-loop): invoke `Skill("build-loop:debugging-memory")` with `{ intent: "list-recent", project: "<current>" }` to summarize recent incidents in this project. One-line output; no action. If cross-project Coding Debugger is installed, the skill may use it; otherwise it falls through to `fallbacks.md#bug-memory`.
|
|
70
|
+
8. **Capture UI state** (if web/mobile): host browser/screenshot tooling or simulator/native-AX evidence when available → showcase capture → manual screenshot. Do not route to IBR unless the user explicitly requested it.
|
|
71
|
+
8a. **UI input/output inventory** (if `uiTarget != null`): load `skills/build-loop/references/ui-io-contract.md` and identify every affected user input and system output before component choices are made. Classify each by structural type, content format, persistence intent, operation/domain verb, component mapping, state matrix, modality fallback, validation/security layer, and traceability. Mirror a compact summary to `.build-loop/state.json.uiIOContract` when practical; the full contract is finalized in Phase 2.
|
|
72
|
+
|
|
73
|
+
8b. **Load short-term working context (Pillar 0 — structurally loaded first, inside memory bootstrap)**: `context_bootstrap.build_packet()` calls `load_current(workdir)` at its very entry, before any heavier memory work, and attaches the result as `packet['working_context']` (a serialized `WorkingContextEnvelope`). The working context is therefore available as part of the Phase-1 packet without a separate CLI step.
|
|
74
|
+
|
|
75
|
+
Consume it directly from the packet:
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
wc = packet["working_context"] # {exists, path, warm_read_latency_ms, parsed, reasons}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Use `wc["parsed"]["links_down"]` as the entry pointers DOWN into long-term memory (P1 hybrid recall + P4 prior-art). Missing / corrupt `current.md` → `wc["exists"] == False` + `wc["reasons"]`; never blocks Phase 1 or bootstrap. Mirror `wc["warm_read_latency_ms"]` into `.build-loop/state.json.assess.workingContextLatencyMs` for the Phase 4G report.
|
|
82
|
+
|
|
83
|
+
The standalone CLI (`python3 ${CLAUDE_PLUGIN_ROOT}/scripts/load_current.py --workdir "$PWD" --json`) remains available for manual inspection but is no longer a required Phase-1 step — the enforced path is via `build_packet()`.
|
|
84
|
+
|
|
85
|
+
9. **Load memory**: Run the automatic context bootstrap before planning:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/context_bootstrap.py \
|
|
89
|
+
--workdir "$PWD" \
|
|
90
|
+
--query "<goal-keywords>" \
|
|
91
|
+
--output "$PWD/.build-loop/context-bootstrap.json" \
|
|
92
|
+
--json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The packet must include canonical `build-loop-memory` root/project `MEMORY.md` and `constitution.md` files, indexed recall, repo-local `.build-loop/feedback.md`, `.build-loop/state.json`, current plan/goal/intent, Codex memory registry `~/.codex/memories/MEMORY.md` plus linked rollout summaries, and best-effort Rally/coordination state when coordination context exists. If the root constitution is absent, `context_bootstrap.py` seeds it once from the shipped template before reading; it never overwrites existing root or project constitution files. Missing surfaces are recorded in `sources.*.reasons[]`; they do not block Phase 1 by themselves. See `references/memory-systems.md` §"Read protocol — Phase 1 Assess".
|
|
96
|
+
|
|
97
|
+
**Cross-project prior art (P4 — payoff)**: the bootstrap also emits `packet.prior_art`, a compact cross-project digest of prior implementations + linked decisions for the task's classified capability. Powered by `scripts/capability_classifier.py` (deterministic, host-LLM-refinable) and `scripts/prior_art.py` (reuses P1 hybrid recall + scans `projects/<slug>/decisions/` and `projects/<slug>/lessons/` across other projects). The digest is compact (hard char cap — `prior_art.DEFAULT_MAX_TOTAL_CHARS`, 4000 chars) and absence-tolerant (empty memory → empty payload, never blocks). `build_packet()` **enforces** the write by calling `context_bootstrap.write_prior_art_to_intent(workdir, digest_text)` immediately after building the packet: when the digest is non-empty AND `<workdir>/.build-loop/` exists, it appends (or idempotently replaces) a `<!-- prior-art:start -->`…`<!-- prior-art:end -->` block in `.build-loop/intent.md` (creating the file when absent). Re-running replaces the block — never duplicates. The agent brief still carries the compact pointer line for quick orientation; the full digest body is in the file. Disable via `BUILD_LOOP_PRIOR_ART=0`.
|
|
98
|
+
|
|
99
|
+
Then write the first live handoff snapshot:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/context_snapshot.py \
|
|
103
|
+
--workdir "$PWD" \
|
|
104
|
+
--trigger phase_transition \
|
|
105
|
+
--phase assess \
|
|
106
|
+
--message "Phase 1 context bootstrap complete" \
|
|
107
|
+
--if-changed \
|
|
108
|
+
--json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This refreshes `.build-loop/context/current.md` for later agents. Snapshot failure is a context-quality warning, not a Phase 1 blocker.
|
|
112
|
+
|
|
113
|
+
9a. **Run identity + multi-session presence (Rally Point)** (always; runs at the Phase 1 preamble before any Rally Point write):
|
|
114
|
+
1. Generate or resume durable run identity + isolated worktree: `execution = scripts/rally_point/build_loop_id.generate_or_resume(workdir="$PWD", tool="<tool-id>", session_id="<session-id>", provision_worktree=True)`. This writes `state.execution.build_loop_id` and `state.execution.run_label` when missing, preserves them on resume, and updates only `current_session_id`. **`provision_worktree=True` is mandatory: it provisions `.build-loop/worktrees/run-<id>` on `bl/run-<id>` (fail-closed; aborts the run rather than touch the canonical checkout) and records `state.execution.run_worktree_path` for all downstream git/file ops. Structural fix for shared-checkout contamination — see `docs/SPEC-run-worktree-isolation.md`.**
|
|
115
|
+
2. Resolve the channel: `slug = scripts/rally_point/channel_paths.app_slug(cwd="$PWD")` (D1: worktree/clone-independent — main checkout and every worktree share one channel). Do NOT reimplement slug derivation.
|
|
116
|
+
3. Write presence: `scripts/rally_point/presence.write_presence(channel, session_id=..., tool="claude_code", model=..., run_id="$RUN_ID", app_slug=slug, phase="assess", files_in_flight=[])`. Codex / Gemini / other hosts substitute their `tool` value. Fire-and-forget. The writer attaches top-level `build_loop_id` and `build_loop_run_label` from `state.execution`.
|
|
117
|
+
4. Read active peers: `peers = scripts/rally_point/presence.read_active_presence(channel, exclude_session=...)` (also reaps stale presence past the heartbeat window — no daemon).
|
|
118
|
+
5. Route per `agents/build-orchestrator.md` §Multi-session concurrency — **awareness only, never a hard block (D4)**:
|
|
119
|
+
- No peers / no `files_in_flight` overlap → log one line per peer (tool, run_id, phase); continue.
|
|
120
|
+
- Overlap with a peer's `files_in_flight` → surface a `soft-claim` WARNING (peer, files, phase); continue with awareness. Interactive MAY additionally `AskUserQuestion` to coordinate; headless logs + proceeds. No SAFE-STOP sentinel, no non-zero exit.
|
|
121
|
+
6. Initialize the memory-index cursor: capture the current top-of-log timestamp from `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/memory_index.py tail --limit 1 --json` (used by `--since` in subsequent phases to surface new peer learnings).
|
|
122
|
+
|
|
123
|
+
**Supersedes** the legacy `ps aux | grep -c "[c]laude$"` advisory below — Rally Point presence is the canonical signal. Keep the legacy line as a fallback only when Rally Point is unavailable (older plugin cache without `scripts/rally_point/`).
|
|
124
|
+
|
|
125
|
+
10. **Load PRD if present** (strategic frame check): load `build-loop:prd-bridge`, run its Phase 1 Assess step. If `docs/prd-*.md` exists, the bridge reads frontmatter (`core_principles`, `load_when`, `evolves_when`), Navigation Map, and Section Index, mirrors them to `.build-loop/state.json.prd`, and surfaces staleness signals. If no PRD exists, the bridge writes a one-line recommendation in `state.json.prd.recommendation` pointing to `prd-builder` skill / `/build-loop:start-prd` command — surfaces in Sub-step G Report's `## Held` section, doesn't block. Step 11 below uses PRD as primary source of truth when present; falls back to fresh capture when absent.
|
|
126
|
+
11. **Capture north star + update intent**: When `state.json.prd.core_principles` is non-empty (a PRD was loaded by step 10), use it as the strategic frame; `intent.md` cites the PRD path + revision rather than re-deriving. Otherwise use `references/intent-capability-pack.md` to identify app/repo purpose, primary users, core jobs, update intent, user value, and non-goals fresh. Write `.build-loop/intent.md` and mirror compact fields to `.build-loop/state.json.intent`.
|
|
127
|
+
|
|
128
|
+
**Intent restatement protocol (always-on, LLM-judged)**: as part of writing `intent.md`, follow `references/intent-capability-pack.md` § Intent restatement protocol — write a one-line concrete restatement always; when the orchestrator LLM judges the goal genuinely ambiguous (per Step A heuristics), extend with 1-3 approach options + tradeoffs + tagged assumptions. The judgment is the orchestrator LLM's, not a regex or detector script. For a concrete unambiguous goal this is one line and the flow moves on immediately — zero fast-path friction. Never `AskUserQuestion`, never `## Held`, never blocks Phase 1. Fail-safe: any error here is logged as one line; the build continues. Phase 2 Plan's "fork on uncertainty" rule consumes `state.json.intent.approach_options` when the LLM's confidence stays medium/low AND Phase 2 surfaces 2+ viable approaches.
|
|
129
|
+
|
|
130
|
+
12. **Assess modular structure**: Use `references/modular-systems-pack.md`. Identify current module boundaries, stable interfaces, coupling risks, likely MECE work partitions, and any justified modularity exception. Mirror compact fields to `.build-loop/state.json.structure`.
|
|
131
|
+
12a. **Capture approach lenses**: For any non-trivial architecture, workflow, dependency, UI/product, or long-lived interface recommendation, assess two separate answers before planning:
|
|
132
|
+
- **Clean-sheet best approach**: what would be best for the use case if prior repo decisions, accumulated tech debt, and current implementation constraints did not exist.
|
|
133
|
+
- **Current-constraints best approach**: what is best given the repo's existing code, dependencies, tools, debt, team/runtime constraints, migration cost, and delivery horizon.
|
|
134
|
+
- **Bridge/backcast**: the smallest credible path from current state toward the clean-sheet target, including debt retired, dependencies added/removed, and decision points.
|
|
135
|
+
|
|
136
|
+
Prior decisions are evidence, not axioms. Do not discard current constraints; isolate them so Phase 2 can decide whether they justify a compromise. Mirror the compact summary to `.build-loop/state.json.approachLenses` with `clean_sheet`, `current_constraints`, `constraint_delta`, and `bridge_backcast` fields.
|
|
137
|
+
13. **Check prior state**: Read `.build-loop/issues/` and `.build-loop/feedback.md` if they exist. Surface relevant items. If any issue affects the current user's experience, add it to the plan unless too large or risky; otherwise log and defer with user impact.
|
|
138
|
+
14. **Research trigger + depth gate**: run the deterministic classifier and cache the result:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/research_trigger.py" \
|
|
142
|
+
--workdir "$PWD" \
|
|
143
|
+
--task "<goal text>" \
|
|
144
|
+
--effort "<XS|S|M|L|XL>" \
|
|
145
|
+
--cache-into-state \
|
|
146
|
+
--json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
This writes `.build-loop/state.json.researchGate`. Use
|
|
150
|
+
`references/research-trigger-policy.md` for trigger policy and t-shirt depth
|
|
151
|
+
lower bounds. If `research_required: true`, run the Research plugin at the
|
|
152
|
+
returned depth (`light`/`standard`/`deep`) or record why it was unavailable.
|
|
153
|
+
If `blocks_final_claims: true`, final current/external/API claims need
|
|
154
|
+
citations or an explicit unavailable/unverified note.
|
|
155
|
+
14a. **Active task surface**: when the user asks what remains, when Phase 1
|
|
156
|
+
surfaces open work, or before queue-continuation decisions, run:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/task_surface.py" \
|
|
160
|
+
--workdir "$PWD" \
|
|
161
|
+
--json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
This is the canonical active view over existing state, queue, and
|
|
165
|
+
project-scoped memory backlog surfaces. Do not create a second task ledger by
|
|
166
|
+
default. See `references/task-capture-policy.md`.
|
|
167
|
+
15. **Recovery check**: This used to be a phase-level marker. As of v0.11 the canonical recovery surface is the `--resume` argument and the heartbeat-staleness path documented under §Resume Protocol. The pre-Assess resolver already ran by the time Phase 1 starts; if it returned `decision: "prompt_user"` and the user chose "fresh", proceed normally; if they chose `--resume`, you're not in this code path (the agent is in §0 Resume mode instead).
|
|
168
|
+
16. **Workspace concurrency check** (advisory, no blocking — surface as one-line notes):
|
|
169
|
+
- **Concurrent sessions**: `ps aux | grep -c "[c]laude$"`. If `>1`, warn that other sessions on this repo can silently revert each other's work; the checkpoint reactions (severity + reason) tell you whether overlap is `merged_residue` / `squash_landed` / `active_conflict`. See `agents/build-orchestrator.md` §Multi-session concurrency.
|
|
170
|
+
- **Branch divergence**: `git rev-list --count HEAD..origin/main` and `origin/main..HEAD`. If local main is ahead of origin AND a feature branch will be cut, recommend branching from `origin/main` directly (`git checkout -b <name> origin/main`) so unpushed local commits don't ride into the eventual squash and bundle under a misleading title.
|
|
171
|
+
- **Recovery if symptoms appear during build** (file writes vanish, system reminders flag "intentional" reverts, `git status` clean): pause edits, run `ps aux | grep claude` + `git log --oneline -- <affected paths>` to identify the colliding session/squash, then re-apply dropped work on a fresh branch from `origin/main`.
|
|
172
|
+
|
|
173
|
+
### UI scope and mockup pre-flight (when uiTarget != null)
|
|
174
|
+
|
|
175
|
+
**UI pre-flight**: If project has `mockups/` or `.mockup-gallery/` and goal references selected mockups, run the design-rule scanner against the mockup HTML/CSS first to surface conflicts before coding:
|
|
176
|
+
```
|
|
177
|
+
node "${CLAUDE_PLUGIN_ROOT}/skills/build-loop/scanners/audit-design-rules.mjs" --root=<mockups_dir> --platform=html --json
|
|
178
|
+
```
|
|
179
|
+
Log conflicts to `.build-loop/issues/mockup-rule-conflicts.md`. Don't block — agents need to know upfront which rules trump the mockup. Mockups are intent, rules are law. See `phases/ui-validation.md` for full guidance.
|
|
180
|
+
|
|
181
|
+
### Define goal and scoring criteria
|
|
182
|
+
|
|
183
|
+
14. **State the goal** in concrete, measurable terms.
|
|
184
|
+
15. **Suggest 3-5 scoring criteria** from: functionality, code quality, UX, performance, security, accessibility, test coverage — select what's relevant to the project and goal. Include intent fidelity/user value when the change affects user experience or product behavior. Include modularity/MECE/scalability when the change spans modules, agents, domains, repo areas, data boundaries, or long-lived interfaces. Show for confirmation.
|
|
185
|
+
|
|
186
|
+
**Warning/lint criteria MUST be relative, not absolute** (R4 from the 2026-05-19 iOS retro). An absolute "zero warnings tagged X" criterion false-fires on pre-existing warnings, forcing subagents to either lie, exit-fail honest work, or write apologetic prose. Author as **"no NEW warnings matching `<filter>` vs `git merge-base origin/main HEAD` using the same build command, destination, SDK, and filter"** (Codex correction: baseline only valid when capture and current invocations match). Inline diff helper:
|
|
187
|
+
`comm -23 <(<current> 2>&1 | grep -E 'warning:' | grep -E '<filter>' | sort -u) <(<baseline> ... | sort -u)`. Persist baselines as plain text under `.build-loop/baselines/warnings-<base-sha>-<filter-slug>.txt` only when one is needed; ad-hoc capture is fine.
|
|
188
|
+
|
|
189
|
+
**When `uiTarget != null`, the following criteria are REQUIRED and added automatically (not optional)**:
|
|
190
|
+
- **UI-1 Design-rule compliance**: scanner exits 0 on changed files (must-fix=0). Grader: code (`audit-design-rules.mjs`).
|
|
191
|
+
- **UI-2 Reduce Motion compliance**: every animation gated on platform's reduce-motion API. Grader: code (scanner rule `animation-without-reducemotion`).
|
|
192
|
+
- **UI-3 Theme token usage**: no raw color literals or hardcoded radii outside theme files. Grader: code (scanner rules `uicolor-rgb-outside-theme`, `literal-corner-radius`, `hex-color-outside-theme`).
|
|
193
|
+
- **UI-4 Accessibility labels**: icon-only graphics have explicit labels. Grader: code (scanner rule `sf-symbol-without-label` or web equivalent).
|
|
194
|
+
- **UI-5 Input/output contract coverage**: every changed UI surface has a plan row naming user inputs, system outputs, data taxonomy, operation/domain verb, component mapping, states, modality fallback, validation/security, and traceability. Grader: code/document check (`check_checklist.py` Item 17 plus Review read).
|
|
195
|
+
|
|
196
|
+
These exist because mockup-parity ≠ design-rule compliance, and component polish does not prove the UI handles the right data. Code that matches the mockup but omits an input, output, state, validation layer, or fallback is not production-ready. See `phases/ui-validation.md` and `references/ui-io-contract.md`.
|
|
197
|
+
|
|
198
|
+
16. **Design eval graders per criterion** using the grading hierarchy:
|
|
199
|
+
- **Prefer code-based graders** (fast, deterministic, cheap): test suite pass/fail, lint/type check, build succeeds, schema validation, accessibility audit
|
|
200
|
+
- **Use LLM-as-judge graders** when code can't check the criterion:
|
|
201
|
+
- Binary pass/fail only — no Likert scales
|
|
202
|
+
- One evaluator per dimension — no multi-dimension God Evaluator
|
|
203
|
+
- Judge reasons in thinking tags, outputs only pass/fail
|
|
204
|
+
- Use the running host model/session as judge
|
|
205
|
+
- Each criterion gets: `description | grading method | pass condition | evidence required`
|
|
206
|
+
- Load `eval-guide.md` in this skill directory for judge prompt template and scorecard format if needed.
|
|
207
|
+
17. **Write goal file**: Save to `.build-loop/goal.md` in the project directory.
|
|
208
|
+
18. **Synthesis-density routing** (REVISED 2026-05-07 round-4 — Phase 1 routing with explicit speed/quality lanes): if a plan file already exists, count its `synthesis_dimensions:` entries via `count_synthesis_dimensions()` in `scripts/plan_verify.py` (shared parser; do NOT write a second). Resolve tier in this priority order:
|
|
209
|
+
1. **Explicit override** — `.build-loop/config.json.modelOverrides.thinking` or `state.json.config.modelOverrides.thinking` set OR plan/chunk frontmatter declares `tier: thinking` → route to thinking-tier.
|
|
210
|
+
2. **Auto-escalate on density** — `count > 5` (6+ entries) → `tier: thinking` (synthesis-dense at commit level; fan-out loses cross-dimension coherence).
|
|
211
|
+
3. **Default — Sonnet fan-out for speed** — `count` 1–5 OR `count == 0` → fan-out. Sonnet's ~33% wall-clock and ~28% token savings are real; C3-C5 backstops catch the residual recall gap.
|
|
212
|
+
4. **Per-chunk override** — individual chunks may declare `tier: thinking` even when plan-level was fan-out.
|
|
213
|
+
|
|
214
|
+
Write to `state.json.synthesisDensity` as `{count, escalated, reason}`. Routing target is `tier: thinking`, **never a hardcoded model name** (`scripts/model_overrides.py`: repo config → state snapshot → orchestrator frontmatter fallback → fail-loud). When `escalated == true`, do NOT fan out; execute inline at thinking-tier.
|
|
215
|
+
|
|
216
|
+
**Why this shape:** n=6 A/B experiment (2026-05-07, `~/dev/research/topics/synthesis-decision-delegation/experiment-2026-05-07/`) showed β catches ~40% of α's novels — real quality gap — but also showed β saves ~33% wall-clock and ~28% tokens, and the C3-C5 backstops catch some leaks. Defaulting Opus universally would erase β's velocity; the `> 5` threshold matches the empirical inflection point where β's recall collapses (C5 at 5 dims surfaced 0 novels vs α's 5). Below that, fan-out is the right speed choice; above it, depth dominates. Plan/chunk-level overrides let the operator pick quality > speed when needed without changing the default. See `agents/build-orchestrator.md` Phase 1 for full procedure.
|
|
217
|
+
|
|
218
|
+
**Output**: Structured state summary + `.build-loop/intent.md` + `.build-loop/goal.md` with criteria. Brief.
|