feat(ai): ADR-0033 Phase C — plan-first blueprint authoring#1537
Merged
Conversation
For high-level goals ("build me a project-management system") the metadata
assistant designs before it builds, then confirms before drafting.
- Add SolutionBlueprintSchema (@objectstack/spec/ai): objects + fields +
relationships + views + dashboards + seed data, with stated assumptions.
- propose_blueprint(goal): structured-output design; persists NOTHING; the
agent presents it for conversational confirm, asks <=2 questions.
- apply_blueprint(blueprint): only after approval, batch-drafts every artifact
through the Phase A draft path (mode:'draft'), per-type validated and
partial-tolerant; seed data reported, not auto-applied.
- New solution_design skill (plan-first instructions) bound to
metadata_assistant alongside metadata_authoring.
- Export stageDraft from metadata-tools and reuse it — one draft-write path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What & why
Implements Phase C of ADR-0033 — plan-first blueprint authoring. Builds on Phase A (#1529).
Real authors say "build me a project-management system," not a field list. For high-level goals the agent must design, not transcribe, and confirm before it builds (ADR §4). This adds that plan-first layer on top of Phase A's draft-gated writes.
What changed
SolutionBlueprintSchema(@objectstack/spec/ai) — a simplified proposal shape: objects + fields + relationships (as lookup/master_detailreferencefields) + views + dashboards + seed data, with statedassumptionsand ≤2questions. References the realFieldTypeenum so proposed types are valid.propose_blueprint(goal)— emits the blueprint viagenerateObject(structured output). Persists nothing. Returns{ status:'blueprint_proposed', blueprint, counts, questions }; the agent presents it for conversational confirm.apply_blueprint(blueprint)— only after the human approves, batch-drafts each object/view/dashboard through the Phase A draft path (protocol.saveMetaItem({mode:'draft'})), per-type validated and partial-tolerant (a bad item is reported infailed, the rest still draft). Seed data is reported as proposed — not auto-applied (no runtimedatasettype exists).solution_designskill carries the plan-first instructions (propose → confirm → apply; never claim "live"); bound tometadata_assistantalongsidemetadata_authoring.stageDraftfrom the metadata tools and reused it — one draft-write path, one error shape.Two safety gates
Verification
@objectstack/spec: 7 newsolution-blueprintschema tests (valid parses; bad field type / missing summary / non-snake_case / >2 questions rejected). Fullspec/aisuite green (129).@objectstack/service-ai: 12 new blueprint-tool tests — propose persists nothing, apply drafts viamode:'draft'and never callsregister, per-item failure isolation, seed reported-not-applied, malformed-blueprint rejection, view-column defaulting. Full suite green (458, was 446).Scope
Phase C only (framework / OSS). Phase B (objectui blueprint review UI) and Phase D (EE) remain out of scope. Flow authoring is explicitly deferred ("flow last").
🤖 Generated with Claude Code