feat: scaffold go backend foundation
This commit is contained in:
@@ -8,13 +8,13 @@ interview-ready after each short practice loop.
|
||||
|
||||
### Backend and Workflow
|
||||
|
||||
- [ ] **BACK-01**: Backend service is implemented in Go.
|
||||
- [ ] **BACK-02**: Backend exposes typed interfaces for tutor workflows.
|
||||
- [ ] **BACK-03**: Backend integrates internalized `agent-farm-go` workflow
|
||||
- [x] **BACK-01**: Backend service is implemented in Go.
|
||||
- [x] **BACK-02**: Backend exposes typed interfaces for tutor workflows.
|
||||
- [x] **BACK-03**: Backend integrates internalized `agent-farm-go` workflow
|
||||
patterns without ad hoc handler shellouts.
|
||||
- [ ] **BACK-04**: Workflow LLM execution uses `third-one` with configurable
|
||||
- [x] **BACK-04**: Workflow LLM execution uses `third-one` with configurable
|
||||
runtime and default `deepseek-v4-flash`.
|
||||
- [ ] **BACK-05**: Manually authored source files stay at or below 600 lines.
|
||||
- [x] **BACK-05**: Manually authored source files stay at or below 600 lines.
|
||||
|
||||
### Interview Practice
|
||||
|
||||
@@ -94,7 +94,7 @@ interview-ready after each short practice loop.
|
||||
|
||||
| Requirement | Phase | Status |
|
||||
|-------------|-------|--------|
|
||||
| BACK-01..BACK-05 | Phase 1 | Pending |
|
||||
| BACK-01..BACK-05 | Phase 1 | Complete |
|
||||
| INT-01..INT-06 | Phase 2 | Pending |
|
||||
| MEM-01..MEM-05 | Phase 3 | Pending |
|
||||
| PROG-01..PROG-05 | Phase 4 | Pending |
|
||||
@@ -108,4 +108,4 @@ interview-ready after each short practice loop.
|
||||
|
||||
---
|
||||
*Requirements defined: 2026-04-26*
|
||||
*Last updated: 2026-04-26 after Go backend direction was locked.*
|
||||
*Last updated: 2026-04-26 after Phase 1 execution.*
|
||||
|
||||
@@ -7,7 +7,7 @@ See: `.planning/PROJECT.md` (updated 2026-04-26)
|
||||
**Core value:** The user should feel and prove that they are becoming more
|
||||
interview-ready after each short practice loop.
|
||||
|
||||
**Current focus:** Phase 1: Go Backend Foundation and Workflow Boundary.
|
||||
**Current focus:** Phase 2 planning: Diagnostic Interview Loop.
|
||||
|
||||
## Current Decisions
|
||||
|
||||
@@ -21,13 +21,15 @@ interview-ready after each short practice loop.
|
||||
- OpenSpec is the intent/requirements source of truth.
|
||||
- First interview track is Backend Developer Interview.
|
||||
- Phase 1 has context, research, and plan artifacts.
|
||||
- Phase 1 Go backend scaffold is implemented and verified.
|
||||
|
||||
## Next Actions
|
||||
|
||||
1. Execute Phase 1 Go backend foundation plan.
|
||||
1. Plan Phase 2 diagnostic interview loop with GSD.
|
||||
2. Keep `docs/planning/WORKFLOW_CONTRACTS.md` aligned with Go structs during
|
||||
implementation.
|
||||
3. After Phase 1, plan Phase 2 diagnostic interview loop.
|
||||
future workflow implementation.
|
||||
3. Decide whether Phase 2 starts with in-memory diagnostic sessions or a small
|
||||
persistence boundary.
|
||||
|
||||
## Validation Log
|
||||
|
||||
@@ -35,6 +37,9 @@ interview-ready after each short practice loop.
|
||||
before GSD planning docs were created.
|
||||
- 2026-04-26: First track, workflow contracts, and Phase 1 GSD plan were
|
||||
created.
|
||||
- 2026-04-26: Phase 1 implementation verified with `go test ./...`,
|
||||
`openspec validate bootstrap-job-tutor-platform --strict`, and Go source
|
||||
line-count check.
|
||||
|
||||
---
|
||||
*State initialized: 2026-04-26.*
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# Phase 1 Summary
|
||||
|
||||
**Status:** Complete
|
||||
**Completed:** 2026-04-26
|
||||
|
||||
## Delivered
|
||||
|
||||
- Initialized Go backend module.
|
||||
- Added `cmd/tutor-api` entrypoint.
|
||||
- Added app assembly package.
|
||||
- Added environment-backed config with defaults for:
|
||||
- HTTP address
|
||||
- environment
|
||||
- workflow runtime path
|
||||
- model key defaulting to `deepseek-v4-flash`
|
||||
- third-one binary path
|
||||
- Added HTTP health endpoint at `GET /healthz`.
|
||||
- Added typed workflow boundary and stub runner.
|
||||
- Added tests for config, health endpoint, and workflow stub behavior.
|
||||
- Updated `AGENTS.md` with concrete Go validation commands.
|
||||
|
||||
## Files Added
|
||||
|
||||
- `go.mod`
|
||||
- `cmd/tutor-api/main.go`
|
||||
- `internal/app/server.go`
|
||||
- `internal/config/config.go`
|
||||
- `internal/config/config_test.go`
|
||||
- `internal/httpapi/handler.go`
|
||||
- `internal/httpapi/handler_test.go`
|
||||
- `internal/workflows/contracts.go`
|
||||
- `internal/workflows/runner.go`
|
||||
- `internal/workflows/runner_test.go`
|
||||
|
||||
## Verification
|
||||
|
||||
```powershell
|
||||
gofmt -w cmd internal
|
||||
go test ./...
|
||||
openspec validate bootstrap-job-tutor-platform --strict
|
||||
```
|
||||
|
||||
All checks passed.
|
||||
|
||||
Go source line-count check passed; no manually authored Go file exceeds 600
|
||||
lines.
|
||||
|
||||
## Deferred
|
||||
|
||||
- Real diagnostic interview workflow execution.
|
||||
- Persistence.
|
||||
- Auth.
|
||||
- Live third-one execution.
|
||||
- Frontend.
|
||||
- Ontology and asset generation.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Phase 1 Verification
|
||||
|
||||
## Verdict
|
||||
|
||||
PASS
|
||||
|
||||
## Requirement Coverage
|
||||
|
||||
- BACK-01: PASS. Go module and backend entrypoint exist.
|
||||
- BACK-02: PASS. `internal/workflows` exposes typed contracts and runner
|
||||
interface.
|
||||
- BACK-03: PASS. HTTP handler receives a workflow runner dependency and does
|
||||
not shell out.
|
||||
- BACK-04: PASS. Config includes workflow runtime, model key, and third-one
|
||||
binary path. Default model key is `deepseek-v4-flash`.
|
||||
- BACK-05: PASS. Go source files are all under 600 lines.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `go test ./...` passed.
|
||||
- `openspec validate bootstrap-job-tutor-platform --strict` passed.
|
||||
- Go line-count check passed.
|
||||
|
||||
## Residual Risk
|
||||
|
||||
The workflow runner is intentionally a stub. Real internalized `agent-farm-go`
|
||||
execution belongs to a later phase when diagnostic and grading behavior are
|
||||
implemented.
|
||||
Reference in New Issue
Block a user