docs: plan backend foundation phase
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
# Phase 1: Go Backend Foundation and Workflow Boundary - Context
|
||||
|
||||
**Gathered:** 2026-04-26
|
||||
**Status:** Ready for planning
|
||||
**Source:** GSD continuation from product planning
|
||||
|
||||
<domain>
|
||||
## Phase Boundary
|
||||
|
||||
Phase 1 establishes the Go backend foundation and the typed workflow boundary.
|
||||
It does not need to implement the full tutoring loop. It should create the
|
||||
minimal service skeleton that future phases can build on without violating the
|
||||
600-line rule, SOLID/KISS/YAGNI, or OpenSpec.
|
||||
|
||||
</domain>
|
||||
|
||||
<decisions>
|
||||
## Implementation Decisions
|
||||
|
||||
### Stack
|
||||
|
||||
- Backend is Go.
|
||||
- The first source package structure should separate app/bootstrap, HTTP
|
||||
transport, config, workflow contracts, and domain placeholders.
|
||||
- The implementation should not introduce a database, queue, UI, auth provider,
|
||||
or image provider in Phase 1 unless needed for scaffold validation.
|
||||
|
||||
### Workflow Boundary
|
||||
|
||||
- `agent-farm-go` patterns are internalized behind typed Go interfaces.
|
||||
- API/handler code must not shell out to workflow scripts directly.
|
||||
- `third-one` / `deepseek-v4-flash` runtime selection belongs behind config and
|
||||
workflow interfaces.
|
||||
- Workflow result contracts should align with
|
||||
`docs/planning/WORKFLOW_CONTRACTS.md`.
|
||||
|
||||
### Engineering Constraints
|
||||
|
||||
- No manually authored source file over 600 lines.
|
||||
- SOLID, KISS, and YAGNI are active constraints.
|
||||
- Keep learner memory, ontology, grading, progression, and assets separated as
|
||||
future module boundaries.
|
||||
|
||||
</decisions>
|
||||
|
||||
<canonical_refs>
|
||||
## Canonical References
|
||||
|
||||
Downstream agents MUST read these before planning or implementing.
|
||||
|
||||
### Product and Requirements
|
||||
|
||||
- `docs/planning/PRD.md` - product direction and MVP scope.
|
||||
- `docs/planning/ARCHITECTURE.md` - Go backend and internalized workflow shape.
|
||||
- `docs/planning/ENGINEERING.md` - implementation constraints.
|
||||
- `.planning/REQUIREMENTS.md` - Phase 1 requirement IDs.
|
||||
- `.planning/ROADMAP.md` - phase goal and success criteria.
|
||||
|
||||
### Workflow Contracts and Specs
|
||||
|
||||
- `docs/planning/WORKFLOW_CONTRACTS.md` - typed workflow contract plan.
|
||||
- `openspec/changes/bootstrap-job-tutor-platform/specs/tutor-workflows/spec.md`
|
||||
- workflow and Go backend requirements.
|
||||
- `openspec/changes/bootstrap-job-tutor-platform/specs/engineering-quality/spec.md`
|
||||
- code-size and design quality requirements.
|
||||
|
||||
</canonical_refs>
|
||||
|
||||
<specifics>
|
||||
## Specific Ideas
|
||||
|
||||
- Start with a small Go module and one health endpoint or CLI smoke path.
|
||||
- Add config structs for runtime/model keys without calling live providers yet.
|
||||
- Add workflow interface definitions and stub implementations that return typed
|
||||
errors or no-op evidence-safe results.
|
||||
- Add tests for config loading and workflow interface behavior where practical.
|
||||
|
||||
</specifics>
|
||||
|
||||
<deferred>
|
||||
## Deferred Ideas
|
||||
|
||||
- Real diagnostic interview flow belongs to Phase 2.
|
||||
- Persistent learner memory belongs to Phase 3.
|
||||
- Progression/readiness map belongs to Phase 4.
|
||||
- Ontology ingestion belongs to Phase 5.
|
||||
- Image asset generation belongs to Phase 6.
|
||||
|
||||
</deferred>
|
||||
|
||||
---
|
||||
*Phase: 001-go-backend-foundation-and-workflow-boundary*
|
||||
*Context gathered: 2026-04-26*
|
||||
Reference in New Issue
Block a user