Problem
The ACP validate_invest tool in src/acp/tools.ts returns a hardcoded stub (score: 0) instead of calling validateInvest() from src/utils/invest.ts.
Current behavior
async validate_invest(req: { content: string }) {
return { score: 0, warnings: ['INVEST validation not yet connected to document model'] };
}
Expected behavior
The tool accepts either raw markdown content or a taskId, parses frontmatter + body via gray-matter, runs validateInvest(frontmatter, body), and returns the full InvestReport.
Acceptance criteria
Files to modify
src/acp/tools.ts — replace stub with real validateInvest() call
src/acp/types.ts — update ValidateInvestRequest to accept taskId or content
tests/acp/tools.test.ts — add tests for real validation results
Related
src/utils/invest.ts — validateInvest(frontmatter, body) → InvestReport
src/documents/types.ts — InvestReport interface
Problem
The ACP
validate_investtool insrc/acp/tools.tsreturns a hardcoded stub (score: 0) instead of callingvalidateInvest()fromsrc/utils/invest.ts.Current behavior
Expected behavior
The tool accepts either raw markdown content or a
taskId, parses frontmatter + body viagray-matter, runsvalidateInvest(frontmatter, body), and returns the fullInvestReport.Acceptance criteria
validate_invest({ content: string })— parses content and returns real{ score, criteria, warnings, pass }validate_invest({ taskId: string })— resolves the agent file from the DB, reads it, and validatesInvestReporttype fromsrc/documents/types.tsFiles to modify
src/acp/tools.ts— replace stub with realvalidateInvest()callsrc/acp/types.ts— updateValidateInvestRequestto accepttaskIdorcontenttests/acp/tools.test.ts— add tests for real validation resultsRelated
src/utils/invest.ts—validateInvest(frontmatter, body)→InvestReportsrc/documents/types.ts—InvestReportinterface