Repository navigation
AA08: proposeAgent tool: validate, catalog checks, requirements, card output - #855
Merged
Merged
Conversation
…rements, card output
proposeAgent({ draft }) validates a new-agent draft against AgentSpec v2
(draftToSpec), checks the live catalogs (models, builtin tools,
guardrails, trigger types, agent refs) in one failure listing all
problems, computes advisory requirements, runs the pluggable review
(passReview until the real review lands), records the card in per-turn
proposal state keyed by identity, and returns a ProposalOutput the panel
renders. proposalId is the call's toolCallId; nothing is written.
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
LinuxDevil
force-pushed
the
fb-aa08-propose-agent
branch
from
November 3, 2026 03:55
4758dc3 to
2090fe5
Compare
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 changed
proposeAgent({ draft })— the Author's create-proposal tool. It validates the draft via AA07'sdraftToSpec, checks every catalog-referenced value (model + fallback models, builtin tools, guardrail names, trigger types,subagents.<key>.refandhandoffs[i].agentagainst workspace agent ids) in a single failure that lists up to 10 problems with the first problem's code, computes the card's readiness rows via therequirementsdep ([]on dep error), runs the injectedreviewDraft(passReviewuntil the real review lands), records the card under the'create'identity in per-turn proposal state, and returns theProposalOutput.proposalIdis the call'stoolCallId; nothing is written to disk.New modules under
server/author/proposal/:turnState.ts—ProposalIdentity,identityKey,ProposalTurnState,proposalTurnState(lazily stored inturn.state['proposals']).review.ts—ReviewInput/ReviewVerdict/ReviewDraftcontract +passReviewdefault.catalogChecks.ts—CatalogFacts,loadCatalogFacts(memoized per turn inturn.state['catalogFacts']),checkCatalogs.Also:
shared/authorWire.ts—ProposalKind,ProposalOutput;SpecChangere-exported alongsideRequirement.tools/index.ts—AuthorToolDepsgainsreviewDraftandrequirements;proposeAgentToolregistered inAUTHOR_TOOL_FACTORIES(now 14 tools).app.ts—createAppwiresreviewDraft: passReviewandrequirementstocomputeRequirementswithrequirementDepsresolved per call against the session's workspace root (workspace seam preserved).How it was tested
npm run typecheck:server,npm run typecheck— clean.npm run test:server— 1020 tests pass (76 files), incl. newproposeAgent.test.ts(8) andcatalogChecks.test.ts(14).npm test -- --run— 946 client tests pass.npx tsc --noEmit,npm run lint,npm run lint --workspace apps/agent-forge(0 errors),npm run test:coverage(7152 pass; coverage report written),npm run fallow(0 above threshold),npm run docs:ratchet,npm run api:check,npm run docs:llms:check,npm run size-check— all green.test:coveragerun showed 11 failures unrelated to this diff — 5 inpackages/create-lousho(itsdist/was unbuilt) and 6src/spec/v2/templates.test.tsREADME assertions caused by CRLF checkout line endings on Windows. Both were environmental; after building the sibling package and normalizing the checkouts to LF, the full suite passes with 0 failures. No content changes were committed for either.Acceptance criteria
ok: truewithproposalId === ctx.toolCallId,kind: 'create',enabled: false, a chat trigger present, and nothing written to.lousho/agents/.UNKNOWN_MODELfailure listing both problems.pass: falsemakes the tool return that failure and leavesproposedempty.proposalTurnState(turn).proposed.get('create')is the output.Generated with Devin