@wnlen/agent-execution-template 0.8.14
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/LICENSE +21 -0
- package/README.md +440 -0
- package/README.zh-CN.md +447 -0
- package/bin/agent-execution-template.js +792 -0
- package/docs/SPEC.md +1039 -0
- package/docs/token-efficient-protocol-v0.1.md +101 -0
- package/package.json +35 -0
- package/template/en/ai/README.md +130 -0
- package/template/en/ai/project/archive/.gitkeep +0 -0
- package/template/en/ai/project/inbox/.gitkeep +1 -0
- package/template/en/ai/project/inbox/ideas/.gitkeep +1 -0
- package/template/en/ai/project/inbox/processed/.gitkeep +0 -0
- package/template/en/ai/project/inbox/raw/.gitkeep +1 -0
- package/template/en/ai/project/metrics.json +20 -0
- package/template/en/ai/project/project.md +42 -0
- package/template/en/ai/project/proposals/final-shape-updates/.gitkeep +1 -0
- package/template/en/ai/project/proposals/final-shape-updates/_template.md +64 -0
- package/template/en/ai/project/refs/architecture.md +23 -0
- package/template/en/ai/project/refs/commands.md +43 -0
- package/template/en/ai/project/refs/constraints.md +24 -0
- package/template/en/ai/project/refs/decisions.md +13 -0
- package/template/en/ai/project/refs/final-shape.md +59 -0
- package/template/en/ai/project/refs/module-map.md +31 -0
- package/template/en/ai/project/refs/roadmap.md +31 -0
- package/template/en/ai/project/result.json +34 -0
- package/template/en/ai/project/result.md +32 -0
- package/template/en/ai/project/runtime.md +74 -0
- package/template/en/ai/project/task.md +110 -0
- package/template/en/ai/template/LANG +1 -0
- package/template/en/ai/template/VERSION +1 -0
- package/template/en/ai/template/bootstrap.md +194 -0
- package/template/en/ai/template/prompt.md +118 -0
- package/template/en/ai/template/protocol.md +332 -0
- package/template/en/ai/template/reconcile.md +140 -0
- package/template/en/ai/template/rules/core.md +197 -0
- package/template/en/ai/template/rules/output.md +51 -0
- package/template/en/ai/template/schemas/metrics.schema.json +119 -0
- package/template/en/ai/template/schemas/result.schema.json +234 -0
- package/template/zh/ai/README.md +129 -0
- package/template/zh/ai/project/archive/.gitkeep +0 -0
- package/template/zh/ai/project/inbox/.gitkeep +1 -0
- package/template/zh/ai/project/inbox/ideas/.gitkeep +1 -0
- package/template/zh/ai/project/inbox/processed/.gitkeep +0 -0
- package/template/zh/ai/project/inbox/raw/.gitkeep +1 -0
- package/template/zh/ai/project/metrics.json +20 -0
- package/template/zh/ai/project/project.md +42 -0
- package/template/zh/ai/project/proposals/final-shape-updates/.gitkeep +1 -0
- package/template/zh/ai/project/proposals/final-shape-updates/_template.md +64 -0
- package/template/zh/ai/project/refs/architecture.md +23 -0
- package/template/zh/ai/project/refs/commands.md +43 -0
- package/template/zh/ai/project/refs/constraints.md +24 -0
- package/template/zh/ai/project/refs/decisions.md +13 -0
- package/template/zh/ai/project/refs/final-shape.md +54 -0
- package/template/zh/ai/project/refs/module-map.md +30 -0
- package/template/zh/ai/project/refs/roadmap.md +29 -0
- package/template/zh/ai/project/result.json +34 -0
- package/template/zh/ai/project/result.md +32 -0
- package/template/zh/ai/project/runtime.md +74 -0
- package/template/zh/ai/project/task.md +106 -0
- package/template/zh/ai/template/LANG +1 -0
- package/template/zh/ai/template/VERSION +1 -0
- package/template/zh/ai/template/bootstrap.md +180 -0
- package/template/zh/ai/template/prompt.md +104 -0
- package/template/zh/ai/template/protocol.md +300 -0
- package/template/zh/ai/template/reconcile.md +134 -0
- package/template/zh/ai/template/rules/core.md +174 -0
- package/template/zh/ai/template/rules/output.md +51 -0
- package/template/zh/ai/template/schemas/metrics.schema.json +119 -0
- package/template/zh/ai/template/schemas/result.schema.json +234 -0
- package/test/selftest.js +280 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Token 高效 AI 执行协议 v0.1
|
|
2
|
+
|
|
3
|
+
这个 profile 建立在 Agent Execution Template 文件协议 v0.8 之上。
|
|
4
|
+
目标不是孤立地最小化 token 使用量,而是在减少人类交互频率和输入量的同时,
|
|
5
|
+
用单位模型成本产出更多可接受的工作。
|
|
6
|
+
|
|
7
|
+
## 核心原则
|
|
8
|
+
|
|
9
|
+
默认使用低成本执行。只在关键判断点升级。
|
|
10
|
+
|
|
11
|
+
## 模型角色
|
|
12
|
+
|
|
13
|
+
- 强模型:规划、需求判断、架构复核、失败复盘、验收争议。
|
|
14
|
+
- 低成本模型:有边界的读取、小改动、草稿、重复检查、机械清理。
|
|
15
|
+
|
|
16
|
+
## 模型分工协议
|
|
17
|
+
|
|
18
|
+
模型分工在每个任务的 `ai/project/task.md.model_policy` 中声明。
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
model_policy:
|
|
22
|
+
default_tier: "cheap"
|
|
23
|
+
allowed_tiers:
|
|
24
|
+
- cheap
|
|
25
|
+
- standard
|
|
26
|
+
- strong
|
|
27
|
+
escalation_allowed: true
|
|
28
|
+
escalation_triggers:
|
|
29
|
+
- ambiguous_goal
|
|
30
|
+
- ambiguous_acceptance
|
|
31
|
+
- high_risk_change
|
|
32
|
+
- architecture_boundary
|
|
33
|
+
- repeated_failure
|
|
34
|
+
- verification_dispute
|
|
35
|
+
strong_model_roles:
|
|
36
|
+
- planning
|
|
37
|
+
- risk_judgment
|
|
38
|
+
- architecture_review
|
|
39
|
+
- failure_review
|
|
40
|
+
- acceptance_judgment
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
协议定义的是档位,不是某个供应商的具体模型名。
|
|
44
|
+
|
|
45
|
+
- `cheap`:文件读取、上下文清理、任务起草、小改动、检查、结果写入。
|
|
46
|
+
- `standard`:中等实现工作或跨模块编辑。
|
|
47
|
+
- `strong`:规划、风险判断、架构复核、失败复盘、验收判断。
|
|
48
|
+
|
|
49
|
+
如果需要升级但宿主无法切换模型,Agent 应停止,或将任务标记为
|
|
50
|
+
`partial` / `blocked`,并记录所需的强模型角色。
|
|
51
|
+
|
|
52
|
+
模型策略执行情况记录在 `ai/project/metrics.json`。
|
|
53
|
+
|
|
54
|
+
## 执行形态
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
项目引导 -> 项目确认 -> 任务草稿 -> 任务确认 -> 计划 -> 执行 -> 复核 -> 结果
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
在基础循环被真实项目证明可靠之前,不要增加动态 DAG、多 Agent 通信或模型矩阵。
|
|
61
|
+
|
|
62
|
+
## 必需记录
|
|
63
|
+
|
|
64
|
+
- `ai/template/`:可复用执行协议。
|
|
65
|
+
- `ai/project/task.md`:目标、范围、权限、风险和验收标准。
|
|
66
|
+
- `ai/project/runtime.md`:每次运行都会读取的紧凑稳定上下文。
|
|
67
|
+
- `ai/project/result.json`:机器可读事实、验证、假设和下一步。
|
|
68
|
+
- `ai/project/result.md`:人类可读摘要。
|
|
69
|
+
- `ai/project/metrics.json`:模型档位、token 估算、耗时、成功状态、人工修复和复用潜力。
|
|
70
|
+
|
|
71
|
+
## 升级触发条件
|
|
72
|
+
|
|
73
|
+
在以下情况升级到更强模型:
|
|
74
|
+
|
|
75
|
+
- 目标或验收标准含糊。
|
|
76
|
+
- 任务触及高风险区域。
|
|
77
|
+
- 需要架构或公共契约判断。
|
|
78
|
+
- 执行器反复失败。
|
|
79
|
+
- 验证结果存在争议,或无法自信解释。
|
|
80
|
+
|
|
81
|
+
在 `ai/project/metrics.json` 中记录升级。
|
|
82
|
+
|
|
83
|
+
## 最少人类输入规则
|
|
84
|
+
|
|
85
|
+
人类通常只需要确认生成的项目上下文和任务契约。
|
|
86
|
+
Agent 应从现有文档、清单、有限代码读取、项目上下文、历史结果和引用中起草
|
|
87
|
+
`ai/project/project.md`、refs 和 `ai/project/task.md`。
|
|
88
|
+
|
|
89
|
+
- 最多问 3 个澄清问题。
|
|
90
|
+
- 只在答案会改变范围、风险、权限或验收时提问。
|
|
91
|
+
- 优先使用显式假设,而不是低价值来回确认。
|
|
92
|
+
- 将重复假设转成 `ai/project/runtime.md` 更新建议。
|
|
93
|
+
- 将重复成功模式转成未来任务模板或技能。
|
|
94
|
+
|
|
95
|
+
## 五条操作规则
|
|
96
|
+
|
|
97
|
+
1. 强模型是顾问,不是默认执行器。
|
|
98
|
+
2. 低成本模型处理边界清楚、验收明确的小任务。
|
|
99
|
+
3. 任务应足够原子,能够独立执行、验证和重跑。
|
|
100
|
+
4. 每次运行都必须留下可审计的任务、输入、输出、失败、成本和验证记录。
|
|
101
|
+
5. 每次运行都应为未来的技能、规则、模板或评估创造原材料。
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wnlen/agent-execution-template",
|
|
3
|
+
"version": "0.8.14",
|
|
4
|
+
"description": "Low-friction AI execution protocol template for coding agents.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"agent-execution-template": "bin/agent-execution-template.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin",
|
|
10
|
+
"docs",
|
|
11
|
+
"template",
|
|
12
|
+
"test",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"doctor": "node bin/agent-execution-template.js doctor",
|
|
17
|
+
"test": "node test/selftest.js"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"ai",
|
|
21
|
+
"coding-agent",
|
|
22
|
+
"codex",
|
|
23
|
+
"claude-code",
|
|
24
|
+
"template"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/wnlen/agent-execution-template.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/wnlen/agent-execution-template/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/wnlen/agent-execution-template#readme",
|
|
34
|
+
"license": "MIT"
|
|
35
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# ai/ Execution Layer
|
|
2
|
+
|
|
3
|
+
Copy this folder into a target software project.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
template is protocol
|
|
7
|
+
project is the field workspace
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Files
|
|
11
|
+
|
|
12
|
+
- `template/prompt.md`: AI startup prompt.
|
|
13
|
+
- `template/bootstrap.md`: project discovery and context bootstrap prompt.
|
|
14
|
+
- `template/reconcile.md`: merge new authoritative material into existing project context.
|
|
15
|
+
- `template/VERSION`: installed template version.
|
|
16
|
+
- `template/protocol.md`: bootstrap flow, execution flow, model division, sync rules.
|
|
17
|
+
- `template/rules/core.md`: bootstrap scope, readiness, risk, refs, permissions, runtime governance.
|
|
18
|
+
- `template/rules/output.md`: result and metrics output rules.
|
|
19
|
+
- `template/schemas/`: optional result and metrics validation.
|
|
20
|
+
- `project/project.md`: stable project identity.
|
|
21
|
+
- `project/runtime.md`: current execution context.
|
|
22
|
+
- `project/task.md`: current task contract.
|
|
23
|
+
- `project/result.json`: latest authoritative execution result.
|
|
24
|
+
- `project/result.md`: latest human-readable execution summary.
|
|
25
|
+
- `project/metrics.json`: latest model, token, time, success, and reuse signals.
|
|
26
|
+
- `project/refs/final-shape.md`: project North Star / final shape.
|
|
27
|
+
- `project/refs/module-map.md`: current module map.
|
|
28
|
+
- `project/refs/roadmap.md`: staged roadmap.
|
|
29
|
+
- `project/refs/`: detailed references loaded only when needed.
|
|
30
|
+
- `project/inbox/ideas/`: product, business, architecture, or direction ideas waiting for evaluation.
|
|
31
|
+
- `project/inbox/processed/`: new material already absorbed into context, kept for traceability.
|
|
32
|
+
- `project/inbox/raw/`: raw long-form inputs, interviews, notes, or fragments.
|
|
33
|
+
- `project/inbox/`: new material waiting to be absorbed, such as authoritative business docs.
|
|
34
|
+
- `project/proposals/final-shape-updates/`: North Star and roadmap amendment proposals.
|
|
35
|
+
- `project/proposals/final-shape-updates/_template.md`: direction amendment proposal template.
|
|
36
|
+
- `project/archive/`: historical tasks/results, not read by default.
|
|
37
|
+
|
|
38
|
+
## Normal Use
|
|
39
|
+
|
|
40
|
+
When first connecting a project, tell the AI tool:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
Start initializing this project
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Common entries later:
|
|
47
|
+
|
|
48
|
+
- Continue work: `Continue this project`
|
|
49
|
+
- Absorb new material: put it in `project/inbox/`, then say `Reconcile the new material in ai/project/inbox/`
|
|
50
|
+
- Resummarize and improve project context: run `npx -y @wnlen/agent-execution-template refresh`
|
|
51
|
+
- Evaluate a new direction or idea: put it in `project/inbox/ideas/`, then say `Generate a direction amendment proposal from ai/project/inbox/ideas/`
|
|
52
|
+
- Recover the next step: run `npx -y @wnlen/agent-execution-template next`
|
|
53
|
+
|
|
54
|
+
Rule of thumb:
|
|
55
|
+
|
|
56
|
+
- Material = confirmed facts, docs, workflows, APIs, or business rules.
|
|
57
|
+
- Direction = undecided ideas, product strategy, architecture changes, or roadmap changes.
|
|
58
|
+
|
|
59
|
+
Review `project/result.json`, `project/result.md`, and `project/metrics.json` after execution.
|
|
60
|
+
Archive old task/result files if needed.
|
|
61
|
+
|
|
62
|
+
## Context Reconcile
|
|
63
|
+
|
|
64
|
+
When more complete or more authoritative material appears, put it in:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
ai/project/inbox/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then ask the AI tool:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Reconcile the new material in ai/project/inbox/
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The workflow produces a reconciliation plan first and updates `project.md`,
|
|
77
|
+
`runtime.md`, and `refs/*` only after confirmation. After reconciliation,
|
|
78
|
+
processed material is moved to `ai/project/inbox/processed/`.
|
|
79
|
+
|
|
80
|
+
## Direction Amendments
|
|
81
|
+
|
|
82
|
+
The North Star, module map, and roadmap belong to the project direction layer:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
ai/project/refs/final-shape.md
|
|
86
|
+
ai/project/refs/module-map.md
|
|
87
|
+
ai/project/refs/roadmap.md
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Routine execution tasks must not edit these files directly. Put new ideas in:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
ai/project/inbox/ideas/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Then have the AI produce a `strategy_update` proposal. After human
|
|
97
|
+
confirmation, use `apply_strategy_update` to merge it into the official
|
|
98
|
+
direction documents.
|
|
99
|
+
|
|
100
|
+
## Sync Rules
|
|
101
|
+
|
|
102
|
+
From the template repo into a real project:
|
|
103
|
+
|
|
104
|
+
- Overwrite only `ai/template/**`.
|
|
105
|
+
- Never overwrite `ai/project/**`.
|
|
106
|
+
|
|
107
|
+
From a real project back into the template repo:
|
|
108
|
+
|
|
109
|
+
- Return only `ai/template/**`.
|
|
110
|
+
- Never return `ai/project/**`.
|
|
111
|
+
|
|
112
|
+
## Bootstrap Rule
|
|
113
|
+
|
|
114
|
+
- The human provides intent, hard constraints, and final acceptance.
|
|
115
|
+
- The agent drafts `project/project.md` and relevant `project/refs/*` from existing docs, manifests, refs, and project files.
|
|
116
|
+
- The agent drafts `project/task.md` after the human provides the current task goal.
|
|
117
|
+
- The human reviews and confirms project and task drafts before execution.
|
|
118
|
+
- Bootstrap may write only project context files, plus `project/task.md` when a current task is provided.
|
|
119
|
+
- Bootstrap must not edit source code, tests, configuration, dependency files, generated files, runtime files, result files, or metrics files.
|
|
120
|
+
- Ask at most 3 clarification questions.
|
|
121
|
+
- Ask only when the answer changes scope, risk, permission, or acceptance.
|
|
122
|
+
- Repeated assumptions should become `project/runtime.md` update proposals.
|
|
123
|
+
|
|
124
|
+
## Model Division Protocol
|
|
125
|
+
|
|
126
|
+
- Model policy lives in `project/task.md.model_policy`.
|
|
127
|
+
- Use `cheap` by default for routine execution.
|
|
128
|
+
- Use `standard` for moderate implementation complexity.
|
|
129
|
+
- Use `strong` only for planning, risk judgment, architecture review, failure review, or acceptance judgment.
|
|
130
|
+
- Record actual tier, trigger, role, and escalation reason in `project/metrics.json`.
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocol_version": "0.8",
|
|
3
|
+
"task_id": "",
|
|
4
|
+
"task_type": "",
|
|
5
|
+
"model": "",
|
|
6
|
+
"model_tier": "cheap",
|
|
7
|
+
"escalated": false,
|
|
8
|
+
"escalation_reason": "",
|
|
9
|
+
"model_policy_followed": true,
|
|
10
|
+
"escalation_trigger_hit": "",
|
|
11
|
+
"strong_model_role": "",
|
|
12
|
+
"input_tokens_estimated": 0,
|
|
13
|
+
"output_tokens_estimated": 0,
|
|
14
|
+
"duration_minutes": 0,
|
|
15
|
+
"success": false,
|
|
16
|
+
"human_fix_required": false,
|
|
17
|
+
"failure_reason": "",
|
|
18
|
+
"reuse_potential": "low",
|
|
19
|
+
"notes": []
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Project
|
|
2
|
+
|
|
3
|
+
This file is the stable project identity used by Agent Execution Template.
|
|
4
|
+
Prefer generating it in Bootstrap Mode from existing repository docs and
|
|
5
|
+
manifests, then have a human review it. Mark unknown facts as `Unknown`.
|
|
6
|
+
|
|
7
|
+
## Identity
|
|
8
|
+
|
|
9
|
+
- Name:
|
|
10
|
+
- Purpose:
|
|
11
|
+
- Primary users:
|
|
12
|
+
|
|
13
|
+
## Technology
|
|
14
|
+
|
|
15
|
+
- Language:
|
|
16
|
+
- Framework:
|
|
17
|
+
- Package manager:
|
|
18
|
+
- Test runner:
|
|
19
|
+
|
|
20
|
+
## Structure
|
|
21
|
+
|
|
22
|
+
- Source:
|
|
23
|
+
- Tests:
|
|
24
|
+
- Configuration:
|
|
25
|
+
- Documentation:
|
|
26
|
+
- Direction docs: `ai/project/refs/final-shape.md`, `module-map.md`, `roadmap.md`
|
|
27
|
+
|
|
28
|
+
## Stable Constraints
|
|
29
|
+
|
|
30
|
+
-
|
|
31
|
+
|
|
32
|
+
## Unknowns
|
|
33
|
+
|
|
34
|
+
-
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
Keep this file for stable project identity and long-lived conventions.
|
|
39
|
+
Use `ai/project/refs/final-shape.md` for project direction and final shape.
|
|
40
|
+
Use `ai/project/refs/module-map.md` for current module structure.
|
|
41
|
+
Use `ai/project/refs/roadmap.md` for staged direction.
|
|
42
|
+
Use `ai/project/runtime.md` for current execution context.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
proposal_id: ""
|
|
3
|
+
status: "proposed"
|
|
4
|
+
created_at: ""
|
|
5
|
+
confirmed_by: ""
|
|
6
|
+
applied_at: ""
|
|
7
|
+
source_ideas: []
|
|
8
|
+
target_files:
|
|
9
|
+
- ai/project/refs/final-shape.md
|
|
10
|
+
- ai/project/refs/module-map.md
|
|
11
|
+
- ai/project/refs/roadmap.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Direction Amendment Proposal
|
|
15
|
+
|
|
16
|
+
Status rules:
|
|
17
|
+
|
|
18
|
+
- `proposed`: generated by the agent and waiting for human review.
|
|
19
|
+
- `accepted`: explicitly confirmed by the human and ready for apply.
|
|
20
|
+
- `rejected`: explicitly rejected by the human and retained for traceability.
|
|
21
|
+
- `applied`: merged by `apply_strategy_update`, with `applied_at` filled.
|
|
22
|
+
|
|
23
|
+
## 1. Summary of the New Idea
|
|
24
|
+
|
|
25
|
+
-
|
|
26
|
+
|
|
27
|
+
## 2. Alignment With Current final-shape
|
|
28
|
+
|
|
29
|
+
-
|
|
30
|
+
|
|
31
|
+
## 3. Conflicts
|
|
32
|
+
|
|
33
|
+
-
|
|
34
|
+
|
|
35
|
+
## 4. Parts to Absorb
|
|
36
|
+
|
|
37
|
+
-
|
|
38
|
+
|
|
39
|
+
## 5. Parts to Reject
|
|
40
|
+
|
|
41
|
+
-
|
|
42
|
+
|
|
43
|
+
## 6. Impact on the Module Map
|
|
44
|
+
|
|
45
|
+
-
|
|
46
|
+
|
|
47
|
+
## 7. Impact on the Roadmap
|
|
48
|
+
|
|
49
|
+
-
|
|
50
|
+
|
|
51
|
+
## 8. Suggested Diff
|
|
52
|
+
|
|
53
|
+
```diff
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 9. Risks
|
|
58
|
+
|
|
59
|
+
-
|
|
60
|
+
|
|
61
|
+
## 10. Merge Recommendation
|
|
62
|
+
|
|
63
|
+
- Recommendation:
|
|
64
|
+
- Reason:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## System Overview
|
|
4
|
+
|
|
5
|
+
Describe the target project's system shape only when needed.
|
|
6
|
+
|
|
7
|
+
## Main Modules
|
|
8
|
+
|
|
9
|
+
- Module:
|
|
10
|
+
- Responsibility:
|
|
11
|
+
- Boundaries:
|
|
12
|
+
|
|
13
|
+
## Data Flow
|
|
14
|
+
|
|
15
|
+
Describe important data flow.
|
|
16
|
+
|
|
17
|
+
## API Flow
|
|
18
|
+
|
|
19
|
+
Describe important API flow.
|
|
20
|
+
|
|
21
|
+
## Deployment Shape
|
|
22
|
+
|
|
23
|
+
Describe deployment shape only if it affects coding tasks.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Commands
|
|
2
|
+
|
|
3
|
+
Commands are permissioned by category.
|
|
4
|
+
AI may run only commands allowed by `ai/project/task.md` and this file.
|
|
5
|
+
|
|
6
|
+
## Safe Verify Commands
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
# Add project-specific safe commands here
|
|
10
|
+
# examples:
|
|
11
|
+
# npm run lint
|
|
12
|
+
# npm run build
|
|
13
|
+
# mvn test
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Local Run Commands
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Add local startup commands here
|
|
20
|
+
# examples:
|
|
21
|
+
# npm run dev
|
|
22
|
+
# mvn spring-boot:run
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Dangerous Commands
|
|
26
|
+
|
|
27
|
+
These require explicit task-level authorization:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# database migration
|
|
31
|
+
# deployment
|
|
32
|
+
# branch reset
|
|
33
|
+
# file deletion
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Forbidden Unless Explicitly Allowed
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# production deploy
|
|
40
|
+
# production data migration
|
|
41
|
+
# destructive cleanup
|
|
42
|
+
# commands that expose secrets
|
|
43
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Constraints
|
|
2
|
+
|
|
3
|
+
## Data
|
|
4
|
+
|
|
5
|
+
- Preserve data consistency.
|
|
6
|
+
- Do not introduce migrations unless explicitly authorized.
|
|
7
|
+
|
|
8
|
+
## Security
|
|
9
|
+
|
|
10
|
+
- Do not weaken authentication, authorization, validation, or secrets handling.
|
|
11
|
+
- Do not log sensitive data.
|
|
12
|
+
|
|
13
|
+
## Compatibility
|
|
14
|
+
|
|
15
|
+
- Preserve public API compatibility unless explicitly authorized.
|
|
16
|
+
|
|
17
|
+
## Performance
|
|
18
|
+
|
|
19
|
+
- Avoid broad refactors without benchmark or clear acceptance criteria.
|
|
20
|
+
|
|
21
|
+
## Deployment / Rollback
|
|
22
|
+
|
|
23
|
+
- Do not deploy unless explicitly authorized.
|
|
24
|
+
- Prefer reversible changes.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Project North Star
|
|
2
|
+
|
|
3
|
+
This file is the project's constitution layer, also called the Product
|
|
4
|
+
Constitution / Final Shape Spec. It stores the project's intended final shape
|
|
5
|
+
and judgment criteria. It should be stable, but it can be revised through an
|
|
6
|
+
explicit process.
|
|
7
|
+
|
|
8
|
+
Routine execution tasks must not edit this file directly. New ideas should go
|
|
9
|
+
to `ai/project/inbox/ideas/`, then a `strategy_update` task should produce a
|
|
10
|
+
proposal. Only after human confirmation should an `apply_strategy_update` task
|
|
11
|
+
merge it.
|
|
12
|
+
|
|
13
|
+
## One-Line Positioning
|
|
14
|
+
|
|
15
|
+
-
|
|
16
|
+
|
|
17
|
+
## Essential Problem
|
|
18
|
+
|
|
19
|
+
-
|
|
20
|
+
|
|
21
|
+
## Target Users
|
|
22
|
+
|
|
23
|
+
-
|
|
24
|
+
|
|
25
|
+
## Core Pain Points
|
|
26
|
+
|
|
27
|
+
-
|
|
28
|
+
|
|
29
|
+
## Final Product Shape
|
|
30
|
+
|
|
31
|
+
-
|
|
32
|
+
|
|
33
|
+
## Not Now
|
|
34
|
+
|
|
35
|
+
-
|
|
36
|
+
|
|
37
|
+
## Core Module Boundaries
|
|
38
|
+
|
|
39
|
+
-
|
|
40
|
+
|
|
41
|
+
## Long-Term Moat
|
|
42
|
+
|
|
43
|
+
-
|
|
44
|
+
|
|
45
|
+
## Task Worthiness Criteria
|
|
46
|
+
|
|
47
|
+
-
|
|
48
|
+
|
|
49
|
+
## Drift Criteria
|
|
50
|
+
|
|
51
|
+
-
|
|
52
|
+
|
|
53
|
+
## Amendment Rules
|
|
54
|
+
|
|
55
|
+
- Ideas must not directly modify this file.
|
|
56
|
+
- Agents must not casually edit this file during routine execution.
|
|
57
|
+
- Changes must go through `proposal -> review -> human confirm -> update`.
|
|
58
|
+
- Confirmed changes should also evaluate `module-map.md`, `roadmap.md`,
|
|
59
|
+
`decisions.md`, and `constraints.md`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Module Map
|
|
2
|
+
|
|
3
|
+
This file describes the current module structure, boundaries, and dependency
|
|
4
|
+
direction. It answers "what shape does the system currently have" and does not
|
|
5
|
+
replace the directional judgment in `final-shape.md`.
|
|
6
|
+
|
|
7
|
+
## Module Overview
|
|
8
|
+
|
|
9
|
+
| Module | Responsibility | Input | Output | Owner/Boundary |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| | | | | |
|
|
12
|
+
|
|
13
|
+
## Dependency Direction
|
|
14
|
+
|
|
15
|
+
-
|
|
16
|
+
|
|
17
|
+
## Stable Boundaries
|
|
18
|
+
|
|
19
|
+
-
|
|
20
|
+
|
|
21
|
+
## Ambiguous Boundaries
|
|
22
|
+
|
|
23
|
+
-
|
|
24
|
+
|
|
25
|
+
## Areas to Split or Merge
|
|
26
|
+
|
|
27
|
+
-
|
|
28
|
+
|
|
29
|
+
## Relationship to North Star
|
|
30
|
+
|
|
31
|
+
-
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
This file describes staged direction. It answers "where should the project grow
|
|
4
|
+
next" and does not replace `task.md` as the current work order.
|
|
5
|
+
|
|
6
|
+
## Current Stage
|
|
7
|
+
|
|
8
|
+
- Stage name:
|
|
9
|
+
- Stage goal:
|
|
10
|
+
- Success signal:
|
|
11
|
+
|
|
12
|
+
## Near-Term Roadmap
|
|
13
|
+
|
|
14
|
+
| Stage | Goal | Key Deliverables | Not Doing | Exit Criteria |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| | | | | |
|
|
17
|
+
|
|
18
|
+
## Completed Stages
|
|
19
|
+
|
|
20
|
+
-
|
|
21
|
+
|
|
22
|
+
## Deferred
|
|
23
|
+
|
|
24
|
+
-
|
|
25
|
+
|
|
26
|
+
## Roadmap Amendment Rules
|
|
27
|
+
|
|
28
|
+
- Routine execution tasks may propose roadmap updates, but must not directly
|
|
29
|
+
edit this file.
|
|
30
|
+
- Changes involving project direction, module boundaries, or stage goals must
|
|
31
|
+
go through a `strategy_update` proposal.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocol_version": "0.8",
|
|
3
|
+
"status": "blocked",
|
|
4
|
+
"task_id": "",
|
|
5
|
+
"task_summary": "No task has been executed yet.",
|
|
6
|
+
"scope_followed": true,
|
|
7
|
+
"files_read": [],
|
|
8
|
+
"refs_read": [],
|
|
9
|
+
"files_changed": [],
|
|
10
|
+
"commands_run": [],
|
|
11
|
+
"verification": {
|
|
12
|
+
"level": "none",
|
|
13
|
+
"passed": false,
|
|
14
|
+
"evidence": []
|
|
15
|
+
},
|
|
16
|
+
"evidence": {
|
|
17
|
+
"git_diff_summary": "",
|
|
18
|
+
"changed_files_from_git": [],
|
|
19
|
+
"command_outputs": [],
|
|
20
|
+
"unverified_claims": []
|
|
21
|
+
},
|
|
22
|
+
"assumptions": [],
|
|
23
|
+
"issues": [
|
|
24
|
+
"No current task executed."
|
|
25
|
+
],
|
|
26
|
+
"next": [
|
|
27
|
+
"Ask the agent to read ai/template/bootstrap.md, confirm project context, then draft and confirm ai/project/task.md before running ai/template/prompt.md."
|
|
28
|
+
],
|
|
29
|
+
"runtime_update": {
|
|
30
|
+
"required": false,
|
|
31
|
+
"changes": [],
|
|
32
|
+
"reason": ""
|
|
33
|
+
}
|
|
34
|
+
}
|