project-tiny-context-harness 0.2.78 → 0.2.80
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/README.md +15 -11
- package/assets/README.md +16 -12
- package/assets/README.zh-CN.md +10 -6
- package/assets/agents/AGENTS_CORE.md +42 -42
- package/assets/skills/composite-long-task-workflow/SKILL.md +212 -0
- package/assets/skills/composite-long-task-workflow/assets/execution-binding.template.md +31 -0
- package/assets/skills/composite-long-task-workflow/assets/goal-objective.template.md +22 -0
- package/assets/skills/composite-long-task-workflow/references/composite-long-task-workflow-protocol.md +633 -0
- package/assets/skills/normal-long-task/SKILL.md +12 -12
- package/dist/commands/composite-long-task.d.ts +6 -0
- package/dist/commands/composite-long-task.js +103 -0
- package/dist/commands/index.js +5 -3
- package/dist/commands/superpowers.js +6 -87
- package/dist/lib/composite-long-task-renderer.d.ts +12 -0
- package/dist/lib/composite-long-task-renderer.js +153 -0
- package/dist/lib/superpowers-task-compile.js +5 -121
- package/dist/lib/superpowers-task-derive.js +1 -1
- package/dist/lib/superpowers-task-gates.js +6 -4
- package/dist/lib/superpowers-task-source-compile.d.ts +5 -0
- package/dist/lib/superpowers-task-source-compile.js +190 -0
- package/dist/lib/superpowers-task-source-parser.d.ts +23 -0
- package/dist/lib/superpowers-task-source-parser.js +224 -0
- package/dist/lib/superpowers-task-state-schema.d.ts +6 -0
- package/dist/lib/superpowers-task-validator.d.ts +1 -0
- package/dist/lib/superpowers-task-validator.js +16 -3
- package/package.json +1 -1
- package/assets/skills/superpowers-long-task/SKILL.md +0 -602
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
# Composite Long-Task Workflow Protocol
|
|
2
|
+
|
|
3
|
+
## Expected Runtime Effect / 预期实现效果
|
|
4
|
+
|
|
5
|
+
`composite-long-task-workflow` is Tiny Context's Superpowers-backed composite long-task workflow Skill. It is not the Tiny Context Workflow Contract itself and is not an ordinary target-mode prompt generator. Its job is to combine three upstream authority inputs, Tiny Context workflow rules, project Context, official Superpowers execution methods, canonical task state and acceptance evidence into a recoverable, auditable Codex Goal workflow whose completion can be computed.
|
|
6
|
+
|
|
7
|
+
The workflow prevents long-running implementation drift across many turns, agents, slices, validators and context compactions: product-intent drift, missing Context updates, scope shrinkage, plan/implementation mismatch, incomplete AC evidence, sampled proof pretending to be full population, passing tests pretending to be acceptance, and audit completion pretending to be product completion.
|
|
8
|
+
|
|
9
|
+
## Execution Order
|
|
10
|
+
|
|
11
|
+
The fusion order is fixed:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
Tiny Context Workflow Contract
|
|
15
|
+
-> confirm three-input source authority
|
|
16
|
+
-> compile task-state.json
|
|
17
|
+
-> enter Superpowers implementation slices
|
|
18
|
+
-> each slice updates canonical state and evidence
|
|
19
|
+
-> derive local audit / matrix / verdict / progress / evidence views
|
|
20
|
+
-> run gates
|
|
21
|
+
-> final-gate computes product_goal_complete
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Workflow Identity
|
|
25
|
+
|
|
26
|
+
This protocol is the detailed execution contract for `composite-long-task-workflow`: a Tiny Context-owned composite workflow adapter for Superpowers-backed long-task execution. It is not the Tiny Context Workflow Contract itself, not a durable project Context file, not a business fact source, not a normal target-mode prompt generator and not an official Superpowers fork.
|
|
27
|
+
|
|
28
|
+
## Authority Model
|
|
29
|
+
|
|
30
|
+
Authority is fixed before implementation starts: Product / Architecture Source owns intent, scope and boundaries; Technical Realization Plan owns PI implementation and plan conformance; Acceptance Checklist owns AC completion semantics and proof layers; `task-state.json` is the only execution state source; `events.ndjson` is append-only; `derived/**` is generated reading output only.
|
|
31
|
+
|
|
32
|
+
## Slice Protocol
|
|
33
|
+
|
|
34
|
+
Implementation advances through coherent slices. Each slice selects related PI / AC / proof-layer gaps, performs implementation and verification work, records canonical evidence, writes and applies `slice-delta.json`, derives views and runs slice-gate. Shared provider/browser/runtime/security proof environments use epoch-gate instead of repeating the full final gate after every slice.
|
|
35
|
+
|
|
36
|
+
## Evidence Protocol
|
|
37
|
+
|
|
38
|
+
Evidence is canonical state, not prose. Every proof record enters `task-state.evidence[]` with evidence id, slice id, type, command or artifact paths, `proves`, `does_not_prove`, freshness, redaction and reviewability / reproduction data. Evidence must be fresh, reviewable and free of secrets, raw credentials, tokens, cookies and long raw payloads.
|
|
39
|
+
|
|
40
|
+
## Derived Views
|
|
41
|
+
|
|
42
|
+
`derived/**` contains generated reading views only: local audit, plan-conformance matrix, final acceptance verdict, progress ledger, evidence index, context alignment and final summary. These files help recovery and review, but never rewrite Product / Architecture Source, Technical Realization Plan, Acceptance Checklist or `task-state.json`.
|
|
43
|
+
|
|
44
|
+
## Gates
|
|
45
|
+
|
|
46
|
+
The runtime gate sequence is slice-gate for one slice, epoch-gate for shared proof environments and final-gate for product completion. Plan conformance is judged against the Technical Realization Plan, acceptance evidence is judged against the Acceptance Checklist, and final-gate is the only path that computes `product_goal_complete`.
|
|
47
|
+
|
|
48
|
+
## Required Bootstrap
|
|
49
|
+
|
|
50
|
+
Every executor first reads `execution-binding.md`, `workflow-protocol.md`, the three input files, `task-state.json` and current `derived/**` views. If state is missing or stale, initialize or compile through `ty-context composite-long-task init <workdir>` and `ty-context composite-long-task compile <workdir>` before choosing the next implementation slice.
|
|
51
|
+
|
|
52
|
+
## Tiny Context Contract Layer
|
|
53
|
+
|
|
54
|
+
The workflow uses Context Priority Ladder, Context Delta, Source-to-Context Coverage, Context-to-Implementation Binding, Contract Conformance and Context drift check as the durable-fact and implementation-binding layer. These rules constrain the composite workflow, but the composite workflow does not replace or register itself as the Tiny Context Workflow Contract.
|
|
55
|
+
|
|
56
|
+
## Superpowers Execution Binding
|
|
57
|
+
|
|
58
|
+
Superpowers remains the execution layer: prefer `superpowers:subagent-driven-development` when subagents are available, use `superpowers:executing-plans` otherwise, use `superpowers:test-driven-development` for behavior gaps and run `superpowers:verification-before-completion` before completion claims. Tiny Context may wrap Superpowers with authority, conformance and acceptance gates, but must not redefine, duplicate or fork official Superpowers mechanics.
|
|
59
|
+
|
|
60
|
+
## Final Gate Protocol
|
|
61
|
+
|
|
62
|
+
Final completion always runs in fixed order: derive all views, run `superpowers:verification-before-completion`, validate canonical state, validate plan acceptance artifacts, run auditor and stale-overclaim checks when applicable, rederive/revalidate if fixes changed state or evidence, then let `ty-context composite-long-task final-gate <workdir>` compute `product_goal_complete`.
|
|
63
|
+
|
|
64
|
+
## Completion State Machine
|
|
65
|
+
|
|
66
|
+
`audit_task_complete` means the workflow or audit pass finished. `acceptance_target_status` is the acceptance verdict. `product_goal_complete` is computed only by final-gate and is the only implementation/execution Goal completion condition. A read-only audit goal may finish at audit completion only while saying `Audit workflow completed; acceptance target not complete.` for non-accepted targets.
|
|
67
|
+
|
|
68
|
+
## Forbidden Shortcuts
|
|
69
|
+
|
|
70
|
+
Tests alone do not prove plan conformance. Superpowers review does not prove AC acceptance. Sample evidence does not prove full population unless the AC allows it. Derived files, local audit, validator output and auditor reports cannot rewrite Product / Plan / Checklist. Local audit cannot mark product completion. Agents must not handwrite `product_goal_complete`.
|
|
71
|
+
|
|
72
|
+
## Hallucination Guard
|
|
73
|
+
|
|
74
|
+
The protocol must prevent false fusion: do not interpret the composite workflow as the Tiny Context Workflow Contract itself; do not register `workflow-protocol.md` in `project_context/context.toml`; do not treat it as a business fact source; do not use local audit, tests, Superpowers review, sampled evidence or final-gate failure as product completion; do not claim full alignment with unresolved Source-to-Context Coverage or Context-to-Implementation Binding gaps; and do not call a Codex implementation Goal complete before final-gate passes.
|
|
75
|
+
|
|
76
|
+
## Blocker Protocol
|
|
77
|
+
|
|
78
|
+
Maximize autonomous progress with repository tools, local app/browser sessions, CLI auth, credential helpers and authorized elevation. Stop only for locally unsatisfiable blockers such as MFA, missing permission, unavailable credentials, external approval or legal/system limits, and return the minimal user action list plus the next agent step.
|
|
79
|
+
|
|
80
|
+
## 1. Materials Entering Agent Context
|
|
81
|
+
|
|
82
|
+
The executor must see and fuse these materials together:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
1. Tiny Context Workflow Contract
|
|
86
|
+
- Context Priority Ladder
|
|
87
|
+
- Context Delta
|
|
88
|
+
- Source-to-Context Coverage
|
|
89
|
+
- Context-to-Implementation Binding
|
|
90
|
+
- Contract Conformance
|
|
91
|
+
- Context drift check
|
|
92
|
+
|
|
93
|
+
2. Project durable Context
|
|
94
|
+
- project_context/global.md
|
|
95
|
+
- project_context/architecture.md
|
|
96
|
+
- project_context/context.toml
|
|
97
|
+
- matching project_context/areas/**/*
|
|
98
|
+
- DESIGN.md when applicable
|
|
99
|
+
|
|
100
|
+
3. Three long-task authority inputs
|
|
101
|
+
- Product / Architecture Source
|
|
102
|
+
- Technical Realization Plan
|
|
103
|
+
- Acceptance Checklist
|
|
104
|
+
|
|
105
|
+
4. Composite workflow protocol artifacts
|
|
106
|
+
- workflow-protocol.md
|
|
107
|
+
- execution-binding.md
|
|
108
|
+
- goal-objective.txt
|
|
109
|
+
|
|
110
|
+
5. Official Superpowers execution layer
|
|
111
|
+
- superpowers:subagent-driven-development
|
|
112
|
+
- superpowers:executing-plans
|
|
113
|
+
- superpowers:test-driven-development
|
|
114
|
+
- superpowers:verification-before-completion
|
|
115
|
+
|
|
116
|
+
6. State and audit kernel
|
|
117
|
+
- task-state.json
|
|
118
|
+
- events.ndjson
|
|
119
|
+
- derived/**
|
|
120
|
+
- task-state.evidence[]
|
|
121
|
+
- slice / epoch / final gates
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The fusion order is not free-form. The executor first applies the Tiny Context Workflow Contract, then confirms the three-input source authority, then compiles state, then uses Superpowers implementation slices, then updates canonical state/evidence, derives reading views, runs gates and lets final-gate compute completion.
|
|
125
|
+
|
|
126
|
+
## 2. Phase One: Workflow Contract First
|
|
127
|
+
|
|
128
|
+
After receiving a Goal, the executor must not start with code. It first applies Tiny Context workflow rules:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
1. Read project_context/global.md, architecture.md, context.toml and relevant area/role Context.
|
|
132
|
+
2. Decide Product Context Delta and Technical Context Delta.
|
|
133
|
+
3. If either is required, update the smallest owning Context before implementation.
|
|
134
|
+
4. Build Source-to-Context Coverage for the three inputs:
|
|
135
|
+
- whether each source item is covered by existing Context;
|
|
136
|
+
- whether Context must be added or updated;
|
|
137
|
+
- whether it is task-local only;
|
|
138
|
+
- whether it is explicitly out of scope;
|
|
139
|
+
- whether a user decision is needed.
|
|
140
|
+
5. For high-risk implementation, build Context-to-Implementation Binding:
|
|
141
|
+
- which surfaces each Context fact must reach;
|
|
142
|
+
- expected implementation paths;
|
|
143
|
+
- forbidden shortcuts;
|
|
144
|
+
- verification paths.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
This phase answers whether the task changes durable facts, whether Context supports implementation, which product/architecture/API/schema/state/surface/verification facts must be written first, and which concrete paths and verification entries the implementation must bind to.
|
|
148
|
+
|
|
149
|
+
If Source-to-Context Coverage still has `new_context_required`, `under_scoped` or `needs_user_decision`, do not claim the plan was fully implemented. If Context-to-Implementation Binding still has `missing`, `partial`, `blocked` or `contradicted_by_current_state`, do not claim Context-to-code alignment.
|
|
150
|
+
|
|
151
|
+
## 3. Phase Two: Three Inputs Lock Task Authority
|
|
152
|
+
|
|
153
|
+
The authority relationship is fixed:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Product / Architecture Source
|
|
157
|
+
= intent, scope, boundaries, owner surface, delivery scope, full population / sample semantics.
|
|
158
|
+
|
|
159
|
+
Technical Realization Plan
|
|
160
|
+
= PI items, implementation paths, API/schema, state machine, worker/runtime, UI/IA, required tests, plan conformance.
|
|
161
|
+
|
|
162
|
+
Acceptance Checklist
|
|
163
|
+
= AC items, completion semantics, required proof layers, invalid evidence, fail conditions, acceptance verdict.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
`task-state.json` is compiled from these inputs. `derived/**`, local audit, matrix, verdict, validator output and auditor reports cannot rewrite them. Project Context also preserves this authority model: source owns intent/scope/boundaries, plan owns executable blueprint and plan conformance, checklist owns AC completion semantics and proof layers.
|
|
167
|
+
|
|
168
|
+
## 4. Phase Three: Compile The State Kernel
|
|
169
|
+
|
|
170
|
+
When initializing or resuming a task, the executor confirms this workdir shape:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
tmp/ty-context/plan-acceptance/<plan-slug>/
|
|
174
|
+
product-architecture-source.md
|
|
175
|
+
technical-realization-plan.md
|
|
176
|
+
acceptance-checklist.md
|
|
177
|
+
workflow-protocol.md
|
|
178
|
+
execution-binding.md
|
|
179
|
+
task-state.json
|
|
180
|
+
events.ndjson
|
|
181
|
+
derived/**
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
If `task-state.json` is absent or uncompiled, use the public command path:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
ty-context composite-long-task init <workdir>
|
|
188
|
+
ty-context composite-long-task compile <workdir>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Legacy/internal compatibility may exist as an equivalent implementation namespace only:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
ty-context superpowers init <workdir>
|
|
195
|
+
ty-context superpowers compile <workdir>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The compiled state forms:
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
Plan graph:
|
|
202
|
+
PI -> AC
|
|
203
|
+
AC -> required proof layers
|
|
204
|
+
delivery scope
|
|
205
|
+
sample / full population boundary
|
|
206
|
+
owner surfaces
|
|
207
|
+
forbidden shortcuts
|
|
208
|
+
|
|
209
|
+
State kernel:
|
|
210
|
+
task-state.json = only execution state source
|
|
211
|
+
events.ndjson = append-only event log
|
|
212
|
+
derived/** = generated reading views only
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The goal of this phase is to turn natural-language plans into a state-machine-traceable task graph.
|
|
216
|
+
|
|
217
|
+
## 5. Phase Four: Superpowers Enters Implementation
|
|
218
|
+
|
|
219
|
+
Superpowers organizes implementation execution:
|
|
220
|
+
|
|
221
|
+
```text
|
|
222
|
+
- Prefer superpowers:subagent-driven-development when subagents are available.
|
|
223
|
+
- Use superpowers:executing-plans when subagents are unavailable or insufficient.
|
|
224
|
+
- Use superpowers:test-driven-development for behavior changes.
|
|
225
|
+
- Use superpowers:verification-before-completion before any completion claim.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Tiny Context does not copy, fork or override official Superpowers execution mechanics. It wraps them with:
|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
source authority gate
|
|
232
|
+
plan conformance gate
|
|
233
|
+
acceptance evidence gate
|
|
234
|
+
state consistency gate
|
|
235
|
+
final completion gate
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Superpowers manages how to move implementation forward efficiently. Tiny Context checks whether implementation drifted from the source, plan and ACs.
|
|
239
|
+
|
|
240
|
+
## 6. Phase Five: What An Implementation Slice Is
|
|
241
|
+
|
|
242
|
+
An implementation slice is not an arbitrary file chunk, page chunk or API chunk. It is the smallest coherent execution unit that closes related gaps.
|
|
243
|
+
|
|
244
|
+
A slice should:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
1. Bind 2-4 strongly related missing layers.
|
|
248
|
+
2. Usually share one or more of:
|
|
249
|
+
- same AC;
|
|
250
|
+
- same PI;
|
|
251
|
+
- same runtime scenario;
|
|
252
|
+
- same owner surface;
|
|
253
|
+
- same proof environment;
|
|
254
|
+
- same verification path group.
|
|
255
|
+
3. Advance both implementation and evidence.
|
|
256
|
+
4. End by updating task-state and reducing explicit plan/AC/proof gaps.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
A slice usually:
|
|
260
|
+
|
|
261
|
+
```text
|
|
262
|
+
- modifies implementation code;
|
|
263
|
+
- modifies API/schema/state/worker/runtime/UI/IA when required;
|
|
264
|
+
- runs required tests or smoke checks;
|
|
265
|
+
- captures evidence;
|
|
266
|
+
- writes slice-delta.json;
|
|
267
|
+
- applies the slice delta;
|
|
268
|
+
- derives views;
|
|
269
|
+
- runs slice-gate.
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
A slice cannot only say "some work was done." Its `progress_value` must explain which gap it closed and why that reduces later rework.
|
|
273
|
+
|
|
274
|
+
## 7. Phase Six: Slice Delta Updates State
|
|
275
|
+
|
|
276
|
+
After every slice, progress must enter `task-state.json` through structured state update. Do not handwrite derived results and do not report progress only in chat.
|
|
277
|
+
|
|
278
|
+
`slice-delta.json` must express at least:
|
|
279
|
+
|
|
280
|
+
```text
|
|
281
|
+
slice_id
|
|
282
|
+
slice_goal
|
|
283
|
+
touched_plan_items
|
|
284
|
+
touched_acs
|
|
285
|
+
code_changes
|
|
286
|
+
evidence_records
|
|
287
|
+
closed_layers
|
|
288
|
+
remaining_layers
|
|
289
|
+
blockers
|
|
290
|
+
cleanup_assertions
|
|
291
|
+
progress_value
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Each evidence record enters `task-state.evidence[]` and includes:
|
|
295
|
+
|
|
296
|
+
```text
|
|
297
|
+
evidence_id
|
|
298
|
+
slice_id
|
|
299
|
+
type
|
|
300
|
+
command
|
|
301
|
+
artifact_paths
|
|
302
|
+
proves
|
|
303
|
+
does_not_prove
|
|
304
|
+
freshness
|
|
305
|
+
redaction
|
|
306
|
+
reviewability / reproduction_steps
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
`proves` and `does_not_prove` are both required because evidence must say what it proves and what it does not prove. This prevents samples, passing tests, screenshots, mocks or local audit text from being reused as full acceptance.
|
|
310
|
+
|
|
311
|
+
## 8. Phase Seven: Local Audit And Derived Views
|
|
312
|
+
|
|
313
|
+
After state changes, run:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
ty-context composite-long-task derive <workdir>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Legacy/internal compatibility may exist as:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
ty-context superpowers derive <workdir>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
The generated views are:
|
|
326
|
+
|
|
327
|
+
```text
|
|
328
|
+
derived/local-audit.md
|
|
329
|
+
derived/plan-conformance-matrix.md
|
|
330
|
+
derived/final-acceptance-verdict.md
|
|
331
|
+
derived/progress-ledger.md
|
|
332
|
+
derived/evidence-index.md
|
|
333
|
+
derived/context-alignment.md
|
|
334
|
+
derived/final-summary.md
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Their roles:
|
|
338
|
+
|
|
339
|
+
```text
|
|
340
|
+
local-audit.md
|
|
341
|
+
= recovery view for future sessions or subagents.
|
|
342
|
+
|
|
343
|
+
plan-conformance-matrix.md
|
|
344
|
+
= whether PIs were implemented, whether evidence maps correctly, and whether implementation drifted from the Technical Plan.
|
|
345
|
+
|
|
346
|
+
final-acceptance-verdict.md
|
|
347
|
+
= whether ACs satisfy required proof layers, what is missing, and what cannot be accepted.
|
|
348
|
+
|
|
349
|
+
progress-ledger.md
|
|
350
|
+
= separate progress for AC acceptance, engineering implementation, runtime/proof, system capability, sample, real object, full population and workflow overhead.
|
|
351
|
+
|
|
352
|
+
evidence-index.md
|
|
353
|
+
= index from evidence_id to proved object, artifact, command and does_not_prove boundary.
|
|
354
|
+
|
|
355
|
+
context-alignment.md
|
|
356
|
+
= alignment state for Context Delta, Source-to-Context Coverage and Context-to-Implementation Binding.
|
|
357
|
+
|
|
358
|
+
final-summary.md
|
|
359
|
+
= whether completion is currently possible, why not, and what comes next.
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
All `derived/**` files are generated views, not authority. They must not be hand-edited as completion evidence. Local audit is not Context, not quality proof and not a global task manager; it is only a recovery and audit view.
|
|
363
|
+
|
|
364
|
+
## 9. Phase Eight: Slice Gate And Epoch Gate
|
|
365
|
+
|
|
366
|
+
After each slice, run:
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
ty-context composite-long-task slice-gate <workdir> --slice <slice-id>
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Slice gate checks:
|
|
373
|
+
|
|
374
|
+
```text
|
|
375
|
+
- whether the slice closed a real PI/AC/proof-layer gap;
|
|
376
|
+
- whether fresh reviewable evidence exists;
|
|
377
|
+
- whether evidence entered task-state.evidence[];
|
|
378
|
+
- whether closed_layers are actually proved;
|
|
379
|
+
- whether remaining_layers were not falsely closed;
|
|
380
|
+
- whether blockers are recorded truthfully;
|
|
381
|
+
- whether derived views match task-state.
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
When multiple slices reuse one provider/browser/runtime/security proof environment, run:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
ty-context composite-long-task epoch-gate <workdir> --epoch <epoch-id>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Epoch gate validates the shared proof environment in batch, avoids running full final gate after every slice, and prevents shared runtime/browser/provider evidence from being reused after contamination or staleness.
|
|
391
|
+
|
|
392
|
+
## 10. Phase Nine: Plan Conformance Gate
|
|
393
|
+
|
|
394
|
+
Plan conformance is judged by the Technical Realization Plan, not by the executor's summary.
|
|
395
|
+
|
|
396
|
+
Each PI answers:
|
|
397
|
+
|
|
398
|
+
```text
|
|
399
|
+
- Was the PI actually implemented?
|
|
400
|
+
- Do implementation paths match implementation_paths?
|
|
401
|
+
- Are owner_surfaces correct?
|
|
402
|
+
- Were forbidden_surfaces avoided?
|
|
403
|
+
- Did API/schema/state/runtime/data/UI/IA land according to the Plan?
|
|
404
|
+
- Were required_tests executed or blocked with reason?
|
|
405
|
+
- Can related_acs be traced through evidence?
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
`derived/plan-conformance-matrix.md` is only a view. The authoritative state is `task-state.json` plus evidence records.
|
|
409
|
+
|
|
410
|
+
Forbidden substitutions:
|
|
411
|
+
|
|
412
|
+
```text
|
|
413
|
+
- "code changed" does not prove plan conformance;
|
|
414
|
+
- "tests passed" does not prove PI completion;
|
|
415
|
+
- "Superpowers review passed" does not prove Plan Conformance Gate;
|
|
416
|
+
- convenient current-code paths do not override the Technical Realization Plan.
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
## 11. Phase Ten: Acceptance Evidence Gate
|
|
420
|
+
|
|
421
|
+
AC completion is decided by the Acceptance Checklist. Every AC must satisfy its declared `required_proof_layers`.
|
|
422
|
+
|
|
423
|
+
Proof layers may include:
|
|
424
|
+
|
|
425
|
+
```text
|
|
426
|
+
code
|
|
427
|
+
api_schema
|
|
428
|
+
worker_runtime
|
|
429
|
+
data_artifact
|
|
430
|
+
ui_browser
|
|
431
|
+
security_redaction
|
|
432
|
+
all_provider_all_runner
|
|
433
|
+
cleanup_stale_scan
|
|
434
|
+
test
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
AC completion requires:
|
|
438
|
+
|
|
439
|
+
```text
|
|
440
|
+
1. Every required proof layer has fresh reviewable evidence.
|
|
441
|
+
2. evidence.proves explicitly covers that layer.
|
|
442
|
+
3. evidence.does_not_prove does not expose a scope substitution problem.
|
|
443
|
+
4. No missing required layers.
|
|
444
|
+
5. No material drift.
|
|
445
|
+
6. No stale artifact.
|
|
446
|
+
7. No raw secret/token/cookie/payload leak.
|
|
447
|
+
8. No sibling surface / sample object / mock substitution for owner surface or full population.
|
|
448
|
+
9. When full_population_required=true, sample evidence cannot replace full-population evidence.
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
This gate enables an external reviewer to follow the evidence chain. Auditor subagents may find gaps but are not proof sources.
|
|
452
|
+
|
|
453
|
+
## 12. Phase Eleven: Delivery Scope And Full Population Stay Separate
|
|
454
|
+
|
|
455
|
+
The workflow always distinguishes:
|
|
456
|
+
|
|
457
|
+
```text
|
|
458
|
+
system_capability_build
|
|
459
|
+
representative_sample_validation
|
|
460
|
+
full_population_operation
|
|
461
|
+
mixed_scope_requires_boundary
|
|
462
|
+
out_of_scope_backlog
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
Typical forbidden claims:
|
|
466
|
+
|
|
467
|
+
```text
|
|
468
|
+
- framework complete does not mean all real objects complete;
|
|
469
|
+
- several objects succeeded does not mean automation capability complete;
|
|
470
|
+
- sample provider succeeded does not mean all-provider complete;
|
|
471
|
+
- UI screenshot exists does not mean owner surface primary path is closed;
|
|
472
|
+
- tests passed does not mean AC accepted;
|
|
473
|
+
- local audit passed does not mean product_goal_complete.
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
If Product / Plan / Checklist disagree on delivery scope, state records:
|
|
477
|
+
|
|
478
|
+
```text
|
|
479
|
+
scope_conflict_requires_decision
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
Completion is blocked until the source conflict is resolved. Validators inspect explicit fields; they do not infer business scope from prose.
|
|
483
|
+
|
|
484
|
+
## 13. Phase Twelve: Fixed Final Gate Order
|
|
485
|
+
|
|
486
|
+
Before final completion, the order is fixed:
|
|
487
|
+
|
|
488
|
+
```text
|
|
489
|
+
1. derive all views
|
|
490
|
+
2. superpowers:verification-before-completion
|
|
491
|
+
3. ty-context validate-superpowers-state <workdir>
|
|
492
|
+
4. ty-context validate-plan-acceptance <workdir>
|
|
493
|
+
5. read-only auditor / stale-overclaim scan when applicable
|
|
494
|
+
6. if auditor findings changed state/evidence, derive and validate again
|
|
495
|
+
7. ty-context composite-long-task final-gate <workdir>
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Legacy/internal compatibility may exist as:
|
|
499
|
+
|
|
500
|
+
```text
|
|
501
|
+
ty-context superpowers final-gate <workdir>
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
Only final-gate computes:
|
|
505
|
+
|
|
506
|
+
```text
|
|
507
|
+
product_goal_complete=true
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Implementation / execution Goals complete only after that computed state.
|
|
511
|
+
|
|
512
|
+
## 14. Completion Semantics
|
|
513
|
+
|
|
514
|
+
The workflow distinguishes:
|
|
515
|
+
|
|
516
|
+
```text
|
|
517
|
+
audit_task_complete
|
|
518
|
+
= whether the audit/reporting task finished.
|
|
519
|
+
|
|
520
|
+
acceptance_target_status
|
|
521
|
+
= AC acceptance target state.
|
|
522
|
+
|
|
523
|
+
product_goal_complete
|
|
524
|
+
= whether implementation/execution is truly complete.
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Rules:
|
|
528
|
+
|
|
529
|
+
```text
|
|
530
|
+
1. Do not handwrite product_goal_complete.
|
|
531
|
+
2. product_goal_complete is computed only by final-gate.
|
|
532
|
+
3. audit_task_complete=true is not product completion.
|
|
533
|
+
4. If acceptance_target_status is not complete, do not say Goal achieved.
|
|
534
|
+
5. A read-only audit task may end, but must say:
|
|
535
|
+
Audit workflow completed; acceptance target not complete.
|
|
536
|
+
6. Implementation / execution Goal mode can call update_goal complete only when product_goal_complete=true.
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
This must stay visible in Skill and Goal objective because Codex Goal mode can otherwise confuse "audit workflow ended" with "product target accepted."
|
|
540
|
+
|
|
541
|
+
## 15. Blocker Strategy
|
|
542
|
+
|
|
543
|
+
The executor maximizes autonomous progress:
|
|
544
|
+
|
|
545
|
+
```text
|
|
546
|
+
- reuse local app login sessions;
|
|
547
|
+
- reuse browser sessions;
|
|
548
|
+
- reuse CLI auth;
|
|
549
|
+
- reuse OS credential helpers;
|
|
550
|
+
- try authorized sudo / gsudo / administrator elevation first;
|
|
551
|
+
- solve locally discoverable command/page/script/config/test/log issues before pausing.
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Only these are user blockers:
|
|
555
|
+
|
|
556
|
+
```text
|
|
557
|
+
- MFA;
|
|
558
|
+
- account not logged in and cannot self-service login;
|
|
559
|
+
- insufficient permissions;
|
|
560
|
+
- external approval;
|
|
561
|
+
- payment or paid-source authorization;
|
|
562
|
+
- platform policy or legal restriction;
|
|
563
|
+
- credentials or decisions that only the user can supply.
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
When reporting a blocker, include the minimal user action:
|
|
567
|
+
|
|
568
|
+
```text
|
|
569
|
+
- exact page/system/command to open;
|
|
570
|
+
- exact field or value location;
|
|
571
|
+
- sensitive values not to send;
|
|
572
|
+
- what the agent will do next;
|
|
573
|
+
- why completion is currently impossible.
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
## 16. Final Expected Effect
|
|
577
|
+
|
|
578
|
+
The result is a recoverable long-running loop:
|
|
579
|
+
|
|
580
|
+
```text
|
|
581
|
+
Tiny Context Workflow Contract
|
|
582
|
+
-> Context Delta
|
|
583
|
+
-> Context update or confirmation
|
|
584
|
+
-> Source-to-Context Coverage
|
|
585
|
+
-> Context-to-Implementation Binding
|
|
586
|
+
|
|
587
|
+
Three inputs
|
|
588
|
+
-> lock product intent, technical plan and acceptance semantics
|
|
589
|
+
-> compile PI/AC/proof graph
|
|
590
|
+
|
|
591
|
+
Superpowers
|
|
592
|
+
-> implementation slices
|
|
593
|
+
-> multi-agent / TDD / executing-plans implementation
|
|
594
|
+
|
|
595
|
+
Each slice
|
|
596
|
+
-> code/API/runtime/UI changes
|
|
597
|
+
-> evidence capture
|
|
598
|
+
-> slice-delta update
|
|
599
|
+
-> apply-slice-delta
|
|
600
|
+
-> derive audit / matrix / verdict / progress / evidence views
|
|
601
|
+
-> slice-gate / epoch-gate
|
|
602
|
+
|
|
603
|
+
Final
|
|
604
|
+
-> Plan Conformance Gate
|
|
605
|
+
-> Acceptance Evidence Gate
|
|
606
|
+
-> External Reviewer / stale-overclaim scan
|
|
607
|
+
-> final-gate
|
|
608
|
+
-> product_goal_complete=true before Codex Goal completion
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
One-sentence definition:
|
|
612
|
+
|
|
613
|
+
```text
|
|
614
|
+
The expected runtime effect of the composite long-task workflow is to make a Codex agent fuse Tiny Context fact/process constraints, three upstream task authorities, Superpowers long-task execution and a task-state evidence state machine in one context; execution goes Context first, then Plan, then Superpowers slices, and completion is judged by state-backed gates for plan conformance, AC evidence and product_goal_complete so long tasks do not drift in implementation, acceptance or completion claims.
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
## 17. Forbidden Wrong Fusion / 不允许的错误融合
|
|
618
|
+
|
|
619
|
+
The workflow must explicitly prevent these interpretations:
|
|
620
|
+
|
|
621
|
+
```text
|
|
622
|
+
Do not interpret the composite long-task workflow as the Tiny Context Workflow Contract itself.
|
|
623
|
+
Do not register workflow-protocol.md in project_context/context.toml.
|
|
624
|
+
Do not treat workflow-protocol.md as a business fact source.
|
|
625
|
+
Do not let derived/** rewrite Product / Plan / Checklist.
|
|
626
|
+
Do not treat local audit as quality proof.
|
|
627
|
+
Do not treat Superpowers review as plan conformance or AC acceptance.
|
|
628
|
+
Do not treat sample evidence as full-population proof.
|
|
629
|
+
Do not claim full implementation when Context Delta is required but Context is not updated.
|
|
630
|
+
Do not claim full alignment while Source-to-Context Coverage / Context-to-Implementation Binding has unresolved gaps.
|
|
631
|
+
Do not handwrite product_goal_complete.
|
|
632
|
+
Do not call update_goal complete before final-gate passes.
|
|
633
|
+
```
|
|
@@ -19,7 +19,7 @@ Convert a given ordinary long-task source into a strict, project-context-aware a
|
|
|
19
19
|
For this exact plan, what must be true before a future executor can honestly say the task is complete?
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
This Skill defines the acceptance standard. It is not an execution framework. For
|
|
22
|
+
This Skill defines the acceptance standard. It is not an execution framework. For the composite workflow that binds the finished checklist to Superpowers-backed execution, directly invoke `/composite-long-task-workflow` after this Skill has produced or verified the full checklist.
|
|
23
23
|
|
|
24
24
|
## Required Outputs
|
|
25
25
|
|
|
@@ -59,7 +59,7 @@ Use this Skill through explicit invocation:
|
|
|
59
59
|
/normal-long-task
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Do not rely on broad automatic keyword routing. If the user needs the Superpowers-
|
|
62
|
+
Do not rely on broad automatic keyword routing. If the user needs the Superpowers-backed composite long-task workflow, use `/composite-long-task-workflow` after this Skill has produced or verified the full checklist.
|
|
63
63
|
|
|
64
64
|
## Use Cases
|
|
65
65
|
|
|
@@ -264,11 +264,11 @@ If only locally unsatisfiable hard blockers remain, pause for the user or extern
|
|
|
264
264
|
|
|
265
265
|
## Autonomous Progress Protocol
|
|
266
266
|
|
|
267
|
-
The generated target-mode prompt must require maximum safe autonomous progress within current platform, repository, tool and user-authorized permission boundaries. Do not ask the user for work the executor can safely discover, run, inspect or verify itself.
|
|
268
|
-
|
|
269
|
-
Before treating account, credential or app access as blocked, open the relevant app, browser page, CLI tool or system setting and try existing app sessions, browser cookies, CLI auth, OS credential helpers or other user-authorized local state. If the existing session is absent, expired, permission-denied or requires login/MFA/approval, then pause with the minimal user action list; do not ask the user to send passwords, tokens, cookies or full sensitive fields.
|
|
270
|
-
|
|
271
|
-
The generated target-mode prompt must inherit current repository/global `AGENTS.md` or agent-instruction permission policy. Authorized `sudo` / `gsudo` / administrator elevation is not a user blocker; the executor must try it before pausing. Pause only if elevation is unavailable, fails, or requires user/system authorization.
|
|
267
|
+
The generated target-mode prompt must require maximum safe autonomous progress within current platform, repository, tool and user-authorized permission boundaries. Do not ask the user for work the executor can safely discover, run, inspect or verify itself.
|
|
268
|
+
|
|
269
|
+
Before treating account, credential or app access as blocked, open the relevant app, browser page, CLI tool or system setting and try existing app sessions, browser cookies, CLI auth, OS credential helpers or other user-authorized local state. If the existing session is absent, expired, permission-denied or requires login/MFA/approval, then pause with the minimal user action list; do not ask the user to send passwords, tokens, cookies or full sensitive fields.
|
|
270
|
+
|
|
271
|
+
The generated target-mode prompt must inherit current repository/global `AGENTS.md` or agent-instruction permission policy. Authorized `sudo` / `gsudo` / administrator elevation is not a user blocker; the executor must try it before pausing. Pause only if elevation is unavailable, fails, or requires user/system authorization.
|
|
272
272
|
|
|
273
273
|
Pause only for locally unsatisfiable hard blockers such as missing accounts, credentials, production access, paid services, legal/security approval, user-only browser sessions or sensitive fields the executor cannot access safely.
|
|
274
274
|
|
|
@@ -445,11 +445,11 @@ Hard requirements:
|
|
|
445
445
|
- The prompt must identify the full checklist path immediately after the plan path and say it is the complete acceptance standard. Chinese prompts must include this exact sentence: `该文件是完整验收标准,验收以这个为准。完成前必须逐项检查,不满足则继续实现。` English prompts must say the full checklist is the complete acceptance standard, acceptance is judged against it, and every item must be checked before completion.
|
|
446
446
|
- The prompt must identify a local audit path, normally `tmp/ty-context/plan-acceptance/<plan-slug>-local-audit.md`, and require the future executor to read it before resuming, keep it current during execution, and use it only as target-mode acceptance progress state, not Context or proof.
|
|
447
447
|
- If the prompt uses a compact checklist summary, say the full checklist owns details and acceptance authority; the compact summary owns direction, priority and recovery navigation; overlap with the full checklist is allowed; conflicts are resolved in favor of the full checklist.
|
|
448
|
-
- The prompt must require local audit status to start from `unknown / not_run`; only fresh required evidence can mark an AC complete. If any fresh browser / API / runtime / data / test contradiction appears, downgrade the affected AC and overall status and record invalidating evidence.
|
|
449
|
-
- The prompt must state that UI-facing acceptance requires a real page path and matching user-visible state; component / viewmodel / mock / unit test evidence is auxiliary unless the full checklist explicitly says otherwise.
|
|
450
|
-
- The prompt must require maximum safe autonomous progress within current platform, repository, tool and user-authorized permission boundaries. Do not ask the user for work the executor can safely discover, run, inspect or verify itself. If pausing for a locally unsatisfiable hard blocker, provide the minimum user action list: exact page/system/command/owner, field or value location, redaction guidance, values not to send and what the executor will do next.
|
|
451
|
-
- The prompt must say existing local sessions, browser state, CLI auth and OS credential helpers are self-service resources: open the relevant app/page/tool/settings first, use existing local auth if present, and pause only after access is actually absent, expired, permission-denied or requires login/MFA/approval.
|
|
452
|
-
- The prompt must inherit current repository/global `AGENTS.md` or agent-instruction permission policy. Authorized `sudo` / `gsudo` / administrator elevation is not a user blocker; the executor must try it before pausing. Pause only if elevation is unavailable, fails, or requires user/system authorization.
|
|
448
|
+
- The prompt must require local audit status to start from `unknown / not_run`; only fresh required evidence can mark an AC complete. If any fresh browser / API / runtime / data / test contradiction appears, downgrade the affected AC and overall status and record invalidating evidence.
|
|
449
|
+
- The prompt must state that UI-facing acceptance requires a real page path and matching user-visible state; component / viewmodel / mock / unit test evidence is auxiliary unless the full checklist explicitly says otherwise.
|
|
450
|
+
- The prompt must require maximum safe autonomous progress within current platform, repository, tool and user-authorized permission boundaries. Do not ask the user for work the executor can safely discover, run, inspect or verify itself. If pausing for a locally unsatisfiable hard blocker, provide the minimum user action list: exact page/system/command/owner, field or value location, redaction guidance, values not to send and what the executor will do next.
|
|
451
|
+
- The prompt must say existing local sessions, browser state, CLI auth and OS credential helpers are self-service resources: open the relevant app/page/tool/settings first, use existing local auth if present, and pause only after access is actually absent, expired, permission-denied or requires login/MFA/approval.
|
|
452
|
+
- The prompt must inherit current repository/global `AGENTS.md` or agent-instruction permission policy. Authorized `sudo` / `gsudo` / administrator elevation is not a user blocker; the executor must try it before pausing. Pause only if elevation is unavailable, fails, or requires user/system authorization.
|
|
453
453
|
- The prompt must preserve hard-blocker semantics: if only locally unsatisfiable hard blockers remain, pause for the user or external owner instead of marking the goal complete.
|
|
454
454
|
- The prompt must say that local audit is not Context, not product-quality proof, not a global task manager, and not a replacement for project tests, CI, review, human acceptance, Task Contract or workflow-contract `plan.md`.
|
|
455
455
|
- Do not include explanatory preface inside the prompt.
|