Phase 7A: knowledge copilot reports backend#10
Merged
Conversation
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
reportstable and audit writes.Changed files
src/modules/knowledge/*src/modules/reports/*src/app/api/copilot/route.tssrc/app/api/reports/route.tssrc/app/api/reports/[id]/route.tsscripts/knowledge-reports-smoke.tstests/knowledge-reports.test.tsdocs/knowledge-copilot-reports-contract.mdpackage.jsonAPI contract
docs/knowledge-copilot-reports-contract.mdGET /api/copilotreturns demo prompt suggestions and citation behavior.POST /api/copilotaccepts{ question, role, organizationId?, actorUserId?, limit? }and returns cited answers over seededknowledge_documents+knowledge_snippets.GET /api/reportslists persisted reports with role generation capabilities.POST /api/reportsgenerates/persistspostmortem,executive-summary, orcustomer-impactreports.GET /api/reports/[id]returns a persisted report; generated markdown is stored inmetadata.markdownuntil a body/export store is added.Acceptance criteria
knowledge_documents+knowledge_snippetswith deterministic ranking.reportstable.Verification
npm installnpm run lintnpm run typechecknpm testnpm run buildnpm run cf:buildnpm run demo:reset && npm run db:check && npm run governance:audit-smoke && npm run demo:reset && npm run knowledge:reports-smoke && npm run demo:resetRisks / notes
reports.metadata.markdownbecause the current schema has no dedicated report body/content column.storageUriuses deterministiccommandgrid://reports/...URIs.Handoff
/root/ralph/plans/commandgrid/runs/phase-07-knowledge-copilot-reports/node-backend-handoff.mdRalph, please start Scout review.