tasks.md Format
This specification defines the structured format for tasks.md in OpenLogos change proposals. The CLI depends on this format to accurately determine task status at each proposal stage.
Format Overview
Section titled “Format Overview”tasks.md uses marked sections to organize tasks, where each section corresponds to a stage in the proposal workflow:
# 实现任务
## [delta] 规格变更- [ ] Produce delta file to deltas/prd/1-product-requirements/ — update requirements- [ ] Produce delta file to deltas/api/ — update API YAML
## [code] 代码实现- [ ] Implement business logic in src/xxx- [ ] Write corresponding tests
## [deploy] 部署执行- [ ] Deploy to staging environment- [ ] Verify deployment healthSection Markers
Section titled “Section Markers”| Marker | Stage | Purpose |
|---|---|---|
[delta] | Spec changes | Delta file production tasks |
[code] | Code implementation | Business code + test code tasks |
[deploy] | Deployment | Deployment execution tasks (optional) |
Sections without markers are treated as general tasks and don’t affect proposal step detection.
[code] is filled after merge, not during write-tasks
Section titled “[code] is filled after merge, not during write-tasks”Under the redesigned launched flow (see Change Management and Slice Planner), [code] slices are no longer written during the plan stage. write-tasks (change-writer) produces only [delta] and [deploy]; its completion predicate is tasks_delta_filled. The [code] slices are cut later by the slice-planner in a dedicated slice subflow that runs after merge, against the merged spec and real test IDs — its completion predicate is tasks_code_filled (slices written, all unchecked).
- A pure-code proposal (no
[delta]) must still keep an empty## [code]heading. This keepsparseTaskSectionsnon-null andcode_requiredtrue, but it is not permission to slice immediately: the proposal must first run no-deltaopenlogos merge <slug>and receive aSPEC_MERGEDmarker. - Once
SPEC_MERGEDexists, the proposal may enterplan-slicesonly when realUT-*/ST-*/SMOKE-*IDs can be parsed fromproposal.md,tasks.md, or merged test deltas. Missing IDs producetest-id-required, not a placeholder slice. - If
[code]is filled early (duringwrite-tasks, before the slice stage legitimately enters),openlogos mergeauto-resets it to an empty heading before spec-complete (backing the old text up toCODE_AUTORESET), soslice-plannerremains the single source of truth for slices.
How [code] slices are written: openlogos slice plan
Section titled “How [code] slices are written: openlogos slice plan”Slices are not typed into tasks.md by hand. slice-planner produces a structured slices.json — one entry per slice with slice_id, task_text, owned_test_ids, runner_selectors and spec_targets — and hands it to the CLI:
openlogos slice plan --file slices.json [--slug <slug>] [--format json]In one call the command validates the input, replaces the body of ## [code] with one checkbox per slice, writes logos/changes/<slug>/TEST_SLICE_MANIFEST.json, and computes the manifest’s task_fingerprint from the tasks.md it just wrote. Both files are staged and validated before either is replaced, so a rejected input leaves both untouched. [delta] / [deploy] sections and their checkboxes are preserved byte for byte, and re-running with the same input is idempotent (existing check states are kept).
TEST_SLICE_MANIFEST.jsonrecords which test IDs each slice owns.openlogos verifyreads ownership only from this manifest — never from the prose in[code]— to run slice checkpoints and the final full verify.- After slicing, the
slice-exitgate approves the plan (SLICES_APPROVED); only then does the proposal move tocoding. - If the merged spec changes later (for example after an incremental
openlogos mergeamendment), rerunopenlogos slice planwith the same or updatedslices.jsonto rebuild the manifest.
See openlogos slice and Slice Planner.
Task Format
Section titled “Task Format”Each task is a Markdown checkbox:
- [ ] Uncompleted task description- [x] Completed task descriptionHow CLI Uses This Format
Section titled “How CLI Uses This Format”Proposal Step Detection
Section titled “Proposal Step Detection”openlogos status reads tasks.md to determine the current proposal step:
| Condition | Proposal Step |
|---|---|
[delta] section has unchecked items | delta-writing |
All [delta] items checked | ready-to-merge |
No [delta] + code required + no SPEC_MERGED/MERGED | spec-complete-required |
SPEC_MERGED exists + code required + no real test IDs | test-id-required |
SPEC_MERGED exists + [code] not yet planned | ready-to-implement / plan-slices |
SPEC_MERGED exists + [code] planned + SLICES_APPROVED exists | coding |
All [code] items checked (or no [code] section) | ready-to-verify |
VERIFY_PASS exists + [deploy] has unchecked items | ready-to-deploy |
All [deploy] items checked | deploy-done / ready-to-smoke |
Deployment Decision
Section titled “Deployment Decision”The presence of a [deploy] section signals that the proposal requires deployment:
- Has
[deploy]section →deployment_required: true(from tasks perspective) - No
[deploy]section → falls back toproposal.mddeployment impact declaration
If proposal.md says “no deployment needed” but tasks.md has a [deploy] section, openlogos status --format json reports a deployment_decision_conflict.
Writing Guidelines
Section titled “Writing Guidelines”- Each task should be a single, actionable item
- Tasks should be specific enough to verify completion
- Delta tasks should reference the target directory
- Code tasks should reference the source file or module
- Deploy tasks should reference the target environment
Example: Full Lifecycle
Section titled “Example: Full Lifecycle”# 实现任务
## [delta] 规格变更- [x] Produce delta to deltas/prd/1-product-requirements/ — add S05 acceptance criteria- [x] Produce delta to deltas/api/ — add GET /suggestions endpoint- [x] Produce delta to deltas/test/ — add S05 test cases
## [code] 代码实现- [x] Implement suggestion engine in src/lib/suggestions.ts- [x] Add GET /suggestions route handler- [x] Write UT-S05-01 through UT-S05-06 test code- [x] Write ST-S05-01 through ST-S05-03 scenario tests- [x] Add OpenLogos reporter to test runner
## [deploy] 部署执行- [ ] Deploy to staging- [ ] Verify /suggestions endpoint respondsRelated
Section titled “Related”- Change Management — Full proposal lifecycle
openlogos status— Reads tasks.md for proposal step detectionopenlogos change— Creates the initial tasks.md templateopenlogos slice plan— Writes the[code]slices andTEST_SLICE_MANIFEST.json