feat: add Project entity with auto-injected agent context#382
Open
wesbillman wants to merge 3 commits intomainfrom
Open
feat: add Project entity with auto-injected agent context#382wesbillman wants to merge 3 commits intomainfrom
wesbillman wants to merge 3 commits intomainfrom
Conversation
Introduces a first-class Project entity that groups channels and provides shared context to agents — eliminating the need to copy-paste canvas instructions into every new channel. Projects are relay-stored Nostr events (kinds 50001-50003) with a full CRUD pipeline: DB table, relay ingest/side-effects, REST API, SDK builders, and 5 MCP tools (create, get, list, update, delete). Channels gain an optional project_id FK. When a channel belongs to a project, the ACP harness automatically injects the project's prompt, repos, and environment into the [Context] block that agents receive — no manual setup required. Includes 21 tests (SDK builders, ingest classification, DB CRUD), environment validation, empty-update guards, and updates to VISION.md and TESTING.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collapse nested if blocks into match guard patterns in messages.rs and ingest.rs to satisfy clippy::collapsible_match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
Design Status & Future RoadmapSummary of concerns discussed during design and where each stands:
Architecture: Relay = WHAT, Edge = WHEREThe project entity stores what agents work on (repo identities, shared instructions, preferences). Each agent runtime determines where and how (local paths, worktree roots, compute environment). This split means:
What's next (incremental, no rearchitecting needed)
|
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
project_idFK — when set, the ACP harness automatically injects the project's prompt, repos, and environment into the[Context]block agents receiveWhat agents see automatically:
Files changed (24 files, +1105/-76)
sprout-core/src/project.rs,sprout-db/src/project.rs,sprout-relay/src/api/projects.rsFuture work
Test plan
cargo check --workspacepassescargo test -p sprout-sdk -- project— 9 builder tests passcargo test -p sprout-relay -- project— 6 ingest classification tests passcargo test -p sprout-db -- project— 6 DB CRUD tests (require Postgres)cargo clippy --workspace -- -D warningspasses🤖 Generated with Claude Code