Skip to content

feat(build-pro): configurable context-resolution depth (REQ-BUILDCTX-002) - #64

Merged
tonmoy007 merged 3 commits into
developfrom
feat/build-context-depth
Aug 10, 2026
Merged

feat(build-pro): configurable context-resolution depth (REQ-BUILDCTX-002)#64
tonmoy007 merged 3 commits into
developfrom
feat/build-context-depth

Conversation

@tonmoy007

Copy link
Copy Markdown
Owner

Summary

Follow-on to PR #63 (Builder Pro, merged) -- these 3 commits were pushed to
builder-pro-plan-execution after that PR had already merged, so they were never
part of a PR. Cherry-picked cleanly onto a fresh branch off develop.

  • T-252: 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 5
    entry, for Builder Pro's context-resolution depth (spec_plan default /
    spec_arch_plan / full_chain), persists to pipeline/state.md, never
    re-prompts or overwrites an explicit prior choice.
  • T-253: wires build_context_depth into scripts/build_executor.py's
    resolve_context() -- read_context_depth() is fail-soft (missing/unset/
    malformed all default to spec_plan); spec_arch_plan resolves task-scoped
    architecture excerpts; full_chain additionally resolves a full_chain_excerpts
    dict (PRD, user stories, user flows, latest numbered sprint plan when present),
    informational only -- the hard REQ-ID traceability invariant is unchanged by
    depth.
  • Docs: references/build/02-context-resolution.md, build/04-plan/ task-dag-v0.8.0.md, build/05-implementation/progress.md, CHANGELOG.md
    updated to reflect both tasks complete (v0.8.0 Revision 2 now spans T-241..T-253
    in full).

Test plan

  • TDD red-first: 18 new tests (7 for T-252, 11 for T-253) confirmed failing
    before implementation, all green after
  • Full unit suite: 1949 passed
  • scripts/validate-plugin.py: exit 0

🤖 Generated with Claude Code

…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
@tonmoy007
tonmoy007 merged commit 4f74d32 into develop Aug 10, 2026
3 checks passed
@tonmoy007
tonmoy007 deleted the feat/build-context-depth branch August 11, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants