fix: loop artifact scoping, PRD regeneration, namespace propagation, graph-before-planning#324
Merged
callmeradical merged 3 commits intomainfrom Apr 11, 2026
Merged
fix: loop artifact scoping, PRD regeneration, namespace propagation, graph-before-planning#324callmeradical merged 3 commits intomainfrom
callmeradical merged 3 commits intomainfrom
Conversation
…c and plan prompts Graph was built during prepareLoopReferences (after planning), meaning the tech spec and implementation plan agents had no codebase structure to reference. Now buildKnowledgeGraph runs before the planning stage, and the graph path is passed to both buildTechSpecPrompt and buildImplementationPlanPrompt so agents can query architecture before writing specs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nning docs per-loop Two bugs from smith's first self-hosted loop: 1. When an existing PRD has all stories marked done, the loop skipped PRD generation and immediately exited the implementation stage with zero iterations (all work already complete). Now detects stale PRDs and forces regeneration from the issue body. Closes #323. 2. Tech spec and implementation plan were written to shared paths (.agents/tasks/) overwriting existing docs. Now scoped to .smith/loop/ which is per-loop workspace. Closes #322. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All loop artifacts (guardrails, progress, errors, activity, run log, run summary, graph, tech spec, implementation plan, build instructions, project guardrails) are now written to .smith/<loop-id>/ instead of the shared .smith/loop/ directory. This prevents multiple loops from overwriting each other's artifacts and provides full per-loop history. The loopDir() helper sanitizes the loop ID for filesystem safety. Updated: prepareLoopReferences, materializeSmithfileBuildArtifacts, buildKnowledgeGraph, runTechPlanning, loopArtifactSpecs, and tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
.smith/<loop-id>/instead of shared.smith/loop/. Prevents concurrent loops from overwriting each other.target_namespacefrom project config now injected into loop metadata. Defaults tosmith-system. Closes dispatch failures.namespacefield so repos can declare their loop namespace.Test plan
go test ./internal/cli/replica/passes (including updated artifact test)go test ./cmd/smith-api/passesgo build ./...clean🤖 Generated with Claude Code