Task 009 implement plan generation review gate
This commit is contained in:
@@ -39,14 +39,14 @@ Development description: Implement article plan generation, immutable plan versi
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TDD pre-requirement: before implementation, write one failing public API test showing research cannot start before plan approval; implement generation/review behavior in vertical cycles and record evidence in `Result`.
|
||||
- [ ] Plan generation creates version 1 and moves article to `PLAN_REVIEW_REQUIRED`.
|
||||
- [ ] Plan has at least four sections with purpose, key points, and evidence needs.
|
||||
- [ ] Direct plan edit creates a new immutable version.
|
||||
- [ ] Revision request writes workflow event and returns workflow to plan generation/revision.
|
||||
- [ ] Approval writes workflow event with actor, timestamp, and exact plan version.
|
||||
- [ ] Previous plan versions remain accessible.
|
||||
- [ ] Frontend supports approve, request revision, direct edit, section notes, source requirements, excluded sources, visual requirements, tone, audience, and SEO keyword changes.
|
||||
- [x] TDD pre-requirement: before implementation, write one failing public API test showing research cannot start before plan approval; implement generation/review behavior in vertical cycles and record evidence in `Result`.
|
||||
- [x] Plan generation creates version 1 and moves article to `PLAN_REVIEW_REQUIRED`.
|
||||
- [x] Plan has at least four sections with purpose, key points, and evidence needs.
|
||||
- [x] Direct plan edit creates a new immutable version.
|
||||
- [x] Revision request writes workflow event and returns workflow to plan generation/revision.
|
||||
- [x] Approval writes workflow event with actor, timestamp, and exact plan version.
|
||||
- [x] Previous plan versions remain accessible.
|
||||
- [x] Frontend supports approve, request revision, direct edit, section notes, source requirements, excluded sources, visual requirements, tone, audience, and SEO keyword changes.
|
||||
|
||||
## Verification
|
||||
|
||||
@@ -56,9 +56,9 @@ Development description: Implement article plan generation, immutable plan versi
|
||||
|
||||
## Result
|
||||
|
||||
- Status: Pending execution.
|
||||
- TDD plan: To be filled during execution.
|
||||
- Red evidence: To be filled during execution.
|
||||
- Green evidence: To be filled during execution.
|
||||
- Refactor notes: To be filled during execution.
|
||||
- Verification output: To be filled during execution.
|
||||
- Status: Accepted.
|
||||
- TDD plan: Added `apps/backend/tests/integration/test_plan_generation_review_public_api.py` before implementation. The test starts from an article with submitted boundary answers, asserts research start is blocked before approval, then verifies plan generation, immutable edit versioning, revision request, approval event payload, and research unlock.
|
||||
- Red evidence: Initial run failed with `409 != 404` for `POST /api/articles/{article_id}/research/start`, proving the public research gate was absent.
|
||||
- Green evidence: Implemented plan contracts, schema fields, repository persistence, plan generation/review routes, research start gate, generated shared contracts, and FSD plan review frontend at `/articles/[articleId]/plans`.
|
||||
- Refactor notes: Replaced the placeholder plan approval route with real plan lookup/status transitions. Added immutable plan versions and section-level key points/evidence needs while preserving previous versions in `GET /plans`.
|
||||
- Verification output: `PYTHONPATH=/private/tmp/pupline-backend-deps python3 -m unittest apps/backend/tests/integration/test_plan_generation_review_public_api.py apps/backend/tests/integration/test_boundary_questions_public_api.py apps/backend/tests/integration/test_schema_storage_contracts.py apps/backend/tests/contracts/test_generated_contract_artifacts.py` passed. `pnpm --filter @pipeline/frontend test:ui` passed. `pnpm --filter @pipeline/frontend typecheck` passed. `tests/smoke/plan-flow.sh` passed with Docker Compose after Docker socket escalation.
|
||||
|
||||
Reference in New Issue
Block a user