@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,32 @@
|
|
|
1
|
+
# Result
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
blocked
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
|
|
9
|
+
No task has been executed yet.
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- None
|
|
14
|
+
|
|
15
|
+
## Verified
|
|
16
|
+
|
|
17
|
+
- Not verified
|
|
18
|
+
|
|
19
|
+
## Metrics
|
|
20
|
+
|
|
21
|
+
- Model: not recorded
|
|
22
|
+
- Duration: 0 minutes
|
|
23
|
+
- Success: false
|
|
24
|
+
- Human fix required: false
|
|
25
|
+
|
|
26
|
+
## Issues
|
|
27
|
+
|
|
28
|
+
- No current task executed.
|
|
29
|
+
|
|
30
|
+
## Next
|
|
31
|
+
|
|
32
|
+
- Read `ai/template/bootstrap.md`, confirm project context, then draft and confirm `ai/project/task.md` before running `ai/template/prompt.md`.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Runtime
|
|
2
|
+
|
|
3
|
+
## Current State
|
|
4
|
+
|
|
5
|
+
- Phase: Direction-layer and execution-layer consistency pass
|
|
6
|
+
- Focus: Keep the file protocol installable, upgradeable, and auditable while keeping project-direction governance aligned with task execution constraints.
|
|
7
|
+
- Blocker: None
|
|
8
|
+
- Known Risks:
|
|
9
|
+
- Over-expanding scope beyond the current task
|
|
10
|
+
- Asking humans for details the agent can infer safely
|
|
11
|
+
- Polluting runtime context with historical process notes
|
|
12
|
+
- Marking success without verification evidence
|
|
13
|
+
- Running commands outside explicit permission
|
|
14
|
+
- Optimizing for token savings instead of acceptable output per cost
|
|
15
|
+
- Direction-layer capabilities advancing while rules, runtime, or doctor checks stay on older semantics
|
|
16
|
+
|
|
17
|
+
## Hard Rules
|
|
18
|
+
|
|
19
|
+
- Current task first.
|
|
20
|
+
- Do not expand scope.
|
|
21
|
+
- Do not rewrite unrelated files.
|
|
22
|
+
- Do not repeat known background.
|
|
23
|
+
- Do not output tutorials.
|
|
24
|
+
- Do not treat guesses as facts.
|
|
25
|
+
- Read relevant files before making assumptions.
|
|
26
|
+
- Prefer minimal safe changes.
|
|
27
|
+
- Verify after changes when possible.
|
|
28
|
+
- Keep final output short.
|
|
29
|
+
- Minimize human interaction; ask only for scope, risk, permission, or acceptance blockers.
|
|
30
|
+
- Ask at most 3 clarification questions before execution.
|
|
31
|
+
- Do not edit `ai/project/runtime.md` unless explicitly allowed by `ai/project/task.md`.
|
|
32
|
+
- If `status = "success"`, `verification.passed` must be `true`.
|
|
33
|
+
- If verification requires manual checking, use `status = "partial"` unless manual verification has been completed.
|
|
34
|
+
- Default to cheap execution and escalate only for planning, judgment, repeated failure, or acceptance disputes.
|
|
35
|
+
- Follow `ai/project/task.md.model_policy`; default cheap, escalate for judgment, record why.
|
|
36
|
+
|
|
37
|
+
## Project Constraints
|
|
38
|
+
|
|
39
|
+
- Bootstrap read set starts from `ai/template/bootstrap.md`, `ai/template/protocol.md`, `ai/template/rules/core.md`, root docs, manifests, docs, refs, and bounded source-structure inspection when docs are insufficient.
|
|
40
|
+
- Execution read set is `ai/template/prompt.md`, `ai/template/protocol.md`, `ai/template/rules/core.md`, `ai/project/project.md`, `ai/project/runtime.md`, and `ai/project/task.md`.
|
|
41
|
+
- `ai/project/refs/` files are loaded only when required by task or triggered by task type.
|
|
42
|
+
- `ai/project/refs/final-shape.md`, `module-map.md`, and `roadmap.md` are official direction-layer documents.
|
|
43
|
+
- Official direction-layer documents must not be modified by routine reconcile flows or routine execution tasks.
|
|
44
|
+
- Direction changes must go through a `strategy_update` proposal and `apply_strategy_update`.
|
|
45
|
+
- `ai/project/archive/` is never read by default.
|
|
46
|
+
- `ai/project/result.json` is the only authoritative latest result.
|
|
47
|
+
- `ai/project/result.md` is the latest human-readable summary.
|
|
48
|
+
- `ai/project/metrics.json` is the latest token-efficiency and reuse record.
|
|
49
|
+
- Model tier decisions are governed by `ai/project/task.md.model_policy`, not by ad hoc chat preference.
|
|
50
|
+
- `ai/project/runtime.md` stores stable, currently valid context only.
|
|
51
|
+
- Historical tasks and results belong in `ai/project/archive/`.
|
|
52
|
+
|
|
53
|
+
## Active Context
|
|
54
|
+
|
|
55
|
+
This project is a protocol/template, not a complex agent framework.
|
|
56
|
+
The current product position is: project-direction governance plus auditable task execution for AI Coding Agents.
|
|
57
|
+
The current product goal is to reduce human interaction frequency and input size while making tasks more precise over time and reducing long-term direction drift.
|
|
58
|
+
Small CLI additions that improve protocol adoption and governance closure are allowed; do not introduce UI, cloud sync, or multi-agent orchestration.
|
|
59
|
+
|
|
60
|
+
## Ref Routing
|
|
61
|
+
|
|
62
|
+
- Final shape / North Star / task-worthiness -> `ai/project/refs/final-shape.md`
|
|
63
|
+
- Current module structure / boundaries / dependency direction -> `ai/project/refs/module-map.md`
|
|
64
|
+
- Stage goals / near-term roadmap / deferred work -> `ai/project/refs/roadmap.md`
|
|
65
|
+
- Architecture / API / module boundary -> `ai/project/refs/architecture.md`
|
|
66
|
+
- Historical decision -> `ai/project/refs/decisions.md`
|
|
67
|
+
- Security / compatibility / performance / data / deployment -> `ai/project/refs/constraints.md`
|
|
68
|
+
- Build / test / deploy command -> `ai/project/refs/commands.md`
|
|
69
|
+
|
|
70
|
+
## Runtime Update Governance
|
|
71
|
+
|
|
72
|
+
AI must not directly update this file unless `ai/project/task.md` explicitly permits it.
|
|
73
|
+
If a task produces long-term valid context, write a proposal to `ai/project/result.json.runtime_update`.
|
|
74
|
+
Apply runtime updates through a separate task whose only allowed target is `ai/project/runtime.md`.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
task_id: ""
|
|
3
|
+
type: "bugfix | feature | refactor | docs | config | test | research | strategy_update | apply_strategy_update"
|
|
4
|
+
priority: "P0 | P1 | P2 | P3"
|
|
5
|
+
risk_level: "low | medium | high"
|
|
6
|
+
depends_on_previous_result: false
|
|
7
|
+
model_policy:
|
|
8
|
+
default_tier: "cheap"
|
|
9
|
+
allowed_tiers:
|
|
10
|
+
- cheap
|
|
11
|
+
- standard
|
|
12
|
+
- strong
|
|
13
|
+
escalation_allowed: true
|
|
14
|
+
escalation_triggers:
|
|
15
|
+
- ambiguous_goal
|
|
16
|
+
- ambiguous_acceptance
|
|
17
|
+
- high_risk_change
|
|
18
|
+
- architecture_boundary
|
|
19
|
+
- repeated_failure
|
|
20
|
+
- verification_dispute
|
|
21
|
+
strong_model_roles:
|
|
22
|
+
- planning
|
|
23
|
+
- risk_judgment
|
|
24
|
+
- architecture_review
|
|
25
|
+
- failure_review
|
|
26
|
+
- acceptance_judgment
|
|
27
|
+
refs:
|
|
28
|
+
required: []
|
|
29
|
+
optional: []
|
|
30
|
+
permission:
|
|
31
|
+
modify:
|
|
32
|
+
allowed: []
|
|
33
|
+
denied: []
|
|
34
|
+
commands:
|
|
35
|
+
allowed: []
|
|
36
|
+
denied: []
|
|
37
|
+
network: false
|
|
38
|
+
destructive_actions: false
|
|
39
|
+
runtime_update: "propose_only"
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
# Task
|
|
43
|
+
|
|
44
|
+
This file is the current execution contract. Prefer generating it in Bootstrap
|
|
45
|
+
Mode from a short human goal plus repository context, then have a human review
|
|
46
|
+
it before execution.
|
|
47
|
+
|
|
48
|
+
Prefer safe assumptions over extra questions, but do not guess scope, risk,
|
|
49
|
+
permissions, or acceptance.
|
|
50
|
+
|
|
51
|
+
## Goal
|
|
52
|
+
|
|
53
|
+
Describe the exact goal of this task. If generated from a short human request,
|
|
54
|
+
preserve the user's intent and make assumptions explicit.
|
|
55
|
+
|
|
56
|
+
If `type = strategy_update`, the goal is to produce a direction amendment
|
|
57
|
+
proposal, not code. If `type = apply_strategy_update`, the goal is to merge a
|
|
58
|
+
confirmed proposal into the official direction documents.
|
|
59
|
+
|
|
60
|
+
## Scope
|
|
61
|
+
|
|
62
|
+
Allowed scope:
|
|
63
|
+
|
|
64
|
+
-
|
|
65
|
+
|
|
66
|
+
Out of scope:
|
|
67
|
+
|
|
68
|
+
-
|
|
69
|
+
|
|
70
|
+
## Related Files
|
|
71
|
+
|
|
72
|
+
-
|
|
73
|
+
|
|
74
|
+
## Constraints
|
|
75
|
+
|
|
76
|
+
- Do not refactor unrelated modules.
|
|
77
|
+
- Do not modify public API unless required by the task.
|
|
78
|
+
- Do not edit `ai/project/runtime.md` unless explicitly authorized.
|
|
79
|
+
- Do not modify `ai/project/refs/final-shape.md`, `module-map.md`, or
|
|
80
|
+
`roadmap.md` unless `type = apply_strategy_update` and a confirmed proposal
|
|
81
|
+
exists.
|
|
82
|
+
|
|
83
|
+
## Acceptance
|
|
84
|
+
|
|
85
|
+
The task is complete when:
|
|
86
|
+
|
|
87
|
+
-
|
|
88
|
+
|
|
89
|
+
## Permission
|
|
90
|
+
|
|
91
|
+
Modify files only under the allowlist in the YAML front matter.
|
|
92
|
+
Run only commands listed in the YAML front matter and allowed by `ai/project/refs/commands.md`.
|
|
93
|
+
|
|
94
|
+
## Model Policy
|
|
95
|
+
|
|
96
|
+
Default to the model tier declared in `model_policy.default_tier`.
|
|
97
|
+
Do not use `strong` for routine execution. Use `strong` only for the roles and
|
|
98
|
+
triggers declared in `model_policy`, then record the reason in `ai/project/metrics.json`.
|
|
99
|
+
|
|
100
|
+
## Stop Conditions
|
|
101
|
+
|
|
102
|
+
Stop and write `ai/project/result.json`, `ai/project/result.md`, and `ai/project/metrics.json` with blocked status if:
|
|
103
|
+
|
|
104
|
+
- Required files are missing.
|
|
105
|
+
- Goal is ambiguous.
|
|
106
|
+
- Acceptance cannot be verified.
|
|
107
|
+
- Scope requires modifying files outside allowed range.
|
|
108
|
+
- Required refs are missing.
|
|
109
|
+
- Required command cannot be run.
|
|
110
|
+
- Risk level is high without explicit authorization.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
en
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.8.14
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# AI Execution Bootstrap
|
|
2
|
+
|
|
3
|
+
Do not summarize this file.
|
|
4
|
+
Execute the bootstrap workflow below.
|
|
5
|
+
|
|
6
|
+
You are bootstrapping project context for Agent Execution Template.
|
|
7
|
+
|
|
8
|
+
Goal: build the stable project understanding that future tasks will rely on.
|
|
9
|
+
This is a discovery and confirmation step, not an implementation step.
|
|
10
|
+
|
|
11
|
+
Your job is to inspect the project, create or update `ai/project/project.md`
|
|
12
|
+
and relevant `ai/project/refs/*`, then stop with the Post-Bootstrap Handoff.
|
|
13
|
+
|
|
14
|
+
## First Read
|
|
15
|
+
|
|
16
|
+
1. `ai/template/protocol.md`
|
|
17
|
+
2. `ai/template/rules/core.md`
|
|
18
|
+
3. Existing `ai/project/project.md`
|
|
19
|
+
4. Existing `ai/project/refs/*.md` if present
|
|
20
|
+
|
|
21
|
+
## Bootstrap Mission
|
|
22
|
+
|
|
23
|
+
Create or update:
|
|
24
|
+
|
|
25
|
+
- `ai/project/project.md`
|
|
26
|
+
- `ai/project/refs/final-shape.md` when project direction, final shape, or
|
|
27
|
+
task-worthiness criteria can be inferred
|
|
28
|
+
- `ai/project/refs/module-map.md` when module responsibilities, boundaries, or
|
|
29
|
+
dependency direction can be inferred
|
|
30
|
+
- `ai/project/refs/roadmap.md` when stage goals, near-term direction, or
|
|
31
|
+
deferred items can be inferred
|
|
32
|
+
- `ai/project/refs/architecture.md` when architecture can be inferred
|
|
33
|
+
- `ai/project/refs/commands.md` when run/test/build commands can be inferred
|
|
34
|
+
- `ai/project/refs/constraints.md` when constraints can be inferred
|
|
35
|
+
- `ai/project/refs/decisions.md` only when durable decisions are documented
|
|
36
|
+
|
|
37
|
+
Create `ai/project/task.md` only if the human also provides a current task.
|
|
38
|
+
If you create `ai/project/task.md`, draft only the task contract. Do not enter execution.
|
|
39
|
+
|
|
40
|
+
Do not edit source code, tests, app config, dependency files, generated files,
|
|
41
|
+
runtime files, result files, or metrics files during bootstrap.
|
|
42
|
+
|
|
43
|
+
## Reading Order
|
|
44
|
+
|
|
45
|
+
Read high-signal project evidence in this order:
|
|
46
|
+
|
|
47
|
+
1. Root docs: `README*`, `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING*`, `CHANGELOG*`
|
|
48
|
+
2. Manifests: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`,
|
|
49
|
+
`pom.xml`, `build.gradle*`, `Makefile`
|
|
50
|
+
3. Project docs: `docs/**`, preferring overview, architecture, setup, testing,
|
|
51
|
+
deployment, API, ADR, and decision files
|
|
52
|
+
4. Existing AI refs: `ai/project/refs/*.md`
|
|
53
|
+
5. Shallow repository structure for source, test, config, and docs directories
|
|
54
|
+
|
|
55
|
+
If docs and manifests are missing or insufficient, infer from code with a
|
|
56
|
+
bounded read:
|
|
57
|
+
|
|
58
|
+
- inspect top-level directories and filenames first;
|
|
59
|
+
- inspect likely entrypoints such as `src/`, `app/`, `lib/`, `packages/`,
|
|
60
|
+
`services/`, `cmd/`, `internal/`, `server/`, `client/`, `test/`, `tests/`;
|
|
61
|
+
- inspect route, module, config, and test files only enough to identify
|
|
62
|
+
project purpose, module boundaries, commands, and constraints;
|
|
63
|
+
- do not read the whole codebase unless the human explicitly authorizes it.
|
|
64
|
+
|
|
65
|
+
Do not read dependency folders, build outputs, coverage outputs, lockfiles
|
|
66
|
+
except to infer package manager, secret files, environment files, or archives
|
|
67
|
+
unless the human explicitly references them.
|
|
68
|
+
|
|
69
|
+
## Confirmation Dimensions
|
|
70
|
+
|
|
71
|
+
After reading, summarize and ask the human to confirm or correct these points:
|
|
72
|
+
|
|
73
|
+
- project name, purpose, and primary users;
|
|
74
|
+
- one-line positioning, final shape, and task-worthiness criteria;
|
|
75
|
+
- current module map, module boundaries, and dependency direction;
|
|
76
|
+
- current stage, near-term roadmap, and what is not being done now;
|
|
77
|
+
- technology stack, package manager, and test runner;
|
|
78
|
+
- source, test, config, and documentation layout;
|
|
79
|
+
- main modules and boundaries;
|
|
80
|
+
- important run, build, test, and verification commands;
|
|
81
|
+
- durable constraints, security boundaries, compatibility requirements, and
|
|
82
|
+
high-risk areas;
|
|
83
|
+
- unknowns that would affect future task precision.
|
|
84
|
+
|
|
85
|
+
Ask at most 3 questions at a time. Ask only questions whose answers would
|
|
86
|
+
change project identity, commands, boundaries, constraints, risk, permission,
|
|
87
|
+
or acceptance.
|
|
88
|
+
|
|
89
|
+
## Output Rules
|
|
90
|
+
|
|
91
|
+
- Mark unknown facts as `Unknown`; do not present guesses as facts.
|
|
92
|
+
- Initialization content in `final-shape.md`, `module-map.md`, and
|
|
93
|
+
`roadmap.md` must cite evidence sources. If evidence is insufficient, keep
|
|
94
|
+
placeholders or write `Unknown`; do not invent a vision.
|
|
95
|
+
- Record evidence sources in the relevant file when useful.
|
|
96
|
+
- Keep `ai/project/project.md` stable and long-lived.
|
|
97
|
+
- Keep `ai/project/refs/*.md` focused; do not turn refs into a project diary.
|
|
98
|
+
- Stop after writing drafts and asking for confirmation.
|
|
99
|
+
- Do not execute implementation work in the same run.
|
|
100
|
+
|
|
101
|
+
## Post-Bootstrap Handoff
|
|
102
|
+
|
|
103
|
+
After writing project context drafts, do not only ask the human to open files
|
|
104
|
+
and inspect them. The final response must include a confirmable summary so the
|
|
105
|
+
human can confirm or correct directly in chat.
|
|
106
|
+
|
|
107
|
+
If the human already provided a current task goal in the bootstrap request, you
|
|
108
|
+
must also draft `ai/project/task.md`, then ask the human to confirm both the
|
|
109
|
+
project understanding and the task draft.
|
|
110
|
+
|
|
111
|
+
If the human did not provide a current task goal, recommend the next best task
|
|
112
|
+
based on the project state.
|
|
113
|
+
|
|
114
|
+
The final response must use one of these shapes.
|
|
115
|
+
|
|
116
|
+
When there is no current task goal:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
Bootstrap is complete. I wrote the project context.
|
|
120
|
+
|
|
121
|
+
My understanding of the project:
|
|
122
|
+
- Project:
|
|
123
|
+
- Tech stack:
|
|
124
|
+
- Main modules:
|
|
125
|
+
- North Star:
|
|
126
|
+
- Roadmap:
|
|
127
|
+
- Common commands:
|
|
128
|
+
- Important constraints:
|
|
129
|
+
- Still uncertain: up to 3 items; write "none" if there are none
|
|
130
|
+
|
|
131
|
+
Recommended next step:
|
|
132
|
+
1. Priority task:
|
|
133
|
+
Reason:
|
|
134
|
+
2. Alternative task:
|
|
135
|
+
Reason:
|
|
136
|
+
|
|
137
|
+
Written:
|
|
138
|
+
- ai/project/project.md
|
|
139
|
+
- ai/project/refs/final-shape.md
|
|
140
|
+
- ai/project/refs/module-map.md
|
|
141
|
+
- ai/project/refs/roadmap.md
|
|
142
|
+
- ai/project/refs/architecture.md
|
|
143
|
+
- ai/project/refs/commands.md
|
|
144
|
+
- ai/project/refs/constraints.md
|
|
145
|
+
- ai/project/refs/decisions.md
|
|
146
|
+
|
|
147
|
+
Reply with:
|
|
148
|
+
- Confirm, draft task 1
|
|
149
|
+
- Confirm, but do: <one-sentence task>
|
|
150
|
+
- Correction: <what to change>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
When there is already a current task goal:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Bootstrap is complete. I wrote the project context and task draft.
|
|
157
|
+
|
|
158
|
+
My understanding of the project:
|
|
159
|
+
- Project:
|
|
160
|
+
- Tech stack:
|
|
161
|
+
- Main modules:
|
|
162
|
+
- North Star:
|
|
163
|
+
- Roadmap:
|
|
164
|
+
- Common commands:
|
|
165
|
+
- Important constraints:
|
|
166
|
+
- Still uncertain: up to 3 items; write "none" if there are none
|
|
167
|
+
|
|
168
|
+
Task draft summary:
|
|
169
|
+
- Goal:
|
|
170
|
+
- Scope:
|
|
171
|
+
- Out of scope:
|
|
172
|
+
- Acceptance:
|
|
173
|
+
- Risk:
|
|
174
|
+
- Permissions needed:
|
|
175
|
+
|
|
176
|
+
Written:
|
|
177
|
+
- ai/project/project.md
|
|
178
|
+
- ai/project/refs/final-shape.md
|
|
179
|
+
- ai/project/refs/module-map.md
|
|
180
|
+
- ai/project/refs/roadmap.md
|
|
181
|
+
- ai/project/refs/architecture.md
|
|
182
|
+
- ai/project/refs/commands.md
|
|
183
|
+
- ai/project/refs/constraints.md
|
|
184
|
+
- ai/project/refs/decisions.md
|
|
185
|
+
- ai/project/task.md
|
|
186
|
+
|
|
187
|
+
Reply with:
|
|
188
|
+
- Confirm, execute
|
|
189
|
+
- Correction: <what to change>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
If important unknowns remain, list at most 3 of them under "Still uncertain".
|
|
193
|
+
Do not make the human hunt through files to find issues; file paths are only
|
|
194
|
+
for traceability.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# AI Execution Prompt
|
|
2
|
+
|
|
3
|
+
Do not summarize this file.
|
|
4
|
+
Execute the workflow below.
|
|
5
|
+
|
|
6
|
+
You are operating inside an Agent Execution Template workspace.
|
|
7
|
+
|
|
8
|
+
First read:
|
|
9
|
+
|
|
10
|
+
1. `ai/template/protocol.md`
|
|
11
|
+
2. `ai/template/rules/core.md`
|
|
12
|
+
|
|
13
|
+
Then choose the mode:
|
|
14
|
+
|
|
15
|
+
- If the user asks to update the North Star, final shape, product constitution,
|
|
16
|
+
module map, roadmap, or project direction, or if
|
|
17
|
+
`ai/project/inbox/ideas/` contains non-`.gitkeep` ideas waiting for
|
|
18
|
+
evaluation, draft a `strategy_update` task or produce the proposal directly,
|
|
19
|
+
then stop for human confirmation.
|
|
20
|
+
- If the user explicitly confirms that a proposal under
|
|
21
|
+
`ai/project/proposals/final-shape-updates/*.md` may be merged, draft or
|
|
22
|
+
execute an `apply_strategy_update` task. If the proposal is still
|
|
23
|
+
`proposed`, update it to `accepted` based on that explicit confirmation.
|
|
24
|
+
- If the user says "Start initializing this project and absorb the material in ai/project/inbox/",
|
|
25
|
+
or asks to initialize while also absorbing material from
|
|
26
|
+
`ai/project/inbox/`, follow `ai/template/bootstrap.md` and treat
|
|
27
|
+
`ai/project/inbox/*.md` and `ai/project/inbox/raw/*.md` as part of the
|
|
28
|
+
bootstrap input for this run; stop after project-context confirmation.
|
|
29
|
+
- If the user says "Reconcile the new material in ai/project/inbox/", asks to
|
|
30
|
+
reconcile, merge, absorb, update context, handle new material, mentions
|
|
31
|
+
`reconcile` or `ai/project/inbox/`, or if `ai/project/inbox/` contains
|
|
32
|
+
non-`.gitkeep` material waiting to be absorbed, follow
|
|
33
|
+
`ai/template/reconcile.md` and stop or update according to its two-phase
|
|
34
|
+
workflow; `ai/project/inbox/processed/` is already processed material and
|
|
35
|
+
should not trigger reconciliation, while `ai/project/inbox/ideas/` should
|
|
36
|
+
route to `strategy_update` first.
|
|
37
|
+
- If the user says "Start initializing this project", asks to initialize,
|
|
38
|
+
organize, or generate project context, or if `ai/project/project.md` is
|
|
39
|
+
empty, placeholder-only, or incomplete, follow `ai/template/bootstrap.md`
|
|
40
|
+
and stop after project-context confirmation.
|
|
41
|
+
- If `ai/project/task.md` is empty, placeholder-only, or incomplete, draft it
|
|
42
|
+
from the user's current goal and confirmed project context, then stop for
|
|
43
|
+
human confirmation.
|
|
44
|
+
- If the user says "Continue this project" without a more specific goal, first
|
|
45
|
+
judge the best next step globally: prioritize pending context confirmation,
|
|
46
|
+
pending task confirmation, failed results, unfinished tasks, or obvious
|
|
47
|
+
risks; then recommend a next step or draft `ai/project/task.md`. Do not make
|
|
48
|
+
the human hunt through files for gaps.
|
|
49
|
+
- Use Execution Mode only after `ai/project/project.md` and
|
|
50
|
+
`ai/project/task.md` are ready enough to define identity, goal, scope,
|
|
51
|
+
permission, and acceptance.
|
|
52
|
+
|
|
53
|
+
## Task Draft Handoff
|
|
54
|
+
|
|
55
|
+
In Task Draft Mode:
|
|
56
|
+
|
|
57
|
+
1. Read confirmed `ai/project/project.md` and relevant `ai/project/refs/*.md`.
|
|
58
|
+
2. Draft `ai/project/task.md` from the user's current goal.
|
|
59
|
+
3. Ask at most 3 questions only for scope, risk, permission, or acceptance
|
|
60
|
+
blockers.
|
|
61
|
+
4. Stop for human confirmation. Do not modify source or business files.
|
|
62
|
+
|
|
63
|
+
End Task Draft Mode with:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
Task draft is ready.
|
|
67
|
+
|
|
68
|
+
Please review:
|
|
69
|
+
- ai/project/task.md
|
|
70
|
+
|
|
71
|
+
Confirm or correct:
|
|
72
|
+
1. Goal and acceptance
|
|
73
|
+
2. Allowed and denied scope
|
|
74
|
+
3. Permissions, commands, and risk level
|
|
75
|
+
|
|
76
|
+
Reply with:
|
|
77
|
+
- Confirmed, execute
|
|
78
|
+
- Or corrections
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Strategy Update Handoff
|
|
82
|
+
|
|
83
|
+
In `strategy_update`:
|
|
84
|
+
|
|
85
|
+
1. Read `final-shape.md`, `module-map.md`, `roadmap.md`, `decisions.md`,
|
|
86
|
+
`constraints.md`, and relevant `inbox/ideas/*`.
|
|
87
|
+
2. Use `ai/project/proposals/final-shape-updates/_template.md` as the
|
|
88
|
+
structural template and generate
|
|
89
|
+
`ai/project/proposals/final-shape-updates/YYYYMMDD-topic.md`.
|
|
90
|
+
3. Stop for human confirmation. Do not modify official direction files or
|
|
91
|
+
source code.
|
|
92
|
+
|
|
93
|
+
End with:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
Direction amendment proposal is ready.
|
|
97
|
+
|
|
98
|
+
Please review:
|
|
99
|
+
- ai/project/proposals/final-shape-updates/YYYYMMDD-topic.md
|
|
100
|
+
|
|
101
|
+
Reply with:
|
|
102
|
+
- Confirmed, merge this proposal
|
|
103
|
+
- Or corrections
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
In Execution Mode, read:
|
|
107
|
+
|
|
108
|
+
1. `ai/project/project.md`
|
|
109
|
+
2. `ai/project/runtime.md`
|
|
110
|
+
3. `ai/project/task.md`
|
|
111
|
+
|
|
112
|
+
Then execute the task and write results to:
|
|
113
|
+
|
|
114
|
+
- `ai/project/result.json`
|
|
115
|
+
- `ai/project/result.md`
|
|
116
|
+
- `ai/project/metrics.json`
|
|
117
|
+
|
|
118
|
+
Keep terminal output short and follow `ai/template/rules/output.md`.
|