@bx-h/meta-flow 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +172 -0
- package/bin/meta-flow.js +7 -0
- package/examples/sample-task/adjudication-report.json +14 -0
- package/examples/sample-task/final-report.md +26 -0
- package/examples/sample-task/goal-contract.json +44 -0
- package/examples/sample-task/milestone-plan.json +31 -0
- package/examples/sample-task/milestones/M1/direction-evaluation.json +16 -0
- package/examples/sample-task/milestones/M1/task-list.json +41 -0
- package/examples/sample-task/milestones/M1/tasks/T1/execution-report.json +25 -0
- package/examples/sample-task/milestones/M1/tasks/T1/task-spec.json +37 -0
- package/examples/sample-task/milestones/M1/tasks/T1/verification-report.json +23 -0
- package/examples/sample-task/proposal-summary.md +21 -0
- package/examples/sample-task/proposal.md +29 -0
- package/examples/sample-task/questioning-report.json +31 -0
- package/examples/sample-task/raw-request.md +1 -0
- package/examples/sample-task/review-aggregate.json +34 -0
- package/examples/sample-task/reviews/product-reviewer.json +16 -0
- package/examples/sample-task/reviews/risk-reviewer.json +16 -0
- package/examples/sample-task/reviews/technical-reviewer.json +16 -0
- package/examples/sample-task/reviews/verification-reviewer.json +15 -0
- package/examples/sample-task/state.json +35 -0
- package/marketplace/marketplace.json +20 -0
- package/package.json +50 -0
- package/plugin/.codex-plugin/plugin.json +36 -0
- package/plugin/agent-templates/adjudicator.toml +26 -0
- package/plugin/agent-templates/direction-evaluator.toml +18 -0
- package/plugin/agent-templates/executor.toml +21 -0
- package/plugin/agent-templates/final-summarizer.toml +17 -0
- package/plugin/agent-templates/planner.toml +18 -0
- package/plugin/agent-templates/product-reviewer.toml +15 -0
- package/plugin/agent-templates/proposal-summarizer.toml +17 -0
- package/plugin/agent-templates/questioner.toml +22 -0
- package/plugin/agent-templates/researcher-proposer.toml +18 -0
- package/plugin/agent-templates/result-verifier.toml +20 -0
- package/plugin/agent-templates/risk-reviewer.toml +14 -0
- package/plugin/agent-templates/task-decomposer.toml +19 -0
- package/plugin/agent-templates/technical-reviewer.toml +14 -0
- package/plugin/agent-templates/verification-reviewer.toml +15 -0
- package/plugin/assets/icon.svg +10 -0
- package/plugin/assets/screenshot-placeholder.md +3 -0
- package/plugin/scripts/_common.py +95 -0
- package/plugin/scripts/aggregate_reviews.py +99 -0
- package/plugin/scripts/new_task.py +78 -0
- package/plugin/scripts/status.py +95 -0
- package/plugin/scripts/validate_adjudication.py +47 -0
- package/plugin/scripts/validate_goal_contract.py +56 -0
- package/plugin/scripts/validate_milestone_plan.py +49 -0
- package/plugin/scripts/validate_task_list.py +59 -0
- package/plugin/scripts/validate_task_verification.py +49 -0
- package/plugin/skills/meta-flow/SKILL.md +159 -0
- package/plugin/skills/meta-flow/references/adjudication-policy.md +30 -0
- package/plugin/skills/meta-flow/references/direction-evaluation-policy.md +24 -0
- package/plugin/skills/meta-flow/references/execution-policy.md +35 -0
- package/plugin/skills/meta-flow/references/review-rubric.md +28 -0
- package/plugin/skills/meta-flow/references/role-contracts.md +29 -0
- package/plugin/templates/adjudication-report.json +11 -0
- package/plugin/templates/direction-evaluation.json +16 -0
- package/plugin/templates/final-report.md +11 -0
- package/plugin/templates/goal-contract.json +20 -0
- package/plugin/templates/milestone-plan.json +15 -0
- package/plugin/templates/proposal-summary.md +11 -0
- package/plugin/templates/proposal.md +17 -0
- package/plugin/templates/questioning-report.json +15 -0
- package/plugin/templates/raw-request.md +3 -0
- package/plugin/templates/review-aggregate.json +14 -0
- package/plugin/templates/reviewer-report.json +10 -0
- package/plugin/templates/state.json +23 -0
- package/plugin/templates/task-execution-report.json +13 -0
- package/plugin/templates/task-list.json +20 -0
- package/plugin/templates/task-spec.json +16 -0
- package/plugin/templates/task-verification-report.json +13 -0
- package/src/cli/commands/doctor.js +171 -0
- package/src/cli/commands/install.js +120 -0
- package/src/cli/commands/print_paths.js +20 -0
- package/src/cli/commands/uninstall.js +56 -0
- package/src/cli/commands/verify.js +197 -0
- package/src/cli/index.js +53 -0
- package/src/cli/lib/agents.js +89 -0
- package/src/cli/lib/args.js +49 -0
- package/src/cli/lib/codex_config.js +106 -0
- package/src/cli/lib/fs_safe.js +142 -0
- package/src/cli/lib/logger.js +23 -0
- package/src/cli/lib/marketplace.js +72 -0
- package/src/cli/lib/paths.js +37 -0
- package/src/cli/lib/plugin.js +57 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 huangbaixi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Meta Flow Codex
|
|
2
|
+
|
|
3
|
+
Meta Flow is a Codex-native workflow for turning vague requests into clarified goals, reviewed proposals, adjudicated plans, concrete tasks, verified results, and direction-aware iteration.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Repo scope:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @bx-h/meta-flow@latest install --scope repo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
User scope:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @bx-h/meta-flow@latest install --scope user
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Global CLI:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i -g @bx-h/meta-flow
|
|
23
|
+
meta-flow install --scope repo
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pinned version:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @bx-h/meta-flow@0.1.0 install --scope repo
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
1. Install with repo or user scope.
|
|
35
|
+
2. Restart Codex.
|
|
36
|
+
3. In Codex, say:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
Use $meta-flow for this request: "I want to improve our backend observability but I'm not sure where to start."
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can check installation state with:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
meta-flow doctor --scope repo
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## When To Use It
|
|
49
|
+
|
|
50
|
+
- Vague requests.
|
|
51
|
+
- Multi-stage tasks.
|
|
52
|
+
- High-reliability implementation.
|
|
53
|
+
- Work that needs a proposal before execution.
|
|
54
|
+
- Work that needs task-level verification.
|
|
55
|
+
- Work where execution may reveal facts that require goal adjustment.
|
|
56
|
+
|
|
57
|
+
## When Not To Use It
|
|
58
|
+
|
|
59
|
+
- Questions answerable in one response.
|
|
60
|
+
- Tiny code edits.
|
|
61
|
+
- Tasks without definable acceptance criteria.
|
|
62
|
+
- Pure discussion with no observable artifact.
|
|
63
|
+
|
|
64
|
+
## Workflow
|
|
65
|
+
|
|
66
|
+
Proposal phase:
|
|
67
|
+
|
|
68
|
+
```mermaid
|
|
69
|
+
flowchart LR
|
|
70
|
+
A["INTAKE"] --> B["QUESTIONING"]
|
|
71
|
+
B --> C["GOAL_CONTRACT_DRAFTED"]
|
|
72
|
+
C --> D["RESEARCH_AND_PROPOSAL"]
|
|
73
|
+
D --> E["PROPOSAL_REVIEW"]
|
|
74
|
+
E --> F["ADJUDICATION"]
|
|
75
|
+
F -->|revise| G["PROPOSAL_REWORK"]
|
|
76
|
+
G --> E
|
|
77
|
+
F -->|accept| H["PROPOSAL_SUMMARY"]
|
|
78
|
+
H --> I["USER_PROPOSAL_CONFIRMATION"]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Execution phase:
|
|
82
|
+
|
|
83
|
+
```mermaid
|
|
84
|
+
flowchart LR
|
|
85
|
+
A["PLANNING"] --> B["USER_PLAN_CONFIRMATION"]
|
|
86
|
+
B --> C["MILESTONE_SELECTED"]
|
|
87
|
+
C --> D["TASK_DECOMPOSITION"]
|
|
88
|
+
D --> E["TASK_EXECUTION"]
|
|
89
|
+
E --> F["TASK_VERIFICATION"]
|
|
90
|
+
F -->|repair| G["TASK_REPAIR"]
|
|
91
|
+
G --> E
|
|
92
|
+
F -->|pass| H["MILESTONE_COMPLETED"]
|
|
93
|
+
H --> I["DIRECTION_EVALUATION"]
|
|
94
|
+
I -->|continue| C
|
|
95
|
+
I -->|replan| A
|
|
96
|
+
I -->|adjust goal| J["GOAL_ADJUSTMENT_REQUIRED"]
|
|
97
|
+
I -->|done| K["FINAL_SUMMARY"]
|
|
98
|
+
K --> L["USER_FINAL_CONFIRMATION"]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Roles
|
|
102
|
+
|
|
103
|
+
- `questioner`: clarifies ambiguity and drafts the goal contract.
|
|
104
|
+
- `researcher-proposer`: researches and writes the proposal.
|
|
105
|
+
- `reviewers`: product, technical, risk, and verification reviewers.
|
|
106
|
+
- `adjudicator`: resolves reviewer/user/direction feedback and routes the workflow.
|
|
107
|
+
- `proposal-summarizer`: writes the user confirmation summary.
|
|
108
|
+
- `planner`: creates milestone checkpoints.
|
|
109
|
+
- `direction-evaluator`: decides whether the goal and plan still hold.
|
|
110
|
+
- `task-decomposer`: creates concrete tasks for a milestone.
|
|
111
|
+
- `executor`: executes exactly one concrete task.
|
|
112
|
+
- `result-verifier`: verifies exactly one concrete task.
|
|
113
|
+
- `final-summarizer`: writes completion evidence, gaps, and residual risk.
|
|
114
|
+
|
|
115
|
+
## File Write Scope
|
|
116
|
+
|
|
117
|
+
Repo scope writes under the target repo:
|
|
118
|
+
|
|
119
|
+
- `<repo>/plugins/meta-flow`
|
|
120
|
+
- `<repo>/.agents/plugins/marketplace.json`
|
|
121
|
+
- `<repo>/.codex/agents/*.toml`
|
|
122
|
+
- `<repo>/.codex/config.toml`
|
|
123
|
+
|
|
124
|
+
User scope writes under the current user home:
|
|
125
|
+
|
|
126
|
+
- `~/.codex/plugins/meta-flow`
|
|
127
|
+
- `~/.agents/plugins/marketplace.json`
|
|
128
|
+
- `~/.codex/agents/*.toml`
|
|
129
|
+
- `~/.codex/config.toml`
|
|
130
|
+
|
|
131
|
+
Task data under `.meta-flow/tasks` is not removed by uninstall.
|
|
132
|
+
|
|
133
|
+
## Uninstall
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
meta-flow uninstall --scope repo --yes
|
|
137
|
+
meta-flow uninstall --scope user --yes
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Run a preview first:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
meta-flow uninstall --scope repo --dry-run
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Safety
|
|
147
|
+
|
|
148
|
+
- No `postinstall` script modifies your system.
|
|
149
|
+
- The installer writes files only after explicit `meta-flow install`.
|
|
150
|
+
- No telemetry is collected.
|
|
151
|
+
- User code, config, and task content are not uploaded.
|
|
152
|
+
- Use `--dry-run` before installing.
|
|
153
|
+
- Existing unmanaged files are not overwritten unless `--force` is used.
|
|
154
|
+
- Overwrites support backups.
|
|
155
|
+
- Prefer pinned versions for reproducible installs.
|
|
156
|
+
|
|
157
|
+
## Codex Marketplace
|
|
158
|
+
|
|
159
|
+
You can also distribute the plugin through a Codex marketplace entry:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
codex plugin marketplace add bx-h/meta-flow --ref v0.1.0
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The npm installer still matters because it also materializes custom agent TOML files and validation scripts.
|
|
166
|
+
|
|
167
|
+
## Developer Docs
|
|
168
|
+
|
|
169
|
+
- [Architecture](docs/architecture.md)
|
|
170
|
+
- [Installation](docs/installation.md)
|
|
171
|
+
- [Publishing](docs/publishing.md)
|
|
172
|
+
- [Security](docs/security.md)
|
package/bin/meta-flow.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"source": "reviewers",
|
|
4
|
+
"decision": "accept",
|
|
5
|
+
"rationale": "All reviewers passed. Suggested changes are compatible and can be carried into implementation constraints.",
|
|
6
|
+
"resolved_conflicts": [],
|
|
7
|
+
"deduplicated_issues": [
|
|
8
|
+
"Keep the endpoint shallow and document that boundary.",
|
|
9
|
+
"Use existing tests and dependencies."
|
|
10
|
+
],
|
|
11
|
+
"instructions_for_next_agent": "Summarize the accepted proposal for user confirmation, preserving shallow health-check scope and validation expectations.",
|
|
12
|
+
"next_phase": "PROPOSAL_SUMMARY",
|
|
13
|
+
"requires_user_confirmation": false
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Final Report
|
|
2
|
+
|
|
3
|
+
## Completed
|
|
4
|
+
|
|
5
|
+
- Added a shallow `GET /healthz` endpoint.
|
|
6
|
+
- Added a focused route test.
|
|
7
|
+
- Documented endpoint path, response, and shallow liveness scope.
|
|
8
|
+
|
|
9
|
+
## Not Completed
|
|
10
|
+
|
|
11
|
+
- No deep dependency readiness checks were added.
|
|
12
|
+
- No deployment, monitoring, or load balancer configuration was changed.
|
|
13
|
+
|
|
14
|
+
## Evidence
|
|
15
|
+
|
|
16
|
+
- `pytest tests/test_health.py` passed in the sample execution report.
|
|
17
|
+
- Documentation review passed.
|
|
18
|
+
- Dependency manifest review passed.
|
|
19
|
+
|
|
20
|
+
## Risks And Follow-Up
|
|
21
|
+
|
|
22
|
+
If operations need readiness semantics, create a separate proposal for dependency checks and rollout behavior.
|
|
23
|
+
|
|
24
|
+
## Acceptance Criteria Result
|
|
25
|
+
|
|
26
|
+
All acceptance criteria in `goal-contract.json` are satisfied in this sample flow.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"raw_user_request": "为一个后端项目增加健康检查接口,并确保它有测试和文档。",
|
|
4
|
+
"refined_goal": "Add a shallow backend health check endpoint with tests and documentation.",
|
|
5
|
+
"problem_boundary": "Implement one liveness endpoint in the backend service, verify the endpoint response, and document its purpose and response contract.",
|
|
6
|
+
"non_goals": [
|
|
7
|
+
"Do not add deep dependency probes for databases, caches, queues, or third-party services.",
|
|
8
|
+
"Do not change deployment, load balancer, or monitoring configuration.",
|
|
9
|
+
"Do not refactor unrelated routing code."
|
|
10
|
+
],
|
|
11
|
+
"assumptions": [
|
|
12
|
+
"The backend already has a route registration pattern.",
|
|
13
|
+
"GET /healthz is acceptable unless a local convention says otherwise.",
|
|
14
|
+
"A shallow liveness check is safer for a first implementation."
|
|
15
|
+
],
|
|
16
|
+
"constraints": [
|
|
17
|
+
"Use existing backend framework and test runner.",
|
|
18
|
+
"Keep the endpoint side-effect free.",
|
|
19
|
+
"Do not introduce new runtime dependencies."
|
|
20
|
+
],
|
|
21
|
+
"success_definition": "A caller can request the health endpoint and receive a deterministic success response; tests and documentation describe the behavior.",
|
|
22
|
+
"acceptance_criteria": [
|
|
23
|
+
{
|
|
24
|
+
"id": "AC1",
|
|
25
|
+
"criterion": "GET /healthz returns HTTP 200 with a JSON body containing status=ok.",
|
|
26
|
+
"verification_method": "test",
|
|
27
|
+
"evidence_required": "Passing route test output."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "AC2",
|
|
31
|
+
"criterion": "Endpoint behavior and non-goals are documented.",
|
|
32
|
+
"verification_method": "review",
|
|
33
|
+
"evidence_required": "Docs diff includes endpoint path, response, and shallow-check limitation."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "AC3",
|
|
37
|
+
"criterion": "No new runtime dependency is added.",
|
|
38
|
+
"verification_method": "review",
|
|
39
|
+
"evidence_required": "Dependency manifest diff is empty or unchanged."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"risk_level": "medium",
|
|
43
|
+
"requires_user_confirmation": true
|
|
44
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"milestones": [
|
|
4
|
+
{
|
|
5
|
+
"id": "M1",
|
|
6
|
+
"objective": "Add and verify a shallow health check endpoint.",
|
|
7
|
+
"scope": [
|
|
8
|
+
"Route implementation",
|
|
9
|
+
"Route test",
|
|
10
|
+
"Endpoint documentation"
|
|
11
|
+
],
|
|
12
|
+
"out_of_scope": [
|
|
13
|
+
"Dependency readiness checks",
|
|
14
|
+
"Deployment configuration",
|
|
15
|
+
"Monitoring dashboards"
|
|
16
|
+
],
|
|
17
|
+
"acceptance_checks": [
|
|
18
|
+
"Health route test passes.",
|
|
19
|
+
"Docs describe endpoint path, response, and shallow scope.",
|
|
20
|
+
"No new runtime dependency is introduced."
|
|
21
|
+
],
|
|
22
|
+
"expected_outputs": [
|
|
23
|
+
"Endpoint code",
|
|
24
|
+
"Test coverage",
|
|
25
|
+
"Documentation update"
|
|
26
|
+
],
|
|
27
|
+
"risk": "medium",
|
|
28
|
+
"status": "done"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"milestone_id": "M1",
|
|
4
|
+
"decision": "continue",
|
|
5
|
+
"summary": "The milestone satisfied the original goal without invalidating proposal assumptions.",
|
|
6
|
+
"new_findings": [],
|
|
7
|
+
"invalidated_assumptions": [],
|
|
8
|
+
"goal_drift_detected": false,
|
|
9
|
+
"proposal_patch_needed": false,
|
|
10
|
+
"contract_patch": {
|
|
11
|
+
"proposed_changes": [],
|
|
12
|
+
"reason": "No goal change required.",
|
|
13
|
+
"requires_user_confirmation": false
|
|
14
|
+
},
|
|
15
|
+
"next_phase": "FINAL_SUMMARY"
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"milestone_id": "M1",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"id": "T1",
|
|
7
|
+
"objective": "Implement GET /healthz, add a focused route test, and document shallow liveness behavior.",
|
|
8
|
+
"inputs": [
|
|
9
|
+
"goal-contract.json",
|
|
10
|
+
"proposal.md",
|
|
11
|
+
"milestone-plan.json"
|
|
12
|
+
],
|
|
13
|
+
"expected_outputs": [
|
|
14
|
+
"A route handler returning HTTP 200 and status=ok.",
|
|
15
|
+
"A passing route test.",
|
|
16
|
+
"Documentation for endpoint path, response, and non-goals."
|
|
17
|
+
],
|
|
18
|
+
"allowed_files": [
|
|
19
|
+
"src/routes/health.py",
|
|
20
|
+
"tests/test_health.py",
|
|
21
|
+
"docs/api.md"
|
|
22
|
+
],
|
|
23
|
+
"forbidden_files": [
|
|
24
|
+
"deployment/**",
|
|
25
|
+
"requirements.txt"
|
|
26
|
+
],
|
|
27
|
+
"allowed_commands": [
|
|
28
|
+
"pytest tests/test_health.py"
|
|
29
|
+
],
|
|
30
|
+
"acceptance_checks": [
|
|
31
|
+
"pytest tests/test_health.py passes.",
|
|
32
|
+
"docs/api.md mentions GET /healthz and shallow liveness.",
|
|
33
|
+
"requirements.txt is unchanged."
|
|
34
|
+
],
|
|
35
|
+
"dependencies": [],
|
|
36
|
+
"risk": "medium",
|
|
37
|
+
"repair_attempts": 0,
|
|
38
|
+
"status": "passed"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"milestone_id": "M1",
|
|
4
|
+
"concrete_task_id": "T1",
|
|
5
|
+
"status": "done",
|
|
6
|
+
"summary": "Implemented a shallow health endpoint, added a route test, and documented the endpoint contract.",
|
|
7
|
+
"changed_files": [
|
|
8
|
+
"src/routes/health.py",
|
|
9
|
+
"tests/test_health.py",
|
|
10
|
+
"docs/api.md"
|
|
11
|
+
],
|
|
12
|
+
"commands_run": [
|
|
13
|
+
"pytest tests/test_health.py"
|
|
14
|
+
],
|
|
15
|
+
"evidence": [
|
|
16
|
+
"pytest tests/test_health.py -> passed",
|
|
17
|
+
"docs/api.md contains GET /healthz documentation",
|
|
18
|
+
"requirements.txt unchanged"
|
|
19
|
+
],
|
|
20
|
+
"discovered_facts": [
|
|
21
|
+
"The endpoint is intentionally shallow and does not touch dependencies."
|
|
22
|
+
],
|
|
23
|
+
"risk_flags": [],
|
|
24
|
+
"notes_for_verifier": "Check route response, docs wording, and dependency manifest."
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"milestone_id": "M1",
|
|
4
|
+
"concrete_task_id": "T1",
|
|
5
|
+
"objective": "Implement GET /healthz, add a focused route test, and document shallow liveness behavior.",
|
|
6
|
+
"inputs": [
|
|
7
|
+
"goal-contract.json",
|
|
8
|
+
"proposal.md",
|
|
9
|
+
"milestones/M1/task-list.json"
|
|
10
|
+
],
|
|
11
|
+
"expected_outputs": [
|
|
12
|
+
"A route handler returning HTTP 200 and status=ok.",
|
|
13
|
+
"A passing route test.",
|
|
14
|
+
"Documentation for endpoint path, response, and non-goals."
|
|
15
|
+
],
|
|
16
|
+
"allowed_files": [
|
|
17
|
+
"src/routes/health.py",
|
|
18
|
+
"tests/test_health.py",
|
|
19
|
+
"docs/api.md"
|
|
20
|
+
],
|
|
21
|
+
"forbidden_files": [
|
|
22
|
+
"deployment/**",
|
|
23
|
+
"requirements.txt"
|
|
24
|
+
],
|
|
25
|
+
"allowed_commands": [
|
|
26
|
+
"pytest tests/test_health.py"
|
|
27
|
+
],
|
|
28
|
+
"acceptance_checks": [
|
|
29
|
+
"pytest tests/test_health.py passes.",
|
|
30
|
+
"docs/api.md mentions GET /healthz and shallow liveness.",
|
|
31
|
+
"requirements.txt is unchanged."
|
|
32
|
+
],
|
|
33
|
+
"dependencies": [],
|
|
34
|
+
"risk": "medium",
|
|
35
|
+
"repair_attempts": 0,
|
|
36
|
+
"status": "passed"
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"milestone_id": "M1",
|
|
4
|
+
"concrete_task_id": "T1",
|
|
5
|
+
"decision": "pass",
|
|
6
|
+
"checks_run": [
|
|
7
|
+
"pytest tests/test_health.py",
|
|
8
|
+
"documentation review",
|
|
9
|
+
"dependency diff review"
|
|
10
|
+
],
|
|
11
|
+
"passed_checks": [
|
|
12
|
+
"Route test passed.",
|
|
13
|
+
"Documentation states GET /healthz response and shallow liveness scope.",
|
|
14
|
+
"No dependency manifest change."
|
|
15
|
+
],
|
|
16
|
+
"failed_checks": [],
|
|
17
|
+
"evidence_refs": [
|
|
18
|
+
"execution-report.json#evidence"
|
|
19
|
+
],
|
|
20
|
+
"minimal_repair_instructions": "",
|
|
21
|
+
"new_findings": [],
|
|
22
|
+
"should_trigger_direction_evaluation": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Proposal Summary
|
|
2
|
+
|
|
3
|
+
## What Will Be Done
|
|
4
|
+
|
|
5
|
+
Add `GET /healthz` as a shallow backend liveness endpoint, with a route test and documentation.
|
|
6
|
+
|
|
7
|
+
## What Will Not Be Done
|
|
8
|
+
|
|
9
|
+
No database, cache, queue, or external service readiness checks. No deployment or monitoring configuration changes.
|
|
10
|
+
|
|
11
|
+
## Why This Approach
|
|
12
|
+
|
|
13
|
+
A shallow liveness endpoint is deterministic, low-risk, and enough to satisfy the initial user request.
|
|
14
|
+
|
|
15
|
+
## Main Risks
|
|
16
|
+
|
|
17
|
+
The repo may already prefer a different health endpoint path. Documentation must prevent operators from assuming this is a deep readiness check.
|
|
18
|
+
|
|
19
|
+
## User Confirmation Needed
|
|
20
|
+
|
|
21
|
+
Confirm that a shallow `GET /healthz` endpoint is the intended first version.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Proposal
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Add a shallow backend liveness endpoint with tests and documentation.
|
|
6
|
+
|
|
7
|
+
## Recommended Approach
|
|
8
|
+
|
|
9
|
+
Implement `GET /healthz` using the existing route registration pattern. The endpoint returns HTTP 200 and a JSON body such as `{"status":"ok"}`. Add a focused route test and document that this is a shallow liveness check, not a dependency readiness check.
|
|
10
|
+
|
|
11
|
+
This keeps behavior deterministic and avoids coupling deploy health to external systems.
|
|
12
|
+
|
|
13
|
+
## Alternatives
|
|
14
|
+
|
|
15
|
+
- Deep readiness endpoint: useful later, but higher risk because dependency outages may affect rollout behavior.
|
|
16
|
+
- Framework middleware/plugin: unnecessary unless the repo already standardizes on one.
|
|
17
|
+
- Reuse an existing status endpoint: possible, but only if it already has the same semantics.
|
|
18
|
+
|
|
19
|
+
## Risks
|
|
20
|
+
|
|
21
|
+
- Existing route conventions may prefer `/health` over `/healthz`.
|
|
22
|
+
- Tests may need framework-specific fixtures.
|
|
23
|
+
- Operators may expect dependency checks; documentation must state the shallow scope.
|
|
24
|
+
|
|
25
|
+
## Verification
|
|
26
|
+
|
|
27
|
+
- Run the backend route test.
|
|
28
|
+
- Review docs for endpoint path, response shape, and non-goals.
|
|
29
|
+
- Confirm dependency files are unchanged.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"raw_user_request": "为一个后端项目增加健康检查接口,并确保它有测试和文档。",
|
|
4
|
+
"known_information": [
|
|
5
|
+
"The user wants a backend health check endpoint.",
|
|
6
|
+
"Tests and documentation are required outputs."
|
|
7
|
+
],
|
|
8
|
+
"missing_information": [
|
|
9
|
+
"Backend framework is not specified.",
|
|
10
|
+
"Exact endpoint path is not specified.",
|
|
11
|
+
"Health check depth is not specified."
|
|
12
|
+
],
|
|
13
|
+
"clarifying_questions": [
|
|
14
|
+
{
|
|
15
|
+
"question": "Should the endpoint be shallow liveness only, or include dependency checks?",
|
|
16
|
+
"why_it_matters": "Dependency checks can turn transient database or cache issues into deployment failures.",
|
|
17
|
+
"blocking": false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"question": "Is there an existing route convention for health endpoints?",
|
|
21
|
+
"why_it_matters": "Following local route naming prevents compatibility drift.",
|
|
22
|
+
"blocking": false
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"assumptions_if_user_does_not_answer": [
|
|
26
|
+
"Use GET /healthz as a shallow liveness endpoint.",
|
|
27
|
+
"Return HTTP 200 with a small JSON body.",
|
|
28
|
+
"Do not add database, cache, or third-party dependency probes in this first pass."
|
|
29
|
+
],
|
|
30
|
+
"can_continue_without_user_answer": true
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
为一个后端项目增加健康检查接口,并确保它有测试和文档。
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"overall_mechanical_result": "pass",
|
|
4
|
+
"reviewers": [
|
|
5
|
+
{
|
|
6
|
+
"reviewer": "product_reviewer",
|
|
7
|
+
"decision": "pass",
|
|
8
|
+
"confidence": 0.86
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"reviewer": "risk_reviewer",
|
|
12
|
+
"decision": "pass",
|
|
13
|
+
"confidence": 0.8
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"reviewer": "technical_reviewer",
|
|
17
|
+
"decision": "pass",
|
|
18
|
+
"confidence": 0.82
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"reviewer": "verification_reviewer",
|
|
22
|
+
"decision": "pass",
|
|
23
|
+
"confidence": 0.88
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"all_blocking_issues": [],
|
|
27
|
+
"all_suggested_changes": [
|
|
28
|
+
"Make the shallow versus deep health check boundary explicit in documentation.",
|
|
29
|
+
"Do not include database/cache checks without a separate readiness design.",
|
|
30
|
+
"Use existing route test utilities rather than adding a new testing dependency.",
|
|
31
|
+
"Record the exact test command in task-execution-report.json."
|
|
32
|
+
],
|
|
33
|
+
"all_missing_information": []
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"reviewer": "product_reviewer",
|
|
4
|
+
"decision": "pass",
|
|
5
|
+
"confidence": 0.86,
|
|
6
|
+
"summary": "The proposal addresses the user's request and keeps the initial scope clear.",
|
|
7
|
+
"blocking_issues": [],
|
|
8
|
+
"suggested_changes": [
|
|
9
|
+
"Make the shallow versus deep health check boundary explicit in documentation."
|
|
10
|
+
],
|
|
11
|
+
"missing_information": [],
|
|
12
|
+
"evidence_refs": [
|
|
13
|
+
"goal-contract.json#refined_goal",
|
|
14
|
+
"proposal.md#Recommended Approach"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"reviewer": "risk_reviewer",
|
|
4
|
+
"decision": "pass",
|
|
5
|
+
"confidence": 0.8,
|
|
6
|
+
"summary": "The shallow endpoint avoids coupling health to dependencies and has low operational risk.",
|
|
7
|
+
"blocking_issues": [],
|
|
8
|
+
"suggested_changes": [
|
|
9
|
+
"Do not include database/cache checks without a separate readiness design."
|
|
10
|
+
],
|
|
11
|
+
"missing_information": [],
|
|
12
|
+
"evidence_refs": [
|
|
13
|
+
"goal-contract.json#non_goals",
|
|
14
|
+
"proposal.md#Risks"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"reviewer": "technical_reviewer",
|
|
4
|
+
"decision": "pass",
|
|
5
|
+
"confidence": 0.82,
|
|
6
|
+
"summary": "The implementation path is small and should fit existing backend route patterns.",
|
|
7
|
+
"blocking_issues": [],
|
|
8
|
+
"suggested_changes": [
|
|
9
|
+
"Use existing route test utilities rather than adding a new testing dependency."
|
|
10
|
+
],
|
|
11
|
+
"missing_information": [],
|
|
12
|
+
"evidence_refs": [
|
|
13
|
+
"goal-contract.json#constraints",
|
|
14
|
+
"proposal.md#Alternatives"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"task_id": "sample-health-check",
|
|
3
|
+
"reviewer": "verification_reviewer",
|
|
4
|
+
"decision": "pass",
|
|
5
|
+
"confidence": 0.88,
|
|
6
|
+
"summary": "The acceptance criteria are observable through route tests and documentation review.",
|
|
7
|
+
"blocking_issues": [],
|
|
8
|
+
"suggested_changes": [
|
|
9
|
+
"Record the exact test command in task-execution-report.json."
|
|
10
|
+
],
|
|
11
|
+
"missing_information": [],
|
|
12
|
+
"evidence_refs": [
|
|
13
|
+
"goal-contract.json#acceptance_criteria"
|
|
14
|
+
]
|
|
15
|
+
}
|