feat(build-pro): configurable context-resolution depth (REQ-BUILDCTX-002) - #64
Merged
Conversation
…ntext_depth Adds scripts/set-context-depth.py -- validates the requested depth (spec_plan/spec_arch_plan/full_chain) and updates pipeline/state.md atomically via _state_lib, same read-modify-write pattern scripts/set-profile.py uses for project_type. Refuses to overwrite an already-set value unless --force is passed. Wires a new "Context Depth for Stage 6" section into skills/forge-plan-pro/SKILL.md's pre-flight: if build_context_depth is unset, ask the user once which depth Stage 6 Pro's context-resolution should use (spec_plan recommended default / spec_arch_plan / full_chain) and persist it; if already set, skip silently -- never re-prompt or overwrite an explicit prior choice (AC-BUILDCTX-002c). Does not block Stage 5 planning on the answer. +7 tests. Full unit suite 1938 pass, zero regressions. Ref: T-252
…t-resolve Adds read_context_depth() (fail-soft: missing state.md, unset field, or an unrecognized value all default to spec_plan -- AC-BUILDCTX-002b) and widens resolve_context() at the two non-default depths: - spec_arch_plan: resolves pipeline/03-architecture/architecture via read-doc.py, scoped to the task's REQ-IDs/Files the same way spec excerpts already are. - full_chain: additionally resolves a new full_chain_excerpts dict -- PRD, user stories, user flows, and the highest-numbered pipeline/05-plan/sprints/sprint-NNN.md when one exists -- same task-scoped matching, informational only. The hard REQ-ID invariant and Output Contract are unchanged by depth. Updated references/build/02-context-resolution.md's Context Depth and Context Bundle sections to match the actual wiring (was previously "T-252/T-253, not yet wired"). TDD red-first: 11 new tests confirmed failing (AttributeError / NameError on the not-yet-existing depth machinery) before implementation, all green after. Full unit suite 1949 pass, zero regressions. Ref: T-253
task-dag-v0.8.0.md: Follow-On section marked DONE with both commit refs. progress.md: v0.8.0 Revision 2 now spans T-241..T-253, nothing tracked and outstanding; also records the PR #63 CI fix (shallow checkout broke the git-show baseline test, fixed via literal fixture snapshot). CHANGELOG.md: Deferred note replaced with the shipped configurable-depth description. lessons.md: a git-history-dependent test can pass locally (full clone) and fail in CI (default actions/checkout is shallow, fetch-depth 1) on the exact same commit -- check workflow fetch-depth before writing a `git show <ancestor-sha>:path` assertion, prefer a fixture snapshot. Ref: T-253
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-on to PR #63 (Builder Pro, merged) -- these 3 commits were pushed to
builder-pro-plan-executionafter that PR had already merged, so they were neverpart of a PR. Cherry-picked cleanly onto a fresh branch off
develop.scripts/set-context-depth.py+ a new "Context Depth for Stage 6"pre-flight section in
skills/forge-plan-pro/SKILL.md-- prompts once, at Stage 5entry, for Builder Pro's context-resolution depth (
spec_plandefault /spec_arch_plan/full_chain), persists topipeline/state.md, neverre-prompts or overwrites an explicit prior choice.
build_context_depthintoscripts/build_executor.py'sresolve_context()--read_context_depth()is fail-soft (missing/unset/malformed all default to
spec_plan);spec_arch_planresolves task-scopedarchitecture excerpts;
full_chainadditionally resolves afull_chain_excerptsdict (PRD, user stories, user flows, latest numbered sprint plan when present),
informational only -- the hard REQ-ID traceability invariant is unchanged by
depth.
references/build/02-context-resolution.md,build/04-plan/ task-dag-v0.8.0.md,build/05-implementation/progress.md,CHANGELOG.mdupdated to reflect both tasks complete (v0.8.0 Revision 2 now spans T-241..T-253
in full).
Test plan
before implementation, all green after
scripts/validate-plugin.py: exit 0🤖 Generated with Claude Code