@nathapp/nax 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -2
- package/dist/nax.js +72691 -0
- package/package.json +12 -4
- package/src/cli/config.ts +3 -1
- package/src/config/defaults.ts +1 -0
- package/src/config/schemas.ts +1 -0
- package/src/config/types.ts +1 -0
- package/src/context/builder.ts +10 -1
- package/src/prompts/sections/role-task.ts +4 -2
- package/src/review/runner.ts +6 -1
- package/src/version.ts +2 -1
- package/.claude/rules/01-project-conventions.md +0 -34
- package/.claude/rules/02-test-architecture.md +0 -39
- package/.claude/rules/03-test-writing.md +0 -58
- package/.claude/rules/04-forbidden-patterns.md +0 -29
- package/.claude/settings.json +0 -15
- package/.githooks/pre-commit +0 -16
- package/.gitlab-ci.yml +0 -103
- package/.mcp.json +0 -8
- package/BRIEF.md +0 -140
- package/CLAUDE.md +0 -143
- package/US-007-IMPLEMENTATION.md +0 -139
- package/biome.json +0 -14
- package/bun.lock +0 -163
- package/bunfig.toml +0 -12
- package/docker-compose.test.yml +0 -15
- package/docs/20260216-fix-plan-context-review.md +0 -56
- package/docs/20260216-relentless-vs-ngent-comparison.md +0 -208
- package/docs/20260216-v02-plan.md +0 -136
- package/docs/20260216-v02-review.md +0 -685
- package/docs/20260217-dogfood-findings.md +0 -56
- package/docs/20260217-p2-plus-plan.md +0 -117
- package/docs/20260217-partial-fixes-plan.md +0 -62
- package/docs/20260217-plan-analyze-spec.md +0 -117
- package/docs/20260217-post-impl-review.md +0 -1137
- package/docs/20260217-quick-wins-plan.md +0 -66
- package/docs/20260217-split-runner-plan.md +0 -75
- package/docs/20260217-v03-impl-plan.md +0 -80
- package/docs/20260217-v03-post-impl-review.md +0 -589
- package/docs/20260217-v04-impl-plan.md +0 -86
- package/docs/20260217-v05-post-impl-review.md +0 -850
- package/docs/20260217-v06-post-impl-review.md +0 -817
- package/docs/20260218-adr003-port-plan.md +0 -151
- package/docs/20260218-review-adr003-verification.md +0 -175
- package/docs/20260219-fix-plan-bug16-19.md +0 -79
- package/docs/20260219-fix-plan-bug20-22.md +0 -114
- package/docs/20260219-plan-llm-routing.md +0 -116
- package/docs/20260219-review-bug20-22-fixes.md +0 -135
- package/docs/20260219-routing-baseline-keyword.md +0 -63
- package/docs/20260220-plan-structured-logging-p1.md +0 -80
- package/docs/20260220-plan-structured-logging-p2.md +0 -37
- package/docs/20260220-review-llm-routing.md +0 -180
- package/docs/20260220-review-post-fix-llm-routing.md +0 -70
- package/docs/20260221-fix-plan-relevantfiles-split.md +0 -101
- package/docs/20260221-fix-plan-routing-mode.md +0 -125
- package/docs/20260221-review-v0.9-implementation.md +0 -379
- package/docs/20260222-fix-plan-v091-routing-isolation.md +0 -197
- package/docs/20260223-fix-plan-prompt-audit.md +0 -62
- package/docs/20260224-nax-roadmap-phases.md +0 -189
- package/docs/20260225-phase2-llm-service-layer.md +0 -401
- package/docs/20260225-review-v0.10.1.md +0 -187
- package/docs/20260303-v010-implementation-plan.md +0 -165
- package/docs/20260304-review-nax.md +0 -492
- package/docs/CLAUDE.md.bak +0 -191
- package/docs/ROADMAP.md +0 -390
- package/docs/SPEC-rectification.md +0 -0
- package/docs/SPEC.md +0 -324
- package/docs/US-001-plugin-loading-verification.md +0 -152
- package/docs/adr/ADR-005-implementation-plan.md +0 -655
- package/docs/adr/ADR-005-pipeline-re-architecture.md +0 -464
- package/docs/architecture-analysis.md +0 -1076
- package/docs/bugs/BUG-21-escalation-null-attempts.md +0 -48
- package/docs/bugs-from-dogfood-run-c.md +0 -243
- package/docs/code-review-20260228.md +0 -612
- package/docs/code-review-v0.15.0.md +0 -629
- package/docs/hook-lifecycle-test-plan.md +0 -149
- package/docs/releases/v0.11.0-and-earlier.md +0 -20
- package/docs/releases/v0.12.0.md +0 -15
- package/docs/releases/v0.13.0.md +0 -14
- package/docs/releases/v0.14.0.md +0 -20
- package/docs/releases/v0.14.1.md +0 -36
- package/docs/releases/v0.14.2.md +0 -51
- package/docs/releases/v0.14.3.md +0 -174
- package/docs/releases/v0.14.4.md +0 -94
- package/docs/releases/v0.15.0.md +0 -502
- package/docs/releases/v0.15.1.md +0 -170
- package/docs/releases/v0.15.3.md +0 -193
- package/docs/specs/bug-039-orphan-processes.md +0 -131
- package/docs/specs/bug-040-review-rectification.md +0 -82
- package/docs/specs/bug-041-cross-story-test-isolation.md +0 -88
- package/docs/specs/bug-042-verifier-failure-capture.md +0 -117
- package/docs/specs/bun-pty-migration.md +0 -171
- package/docs/specs/central-run-registry.md +0 -116
- package/docs/specs/feat-010-smart-runner-git-history.md +0 -96
- package/docs/specs/feat-011-file-context-strategy.md +0 -73
- package/docs/specs/feat-012-tdd-writer-tier.md +0 -79
- package/docs/specs/feat-013-test-after-review.md +0 -89
- package/docs/specs/feat-014-heartbeat-observability.md +0 -127
- package/docs/specs/status-file-consolidation.md +0 -93
- package/docs/specs/status-file-v0.10.1.md +0 -812
- package/docs/specs/trigger-completion.md +0 -145
- package/docs/specs/verification-architecture-v2.md +0 -343
- package/docs/tdd/strategies.md +0 -97
- package/docs/v0.10-global-config.md +0 -206
- package/docs/v0.10-plugin-system.md +0 -415
- package/docs/v0.10-prompt-optimizer.md +0 -234
- package/docs/v0.3-spec.md +0 -244
- package/docs/v0.4-spec.md +0 -140
- package/docs/v0.5-spec.md +0 -237
- package/docs/v0.6-spec.md +0 -371
- package/docs/v0.7-spec.md +0 -177
- package/docs/v0.8-llm-routing.md +0 -206
- package/docs/v0.8-structured-logging.md +0 -132
- package/docs/v0.9.3-prompt-audit.md +0 -112
- package/examples/plugins/console-reporter/index.test.ts +0 -207
- package/examples/plugins/console-reporter/index.ts +0 -110
- package/memory/topic/feat-010-baseref.md +0 -28
- package/memory/topic/feat-013-test-after-deprecation.md +0 -22
- package/nax/config.json +0 -154
- package/nax/features/bug-039-medium/prd.json +0 -45
- package/nax/features/bugfix-v0171/prd.json +0 -52
- package/nax/features/central-run-registry/prd.json +0 -105
- package/nax/features/config-management/prd.json +0 -108
- package/nax/features/config-management/progress.txt +0 -5
- package/nax/features/diagnose/acceptance.test.ts +0 -414
- package/nax/features/diagnose/prd.json +0 -41
- package/nax/features/nax-compliance/prd.json +0 -52
- package/nax/features/nax-compliance/progress.txt +0 -1
- package/nax/features/orchestration-fixes/prd.json +0 -89
- package/nax/features/orchestration-fixes/progress.txt +0 -1
- package/nax/features/plugin-integration/US-007-VERIFICATION.md +0 -259
- package/nax/features/plugin-integration/prd.json +0 -208
- package/nax/features/plugin-integration/progress.txt +0 -5
- package/nax/features/post-rearch-bugfix/prd.json +0 -137
- package/nax/features/precheck/prd.json +0 -205
- package/nax/features/precheck/progress.txt +0 -15
- package/nax/features/prompt-builder/prd.json +0 -152
- package/nax/features/prompt-builder/progress.txt +0 -3
- package/nax/features/review-quality/prd.json +0 -55
- package/nax/features/routing-persistence/prd.json +0 -104
- package/nax/features/routing-persistence/progress.txt +0 -1
- package/nax/features/smart-test-runner/plan.md +0 -7
- package/nax/features/smart-test-runner/prd.json +0 -203
- package/nax/features/smart-test-runner/progress.txt +0 -13
- package/nax/features/smart-test-runner/spec.md +0 -7
- package/nax/features/smart-test-runner/tasks.md +0 -8
- package/nax/features/status-file-consolidation/prd.json +0 -106
- package/nax/features/structured-logging/prd.json +0 -199
- package/nax/features/trigger-completion/prd.json +0 -150
- package/nax/features/trigger-completion/progress.txt +0 -7
- package/nax/features/unlock/prd.json +0 -36
- package/nax/features/v0.18.3-execution-reliability/prd.json +0 -80
- package/nax/features/v0.18.3-execution-reliability/progress.txt +0 -3
- package/nax/features/v0.19.0-hardening/plan.md +0 -7
- package/nax/features/v0.19.0-hardening/prd.json +0 -84
- package/nax/features/v0.19.0-hardening/progress.txt +0 -7
- package/nax/features/v0.19.0-hardening/spec.md +0 -18
- package/nax/features/v0.19.0-hardening/tasks.md +0 -8
- package/nax/features/verify-v2/prd.json +0 -79
- package/nax/features/verify-v2/progress.txt +0 -3
- package/nax/status.json +0 -36
- package/test/COVERAGE-GAPS.md +0 -333
- package/test/e2e/cm-003-default-view.test.ts +0 -195
- package/test/e2e/plan-analyze-run.test.ts +0 -902
- package/test/helpers/helpers.test.ts +0 -295
- package/test/helpers/timeout.ts +0 -42
- package/test/integration/US-002-TEST-SUMMARY.md +0 -107
- package/test/integration/US-003-TEST-SUMMARY.md +0 -149
- package/test/integration/US-004-TEST-SUMMARY.md +0 -106
- package/test/integration/US-005-TEST-SUMMARY.md +0 -138
- package/test/integration/US-007-TEST-SUMMARY.md +0 -100
- package/test/integration/cli/agent-validation.test.ts +0 -439
- package/test/integration/cli/cli-config-default-edge-cases.test.ts +0 -223
- package/test/integration/cli/cli-config-default-view.test.ts +0 -230
- package/test/integration/cli/cli-config-diff.test.ts +0 -461
- package/test/integration/cli/cli-config-prompts-explain.test.ts +0 -74
- package/test/integration/cli/cli-config.test.ts +0 -737
- package/test/integration/cli/cli-diagnose.test.ts +0 -595
- package/test/integration/cli/cli-logs.test.ts +0 -346
- package/test/integration/cli/cli-plugins.test.ts +0 -679
- package/test/integration/cli/cli-precheck.test.ts +0 -372
- package/test/integration/cli/cli-run-headless.test.ts +0 -174
- package/test/integration/cli/cli.test.ts +0 -76
- package/test/integration/cli/precheck-integration.test.ts +0 -476
- package/test/integration/cli/precheck-orchestrator.test.ts +0 -247
- package/test/integration/cli/precheck.test.ts +0 -806
- package/test/integration/config/config-loader.test.ts +0 -266
- package/test/integration/config/config.test.ts +0 -444
- package/test/integration/config/merger.test.ts +0 -466
- package/test/integration/config/paths.test.ts +0 -52
- package/test/integration/config/security-loader.test.ts +0 -83
- package/test/integration/context/context-integration.test.ts +0 -703
- package/test/integration/context/context-path-security.test.ts +0 -173
- package/test/integration/context/context-provider-injection.test.ts +0 -507
- package/test/integration/context/context-verification-integration.test.ts +0 -296
- package/test/integration/context/s5-greenfield-fallback.test.ts +0 -298
- package/test/integration/execution/execution-isolation.test.ts +0 -143
- package/test/integration/execution/execution.test.ts +0 -634
- package/test/integration/execution/feature-status-write.test.ts +0 -302
- package/test/integration/execution/parallel.test.ts +0 -251
- package/test/integration/execution/prd-pause.test.ts +0 -205
- package/test/integration/execution/prd-resolvers.test.ts +0 -186
- package/test/integration/execution/progress.test.ts +0 -34
- package/test/integration/execution/runner-batching.test.ts +0 -682
- package/test/integration/execution/runner-config-plugins.test.ts +0 -462
- package/test/integration/execution/runner-escalation.test.ts +0 -561
- package/test/integration/execution/runner-fixes.test.ts +0 -400
- package/test/integration/execution/runner-plugin-integration.test.ts +0 -544
- package/test/integration/execution/runner-queue-and-attempts.test.ts +0 -476
- package/test/integration/execution/status-file-integration.test.ts +0 -289
- package/test/integration/execution/status-file.test.ts +0 -380
- package/test/integration/execution/status-writer.test.ts +0 -447
- package/test/integration/execution/story-id-in-events.test.ts +0 -274
- package/test/integration/interaction/interaction-chain-pipeline.test.ts +0 -476
- package/test/integration/pipeline/hooks.test.ts +0 -363
- package/test/integration/pipeline/pipeline-acceptance.test.ts +0 -303
- package/test/integration/pipeline/pipeline-events.test.ts +0 -476
- package/test/integration/pipeline/pipeline.test.ts +0 -660
- package/test/integration/pipeline/reporter-lifecycle.test.ts +0 -862
- package/test/integration/pipeline/verify-stage.test.ts +0 -286
- package/test/integration/plan/analyze-integration.test.ts +0 -262
- package/test/integration/plan/analyze-scanner.test.ts +0 -132
- package/test/integration/plan/logger.test.ts +0 -461
- package/test/integration/plan/plan.test.ts +0 -157
- package/test/integration/plugins/config-integration.test.ts +0 -173
- package/test/integration/plugins/config-resolution.test.ts +0 -523
- package/test/integration/plugins/loader.test.ts +0 -644
- package/test/integration/plugins/plugins-registry.test.ts +0 -747
- package/test/integration/plugins/validator.test.ts +0 -564
- package/test/integration/prompts/pb-004-migration.test.ts +0 -523
- package/test/integration/review/review-config-commands.test.ts +0 -320
- package/test/integration/review/review-config-schema.test.ts +0 -117
- package/test/integration/review/review-plugin-integration.test.ts +0 -729
- package/test/integration/review/review.test.ts +0 -150
- package/test/integration/routing/plugin-routing-advanced.test.ts +0 -461
- package/test/integration/routing/plugin-routing-core.test.ts +0 -527
- package/test/integration/routing/routing-stage-bug-021.test.ts +0 -275
- package/test/integration/routing/routing-stage-greenfield.test.ts +0 -287
- package/test/integration/tdd/tdd-cleanup.test.ts +0 -246
- package/test/integration/tdd/tdd-orchestrator-core.test.ts +0 -565
- package/test/integration/tdd/tdd-orchestrator-failureCategory.test.ts +0 -355
- package/test/integration/tdd/tdd-orchestrator-fallback.test.ts +0 -311
- package/test/integration/tdd/tdd-orchestrator-lite.test.ts +0 -289
- package/test/integration/tdd/tdd-orchestrator-prompts.test.ts +0 -260
- package/test/integration/tdd/tdd-orchestrator-verdict.test.ts +0 -536
- package/test/integration/tmp/headless-test/test.jsonl +0 -30
- package/test/integration/verification/test-scanner.test.ts +0 -403
- package/test/integration/verification/verification-asset-check.test.ts +0 -143
- package/test/integration/worktree/manager.test.ts +0 -218
- package/test/integration/worktree/worktree-merge.test.ts +0 -341
- package/test/manual/logging-formatter-demo.ts +0 -158
- package/test/ui/tui-agent-panel.test.tsx +0 -99
- package/test/ui/tui-pty-integration.test.tsx +0 -146
- package/test/unit/acceptance.test.ts +0 -187
- package/test/unit/agent-stderr-capture.test.ts +0 -147
- package/test/unit/agents/claude.test.ts +0 -107
- package/test/unit/analyze-classifier.test.ts +0 -216
- package/test/unit/analyze.test.ts +0 -224
- package/test/unit/auto-detect.test.ts +0 -250
- package/test/unit/cli-status-project-level.test.ts +0 -283
- package/test/unit/cli-status.test.ts +0 -418
- package/test/unit/commands/common.test.ts +0 -321
- package/test/unit/commands/logs.test.ts +0 -458
- package/test/unit/commands/runs.test.ts +0 -303
- package/test/unit/commands/unlock.test.ts +0 -320
- package/test/unit/config/defaults.test.ts +0 -70
- package/test/unit/config/quality-commands-schema.test.ts +0 -72
- package/test/unit/config/regression-gate-schema.test.ts +0 -160
- package/test/unit/config/smart-runner-flag.test.ts +0 -250
- package/test/unit/constitution-generators.test.ts +0 -161
- package/test/unit/constitution.test.ts +0 -210
- package/test/unit/context/context-autodetect.test.ts +0 -297
- package/test/unit/context/context-build.test.ts +0 -575
- package/test/unit/context/context-coverage.test.ts +0 -236
- package/test/unit/context/context-error.test.ts +0 -93
- package/test/unit/context/context-estimate-tokens.test.ts +0 -201
- package/test/unit/context/context-format.test.ts +0 -302
- package/test/unit/context/context-isolation.test.ts +0 -267
- package/test/unit/context/context-sort.test.ts +0 -93
- package/test/unit/context/context-story.test.ts +0 -108
- package/test/unit/context/prior-failures.test.ts +0 -463
- package/test/unit/context.test.ts +0 -1726
- package/test/unit/cost.test.ts +0 -231
- package/test/unit/crash-recovery.test.ts +0 -309
- package/test/unit/escalation.test.ts +0 -127
- package/test/unit/execution/lifecycle/run-completion.test.ts +0 -240
- package/test/unit/execution/lifecycle/run-regression.test.ts +0 -420
- package/test/unit/execution/pid-registry.test.ts +0 -241
- package/test/unit/execution/sequential-executor.test.ts +0 -235
- package/test/unit/execution/sfc-004-dead-code-cleanup.test.ts +0 -89
- package/test/unit/execution/structured-failure.test.ts +0 -415
- package/test/unit/execution-logging-stderr.test.ts +0 -157
- package/test/unit/execution-stage.test.ts +0 -123
- package/test/unit/fix-generator.test.ts +0 -276
- package/test/unit/formatters.test.ts +0 -468
- package/test/unit/greenfield.test.ts +0 -180
- package/test/unit/hooks/shell-security.test.ts +0 -40
- package/test/unit/interaction/auto-plugin.test.ts +0 -162
- package/test/unit/interaction/human-review-trigger.test.ts +0 -165
- package/test/unit/interaction-network-failures.test.ts +0 -390
- package/test/unit/interaction-plugins.test.ts +0 -472
- package/test/unit/logging/formatter.test.ts +0 -456
- package/test/unit/merge.test.ts +0 -269
- package/test/unit/metrics/aggregator.test.ts +0 -164
- package/test/unit/metrics/tracker.test.ts +0 -186
- package/test/unit/metrics.test.ts +0 -276
- package/test/unit/optimizer/noop.optimizer.test.ts +0 -125
- package/test/unit/optimizer/rule-based.optimizer.test.ts +0 -358
- package/test/unit/pipeline/event-bus.test.ts +0 -105
- package/test/unit/pipeline/routing-partial-override.test.ts +0 -121
- package/test/unit/pipeline/runner-retry.test.ts +0 -89
- package/test/unit/pipeline/stages/autofix.test.ts +0 -97
- package/test/unit/pipeline/stages/completion-review-gate.test.ts +0 -218
- package/test/unit/pipeline/stages/execution-ambiguity.test.ts +0 -311
- package/test/unit/pipeline/stages/execution-merge-conflict.test.ts +0 -218
- package/test/unit/pipeline/stages/rectify.test.ts +0 -101
- package/test/unit/pipeline/stages/regression-stage.test.ts +0 -69
- package/test/unit/pipeline/stages/review.test.ts +0 -201
- package/test/unit/pipeline/stages/routing-idempotence.test.ts +0 -139
- package/test/unit/pipeline/stages/routing-initial-complexity.test.ts +0 -321
- package/test/unit/pipeline/stages/routing-persistence.test.ts +0 -380
- package/test/unit/pipeline/stages/verify.test.ts +0 -267
- package/test/unit/pipeline/subscribers/events-writer.test.ts +0 -227
- package/test/unit/pipeline/subscribers/hooks.test.ts +0 -84
- package/test/unit/pipeline/subscribers/interaction.test.ts +0 -313
- package/test/unit/pipeline/subscribers/registry.test.ts +0 -149
- package/test/unit/pipeline/subscribers/reporters.test.ts +0 -90
- package/test/unit/pipeline/verify-smart-runner.test.ts +0 -345
- package/test/unit/prd-auto-default.test.ts +0 -291
- package/test/unit/prd-failure-category.test.ts +0 -177
- package/test/unit/prd-get-next-story.test.ts +0 -215
- package/test/unit/precheck/checks-warnings.test.ts +0 -114
- package/test/unit/precheck-checks.test.ts +0 -841
- package/test/unit/precheck-story-size-gate.test.ts +0 -288
- package/test/unit/precheck-types.test.ts +0 -143
- package/test/unit/prompts/builder.test.ts +0 -258
- package/test/unit/prompts/loader.test.ts +0 -355
- package/test/unit/prompts/sections/conventions.test.ts +0 -30
- package/test/unit/prompts/sections/isolation.test.ts +0 -35
- package/test/unit/prompts/sections/role-task.test.ts +0 -40
- package/test/unit/prompts/sections/sections.test.ts +0 -238
- package/test/unit/prompts/sections/story.test.ts +0 -45
- package/test/unit/prompts/sections/verdict.test.ts +0 -58
- package/test/unit/prompts.test.ts +0 -476
- package/test/unit/queue.test.ts +0 -237
- package/test/unit/rectification.test.ts +0 -285
- package/test/unit/registry.test.ts +0 -288
- package/test/unit/review/runner.test.ts +0 -117
- package/test/unit/routing/content-hash.test.ts +0 -99
- package/test/unit/routing/routing-stability.test.ts +0 -208
- package/test/unit/routing/strategies/llm.test.ts +0 -306
- package/test/unit/routing-advanced.test.ts +0 -313
- package/test/unit/routing-core.test.ts +0 -341
- package/test/unit/routing-strategies.test.ts +0 -440
- package/test/unit/storyid-events.test.ts +0 -213
- package/test/unit/tdd-verdict.test.ts +0 -492
- package/test/unit/test-output-parser.test.ts +0 -377
- package/test/unit/ui/tui-controls.test.ts +0 -335
- package/test/unit/ui/tui-cost-and-pty.test.ts +0 -190
- package/test/unit/ui/tui-layout.test.ts +0 -379
- package/test/unit/ui/tui-stories.test.ts +0 -333
- package/test/unit/unit-isolation.test.ts +0 -135
- package/test/unit/utils/git.test.ts +0 -50
- package/test/unit/utils/path-security.test.ts +0 -47
- package/test/unit/utils-helpers.test.ts +0 -318
- package/test/unit/verdict.test.ts +0 -325
- package/test/unit/verification/orchestrator-types.test.ts +0 -54
- package/test/unit/verification/orchestrator.test.ts +0 -66
- package/test/unit/verification/smart-runner-config.test.ts +0 -163
- package/test/unit/verification/smart-runner-discovery.test.ts +0 -354
- package/test/unit/verification/smart-runner.test.ts +0 -262
- package/test/unit/verification/strategies/acceptance.test.ts +0 -33
- package/test/unit/verification/strategies/regression.test.ts +0 -87
- package/test/unit/verification/strategies/scoped.test.ts +0 -100
- package/test/unit/worktree-manager.test.ts +0 -159
- package/tsconfig.json +0 -27
package/CLAUDE.md
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# nax — AI Coding Agent Orchestrator
|
|
2
|
-
|
|
3
|
-
Bun + TypeScript CLI that orchestrates AI coding agents (Claude Code) with model-tier routing, TDD strategies, plugin hooks, and a Central Run Registry.
|
|
4
|
-
|
|
5
|
-
## Tech Stack
|
|
6
|
-
|
|
7
|
-
| Layer | Choice |
|
|
8
|
-
|:------|:-------|
|
|
9
|
-
| Runtime | **Bun 1.3.7+** — Bun-native APIs only, no Node.js equivalents |
|
|
10
|
-
| Language | **TypeScript strict** — no `any` without explicit justification |
|
|
11
|
-
| Test | **`bun:test`** — describe/test/expect |
|
|
12
|
-
| Lint/Format | **Biome** (`bun run lint`) |
|
|
13
|
-
| Build | `bun run build` |
|
|
14
|
-
|
|
15
|
-
## Git Identity
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
git config user.name "subrina.tai"
|
|
19
|
-
git config user.email "subrina8080@outlook.com"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Commands
|
|
23
|
-
|
|
24
|
-
| Command | Purpose |
|
|
25
|
-
|:--------|:--------|
|
|
26
|
-
| `bun run typecheck` | tsc --noEmit |
|
|
27
|
-
| `bun run lint` | Biome |
|
|
28
|
-
| `bun test test/unit/foo.test.ts` | Targeted test during iteration |
|
|
29
|
-
| `NAX_SKIP_PRECHECK=1 bun test test/ --timeout=60000 --bail` | Full suite |
|
|
30
|
-
|
|
31
|
-
nax runs lint, typecheck, and tests automatically via the pipeline. Run these manually only when working outside a nax session.
|
|
32
|
-
|
|
33
|
-
## Engineering Persona
|
|
34
|
-
|
|
35
|
-
- **Senior Engineer mindset**: check edge cases, null/undefined, race conditions, and error states.
|
|
36
|
-
- **TDD first**: write or update tests before implementation when the story calls for it.
|
|
37
|
-
- **Stuck rule**: if the same test fails 2+ iterations, stop, summarise failed attempts, reassess approach.
|
|
38
|
-
- **Never push to remote** — the human reviews and pushes.
|
|
39
|
-
|
|
40
|
-
## Architecture
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
Runner.run() [src/execution/runner.ts — thin orchestrator only]
|
|
44
|
-
→ loadPlugins()
|
|
45
|
-
→ for each story:
|
|
46
|
-
→ Pipeline.execute() [src/pipeline/pipeline.ts]
|
|
47
|
-
→ stages: queueCheck → routing → constitution → context → prompt
|
|
48
|
-
→ execution → verify → review → completion
|
|
49
|
-
→ Reporter.emit()
|
|
50
|
-
→ registry.teardownAll()
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Key Source Directories
|
|
54
|
-
|
|
55
|
-
| Directory | Purpose |
|
|
56
|
-
|:----------|:--------|
|
|
57
|
-
| `src/execution/` | Runner loop, agent adapters, escalation, lifecycle hooks |
|
|
58
|
-
| `src/execution/escalation/` | Tier escalation on repeated failures |
|
|
59
|
-
| `src/pipeline/stages/` | One file per pipeline stage |
|
|
60
|
-
| `src/pipeline/subscribers/` | Event-driven hooks (interaction, hooks.ts) |
|
|
61
|
-
| `src/routing/` | Model-tier routing — keyword, LLM, plugin chain |
|
|
62
|
-
| `src/routing/strategies/` | keyword.ts, llm.ts, llm-prompts.ts |
|
|
63
|
-
| `src/interaction/` | Interaction triggers + plugins (Auto, Telegram, Webhook) |
|
|
64
|
-
| `src/plugins/` | Plugin system — loader, registry, validator |
|
|
65
|
-
| `src/verification/` | Test execution, smart runner, scoped runner |
|
|
66
|
-
| `src/metrics/` | StoryMetrics, aggregator, tracker |
|
|
67
|
-
| `src/config/` | Config schema + layered loader (global → project) |
|
|
68
|
-
| `src/agents/adapters/` | Agent integrations (Claude Code) |
|
|
69
|
-
| `src/cli/` + `src/commands/` | CLI commands — check both locations |
|
|
70
|
-
| `src/prd/` | PRD types, loader, story state machine |
|
|
71
|
-
| `src/hooks/` | Lifecycle hook wiring |
|
|
72
|
-
| `src/constitution/` | Constitution loader + injection |
|
|
73
|
-
| `src/analyze/` | `nax analyze` — story classifier |
|
|
74
|
-
|
|
75
|
-
### Plugin Extension Points
|
|
76
|
-
|
|
77
|
-
| Interface | Loaded By | Purpose |
|
|
78
|
-
|:----------|:----------|:--------|
|
|
79
|
-
| `IContextProvider` | `context.ts` stage | Inject context into agent prompts |
|
|
80
|
-
| `IReviewer` | Review stage | Post-verify quality checks |
|
|
81
|
-
| `IReporter` | Runner | onRunStart / onStoryComplete / onRunEnd events |
|
|
82
|
-
| `IRoutingStrategy` | Router chain | Override model-tier routing |
|
|
83
|
-
|
|
84
|
-
### Config
|
|
85
|
-
|
|
86
|
-
- Global: `~/.nax/config.json` → Project: `<workdir>/nax/config.json`
|
|
87
|
-
- Schema: `src/config/schema.ts` — no hardcoded flags or credentials anywhere
|
|
88
|
-
|
|
89
|
-
## Workflow Protocol
|
|
90
|
-
|
|
91
|
-
1. **Explore first**: use `grep`, `cat`, and solograph MCP to understand context before writing code.
|
|
92
|
-
2. **Plan complex tasks**: for multi-file changes, write a short plan before implementing.
|
|
93
|
-
3. **Implement in small chunks**: one logical concern per commit.
|
|
94
|
-
|
|
95
|
-
## Code Intelligence (Solograph MCP) — MANDATORY
|
|
96
|
-
|
|
97
|
-
**Always use solograph MCP tools before writing code or analyzing architecture.** Do NOT use `web_search` or `kb_search` as substitutes.
|
|
98
|
-
|
|
99
|
-
### Tool Selection Guide
|
|
100
|
-
|
|
101
|
-
| Tool | Capability | When to Use | Availability |
|
|
102
|
-
|:-----|:-----------|:-----------|:-------------|
|
|
103
|
-
| `codegraph_query` | Structural queries (Cypher) — find calls, dependencies, imports | **Preferred for dependency analysis, call tracing, symbol lookup** | ✅ Always works (in-memory graph) |
|
|
104
|
-
| `project_code_search` | Semantic search (Redis vector DB) — pattern matching by meaning | Natural language queries like "find auth patterns" | ⚠️ Requires explicit `project_code_reindex` + Redis daemon |
|
|
105
|
-
| `codegraph_explain` | Architecture overview for unfamiliar subsystems | Understand module relationships before major changes | ✅ Always works |
|
|
106
|
-
| `project_code_reindex` | Index project for semantic search | After creating/deleting source files | ✅ Always works |
|
|
107
|
-
|
|
108
|
-
### Recommended Workflow
|
|
109
|
-
|
|
110
|
-
For nax, **prefer `codegraph_query`** for routine tasks:
|
|
111
|
-
- Finding where functions are called (`calculateAggregateMetrics` called by `status-cost.ts`)
|
|
112
|
-
- Analyzing dependencies before refactoring
|
|
113
|
-
- Tracing import/export chains
|
|
114
|
-
- Querying symbol definitions and relationships
|
|
115
|
-
|
|
116
|
-
**Use `project_code_search` only if:**
|
|
117
|
-
- You need semantic similarity ("find authentication patterns")
|
|
118
|
-
- Redis is indexed and running (not guaranteed in all sessions)
|
|
119
|
-
|
|
120
|
-
### Example Queries
|
|
121
|
-
|
|
122
|
-
```cypher
|
|
123
|
-
-- Find files calling calculateAggregateMetrics
|
|
124
|
-
MATCH (f:File)-[:CALLS]->(s:Symbol {name: "calculateAggregateMetrics"})
|
|
125
|
-
RETURN f.path
|
|
126
|
-
|
|
127
|
-
-- Find all imports of aggregator.ts
|
|
128
|
-
MATCH (f:File)-[:IMPORTS]->(target:File {path: "src/metrics/aggregator.ts"})
|
|
129
|
-
RETURN f.path
|
|
130
|
-
|
|
131
|
-
-- Find symbols defined in a file
|
|
132
|
-
MATCH (f:File {path: "src/metrics/aggregator.ts"})-[:DEFINES]->(s:Symbol)
|
|
133
|
-
RETURN s.name, s.type
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Coding Standards & Forbidden Patterns
|
|
137
|
-
|
|
138
|
-
Full rules in `.claude/rules/` (loaded automatically):
|
|
139
|
-
|
|
140
|
-
- `01-project-conventions.md` — Bun-native APIs, 400-line limit, barrel imports, logging, commits
|
|
141
|
-
- `02-test-architecture.md` — directory mirroring, placement rules, file naming
|
|
142
|
-
- `03-test-writing.md` — `_deps` injection pattern, mock discipline, CI guards
|
|
143
|
-
- `04-forbidden-patterns.md` — banned APIs and test anti-patterns with alternatives
|
package/US-007-IMPLEMENTATION.md
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
# US-007 Implementation Summary
|
|
2
|
-
|
|
3
|
-
## Story: Read plugin config entries from nax config.json
|
|
4
|
-
|
|
5
|
-
**Status:** ✅ COMPLETE
|
|
6
|
-
|
|
7
|
-
## Implementation Details
|
|
8
|
-
|
|
9
|
-
The functionality described in US-007 was already implemented in the codebase. This document verifies that all acceptance criteria are met.
|
|
10
|
-
|
|
11
|
-
### Acceptance Criteria Verification
|
|
12
|
-
|
|
13
|
-
#### ✅ AC1: plugins[] from config.json are passed to loadPlugins() as configPlugins parameter
|
|
14
|
-
|
|
15
|
-
**Implementation:**
|
|
16
|
-
- `src/config/loader.ts`: Config schema includes `plugins?: PluginConfigEntry[]` (line 369)
|
|
17
|
-
- `src/execution/runner.ts`: Reads `config.plugins` and passes to `loadPlugins()` (line 201)
|
|
18
|
-
- `src/execution/run-lifecycle.ts`: Reads `config.plugins` and passes to `loadPlugins()` (line 88)
|
|
19
|
-
- `src/cli/plugins.ts`: Reads `config.plugins` and passes to `loadPlugins()` (line 22)
|
|
20
|
-
|
|
21
|
-
**Test Coverage:**
|
|
22
|
-
- `test/integration/config-loader.test.ts`: New tests verify plugins[] are loaded from config.json
|
|
23
|
-
- `test/integration/plugins/config-integration.test.ts`: End-to-end test with realistic scenario
|
|
24
|
-
- `test/integration/plugins/config-resolution.test.ts`: Comprehensive path resolution tests
|
|
25
|
-
|
|
26
|
-
#### ✅ AC2: Relative module paths in plugins[].module are resolved relative to project root
|
|
27
|
-
|
|
28
|
-
**Implementation:**
|
|
29
|
-
- `src/plugins/loader.ts`: `resolveModulePath()` function (lines 173-186)
|
|
30
|
-
- Relative paths (starting with `./` or `../`) are resolved relative to `projectRoot`
|
|
31
|
-
- Uses `path.resolve(projectRoot, modulePath)` for relative paths
|
|
32
|
-
|
|
33
|
-
**Test Coverage:**
|
|
34
|
-
- `test/integration/plugins/config-resolution.test.ts`:
|
|
35
|
-
- "AC2: Relative module paths resolved relative to project root"
|
|
36
|
-
- "resolves ./custom-plugins/plugin.ts relative to project root"
|
|
37
|
-
|
|
38
|
-
#### ✅ AC3: Absolute module paths and npm package names work as-is
|
|
39
|
-
|
|
40
|
-
**Implementation:**
|
|
41
|
-
- `src/plugins/loader.ts`: `resolveModulePath()` function (lines 173-186)
|
|
42
|
-
- Absolute paths: `path.isAbsolute(modulePath)` returns true → no resolution needed
|
|
43
|
-
- NPM packages: No leading `./` or `../` → treated as package name, passed as-is
|
|
44
|
-
|
|
45
|
-
**Test Coverage:**
|
|
46
|
-
- `test/integration/plugins/config-resolution.test.ts`:
|
|
47
|
-
- "AC3: Absolute paths and npm packages work as-is"
|
|
48
|
-
- "resolves npm package names as-is"
|
|
49
|
-
- "resolves absolute paths as-is"
|
|
50
|
-
|
|
51
|
-
#### ✅ AC4: If a plugin module cannot be found, a clear error message is logged with the path tried
|
|
52
|
-
|
|
53
|
-
**Implementation:**
|
|
54
|
-
- `src/plugins/loader.ts`: `loadAndValidatePlugin()` function (lines 225-241)
|
|
55
|
-
- Catches import errors and provides helpful error messages
|
|
56
|
-
- Lines 230-235: Special handling for "Cannot find module" and "ENOENT" errors
|
|
57
|
-
- Logs both original path and attempted resolved path
|
|
58
|
-
- Provides guidance: "Ensure the module exists and the path is correct (relative paths are resolved from project root)"
|
|
59
|
-
|
|
60
|
-
**Test Coverage:**
|
|
61
|
-
- `test/integration/plugins/config-resolution.test.ts`:
|
|
62
|
-
- "AC4: Clear error message when plugin module not found (relative path)"
|
|
63
|
-
- "AC4: Clear error message when plugin module not found (npm package)"
|
|
64
|
-
|
|
65
|
-
**Example Error Output:**
|
|
66
|
-
```
|
|
67
|
-
[nax] Failed to load plugin module './custom-plugins/missing.ts'
|
|
68
|
-
[nax] Attempted path: /path/to/project/custom-plugins/missing.ts
|
|
69
|
-
[nax] Ensure the module exists and the path is correct (relative paths are resolved from project root)
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
#### ✅ AC5: Plugin-specific config (plugins[].config) is passed to the plugin's setup() function
|
|
73
|
-
|
|
74
|
-
**Implementation:**
|
|
75
|
-
- `src/plugins/loader.ts`: `loadAndValidatePlugin()` function (lines 214-221)
|
|
76
|
-
- Calls plugin's `setup()` function with the provided config
|
|
77
|
-
- Config is passed as the first parameter: `await validated.setup(config)`
|
|
78
|
-
|
|
79
|
-
**Test Coverage:**
|
|
80
|
-
- `test/integration/plugins/config-integration.test.ts`:
|
|
81
|
-
- "realistic scenario: project with relative plugin paths in config"
|
|
82
|
-
- Verifies that plugin configs are written to tracker file via setup()
|
|
83
|
-
- `test/integration/plugins/config-resolution.test.ts`:
|
|
84
|
-
- "AC5: Plugin-specific config passed to setup() function"
|
|
85
|
-
|
|
86
|
-
## Test Results
|
|
87
|
-
|
|
88
|
-
All plugin-related tests pass:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
$ bun test test/integration/plugins/ test/integration/config-loader.test.ts test/integration/runner-plugin-integration.test.ts
|
|
92
|
-
|
|
93
|
-
✓ 101 tests passed
|
|
94
|
-
✓ 154 expect() calls
|
|
95
|
-
✓ 0 failures
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### New Tests Added
|
|
99
|
-
|
|
100
|
-
Added 4 new tests to `test/integration/config-loader.test.ts`:
|
|
101
|
-
|
|
102
|
-
1. **"loads plugins[] from config.json"** - Verifies plugins array is loaded correctly
|
|
103
|
-
2. **"handles missing plugins[] array"** - Verifies graceful handling of missing plugins
|
|
104
|
-
3. **"merges plugins[] from global and project config"** - Verifies config merging behavior
|
|
105
|
-
4. **"validates plugin config entries have required fields"** - Verifies validation works
|
|
106
|
-
|
|
107
|
-
## Files Modified
|
|
108
|
-
|
|
109
|
-
1. **test/integration/config-loader.test.ts**
|
|
110
|
-
- Added new test suite: "Config Loader - Plugin Configuration (US-007)"
|
|
111
|
-
- Added 4 tests covering config loading scenarios
|
|
112
|
-
- Tests verify plugins[] array is properly loaded and validated
|
|
113
|
-
|
|
114
|
-
## Architecture Overview
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
config.json
|
|
118
|
-
└─> loadConfig() (src/config/loader.ts)
|
|
119
|
-
└─> NaxConfig { plugins?: PluginConfigEntry[] }
|
|
120
|
-
└─> Runner/CLI reads config.plugins
|
|
121
|
-
└─> loadPlugins(globalDir, projectDir, configPlugins, projectRoot)
|
|
122
|
-
└─> resolveModulePath() for each entry
|
|
123
|
-
└─> loadAndValidatePlugin()
|
|
124
|
-
└─> import module
|
|
125
|
-
└─> validatePlugin()
|
|
126
|
-
└─> plugin.setup(config)
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Conclusion
|
|
130
|
-
|
|
131
|
-
All acceptance criteria for US-007 are met. The implementation correctly:
|
|
132
|
-
1. Reads plugins[] from config.json
|
|
133
|
-
2. Passes them to loadPlugins() as configPlugins parameter
|
|
134
|
-
3. Resolves relative paths relative to project root
|
|
135
|
-
4. Handles absolute paths and npm packages correctly
|
|
136
|
-
5. Provides clear error messages when modules are not found
|
|
137
|
-
6. Passes plugin-specific config to setup() functions
|
|
138
|
-
|
|
139
|
-
The feature is production-ready and fully tested.
|
package/biome.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
|
3
|
-
"organizeImports": { "enabled": true },
|
|
4
|
-
"linter": {
|
|
5
|
-
"enabled": true,
|
|
6
|
-
"rules": { "recommended": true }
|
|
7
|
-
},
|
|
8
|
-
"formatter": {
|
|
9
|
-
"enabled": true,
|
|
10
|
-
"indentStyle": "space",
|
|
11
|
-
"indentWidth": 2,
|
|
12
|
-
"lineWidth": 120
|
|
13
|
-
}
|
|
14
|
-
}
|
package/bun.lock
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"lockfileVersion": 1,
|
|
3
|
-
"configVersion": 1,
|
|
4
|
-
"workspaces": {
|
|
5
|
-
"": {
|
|
6
|
-
"name": "ngent",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@anthropic-ai/sdk": "^0.74.0",
|
|
9
|
-
"@types/react": "^19.2.14",
|
|
10
|
-
"chalk": "^5.6.2",
|
|
11
|
-
"commander": "^13.1.0",
|
|
12
|
-
"ink": "^6.7.0",
|
|
13
|
-
"ink-spinner": "^5.0.0",
|
|
14
|
-
"ink-testing-library": "^4.0.0",
|
|
15
|
-
"react": "^19.2.4",
|
|
16
|
-
"zod": "^4.3.6",
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@biomejs/biome": "^1.9.4",
|
|
20
|
-
"@types/bun": "^1.3.8",
|
|
21
|
-
"react-devtools-core": "^7.0.1",
|
|
22
|
-
"typescript": "^5.7.3",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
"packages": {
|
|
27
|
-
"@alcalzone/ansi-tokenize": ["@alcalzone/ansi-tokenize@0.2.5", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-3NX/MpTdroi0aKz134A6RC2Gb2iXVECN4QaAXnvCIxxIm3C3AVB1mkUe8NaaiyvOpDfsrqWhYtj+Q6a62RrTsw=="],
|
|
28
|
-
|
|
29
|
-
"@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.74.0", "", { "dependencies": { "json-schema-to-ts": "^3.1.1" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["zod"], "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-srbJV7JKsc5cQ6eVuFzjZO7UR3xEPJqPamHFIe29bs38Ij2IripoAhC0S5NslNbaFUYqBKypmmpzMTpqfHEUDw=="],
|
|
30
|
-
|
|
31
|
-
"@babel/runtime": ["@babel/runtime@7.28.6", "", {}, "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA=="],
|
|
32
|
-
|
|
33
|
-
"@biomejs/biome": ["@biomejs/biome@1.9.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "1.9.4", "@biomejs/cli-darwin-x64": "1.9.4", "@biomejs/cli-linux-arm64": "1.9.4", "@biomejs/cli-linux-arm64-musl": "1.9.4", "@biomejs/cli-linux-x64": "1.9.4", "@biomejs/cli-linux-x64-musl": "1.9.4", "@biomejs/cli-win32-arm64": "1.9.4", "@biomejs/cli-win32-x64": "1.9.4" }, "bin": { "biome": "bin/biome" } }, "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog=="],
|
|
34
|
-
|
|
35
|
-
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@1.9.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw=="],
|
|
36
|
-
|
|
37
|
-
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@1.9.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg=="],
|
|
38
|
-
|
|
39
|
-
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g=="],
|
|
40
|
-
|
|
41
|
-
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA=="],
|
|
42
|
-
|
|
43
|
-
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg=="],
|
|
44
|
-
|
|
45
|
-
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg=="],
|
|
46
|
-
|
|
47
|
-
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@1.9.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg=="],
|
|
48
|
-
|
|
49
|
-
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
|
|
50
|
-
|
|
51
|
-
"@types/bun": ["@types/bun@1.3.9", "", { "dependencies": { "bun-types": "1.3.9" } }, "sha512-KQ571yULOdWJiMH+RIWIOZ7B2RXQGpL1YQrBtLIV3FqDcCu6FsbFUBwhdKUlCKUpS3PJDsHlJ1QKlpxoVR+xtw=="],
|
|
52
|
-
|
|
53
|
-
"@types/node": ["@types/node@25.2.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ=="],
|
|
54
|
-
|
|
55
|
-
"@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="],
|
|
56
|
-
|
|
57
|
-
"ansi-escapes": ["ansi-escapes@7.3.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg=="],
|
|
58
|
-
|
|
59
|
-
"ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
|
|
60
|
-
|
|
61
|
-
"ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
|
|
62
|
-
|
|
63
|
-
"auto-bind": ["auto-bind@5.0.1", "", {}, "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg=="],
|
|
64
|
-
|
|
65
|
-
"bun-types": ["bun-types@1.3.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-+UBWWOakIP4Tswh0Bt0QD0alpTY8cb5hvgiYeWCMet9YukHbzuruIEeXC2D7nMJPB12kbh8C7XJykSexEqGKJg=="],
|
|
66
|
-
|
|
67
|
-
"chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
|
|
68
|
-
|
|
69
|
-
"cli-boxes": ["cli-boxes@3.0.0", "", {}, "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g=="],
|
|
70
|
-
|
|
71
|
-
"cli-cursor": ["cli-cursor@4.0.0", "", { "dependencies": { "restore-cursor": "^4.0.0" } }, "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg=="],
|
|
72
|
-
|
|
73
|
-
"cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="],
|
|
74
|
-
|
|
75
|
-
"cli-truncate": ["cli-truncate@5.1.1", "", { "dependencies": { "slice-ansi": "^7.1.0", "string-width": "^8.0.0" } }, "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A=="],
|
|
76
|
-
|
|
77
|
-
"code-excerpt": ["code-excerpt@4.0.0", "", { "dependencies": { "convert-to-spaces": "^2.0.1" } }, "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA=="],
|
|
78
|
-
|
|
79
|
-
"commander": ["commander@13.1.0", "", {}, "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw=="],
|
|
80
|
-
|
|
81
|
-
"convert-to-spaces": ["convert-to-spaces@2.0.1", "", {}, "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ=="],
|
|
82
|
-
|
|
83
|
-
"csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
|
|
84
|
-
|
|
85
|
-
"emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
|
|
86
|
-
|
|
87
|
-
"environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="],
|
|
88
|
-
|
|
89
|
-
"es-toolkit": ["es-toolkit@1.44.0", "", {}, "sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg=="],
|
|
90
|
-
|
|
91
|
-
"escape-string-regexp": ["escape-string-regexp@2.0.0", "", {}, "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="],
|
|
92
|
-
|
|
93
|
-
"get-east-asian-width": ["get-east-asian-width@1.4.0", "", {}, "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q=="],
|
|
94
|
-
|
|
95
|
-
"indent-string": ["indent-string@5.0.0", "", {}, "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="],
|
|
96
|
-
|
|
97
|
-
"ink": ["ink@6.7.0", "", { "dependencies": { "@alcalzone/ansi-tokenize": "^0.2.4", "ansi-escapes": "^7.3.0", "ansi-styles": "^6.2.1", "auto-bind": "^5.0.1", "chalk": "^5.6.0", "cli-boxes": "^3.0.0", "cli-cursor": "^4.0.0", "cli-truncate": "^5.1.1", "code-excerpt": "^4.0.0", "es-toolkit": "^1.39.10", "indent-string": "^5.0.0", "is-in-ci": "^2.0.0", "patch-console": "^2.0.0", "react-reconciler": "^0.33.0", "scheduler": "^0.27.0", "signal-exit": "^3.0.7", "slice-ansi": "^7.1.0", "stack-utils": "^2.0.6", "string-width": "^8.1.1", "terminal-size": "^4.0.1", "type-fest": "^5.4.1", "widest-line": "^6.0.0", "wrap-ansi": "^9.0.0", "ws": "^8.18.0", "yoga-layout": "~3.2.1" }, "peerDependencies": { "@types/react": ">=19.0.0", "react": ">=19.0.0", "react-devtools-core": "^6.1.2" }, "optionalPeers": ["@types/react", "react-devtools-core"] }, "sha512-dhB16KfdTO8yYwF2K0E4wPXpL88tdrjjB6w44AZ0ljSktYoUQQcxccq9KL1vpRhk8JIa0A7B7zvjajHqI42teA=="],
|
|
98
|
-
|
|
99
|
-
"ink-spinner": ["ink-spinner@5.0.0", "", { "dependencies": { "cli-spinners": "^2.7.0" }, "peerDependencies": { "ink": ">=4.0.0", "react": ">=18.0.0" } }, "sha512-EYEasbEjkqLGyPOUc8hBJZNuC5GvXGMLu0w5gdTNskPc7Izc5vO3tdQEYnzvshucyGCBXc86ig0ujXPMWaQCdA=="],
|
|
100
|
-
|
|
101
|
-
"ink-testing-library": ["ink-testing-library@4.0.0", "", { "peerDependencies": { "@types/react": ">=18.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-yF92kj3pmBvk7oKbSq5vEALO//o7Z9Ck/OaLNlkzXNeYdwfpxMQkSowGTFUCS5MSu9bWfSZMewGpp7bFc66D7Q=="],
|
|
102
|
-
|
|
103
|
-
"is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="],
|
|
104
|
-
|
|
105
|
-
"is-in-ci": ["is-in-ci@2.0.0", "", { "bin": { "is-in-ci": "cli.js" } }, "sha512-cFeerHriAnhrQSbpAxL37W1wcJKUUX07HyLWZCW1URJT/ra3GyUTzBgUnh24TMVfNTV2Hij2HLxkPHFZfOZy5w=="],
|
|
106
|
-
|
|
107
|
-
"json-schema-to-ts": ["json-schema-to-ts@3.1.1", "", { "dependencies": { "@babel/runtime": "^7.18.3", "ts-algebra": "^2.0.0" } }, "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g=="],
|
|
108
|
-
|
|
109
|
-
"mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="],
|
|
110
|
-
|
|
111
|
-
"onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="],
|
|
112
|
-
|
|
113
|
-
"patch-console": ["patch-console@2.0.0", "", {}, "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA=="],
|
|
114
|
-
|
|
115
|
-
"react": ["react@19.2.4", "", {}, "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ=="],
|
|
116
|
-
|
|
117
|
-
"react-devtools-core": ["react-devtools-core@7.0.1", "", { "dependencies": { "shell-quote": "^1.6.1", "ws": "^7" } }, "sha512-C3yNvRHaizlpiASzy7b9vbnBGLrhvdhl1CbdU6EnZgxPNbai60szdLtl+VL76UNOt5bOoVTOz5rNWZxgGt+Gsw=="],
|
|
118
|
-
|
|
119
|
-
"react-reconciler": ["react-reconciler@0.33.0", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.0" } }, "sha512-KetWRytFv1epdpJc3J4G75I4WrplZE5jOL7Yq0p34+OVOKF4Se7WrdIdVC45XsSSmUTlht2FM/fM1FZb1mfQeA=="],
|
|
120
|
-
|
|
121
|
-
"restore-cursor": ["restore-cursor@4.0.0", "", { "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg=="],
|
|
122
|
-
|
|
123
|
-
"scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="],
|
|
124
|
-
|
|
125
|
-
"shell-quote": ["shell-quote@1.8.3", "", {}, "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw=="],
|
|
126
|
-
|
|
127
|
-
"signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
|
|
128
|
-
|
|
129
|
-
"slice-ansi": ["slice-ansi@7.1.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w=="],
|
|
130
|
-
|
|
131
|
-
"stack-utils": ["stack-utils@2.0.6", "", { "dependencies": { "escape-string-regexp": "^2.0.0" } }, "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ=="],
|
|
132
|
-
|
|
133
|
-
"string-width": ["string-width@8.1.1", "", { "dependencies": { "get-east-asian-width": "^1.3.0", "strip-ansi": "^7.1.0" } }, "sha512-KpqHIdDL9KwYk22wEOg/VIqYbrnLeSApsKT/bSj6Ez7pn3CftUiLAv2Lccpq1ALcpLV9UX1Ppn92npZWu2w/aw=="],
|
|
134
|
-
|
|
135
|
-
"strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="],
|
|
136
|
-
|
|
137
|
-
"tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="],
|
|
138
|
-
|
|
139
|
-
"terminal-size": ["terminal-size@4.0.1", "", {}, "sha512-avMLDQpUI9I5XFrklECw1ZEUPJhqzcwSWsyyI8blhRLT+8N1jLJWLWWYQpB2q2xthq8xDvjZPISVh53T/+CLYQ=="],
|
|
140
|
-
|
|
141
|
-
"ts-algebra": ["ts-algebra@2.0.0", "", {}, "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw=="],
|
|
142
|
-
|
|
143
|
-
"type-fest": ["type-fest@5.4.4", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-JnTrzGu+zPV3aXIUhnyWJj4z/wigMsdYajGLIYakqyOW1nPllzXEJee0QQbHj+CTIQtXGlAjuK0UY+2xTyjVAw=="],
|
|
144
|
-
|
|
145
|
-
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
146
|
-
|
|
147
|
-
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
148
|
-
|
|
149
|
-
"widest-line": ["widest-line@6.0.0", "", { "dependencies": { "string-width": "^8.1.0" } }, "sha512-U89AsyEeAsyoF0zVJBkG9zBgekjgjK7yk9sje3F4IQpXBJ10TF6ByLlIfjMhcmHMJgHZI4KHt4rdNfktzxIAMA=="],
|
|
150
|
-
|
|
151
|
-
"wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="],
|
|
152
|
-
|
|
153
|
-
"ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="],
|
|
154
|
-
|
|
155
|
-
"yoga-layout": ["yoga-layout@3.2.1", "", {}, "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ=="],
|
|
156
|
-
|
|
157
|
-
"zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
|
|
158
|
-
|
|
159
|
-
"ink/ws": ["ws@8.19.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="],
|
|
160
|
-
|
|
161
|
-
"wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
|
|
162
|
-
}
|
|
163
|
-
}
|
package/bunfig.toml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Bun Test Configuration
|
|
2
|
-
|
|
3
|
-
[test]
|
|
4
|
-
# Global test timeout: 30 seconds per test (unit/integration)
|
|
5
|
-
# This prevents individual tests from hanging indefinitely
|
|
6
|
-
timeout = 30000
|
|
7
|
-
|
|
8
|
-
# Exclude nax dogfood feature directories (contain acceptance tests from nax runs, not source tests)
|
|
9
|
-
exclude = ["nax/**"]
|
|
10
|
-
|
|
11
|
-
[test]
|
|
12
|
-
concurrent = 1
|
package/docker-compose.test.yml
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Fix Plan: Context Builder Review Findings
|
|
2
|
-
**Date:** 2026-02-16
|
|
3
|
-
**Branch:** main (local commits only)
|
|
4
|
-
|
|
5
|
-
## Phase 1: DRY + Token Estimation + Dead Config
|
|
6
|
-
|
|
7
|
-
### Fix 1: Extract context building helper in runner.ts
|
|
8
|
-
**File:** `src/execution/runner.ts`
|
|
9
|
-
**Impact:** Code duplication between TDD and single-session paths
|
|
10
|
-
**Change:** Extract the duplicated 8-line context building block (build + log) into a helper function like `maybeGetContext(story, config, useContext)` that returns `string | undefined`. Call it from both TDD and single-session branches.
|
|
11
|
-
|
|
12
|
-
### Fix 2: Token estimation ratio
|
|
13
|
-
**File:** `src/context/builder.ts`
|
|
14
|
-
**Impact:** Budget underestimates for code (1:4 is too generous; code averages closer to 1:3)
|
|
15
|
-
**Change:** Change `estimateTokens()` from `Math.ceil(text.length / 4)` to `Math.ceil(text.length / 3)`. Update any test assertions that check specific token counts.
|
|
16
|
-
|
|
17
|
-
### Fix 3: Remove dead config paths
|
|
18
|
-
**File:** `src/context/types.ts`, `src/context/builder.ts`, `src/execution/runner.ts`
|
|
19
|
-
**Impact:** `includeConfig` and `includeDependencies` in `ContextBuilderConfig` are set but never read in `buildContext()`
|
|
20
|
-
**Change:** Remove `includeConfig` and `includeDependencies` from `ContextBuilderConfig`. Remove them from the config object in `buildStoryContext()`. If dependencies should be used, wire them — otherwise remove the dead path. The `dependency` type in `ContextElement` can stay for future use.
|
|
21
|
-
|
|
22
|
-
## Phase 2: Wire UserStory fields for real context
|
|
23
|
-
|
|
24
|
-
### Fix 4: Add optional context fields to UserStory
|
|
25
|
-
**File:** `src/prd/types.ts`
|
|
26
|
-
**Change:** Add to `UserStory` interface:
|
|
27
|
-
```ts
|
|
28
|
-
/** Relevant source files for context injection */
|
|
29
|
-
relevantFiles?: string[];
|
|
30
|
-
/** Prior error messages from failed attempts */
|
|
31
|
-
priorErrors?: string[];
|
|
32
|
-
/** Custom context strings */
|
|
33
|
-
customContext?: string[];
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Fix 5: Wire UserStory fields into buildStoryContext
|
|
37
|
-
**File:** `src/execution/runner.ts`
|
|
38
|
-
**Change:** Replace the hardcoded empty arrays in `buildStoryContext()` with actual values from `story`:
|
|
39
|
-
```ts
|
|
40
|
-
relevantFiles: story.relevantFiles || [],
|
|
41
|
-
priorErrors: story.priorErrors,
|
|
42
|
-
customContext: story.customContext,
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Fix 6: Populate priorErrors on retry
|
|
46
|
-
**File:** `src/execution/runner.ts`
|
|
47
|
-
**Change:** When a story fails and gets retried (escalation), capture the error/failure reason and push it to `story.priorErrors` so the next attempt gets context about what went wrong.
|
|
48
|
-
|
|
49
|
-
## Test Strategy
|
|
50
|
-
- Mode: test-after
|
|
51
|
-
- Run: `bun test` after each phase
|
|
52
|
-
- Update existing assertions in `test/context.test.ts` and `test/context-integration.test.ts` for token ratio change
|
|
53
|
-
|
|
54
|
-
## Commits
|
|
55
|
-
- Phase 1: `refactor: DRY context helper, fix token estimation, remove dead config`
|
|
56
|
-
- Phase 2: `feat: wire UserStory context fields into context builder`
|