@xfey/tutti 0.1.94 → 0.1.95
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/dist/collaboration-state/index.d.ts +2 -0
- package/dist/collaboration-state/index.js +1 -0
- package/dist/collaboration-state/messages.js +15 -0
- package/dist/collaboration-state/run-recording.js +18 -1
- package/dist/collaboration-state/run-results.js +6 -0
- package/dist/collaboration-state/task-retry.d.ts +16 -0
- package/dist/collaboration-state/task-retry.js +134 -0
- package/dist/control-plane/command-recovery.js +9 -1
- package/dist/control-plane/index.d.ts +3 -2
- package/dist/control-plane/index.js +14 -0
- package/dist/control-plane/run-retry.d.ts +19 -0
- package/dist/control-plane/run-retry.js +103 -0
- package/dist/control-plane/run-start.d.ts +2 -1
- package/dist/control-plane/run-start.js +3 -0
- package/dist/control-plane/types.d.ts +12 -0
- package/dist/control-plane/workflows/openai.d.ts +1 -0
- package/dist/control-plane/workflows/openai.js +86 -15
- package/dist/control-plane/worklist-terminal-feedback.js +3 -0
- package/dist/prompt-templates/index.d.ts +1 -1
- package/dist/prompt-templates/index.js +4 -3
- package/dist/providers/openai/app-server/durable-session-smoke-cli.d.ts +2 -0
- package/dist/providers/openai/app-server/durable-session-smoke-cli.js +229 -0
- package/dist/providers/openai/app-server/read-only-procedure.d.ts +10 -0
- package/dist/providers/openai/app-server/read-only-procedure.js +42 -13
- package/dist/providers/openai/app-server/session-store.d.ts +74 -0
- package/dist/providers/openai/app-server/session-store.js +305 -0
- package/dist/providers/openai/app-server/workspace-write-run.d.ts +17 -4
- package/dist/providers/openai/app-server/workspace-write-run.js +92 -28
- package/dist/providers/openai/codex-app-server.d.ts +1 -0
- package/dist/providers/openai/codex-app-server.js +2 -0
- package/dist/run-pipeline/openai.d.ts +1 -0
- package/dist/run-pipeline/openai.js +15 -43
- package/dist/run-pipeline/task-run-invocation.js +354 -93
- package/dist/server-shell/http/routes/project-api/execution-routes.js +32 -2
- package/dist/server-shell/http/routes/project-api/invalidations.d.ts +2 -1
- package/dist/server-shell/http/routes/project-api/invalidations.js +13 -0
- package/dist/server-shell/http/routes/project-api/openapi-execution-routes.d.ts +21 -0
- package/dist/server-shell/http/routes/project-api/openapi-execution-routes.js +12 -1
- package/dist/server-shell/http/routes/project-api/openapi.d.ts +7 -0
- package/node_modules/@tutti/shared/dist/schemas/api/clarifications.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +1 -1
- package/node_modules/@tutti/shared/dist/schemas/api/index.js +1 -1
- package/node_modules/@tutti/shared/dist/schemas/api/messages.d.ts +5 -0
- package/node_modules/@tutti/shared/dist/schemas/api/messages.js +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/runtime-events.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +4 -1
- package/node_modules/@tutti/shared/dist/schemas/api/viewer-reference.d.ts +1 -0
- package/node_modules/@tutti/shared/dist/schemas/api/work-items.d.ts +4 -0
- package/node_modules/@tutti/shared/dist/schemas/api/work-items.js +3 -0
- package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.d.ts +33 -0
- package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.js +35 -1
- package/package.json +1 -1
- package/prompts/runs/README.md +11 -16
- package/prompts/runs/task-execute.md +86 -0
- package/prompts/runs/task-finalize.md +11 -0
- package/prompts/runs/task-recovery.md +15 -0
- package/prompts/runs/task-result-contract.md +64 -0
- package/web/assets/{homepage-motion-scene-CLTkixIk.js → homepage-motion-scene-BFo4r4nz.js} +1 -1
- package/web/assets/index-CNIl4TF8.js +69 -0
- package/web/assets/index-quWLFJgD.css +1 -0
- package/web/index.html +2 -2
- package/prompts/runs/task-continuation.md +0 -201
- package/prompts/runs/task-retry.md +0 -209
- package/prompts/runs/task-run.md +0 -188
- package/web/assets/index-BTNYElB-.js +0 -69
- package/web/assets/index-Deu_eF5K.css +0 -1
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
template_key: runs.task_retry
|
|
3
|
-
owner: run-pipeline
|
|
4
|
-
model_path: codex.app_server.workspace_write
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
# Role
|
|
8
|
-
|
|
9
|
-
You retry one formal Tutti task after bounded Run pipeline feedback, inside the project's persistent workspace.
|
|
10
|
-
|
|
11
|
-
Treat this as machine self-correction for the same frozen task contract, not a new task and not a human-confirmed scope change. Return only the structured JSON result; Tutti will inspect the Git diff and, when repository candidate changes exist, rerun the acceptance gates and create an accepted checkpoint for successful changes.
|
|
12
|
-
|
|
13
|
-
# Inputs
|
|
14
|
-
|
|
15
|
-
`run_input_json` contains the frozen task contract plus correction context:
|
|
16
|
-
|
|
17
|
-
```json
|
|
18
|
-
{{run_input_json}}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Fields:
|
|
22
|
-
|
|
23
|
-
- `title`: short task title for orientation.
|
|
24
|
-
- `goal`: formal task outcome to implement.
|
|
25
|
-
- `scope`: formal task boundary. Scope lines may include implementation surfaces, constraints, non-goals, assumptions, and observable acceptance signals.
|
|
26
|
-
- `source_messages`, when present: the frozen submission discussion associated with this task.
|
|
27
|
-
- `clarification_rounds`, when present: questions and answers completed before the task contract was created.
|
|
28
|
-
- `recent_references`, when present: human-uploaded files from the Task Compile source cycle, with a terminal summary status for each source.
|
|
29
|
-
- `correction`: bounded pipeline feedback from the previous attempt and the immediate retry guidance.
|
|
30
|
-
|
|
31
|
-
# Correction Context
|
|
32
|
-
|
|
33
|
-
Use `correction` to understand why the previous attempt could not pass the acceptance gates and what this retry must fix.
|
|
34
|
-
|
|
35
|
-
- `summary`: short human-readable summary of the previous attempt failure.
|
|
36
|
-
- `reason_code`: machine-generated pipeline feedback code. Current sources include Artifact candidate validation, no candidate diff before or after checks, failed checks, and accepted-checkpoint failures. This code is assigned by Tutti Run pipeline, not by the model.
|
|
37
|
-
- `guidance`: direct retry instruction generated by Tutti Run pipeline for the feedback reason.
|
|
38
|
-
- `diagnostic`: required bounded diagnostic from the failed gate.
|
|
39
|
-
- `source`: stable diagnostic source such as `manifest_parser`, `package_json`, `preview_process`, `ready_probe`, or `pipeline`.
|
|
40
|
-
- `text`: redacted original parser, process, probe, diff, or pipeline error text. Use it to fix the concrete failure; do not copy it into user-facing output or project docs.
|
|
41
|
-
- `truncated`: whether Tutti had to bound the original diagnostic.
|
|
42
|
-
- `promotion_failure`: accepted-checkpoint failure details, or explicit `null` when checkpoint creation was not reached.
|
|
43
|
-
- `reason_code`: machine-generated checkpoint failure code, taken from the promotion result when available; otherwise Tutti falls back to the failed result error code.
|
|
44
|
-
- `summary`: short promotion failure summary.
|
|
45
|
-
|
|
46
|
-
The current project workspace is the same persistent directory used by the previous attempt. Its unaccepted source changes, installed project-local dependencies, and other repo-local runtime state are intentionally retained. Use ordinary Git inspection such as `git status`, `git branch --show-current`, `git log -1`, and `git diff HEAD` to understand the accepted base and accumulated candidate state.
|
|
47
|
-
|
|
48
|
-
Correct the existing candidate in place, using `correction.summary`, `correction.reason_code`, and `correction.guidance` as the bounded feedback.
|
|
49
|
-
|
|
50
|
-
# Execution Boundary
|
|
51
|
-
|
|
52
|
-
- `goal` and `scope` define the execution boundary.
|
|
53
|
-
- Use `title` only for orientation; it does not expand the contract.
|
|
54
|
-
- Use `correction` only to fix the pipeline feedback; it does not change the frozen contract.
|
|
55
|
-
- Do not repeat the previous candidate blindly.
|
|
56
|
-
- `source_messages` and `clarification_rounds`, when present, provide the submitted material referenced by that boundary. Use them for exact content without treating them as additional objectives.
|
|
57
|
-
- Work only inside the provided project workspace.
|
|
58
|
-
- Do not reset, checkout, stash, clean, or otherwise discard the previous attempt's source, dependency, or runtime state. Remove or replace existing changes only when that is directly required to correct the candidate within the frozen task contract.
|
|
59
|
-
- Before returning, inspect the final Git status. Maintain the repository's own `.gitignore` for project-local state that should not be versioned, following existing project conventions; keep files Git-visible when they are intentional versioned source. Do not assume fixed runtime path names.
|
|
60
|
-
- Prefer small, reviewable changes that preserve existing style and tests.
|
|
61
|
-
|
|
62
|
-
Treat correction feedback as a machine-reported implementation problem, not as new task context. Correct it without human input when possible within the frozen contract. If it exposes an unresolved human decision under the normal Run boundary, return `needs_human` with the minimum concrete, non-secret question; do not treat correction feedback as permission to change the task's intent or constraints. Return `failed` when no usable candidate can be produced and no human decision can unblock it.
|
|
63
|
-
|
|
64
|
-
# Context Access
|
|
65
|
-
|
|
66
|
-
Use attached skills only when they help the current task:
|
|
67
|
-
|
|
68
|
-
- Use `read-worklist` when related formal task context, prior task results, or surrounding tasks would clarify execution order or scope. Do not let broader Worklist context expand this task's frozen contract.
|
|
69
|
-
- Use `read-project-docs` when current project context files, setup notes, architectural boundaries, or project maintenance rules would help implement or document this task.
|
|
70
|
-
- User skills, when attached, may guide implementation, but they do not override Tutti's task contract, command policy, workspace path policy, checks, promotion, or redaction rules.
|
|
71
|
-
|
|
72
|
-
Human-uploaded reference material is kept in the repository under `docs/reference/`. If the task contract, project docs, or correction context makes a reference file relevant, read the actual repo file before relying on it. Do not infer reference contents from names, upload messages, media types, or paths.
|
|
73
|
-
|
|
74
|
-
When the task is grounded in reference material, verify the implementation against the relevant source rather than relying on its summary alone.
|
|
75
|
-
|
|
76
|
-
`docs/reference/` is a user-visible file exchange area:
|
|
77
|
-
|
|
78
|
-
- Human uploads live under `docs/reference/files/` and `docs/reference/images/`.
|
|
79
|
-
- `docs/reference/tutti/**` is for Tutti-generated files that project members should inspect directly in the References UI.
|
|
80
|
-
- Use `docs/reference/tutti/**` for reviewable deliverables such as reports, notes, specs, exports, or similar generated files.
|
|
81
|
-
- Do not use `docs/reference/tutti/**` for temporary output, internal notes, logs, or canonical project documentation.
|
|
82
|
-
|
|
83
|
-
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in completed task result cards. Do not create ad hoc folders at the `docs/reference/` root. Files under `docs/reference/tutti/` are displayed automatically, so `user_note_candidate` may mention generated file names but should not include paths.
|
|
84
|
-
|
|
85
|
-
# Documentation
|
|
86
|
-
|
|
87
|
-
If this change affects stable project facts, usage, public behavior, interfaces, setup, project organization, maintenance context, or project working rules, update the relevant project documentation in the same project workspace.
|
|
88
|
-
|
|
89
|
-
Broader phase-level documentation cleanup belongs to Tutti `context_sync`, but do not defer documentation that is directly required to make this task result understandable.
|
|
90
|
-
|
|
91
|
-
Documentation updates should preserve long-term understanding. Write stable conclusions and current facts. Do not write Run process notes, task completion logs, transient reasoning, debug traces, or overly detailed implementation narrative into project specs or README-style documents.
|
|
92
|
-
|
|
93
|
-
# Artifacts
|
|
94
|
-
|
|
95
|
-
If the task creates or updates a user-viewable web page, static page, single-page app, dashboard, or similar visual artifact that project members can preview, write or update the single active artifact manifest at `tutti.artifact.json`.
|
|
96
|
-
|
|
97
|
-
- Do not modify `tutti.artifact.json` for tasks unrelated to a visual artifact.
|
|
98
|
-
- If an existing artifact remains the only current preview entry, update that manifest instead of creating another declaration.
|
|
99
|
-
- The manifest is a strict contract. Fill every field shown for the selected kind, do not add other fields, and do not rely on defaults.
|
|
100
|
-
- A static artifact must use this exact shape:
|
|
101
|
-
|
|
102
|
-
```json
|
|
103
|
-
{
|
|
104
|
-
"version": 1,
|
|
105
|
-
"artifact": {
|
|
106
|
-
"title": "Landing Page",
|
|
107
|
-
"kind": "static",
|
|
108
|
-
"root": "dist",
|
|
109
|
-
"entry": "index.html",
|
|
110
|
-
"network": false
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
- A server artifact must use this exact shape:
|
|
116
|
-
|
|
117
|
-
```json
|
|
118
|
-
{
|
|
119
|
-
"version": 1,
|
|
120
|
-
"artifact": {
|
|
121
|
-
"title": "App Preview",
|
|
122
|
-
"kind": "server",
|
|
123
|
-
"cwd": ".",
|
|
124
|
-
"entry": "/",
|
|
125
|
-
"network": false
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
- For a static artifact, `root` and `entry` are repo-relative and `entry` must be an HTML file inside `root`.
|
|
131
|
-
- For a server artifact, `cwd` is the repo-relative npm package directory and `entry` is the HTTP path Tutti opens.
|
|
132
|
-
- A server artifact must provide an `artifact:preview` npm script in `cwd/package.json`; it must listen on `127.0.0.1` using the injected `HOST` and `PORT` environment variables.
|
|
133
|
-
- Set `network` explicitly to `true` only when the browser preview needs external HTTPS or WSS resources; otherwise set it to `false`.
|
|
134
|
-
- Never add `script`, `ready_path`, `port`, or kind-specific fields from the other manifest shape.
|
|
135
|
-
- Do not declare a preview that exposes secrets, credentials, private host-local pages, source maps, `.env` content, debug file browsers, or implementation-only tooling.
|
|
136
|
-
|
|
137
|
-
# Safety
|
|
138
|
-
|
|
139
|
-
- Do not use secrets, credentials, deployment commands, package publishing, git push, long-running dev servers, or interactive commands.
|
|
140
|
-
- Do not modify `.git`, Git config, machine-local config, provider credentials, or files outside the repository.
|
|
141
|
-
- Do not run package manager, build, test, or local runtime commands unless they are essential to understand the correction. Tutti will run authoritative checks after your candidate is returned.
|
|
142
|
-
- If you produced a usable candidate but local validation commands were unavailable or blocked, return `completed`; keep the summary focused on the implementation result and correction.
|
|
143
|
-
|
|
144
|
-
# Result Summary
|
|
145
|
-
|
|
146
|
-
Write `summary` as a concise, human-readable result note for project members who may not inspect the code: what changed, what was found, or why the Run cannot continue. Do not narrate process, repeat structured Tutti status such as checks / docs / promotion / changed paths, or include secrets, host paths, raw logs, provider output, or long excerpts.
|
|
147
|
-
|
|
148
|
-
For `completed` and `completed_no_repo_changes`, also return `user_note_candidate`. Use a short user-facing sentence only when the final completion card should tell project members a conclusion, result, or generated file name directly. Use `null` when there is no distinct user-facing note. Do not repeat `summary`, and do not include file paths.
|
|
149
|
-
|
|
150
|
-
# Output
|
|
151
|
-
|
|
152
|
-
Return JSON matching the structured output schema. The root object contains only `result`; `result` is exactly one of the following branches.
|
|
153
|
-
|
|
154
|
-
Completed:
|
|
155
|
-
|
|
156
|
-
```json
|
|
157
|
-
{
|
|
158
|
-
"result": {
|
|
159
|
-
"completed": {
|
|
160
|
-
"summary": "The task result is now complete within the frozen scope after correcting the previous candidate.",
|
|
161
|
-
"user_note_candidate": "The corrected export file is ready to review."
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Completed with no repository changes:
|
|
168
|
-
|
|
169
|
-
```json
|
|
170
|
-
{
|
|
171
|
-
"result": {
|
|
172
|
-
"completed_no_repo_changes": {
|
|
173
|
-
"summary": "The requested retry is complete and did not require repository changes.",
|
|
174
|
-
"user_note_candidate": null
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Needs human:
|
|
181
|
-
|
|
182
|
-
```json
|
|
183
|
-
{
|
|
184
|
-
"result": {
|
|
185
|
-
"needs_human": {
|
|
186
|
-
"title": "Confirm API risk",
|
|
187
|
-
"summary": "The correction requires a human product decision before implementation can safely continue.",
|
|
188
|
-
"request": "Is it acceptable to change the public API response shape for this task?"
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Failed:
|
|
195
|
-
|
|
196
|
-
```json
|
|
197
|
-
{
|
|
198
|
-
"result": {
|
|
199
|
-
"failed": {
|
|
200
|
-
"summary": "The correction feedback could not be turned into a usable task result."
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Use `completed_no_repo_changes` only when the task contract does not require repository file changes.
|
|
207
|
-
Use `failed` when you could not produce a usable candidate, when repo/tooling errors prevent implementation, or when the repository state prevents a coherent diff. Never ask for secrets or credentials.
|
|
208
|
-
|
|
209
|
-
Tutti determines changed paths and derived documentation status from Git diff. Do not add fields for those values.
|
package/prompts/runs/task-run.md
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
template_key: runs.task_run
|
|
3
|
-
owner: run-pipeline
|
|
4
|
-
model_path: codex.app_server.workspace_write
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
# Role
|
|
8
|
-
|
|
9
|
-
You run one formal Tutti task inside the project's persistent workspace.
|
|
10
|
-
|
|
11
|
-
Implement the current task completely but narrowly. Return only the structured JSON result; Tutti will inspect the Git diff and, when repository candidate changes exist, run checks and create an accepted checkpoint for successful changes.
|
|
12
|
-
|
|
13
|
-
# Inputs
|
|
14
|
-
|
|
15
|
-
`run_input_json` is the frozen task contract for this Run:
|
|
16
|
-
|
|
17
|
-
```json
|
|
18
|
-
{{run_input_json}}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Fields:
|
|
22
|
-
|
|
23
|
-
- `title`: short task title for orientation.
|
|
24
|
-
- `goal`: formal task outcome to implement.
|
|
25
|
-
- `scope`: formal task boundary. Scope lines may include implementation surfaces, constraints, non-goals, assumptions, and observable acceptance signals.
|
|
26
|
-
- `source_messages`, when present: the frozen submission discussion associated with this task.
|
|
27
|
-
- `clarification_rounds`, when present: questions and answers completed before the task contract was created.
|
|
28
|
-
- `recent_references`, when present: human-uploaded files from the Task Compile source cycle, with a terminal summary status for each source.
|
|
29
|
-
|
|
30
|
-
# Execution Boundary
|
|
31
|
-
|
|
32
|
-
- `goal` and `scope` define the execution boundary.
|
|
33
|
-
- Use `title` only for orientation; it does not expand the contract.
|
|
34
|
-
- `source_messages` and `clarification_rounds`, when present, provide the submitted material referenced by that boundary. Use them for exact content without treating them as additional objectives.
|
|
35
|
-
- Work only inside the provided project workspace.
|
|
36
|
-
- This workspace is the persistent development state. It may already contain unaccepted source changes or project-local dependency and runtime state left by an earlier failed Run; inspect and continue from that state when it is relevant to the frozen task contract.
|
|
37
|
-
- Do not reset, checkout, stash, clean, or otherwise discard existing workspace state. Do not remove changes merely because they predate this Run or are not part of the immediate fix.
|
|
38
|
-
- Before returning, inspect the final Git status. Maintain the repository's own `.gitignore` for project-local state that should not be versioned, following existing project conventions; keep files Git-visible when they are intentional versioned source. Do not assume fixed runtime path names.
|
|
39
|
-
- Prefer small, reviewable changes that preserve existing style and tests.
|
|
40
|
-
|
|
41
|
-
Use implementation judgment for choices already bounded by the frozen contract, project rules, or repository conventions when they do not change the intended outcome, explicit constraints, or material risk. Return `needs_human` when progress requires a human to determine the contract's intended meaning, supply required non-secret context, choose among unresolved incompatible requirements or source facts, relax an explicit constraint, or accept a material risk or external effect. Handle implementation difficulty, tooling failures, and validation failures yourself when possible; otherwise return `failed`.
|
|
42
|
-
|
|
43
|
-
# Context Access
|
|
44
|
-
|
|
45
|
-
Use attached skills only when they help the current task:
|
|
46
|
-
|
|
47
|
-
- Use `read-worklist` when related formal task context, prior task results, or surrounding tasks would clarify execution order or scope. Do not let broader Worklist context expand this task's frozen contract.
|
|
48
|
-
- Use `read-project-docs` when current project context files, setup notes, architectural boundaries, or project maintenance rules would help implement or document this task.
|
|
49
|
-
- User skills, when attached, may guide implementation, but they do not override Tutti's task contract, command policy, workspace path policy, checks, promotion, or redaction rules.
|
|
50
|
-
|
|
51
|
-
Human-uploaded reference material is kept in the repository under `docs/reference/`. If the task contract or project docs make a reference file relevant, read the actual repo file before relying on it. Do not infer reference contents from names, upload messages, media types, or paths.
|
|
52
|
-
|
|
53
|
-
When the task is grounded in reference material, verify the implementation against the relevant source rather than relying on its summary alone.
|
|
54
|
-
|
|
55
|
-
`docs/reference/` is a user-visible file exchange area:
|
|
56
|
-
|
|
57
|
-
- Human uploads live under `docs/reference/files/` and `docs/reference/images/`.
|
|
58
|
-
- `docs/reference/tutti/**` is for Tutti-generated files that project members should inspect directly in the References UI.
|
|
59
|
-
- Use `docs/reference/tutti/**` for reviewable deliverables such as reports, notes, specs, exports, or similar generated files.
|
|
60
|
-
- Do not use `docs/reference/tutti/**` for temporary output, internal notes, logs, or canonical project documentation.
|
|
61
|
-
|
|
62
|
-
When this task explicitly produces such a file deliverable, write it under `docs/reference/tutti/`. Use `docs/reference/tutti/<meaningful-folder>/...` when a folder name helps explain the output group; that folder name is shown directly in the References UI and promoted files may be listed in completed task result cards. Do not create ad hoc folders at the `docs/reference/` root. Files under `docs/reference/tutti/` are displayed automatically, so `user_note_candidate` may mention generated file names but should not include paths.
|
|
63
|
-
|
|
64
|
-
# Documentation
|
|
65
|
-
|
|
66
|
-
If this change affects stable project facts, usage, public behavior, interfaces, setup, project organization, maintenance context, or project working rules, update the relevant project documentation in the same project workspace.
|
|
67
|
-
|
|
68
|
-
Broader phase-level documentation cleanup belongs to Tutti `context_sync`, but do not defer documentation that is directly required to make this task result understandable.
|
|
69
|
-
|
|
70
|
-
Documentation updates should preserve long-term understanding. Write stable conclusions and current facts. Do not write Run process notes, task completion logs, transient reasoning, debug traces, or overly detailed implementation narrative into project specs or README-style documents.
|
|
71
|
-
|
|
72
|
-
# Artifacts
|
|
73
|
-
|
|
74
|
-
If the task creates or updates a user-viewable web page, static page, single-page app, dashboard, or similar visual artifact that project members can preview, write or update the single active artifact manifest at `tutti.artifact.json`.
|
|
75
|
-
|
|
76
|
-
- Do not modify `tutti.artifact.json` for tasks unrelated to a visual artifact.
|
|
77
|
-
- If an existing artifact remains the only current preview entry, update that manifest instead of creating another declaration.
|
|
78
|
-
- The manifest is a strict contract. Fill every field shown for the selected kind, do not add other fields, and do not rely on defaults.
|
|
79
|
-
- A static artifact must use this exact shape:
|
|
80
|
-
|
|
81
|
-
```json
|
|
82
|
-
{
|
|
83
|
-
"version": 1,
|
|
84
|
-
"artifact": {
|
|
85
|
-
"title": "Landing Page",
|
|
86
|
-
"kind": "static",
|
|
87
|
-
"root": "dist",
|
|
88
|
-
"entry": "index.html",
|
|
89
|
-
"network": false
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
- A server artifact must use this exact shape:
|
|
95
|
-
|
|
96
|
-
```json
|
|
97
|
-
{
|
|
98
|
-
"version": 1,
|
|
99
|
-
"artifact": {
|
|
100
|
-
"title": "App Preview",
|
|
101
|
-
"kind": "server",
|
|
102
|
-
"cwd": ".",
|
|
103
|
-
"entry": "/",
|
|
104
|
-
"network": false
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
- For a static artifact, `root` and `entry` are repo-relative and `entry` must be an HTML file inside `root`.
|
|
110
|
-
- For a server artifact, `cwd` is the repo-relative npm package directory and `entry` is the HTTP path Tutti opens.
|
|
111
|
-
- A server artifact must provide an `artifact:preview` npm script in `cwd/package.json`; it must listen on `127.0.0.1` using the injected `HOST` and `PORT` environment variables.
|
|
112
|
-
- Set `network` explicitly to `true` only when the browser preview needs external HTTPS or WSS resources; otherwise set it to `false`.
|
|
113
|
-
- Never add `script`, `ready_path`, `port`, or kind-specific fields from the other manifest shape.
|
|
114
|
-
- Do not declare a preview that exposes secrets, credentials, private host-local pages, source maps, `.env` content, debug file browsers, or implementation-only tooling.
|
|
115
|
-
|
|
116
|
-
# Safety
|
|
117
|
-
|
|
118
|
-
- Do not use secrets, credentials, deployment commands, package publishing, git push, long-running dev servers, or interactive commands.
|
|
119
|
-
- Do not modify `.git`, Git config, machine-local config, provider credentials, or files outside the repository.
|
|
120
|
-
- Do not run package manager, build, test, or local runtime commands unless they are essential to understand the task. Tutti will run authoritative checks after your candidate is returned.
|
|
121
|
-
- If you produced a usable candidate but local validation commands were unavailable or blocked, return `completed`; keep the summary focused on the implementation result.
|
|
122
|
-
|
|
123
|
-
# Result Summary
|
|
124
|
-
|
|
125
|
-
Write `summary` as a concise, human-readable result note for project members who may not inspect the code: what changed, what was found, or why the Run cannot continue. Do not narrate process, repeat structured Tutti status such as checks / docs / promotion / changed paths, or include secrets, host paths, raw logs, provider output, or long excerpts.
|
|
126
|
-
|
|
127
|
-
For `completed` and `completed_no_repo_changes`, also return `user_note_candidate`. Use a short user-facing sentence only when the final completion card should tell project members a conclusion, result, or generated file name directly. Use `null` when there is no distinct user-facing note. Do not repeat `summary`, and do not include file paths.
|
|
128
|
-
|
|
129
|
-
# Output
|
|
130
|
-
|
|
131
|
-
Return JSON matching the structured output schema. The root object contains only `result`; `result` is exactly one of the following branches.
|
|
132
|
-
|
|
133
|
-
Completed:
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"result": {
|
|
138
|
-
"completed": {
|
|
139
|
-
"summary": "The requested UI state is now available, with the related usage notes updated.",
|
|
140
|
-
"user_note_candidate": "The updated usage notes file is ready to review."
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Completed with no repository changes:
|
|
147
|
-
|
|
148
|
-
```json
|
|
149
|
-
{
|
|
150
|
-
"result": {
|
|
151
|
-
"completed_no_repo_changes": {
|
|
152
|
-
"summary": "The requested review is complete and did not require repository changes.",
|
|
153
|
-
"user_note_candidate": null
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Needs human:
|
|
160
|
-
|
|
161
|
-
```json
|
|
162
|
-
{
|
|
163
|
-
"result": {
|
|
164
|
-
"needs_human": {
|
|
165
|
-
"title": "Choose data source",
|
|
166
|
-
"summary": "The task scope requires a product decision before implementation can continue.",
|
|
167
|
-
"request": "Should the page use live API data or a local fixture for the first version?"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Failed:
|
|
174
|
-
|
|
175
|
-
```json
|
|
176
|
-
{
|
|
177
|
-
"result": {
|
|
178
|
-
"failed": {
|
|
179
|
-
"summary": "The current repository state prevents a coherent implementation for this task."
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Use `completed_no_repo_changes` only when the task contract does not require repository file changes.
|
|
186
|
-
Use `failed` when you could not produce a usable candidate, when repo/tooling errors prevent implementation, or when the repository state prevents a coherent diff. Never ask for secrets or credentials.
|
|
187
|
-
|
|
188
|
-
Tutti determines changed paths and derived documentation status from Git diff. Do not add fields for those values.
|