@hassangameryt/freeflow 0.7.1 → 0.7.2
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +28 -23
- package/capabilities/cognitive-routing/SKILL.md +94 -311
- package/command-surface.json +7 -1
- package/gemini-extension.json +1 -1
- package/package.json +4 -4
- package/pi-extension/dist/cognitive-routing-v2/budget.js +42 -0
- package/pi-extension/dist/cognitive-routing-v2/config.js +120 -0
- package/pi-extension/dist/cognitive-routing-v2/projection.js +321 -0
- package/pi-extension/dist/cognitive-routing-v2/render.js +231 -0
- package/pi-extension/dist/cognitive-routing-v2/runtime.js +1585 -0
- package/pi-extension/dist/cognitive-routing-v2/schemas.js +107 -0
- package/pi-extension/dist/cognitive-routing-v2/state.js +612 -0
- package/pi-extension/dist/cognitive-routing-v2/tools.js +91 -0
- package/pi-extension/dist/cognitive-routing-v2/types.js +44 -0
- package/pi-extension/dist/freeflow-context/tool.js +5 -0
- package/pi-extension/dist/index.js +279 -624
- package/pi-extension/dist/runtime/runtime-context.js +63 -13
- package/pi-extension/dist/session-sources/events.js +195 -0
- package/pi-extension/dist/session-sources/read-only-session.js +148 -0
- package/pi-extension/dist/session-sources/sources.js +233 -0
- package/pi-extension/dist/settings/settings-ui.js +44 -117
- package/pi-extension/src/cognitive-routing-v2/budget.ts +42 -0
- package/pi-extension/src/cognitive-routing-v2/config.ts +143 -0
- package/pi-extension/src/cognitive-routing-v2/projection.ts +365 -0
- package/pi-extension/src/cognitive-routing-v2/render.ts +256 -0
- package/pi-extension/src/cognitive-routing-v2/runtime.ts +1634 -0
- package/pi-extension/src/cognitive-routing-v2/schemas.ts +109 -0
- package/pi-extension/src/cognitive-routing-v2/state.ts +622 -0
- package/pi-extension/src/cognitive-routing-v2/tools.ts +93 -0
- package/pi-extension/src/cognitive-routing-v2/types.ts +222 -0
- package/pi-extension/src/freeflow-context/tool.ts +5 -0
- package/pi-extension/src/index.ts +285 -674
- package/pi-extension/src/runtime/runtime-context.ts +75 -14
- package/pi-extension/src/session-sources/events.ts +208 -0
- package/pi-extension/src/session-sources/read-only-session.ts +170 -0
- package/pi-extension/src/session-sources/sources.ts +263 -0
- package/pi-extension/src/settings/settings-ui.ts +54 -131
- package/pi-extension/tests/cognitive-routing-v2/communication.test.js +484 -0
- package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +183 -0
- package/pi-extension/tests/cognitive-routing-v2/native.test.js +441 -0
- package/pi-extension/tests/cognitive-routing-v2/performance.test.js +87 -0
- package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +245 -0
- package/pi-extension/tests/cognitive-routing-v2/projection.test.js +241 -0
- package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +236 -0
- package/pi-extension/tests/cognitive-routing-v2/render.test.js +230 -0
- package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +153 -0
- package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +521 -0
- package/pi-extension/tests/cognitive-routing-v2/state.test.js +275 -0
- package/pi-extension/tests/context-virtualization/extension.test.js +16 -0
- package/pi-extension/tests/fixtures/routing-native.js +188 -0
- package/pi-extension/tests/integration/mode-free-core.test.js +3 -2
- package/pi-extension/tests/integration/pi-extension.test.js +154 -37
- package/pi-extension/tests/integration/prompt-architecture.test.js +87 -6
- package/pi-extension/tests/integration/unaffected-regressions.test.js +77 -10
- package/plugin.json +1 -1
- package/runtime/prompts/cognitive-routing.md +4 -5
- package/runtime/prompts/core.md +51 -45
- package/runtime/prompts/interaction-contract.md +5 -5
- package/skills/action-selection/SKILL.md +57 -97
- package/skills/design-for-depth/SKILL.md +58 -193
- package/skills/design-for-depth/references/implementation-decisions.md +76 -0
- package/skills/diagnose-failure/SKILL.md +64 -196
- package/skills/discuss/SKILL.md +64 -123
- package/skills/discuss/references/discussion-continuity.md +7 -3
- package/skills/execute-work/SKILL.md +69 -88
- package/skills/execute-work/references/execute-work-edges.md +9 -3
- package/skills/handoff/SKILL.md +44 -54
- package/skills/handoff/references/handoff-templates.md +15 -6
- package/skills/review-artifact/SKILL.md +80 -127
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +1 -1
- package/skills/review-work/SKILL.md +65 -115
- package/skills/review-work/references/independent-work-reviewer-contract.md +1 -1
- package/skills/simplify-code/SKILL.md +47 -100
- package/skills/track-work/SKILL.md +128 -119
- package/skills/track-work/references/working-record-format.md +14 -2
- package/skills/verify-work/SKILL.md +58 -62
- package/skills/verify-work/references/integration-evidence.md +4 -2
- package/skills/verify-work/references/test-design.md +89 -0
- package/skills/workflow/SKILL.md +73 -119
- package/skills/write-plan/SKILL.md +46 -77
- package/skills/write-plan/references/plan-shapes.md +5 -5
- package/skills/write-spec/SKILL.md +51 -63
- package/skills/write-spec/references/artifact-standards.md +2 -2
- package/skills/write-spec/references/decision-records.md +3 -2
- package/skills/write-spec/references/spec-shapes.md +15 -0
- package/pi-extension/dist/cognitive-routing/commands.js +0 -96
- package/pi-extension/dist/cognitive-routing/config.js +0 -232
- package/pi-extension/dist/cognitive-routing/controller.js +0 -1292
- package/pi-extension/dist/cognitive-routing/history.js +0 -451
- package/pi-extension/dist/cognitive-routing/host.js +0 -188
- package/pi-extension/dist/cognitive-routing/pi-routing-session.js +0 -414
- package/pi-extension/dist/cognitive-routing/pi-session-control.js +0 -320
- package/pi-extension/dist/cognitive-routing/runtime.js +0 -43
- package/pi-extension/dist/cognitive-routing/tool.js +0 -212
- package/pi-extension/dist/cognitive-routing/types.js +0 -6
- package/pi-extension/src/cognitive-routing/commands.ts +0 -129
- package/pi-extension/src/cognitive-routing/config.ts +0 -303
- package/pi-extension/src/cognitive-routing/controller.ts +0 -1628
- package/pi-extension/src/cognitive-routing/history.ts +0 -650
- package/pi-extension/src/cognitive-routing/host.ts +0 -266
- package/pi-extension/src/cognitive-routing/pi-routing-session.ts +0 -538
- package/pi-extension/src/cognitive-routing/pi-session-control.ts +0 -444
- package/pi-extension/src/cognitive-routing/runtime.ts +0 -57
- package/pi-extension/src/cognitive-routing/tool.ts +0 -273
- package/pi-extension/src/cognitive-routing/types.ts +0 -89
- package/pi-extension/tests/cognitive-routing/commands.test.js +0 -134
- package/pi-extension/tests/cognitive-routing/controller.test.js +0 -1128
- package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +0 -1142
- package/pi-extension/tests/cognitive-routing/history.test.js +0 -274
- package/pi-extension/tests/cognitive-routing/host-identity.test.js +0 -63
- package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +0 -434
- package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +0 -174
- package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +0 -91
- package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +0 -279
- package/pi-extension/tests/cognitive-routing/tool.test.js +0 -230
- package/skills/tdd/SKILL.md +0 -143
- package/skills/tdd/references/test-design.md +0 -96
- /package/pi-extension/tests/{cognitive-routing/host-fixture.js → fixtures/pi-host.js} +0 -0
|
@@ -1,257 +1,125 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: diagnose-failure
|
|
3
|
-
description: Use when a bug, failure, regression, performance problem, or repeated unsuccessful correction lacks a supported cause.
|
|
3
|
+
description: "Use when a bug, failure, regression, performance problem, or repeated unsuccessful correction lacks a supported cause."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Diagnose Failure
|
|
7
7
|
|
|
8
|
-
Establish what
|
|
8
|
+
Establish what fails and why before selecting a correction. A supported cause distinguishes meaningful alternatives well enough to bound the next action; it does not require impossible certainty.
|
|
9
9
|
|
|
10
|
-
A
|
|
10
|
+
A plausible path, requested patch, reviewer theory, or favorable rerun is not a supported cause. Diagnosis owns the causal question, interpretation, and correction boundary—not authority to run experiments or change production.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Enter For An Unsettled Cause
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Use diagnosis for unexplained bugs, failed checks, regressions, flaky or environmental behavior, contradictory observations, and corrections that repeatedly fail or expose related coordination.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Do not investigate an ordinary mistake when fresh evidence already establishes a clear local defect and the accepted remedy. Return that correction to [Workflow](../../skills/workflow/SKILL.md). Finding count or several bugs in one area does not establish a shared structural cause.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Keep diagnosis within the same coherent Slice. Use [Track Work](../../skills/track-work/SKILL.md) when continuity requires preserving the hypothesis, discriminating evidence, rejected approaches, blocker, and next useful action. Do not record every trial.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
## Establish The Failure, Not The Proposed Fix
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
- flaky, timing-dependent, environmental, or performance behavior;
|
|
24
|
-
- contradictory evidence;
|
|
25
|
-
- related corrections that keep failing;
|
|
26
|
-
- patches that repeatedly expose additional state or coordination;
|
|
27
|
-
- review findings whose shared cause remains unsupported.
|
|
22
|
+
Identify only what the investigation needs:
|
|
28
23
|
|
|
29
|
-
Do not diagnose an ordinary mistake when fresh evidence already establishes one clear local defect and accepted behavior is settled. Return that correction to [Workflow](../../skills/workflow/SKILL.md).
|
|
30
|
-
|
|
31
|
-
Review count, finding count, or several bugs in one area do not by themselves prove a shared or structural cause.
|
|
32
|
-
|
|
33
|
-
Diagnosis may recur inside one Slice. A new hypothesis or observation does not create a new Slice by itself. When a Working Record exists, use [Track Work](../../skills/track-work/SKILL.md) to preserve the current hypothesis, evidence, blocker, and next distinguishing action.
|
|
34
|
-
|
|
35
|
-
## Establish The Failure Boundary
|
|
36
|
-
|
|
37
|
-
Before generating new evidence, identify:
|
|
38
|
-
|
|
39
|
-
- the failure claim;
|
|
40
24
|
- accepted expected behavior and its source;
|
|
41
|
-
- observed
|
|
42
|
-
-
|
|
43
|
-
- the strongest boundary
|
|
44
|
-
-
|
|
45
|
-
- evidence that already contradicts possible explanations.
|
|
46
|
-
|
|
47
|
-
Prefer the reported path, environment, and observer. A nearby failure may suggest a hypothesis but does not establish the reported failure.
|
|
25
|
+
- observed symptom and available counterevidence;
|
|
26
|
+
- relevant input, state, environment, timing, and reported path;
|
|
27
|
+
- the strongest boundary actually observed;
|
|
28
|
+
- any difference between that boundary and the reported failure.
|
|
48
29
|
|
|
49
|
-
|
|
30
|
+
Prefer the reported path and environment. A nearby symptom may suggest a hypothesis but does not reproduce the reported defect. State reduced-fidelity limits explicitly.
|
|
50
31
|
|
|
51
|
-
Allowed behavior is not
|
|
32
|
+
Allowed behavior is not a bug: a cache hit does not establish stale-read failure when caching is permitted. A possible race in source is not the cause without evidence connecting its timing and state to the symptom.
|
|
52
33
|
|
|
53
|
-
|
|
34
|
+
Use [Decision Gate](../../skills/decision-gate/SKILL.md) when accepted behavior or source truth is unsettled. Do not invent an expectation and then diagnose why the implementation violates it.
|
|
54
35
|
|
|
55
|
-
|
|
36
|
+
## Choose A Distinguishing Observation
|
|
56
37
|
|
|
57
|
-
|
|
38
|
+
State a falsifiable leading explanation and only the viable alternatives the next observation must distinguish:
|
|
58
39
|
|
|
59
40
|
```text
|
|
60
41
|
Hypothesis:
|
|
61
42
|
Predicted observation:
|
|
62
|
-
|
|
43
|
+
What would contradict it:
|
|
63
44
|
Meaningful alternative:
|
|
64
45
|
```
|
|
65
46
|
|
|
66
|
-
Do not
|
|
67
|
-
|
|
68
|
-
When accepted behavior, source truth, or a user-owned choice is unsettled, use [Decision Gate](../../skills/decision-gate/SKILL.md) rather than diagnosing an invented expectation.
|
|
69
|
-
|
|
70
|
-
## Choose One Distinguishing Loop
|
|
71
|
-
|
|
72
|
-
Choose the smallest observation whose possible outcomes differ between the meaningful hypotheses at the required boundary.
|
|
73
|
-
|
|
74
|
-
When the exact loop is not obvious, or several loop shapes remain plausible, read the [Diagnostic Loop Catalog](references/diagnostic-loop-catalog.md).
|
|
75
|
-
|
|
76
|
-
When timing, randomness, environmental variance, concurrency, or resource behavior shapes the failure, also read [Flaky and Performance Diagnosis](references/flaky-and-performance-diagnosis.md) before selecting or running the loop.
|
|
77
|
-
|
|
78
|
-
When several tools or observers could execute the same selected loop, or the likely interaction is broad, use [Action Selection](../../skills/action-selection/SKILL.md). It selects the interaction; Diagnose Failure retains the hypothesis and causal question.
|
|
79
|
-
|
|
80
|
-
Before an active observation, confirm that the authority envelope covers:
|
|
81
|
-
|
|
82
|
-
- the exact path and environment;
|
|
83
|
-
- mutation, repetition, instrumentation, and cost;
|
|
84
|
-
- evidence collection and sensitive-data handling;
|
|
85
|
-
- cleanup, rollback, or recovery.
|
|
86
|
-
|
|
87
|
-
Otherwise return the loop's purpose, expected distinguishing evidence, and stop condition to Workflow and wait.
|
|
88
|
-
|
|
89
|
-
When no safe useful loop exists, stop with the smallest missing evidence: failing input, command, trace, log window, seed, timestamp, environment, permission, or isolated instrumentation.
|
|
90
|
-
|
|
91
|
-
## Run And Interpret One Iteration
|
|
92
|
-
|
|
93
|
-
Run one covered observation and change one distinguishing variable at a time.
|
|
94
|
-
|
|
95
|
-
Apply [Verify Work](../../skills/verify-work/SKILL.md) when the observation requires its full claim-and-boundary method. Diagnosis retains ownership of causal inference after verification returns the evidence.
|
|
96
|
-
|
|
97
|
-
Keep three results separate.
|
|
98
|
-
|
|
99
|
-
### Check Result
|
|
100
|
-
|
|
101
|
-
How did the selected observation's defined assertion execute?
|
|
47
|
+
Choose a repeatable diagnostic loop whose possible results differ between those explanations. Do not build a hypothesis around the requested patch and then treat consistency with it as proof of necessity.
|
|
102
48
|
|
|
103
|
-
|
|
49
|
+
Read [Diagnostic Loop Catalog](references/diagnostic-loop-catalog.md) when the exact loop is not obvious or several loop shapes are plausible. Read [Flaky and Performance Diagnosis](references/flaky-and-performance-diagnosis.md) when timing, randomness, environment, concurrency, or resources shape the failure.
|
|
104
50
|
|
|
105
|
-
-
|
|
106
|
-
- **Failed:** the observation executed validly and its assertion did not hold.
|
|
107
|
-
- **Error:** the observer or execution was invalid.
|
|
108
|
-
- **Unavailable:** the observation could not be attempted safely or reliably.
|
|
51
|
+
Use [Action Selection](../../skills/action-selection/SKILL.md) when tools, targets, or observers for the selected causal question remain uncertain or broad. Stop reading when adequate context supports the experiment; the objective is not exhaustive understanding of the subsystem.
|
|
109
52
|
|
|
110
|
-
|
|
53
|
+
Before active evidence generation, confirm that the agreement covers the path, environment, repetition, instrumentation, cost, sensitive-data handling, and cleanup or recovery. Covered bug investigation needs no extra permission solely because it is diagnosis. Otherwise return the proposed observation and stop condition to Workflow and wait.
|
|
111
54
|
|
|
112
|
-
|
|
55
|
+
If no safe useful observer is available, report the smallest missing input, trace, environment, permission, or instrumentation rather than patching a guess.
|
|
113
56
|
|
|
114
|
-
|
|
57
|
+
## Interpret One Iteration
|
|
115
58
|
|
|
116
|
-
|
|
117
|
-
- **Contradicted:** evidence shows the hypothesis is false.
|
|
118
|
-
- **Inconclusive:** the observation cannot distinguish it from meaningful alternatives.
|
|
119
|
-
- **Unavailable:** the required evidence cannot currently be obtained.
|
|
59
|
+
Run one covered observation, changing one distinguishing variable at a time. Use [Verify Work](../../skills/verify-work/SKILL.md) for its claim-and-boundary method when needed. Diagnosis retains ownership of causal inference.
|
|
120
60
|
|
|
121
|
-
|
|
61
|
+
Keep three results separate:
|
|
122
62
|
|
|
123
|
-
- **
|
|
124
|
-
- **
|
|
63
|
+
- **Check result:** Passed, Failed, Error, or Unavailable under Verify Work's assertion-relative meanings. Observing an expected target failure can be a Passed check.
|
|
64
|
+
- **Hypothesis result:** Supported, Contradicted, Inconclusive, or Unavailable at the stated observing boundary.
|
|
65
|
+
- **Cause status:** Supported or Unresolved.
|
|
125
66
|
|
|
126
|
-
A
|
|
67
|
+
A supported hypothesis need not establish the cause. A useful supported cause connects trigger and state through mechanism to the symptom, predicts the observations, materially weakens viable alternatives, and is sufficient to bound a correction without guessing.
|
|
127
68
|
|
|
128
|
-
|
|
69
|
+
If only the strongest remaining hypothesis is supported, say so and identify its missing causal link. Do not claim certainty from one consistent observation.
|
|
129
70
|
|
|
130
|
-
|
|
131
|
-
2. behaves as the causal explanation predicts;
|
|
132
|
-
3. materially weakens meaningful alternatives;
|
|
133
|
-
4. connects trigger and state through mechanism to the observed symptom;
|
|
134
|
-
5. is sufficient to bound a correction or other next action without guessing.
|
|
71
|
+
Route from the result:
|
|
135
72
|
|
|
136
|
-
|
|
73
|
+
- Check Error -> repair or replace the observer, not production.
|
|
74
|
+
- Check Unavailable -> return the missing evidence or authority.
|
|
75
|
+
- Hypothesis Contradicted -> preserve the result and revise the explanation.
|
|
76
|
+
- Hypothesis Inconclusive -> choose a sharper observer if one is useful and covered.
|
|
77
|
+
- Hypothesis Supported, cause Unresolved -> test the remaining material link or alternative.
|
|
78
|
+
- Cause Supported -> return the correction boundary.
|
|
137
79
|
|
|
138
|
-
|
|
80
|
+
Stop when the cause is sufficiently supported or no covered observation can materially improve the decision. Do not keep investigating merely because stronger certainty is imaginable.
|
|
139
81
|
|
|
140
|
-
|
|
141
|
-
- **Check Unavailable:** stop with the missing evidence or authority.
|
|
142
|
-
- **Hypothesis Contradicted:** preserve the evidence, then refine or replace the hypothesis.
|
|
143
|
-
- **Hypothesis Inconclusive:** choose a sharper distinguishing loop.
|
|
144
|
-
- **Hypothesis Supported, cause Unresolved:** test the remaining causal link or alternative.
|
|
145
|
-
- **Cause Supported:** return the causal explanation and correction boundary to Workflow.
|
|
146
|
-
- **Behavior or source conflict:** use Decision Gate.
|
|
147
|
-
- **Supported structural pressure:** apply [Design for Depth](../../skills/design-for-depth/SKILL.md) under the current owner.
|
|
148
|
-
- **Active harm before cause:** return one bounded containment option to Workflow.
|
|
82
|
+
## Keep The Investigation Inside The Task
|
|
149
83
|
|
|
150
|
-
|
|
84
|
+
Before following another prerequisite, distinguish a limitation of the current observer or approach from a requirement of the accepted outcome. A failed reproduction method is not proof that production needs new infrastructure, stronger guarantees, or a host change.
|
|
151
85
|
|
|
152
|
-
|
|
86
|
+
Choose the smallest supported correction preserving accepted behavior. If the remedy changes scope, compatibility, public behavior, failure semantics, or another user-owned boundary, return the concrete consequence and alternatives through Workflow before adopting it.
|
|
153
87
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Bound repetition by time, cost, side effects, and environment safety. Do not repeatedly exercise mutating production behavior without explicit authority and an understood recovery boundary.
|
|
157
|
-
|
|
158
|
-
Temporary instrumentation must distinguish hypotheses. Keep it isolated and state:
|
|
159
|
-
|
|
160
|
-
- what it observes;
|
|
161
|
-
- mutation or performance impact;
|
|
162
|
-
- cleanup and removal condition;
|
|
163
|
-
- whether it remains after diagnosis.
|
|
164
|
-
|
|
165
|
-
Preserve contradictory and unfavorable evidence. Do not rerun until it disappears.
|
|
166
|
-
|
|
167
|
-
## Identify The Owning Cause
|
|
168
|
-
|
|
169
|
-
Classify only what evidence supports:
|
|
88
|
+
Classify only the owning cause supported by evidence:
|
|
170
89
|
|
|
171
90
|
- local implementation defect;
|
|
172
91
|
- invalid, stale, or inadequate check;
|
|
173
|
-
- environment, dependency, data, timing, or configuration
|
|
174
|
-
- missing observer or
|
|
92
|
+
- environment, dependency, data, timing, or configuration issue;
|
|
93
|
+
- missing observer or evidence;
|
|
175
94
|
- unsettled behavior or source conflict;
|
|
176
|
-
- wrong result, scope, order, or
|
|
95
|
+
- wrong result, scope, order, or strategy;
|
|
177
96
|
- structural ownership, interface, state, or failure-unit pressure.
|
|
178
97
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Use Design for Depth only after diagnosis establishes structural pressure, or when direct design evidence independently establishes caller coordination, distributed policy, unowned state, interface leakage, or failure-unit pressure. Design for Depth shapes the supported ownership boundary; it does not re-prove the cause.
|
|
182
|
-
|
|
183
|
-
If design work exposes an unsupported causal assumption that changes the boundary choice, re-enter diagnosis with that exact assumption and the alternatives it must distinguish.
|
|
184
|
-
|
|
185
|
-
## Contain Harm Without Claiming A Fix
|
|
186
|
-
|
|
187
|
-
When immediate harm must be limited before cause is Supported, return one bounded containment option to Workflow.
|
|
188
|
-
|
|
189
|
-
Containment must:
|
|
98
|
+
Use [Design for Depth](../../skills/design-for-depth/SKILL.md) when causal or direct design evidence establishes structural pressure. It shapes the boundary without re-proving the cause. If design reveals an unsupported causal premise, return to diagnosis with that exact uncertainty.
|
|
190
99
|
|
|
191
|
-
|
|
192
|
-
- remain narrower and more reversible than a guessed correction;
|
|
193
|
-
- preserve diagnostic evidence;
|
|
194
|
-
- define verification and recovery;
|
|
195
|
-
- avoid settling unresolved behavior;
|
|
196
|
-
- be reported as mitigation, not resolution.
|
|
100
|
+
## Protect Evidence And Contain Harm
|
|
197
101
|
|
|
198
|
-
|
|
102
|
+
Logs, traces, payloads, dumps, screenshots, and browser state may be sensitive. Minimize and sanitize them; do not expose credentials or unnecessary private data. Bound repetitions by time, cost, effects, and environment safety. Preserve unfavorable evidence rather than rerunning until it disappears.
|
|
199
103
|
|
|
200
|
-
|
|
104
|
+
Temporary instrumentation must distinguish hypotheses. Keep it isolated and state its observer, mutation/performance impact, removal condition, and whether it remains afterward.
|
|
201
105
|
|
|
202
|
-
When
|
|
106
|
+
When immediate harm needs containment before diagnosis is settled, return one narrower, reversible mitigation to Workflow. It must preserve evidence, define checking and recovery, and avoid settling undefined behavior. Report mitigation as containment, not resolution.
|
|
203
107
|
|
|
204
|
-
|
|
205
|
-
- diagnostic loop and observation;
|
|
206
|
-
- check result and hypothesis result;
|
|
207
|
-
- causal chain;
|
|
208
|
-
- alternatives weakened and uncertainty remaining;
|
|
209
|
-
- owning cause;
|
|
210
|
-
- smallest coherent correction boundary;
|
|
211
|
-
- minimized regression signal;
|
|
212
|
-
- original reported path or strongest available observer.
|
|
108
|
+
A requested experimental patch can generate evidence when authorized as learning. It does not automatically select production behavior or authorize continuing beyond its question.
|
|
213
109
|
|
|
214
|
-
|
|
110
|
+
## Return A Supported Correction Boundary
|
|
215
111
|
|
|
216
|
-
Return
|
|
112
|
+
Return proportionately:
|
|
217
113
|
|
|
218
|
-
|
|
114
|
+
- failure and accepted expectation at the required boundary;
|
|
115
|
+
- observed diagnostic loop, check result, and hypothesis result;
|
|
116
|
+
- causal chain, alternatives weakened, and remaining uncertainty;
|
|
117
|
+
- owning cause and smallest coherent correction;
|
|
118
|
+
- minimized regression signal and original reported path or strongest available observer;
|
|
119
|
+
- instrumentation, containment, residual effects, and authority limits.
|
|
219
120
|
|
|
220
|
-
|
|
221
|
-
2. the original reported path or strongest available observer.
|
|
121
|
+
An already-covered correction can return to [Execute Work](../../skills/execute-work/SKILL.md). Preserve the diagnostic evidence and use suitable regression checks without prescribing a formal test-first sequence. Use [Verify Work](../../skills/verify-work/SKILL.md) to design or classify those checks. Use [Simplify Code](../../skills/simplify-code/SKILL.md) only for an accepted behavior-preserving removal of obsolete or workaround machinery, not as a substitute for the fix.
|
|
222
122
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
Do not claim fixed when only containment succeeded, a nearby check passed, or the original boundary remains unavailable.
|
|
226
|
-
|
|
227
|
-
## Report Proportionately
|
|
228
|
-
|
|
229
|
-
For one unresolved iteration:
|
|
230
|
-
|
|
231
|
-
```text
|
|
232
|
-
Failure @ boundary:
|
|
233
|
-
Diagnostic loop:
|
|
234
|
-
Check result:
|
|
235
|
-
Hypothesis result:
|
|
236
|
-
Cause status: Unresolved
|
|
237
|
-
Next distinguishing evidence:
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
For a supported cause, containment, conflicting evidence, or a route handoff:
|
|
241
|
-
|
|
242
|
-
```text
|
|
243
|
-
Failure claim:
|
|
244
|
-
Required boundary:
|
|
245
|
-
Expected / observed:
|
|
246
|
-
Diagnostic loop and evidence:
|
|
247
|
-
Check result:
|
|
248
|
-
Hypothesis result:
|
|
249
|
-
Cause status:
|
|
250
|
-
Causal explanation or strongest remaining hypothesis:
|
|
251
|
-
Alternatives weakened / unresolved:
|
|
252
|
-
Containment or instrumentation:
|
|
253
|
-
Correction boundary or next evidence:
|
|
254
|
-
Post-correction verification:
|
|
255
|
-
```
|
|
123
|
+
After correction, verify the minimized regression signal and the original reported path or strongest available observer. A nearby passing test is insufficient. If the fix fails or reveals related shared-state consequences, re-enter the affected causal question before another patch.
|
|
256
124
|
|
|
257
|
-
|
|
125
|
+
Stop with the supported correction, missing evidence, containment boundary, or unresolved decision explicit. Do not claim fixed when only mitigation succeeded or the reported boundary remains unverified.
|
package/skills/discuss/SKILL.md
CHANGED
|
@@ -1,175 +1,116 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: discuss
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when exploring, clarifying, or revisiting what to accomplish or how to approach it, especially when user collaboration, alternatives, assumptions, or new evidence could change the next action."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Discuss
|
|
7
7
|
|
|
8
|
-
Build enough shared understanding to choose the next sound action.
|
|
8
|
+
Build enough shared understanding to choose the next sound action. Discussion can establish both what to accomplish and how to approach it; it need not end at requirements or continue until every implementation detail is known.
|
|
9
9
|
|
|
10
|
-
Discuss owns exploration, alternatives, assumptions, and direction. It
|
|
10
|
+
Discuss owns exploration, alternatives, assumptions, and direction. It does not turn conversation, a recommendation, or a recorded proposal into execution authority.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Start From The User's Intent
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Respond to the substance before steering the process.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- several meaningful paths remain viable;
|
|
18
|
-
- an assumption or earlier direction needs reconsideration;
|
|
19
|
-
- new evidence makes the next route uncertain.
|
|
16
|
+
A request to discuss keeps the user involved as understanding develops. Gather relevant existing facts when needed, explain what they imply, and return at the next meaningful question or supported conclusion. Do not treat convergence as permission to implement.
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
A direct action request may already settle the outcome and delegate approach selection. Do not force a discussion phase when existing evidence can resolve the remaining facts and reversible local choices. Return clear covered work to [Workflow](../workflow/SKILL.md).
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
Use [Decision Gate](../decision-gate/SKILL.md) for one known blocking user-owned choice or source conflict. Use [Diagnose Failure](../diagnose-failure/SKILL.md) when a reported or recurring failure needs a supported cause rather than broader option discussion.
|
|
24
21
|
|
|
25
|
-
##
|
|
22
|
+
## Separate Outcome From Approach
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
Identify which understanding is missing:
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- interpret what the current evidence and intent imply;
|
|
32
|
-
- expose consequential assumptions and tradeoffs;
|
|
33
|
-
- challenge claims when evidence or engineering judgment warrants it;
|
|
34
|
-
- recommend a direction when one is better supported;
|
|
35
|
-
- revise your position plainly when new reasoning or evidence changes it.
|
|
36
|
-
|
|
37
|
-
Ask only questions whose answers could materially change the route and which available evidence cannot answer. Ask the user about intent, priorities, constraints, and tradeoffs they own. Do not make the user answer factual questions that existing sources can resolve.
|
|
38
|
-
|
|
39
|
-
Keep one consequential uncertainty in focus. Do not conduct a questionnaire, manufacture alternatives, repeat accepted context, or continue arguing for a rejected path without new evidence.
|
|
40
|
-
|
|
41
|
-
## Follow The Discussion Loop
|
|
42
|
-
|
|
43
|
-
```text
|
|
44
|
-
Orient from what remains true
|
|
45
|
-
-> respond to the current substance
|
|
46
|
-
-> focus the uncertainty that could change the route
|
|
47
|
-
-> inspect facts, ask about intent, or compare meaningful paths
|
|
48
|
-
-> determine what is now supported
|
|
49
|
-
-> continue discussion
|
|
50
|
-
-> learn through bounded action
|
|
51
|
-
-> decide continuity
|
|
52
|
-
-> route the supported result
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Use this as a feedback loop, not a user-facing checklist.
|
|
56
|
-
|
|
57
|
-
## Orient Without Restarting
|
|
26
|
+
- **What:** the problem or opportunity, desired result, accepted behavior, constraints, non-goals, and what would count as success.
|
|
27
|
+
- **How:** the mechanism, dependencies, affected boundaries, tradeoffs, and evidence needed to produce that result in the actual environment.
|
|
58
28
|
|
|
59
|
-
|
|
29
|
+
These questions can be answered together. Reuse what remains supported instead of running two compulsory discovery passes. A detailed request may settle what while leaving how open; an investigation may reveal that the initial problem description was wrong.
|
|
60
30
|
|
|
61
|
-
|
|
62
|
-
- supported facts and explicit decisions;
|
|
63
|
-
- tentative assumptions or viable alternatives;
|
|
64
|
-
- open questions capable of changing the route;
|
|
65
|
-
- evidence that still matters.
|
|
31
|
+
Keep supported facts and explicit decisions distinct from hypotheses, proposed mechanisms, and unresolved choices. Do not turn an assistant recommendation into a requirement because it is repeated or recorded.
|
|
66
32
|
|
|
67
|
-
|
|
33
|
+
When reopening discussion, name what changed and preserve unaffected understanding. A new local obstacle does not reopen the whole task.
|
|
68
34
|
|
|
69
|
-
|
|
70
|
-
- **Tentative:** live hypothesis or provisional direction.
|
|
71
|
-
- **Open:** unresolved and capable of changing the next action.
|
|
35
|
+
## Gather Context To Answer A Question
|
|
72
36
|
|
|
73
|
-
|
|
37
|
+
Before inspecting the environment, identify the missing fact and how its answer could change the discussion. Check whether current evidence already supplies it.
|
|
74
38
|
|
|
75
|
-
|
|
39
|
+
Use [Action Selection](../action-selection/SKILL.md) for uncertain or broad inspection. Prefer a focused source, caller, contract, or observation over a repository survey. Read more only when the result leaves a material question unresolved.
|
|
76
40
|
|
|
77
|
-
|
|
41
|
+
Existing code, tests, documentation, policies, artifacts, repository state, supplied material, and current primary sources may settle factual questions. Inspect them rather than asking the user to supply facts available to the agent. Source inspection cannot establish unobserved runtime behavior.
|
|
78
42
|
|
|
79
|
-
|
|
43
|
+
Stop gathering when sufficient evidence supports the next decision. Do not collect every later dependency, reconstruct exhausted history, or prepare an exact implementation plan while the outcome is still open.
|
|
80
44
|
|
|
81
|
-
|
|
45
|
+
## Collaborate And Recommend Proportionately
|
|
82
46
|
|
|
83
|
-
|
|
47
|
+
Carry your share of the thinking:
|
|
84
48
|
|
|
85
|
-
|
|
49
|
+
- explain what the evidence and intent imply;
|
|
50
|
+
- challenge unsupported claims and consequential assumptions;
|
|
51
|
+
- compare only materially different paths that could realistically be chosen;
|
|
52
|
+
- state what each sacrifices and the assumptions it needs;
|
|
53
|
+
- recommend the best-supported direction and what would change it;
|
|
54
|
+
- revise your position when evidence changes.
|
|
86
55
|
|
|
87
|
-
|
|
88
|
-
2. state what each optimizes and what it sacrifices;
|
|
89
|
-
3. identify the assumptions on which each path depends;
|
|
90
|
-
4. recommend the best-supported direction;
|
|
91
|
-
5. state what evidence or changed priority would alter that recommendation.
|
|
56
|
+
Ask about priorities, behavior, constraints, and tradeoffs the user owns. Keep one consequential uncertainty in focus; do not conduct a questionnaire or manufacture alternatives for ordinary choices.
|
|
92
57
|
|
|
93
|
-
|
|
58
|
+
Before recommending a new obligation, distinguish a requirement from a limitation of the current approach. Explain consequences in user terms: "requires changing and distributing a patched host," not merely "needs a provenance interface." Include a simpler in-scope alternative when one is supported. Do not weaken required behavior to make an approach look simpler.
|
|
94
59
|
|
|
95
|
-
|
|
60
|
+
Use [Design for Depth](../design-for-depth/SKILL.md) when ownership, interfaces, state, dependencies, or failure behavior materially shape the choice. A lens is not a reason to design a broader system.
|
|
96
61
|
|
|
97
|
-
##
|
|
62
|
+
## Frame And Assess A Learning Action
|
|
98
63
|
|
|
99
|
-
|
|
64
|
+
Use an experiment or prototype when existing evidence cannot settle a material question and exercising behavior can distinguish the remaining answers. A separate prototype should isolate the uncertainty more safely or economically than changing production; unfamiliarity alone does not require one.
|
|
100
65
|
|
|
101
|
-
|
|
66
|
+
If the work is an accepted useful outcome regardless of what it teaches, treat it as Delivery or Deepening rather than disguise implementation as Learning. Incidental learning does not change its authority or acceptance boundary.
|
|
102
67
|
|
|
103
|
-
|
|
104
|
-
- exercising behavior, building a prototype, testing an assumption, or writing disposable code can answer it;
|
|
105
|
-
- the expected information can change the direction;
|
|
106
|
-
- the action can be bounded by evidence and a stop condition.
|
|
68
|
+
Frame the action before proposing execution:
|
|
107
69
|
|
|
108
|
-
|
|
70
|
+
- the question and its consequence for the accepted outcome or approach;
|
|
71
|
+
- plausible answers and the observation that would distinguish them;
|
|
72
|
+
- the smallest adequate prototype or observer;
|
|
73
|
+
- permitted effects, environment, and production exclusion;
|
|
74
|
+
- expected evidence and return conditions: question answered, observing limit reached, or further work requiring a different question or expanded scope;
|
|
75
|
+
- what would justify discarding, revising, or proposing promotion.
|
|
109
76
|
|
|
110
|
-
|
|
111
|
-
Question or hypothesis:
|
|
112
|
-
Smallest discriminating action:
|
|
113
|
-
Reversible effects and production boundary:
|
|
114
|
-
Expected evidence:
|
|
115
|
-
Stop and return when:
|
|
116
|
-
Discard, revise, or propose promotion when:
|
|
117
|
-
```
|
|
77
|
+
Add a time or cost boundary when repetition or setup could grow; do not demand an exact token prediction. If no adequate observer is available within scope, state the limitation rather than inventing a proof.
|
|
118
78
|
|
|
119
|
-
|
|
79
|
+
Return the framed action to Workflow for authority and, when needed, [Track Work](../track-work/SKILL.md) preservation, then [Execute Work](../execute-work/SKILL.md) for execution. Existing authority may already cover the experiment; its name does not create another approval gate.
|
|
120
80
|
|
|
121
|
-
|
|
81
|
+
Assess returned evidence against the original question. Negative or inconclusive evidence is a valid result; one failed technique does not prove every alternative impossible. If a new prerequisite is reported, distinguish a limitation of the observer or chosen approach from a requirement of the intended outcome before recommending more work.
|
|
122
82
|
|
|
123
|
-
|
|
83
|
+
Revise only the affected understanding. Preserve the consequence for the task, remaining uncertainty, and exploratory-artifact disposition when continuity matters. A successful demonstration is not production acceptance; promotion must be deliberately selected and its effects authorized. Stop assessment when the supported next direction or unresolved decision is clear.
|
|
124
84
|
|
|
125
|
-
##
|
|
85
|
+
## Preserve A Useful Route When Needed
|
|
126
86
|
|
|
127
|
-
|
|
87
|
+
When the likely work becomes clear enough, propose coherent outcomes and their dependencies. Keep near-term work concrete and later work directional. A rough route need not wait for a formal Plan; its order may change as evidence arrives.
|
|
128
88
|
|
|
129
|
-
|
|
89
|
+
Ask whether losing the current understanding, decisions, evidence, proposals, or next action would risk misalignment. If not, keep it in conversation.
|
|
130
90
|
|
|
131
|
-
If
|
|
132
|
-
|
|
133
|
-
If yes, read [Discussion Continuity](references/discussion-continuity.md) before choosing or preserving the durable destination. When a Working Record is appropriate:
|
|
91
|
+
If continuity matters, read [Discussion Continuity](references/discussion-continuity.md), then Track Work before record operations. Preserve the state that made memory necessary, not an empty shell or transcript. Keep the outcome separate from the current approach and retain material uncertainty instead of describing proposals as settled work.
|
|
134
92
|
|
|
135
93
|
```text
|
|
136
|
-
Discuss
|
|
137
|
-
-> material
|
|
138
|
-
->
|
|
139
|
-
-> Discuss
|
|
140
|
-
-> Workflow
|
|
94
|
+
Discuss establishes supported meaning
|
|
95
|
+
-> Track Work preserves material state
|
|
96
|
+
-> Discuss continues or returns the direction to Workflow
|
|
141
97
|
```
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Do not create a Working Record for a short disposable exchange or one clear direct result merely because discussion occurred. Reconsider the decision if a small task develops durable decisions, several outcomes, repeated feedback, checkpoints, or context-loss risk.
|
|
146
|
-
|
|
147
|
-
## Shape Checkpoints Sparingly
|
|
148
|
-
|
|
149
|
-
Recommend a user decision, independent review, local commit, or continuity checkpoint only when crossing that boundary unresolved could materially endanger dependent work.
|
|
150
|
-
|
|
151
|
-
Discussion may propose a checkpoint. Workflow selects it. Track Work preserves it when durable memory is needed. A recommendation or recorded checkpoint does not authorize the action it describes.
|
|
152
|
-
|
|
153
|
-
## Return Supported Direction
|
|
99
|
+
The record does not select work or grant authority. Propose independent review, a local commit, a user decision, or a continuity checkpoint only when it protects a material boundary; Workflow selects it.
|
|
154
100
|
|
|
155
|
-
|
|
101
|
+
## Converge And Return
|
|
156
102
|
|
|
157
|
-
|
|
158
|
-
- settled and tentative direction;
|
|
159
|
-
- open questions that still change the route;
|
|
160
|
-
- recommended next action or bounded proposal;
|
|
161
|
-
- continuity decision;
|
|
162
|
-
- authority state and selected checkpoint, when any.
|
|
103
|
+
End the current discussion when the next sound action no longer depends on unresolved direction, or when a bounded learning action, missing user decision, wait, or stop is clear. Do not continue merely because more detail could be explored.
|
|
163
104
|
|
|
164
|
-
|
|
105
|
+
When the user requests execution, return to Workflow to establish its outcome, scope, and user-facing return condition. If the user delegates the remaining investigation and implementation, do not require them to finish planning it.
|
|
165
106
|
|
|
166
|
-
|
|
107
|
+
Return only what the next route needs: supported understanding, tentative approach, material open questions, relevant evidence, recommended or accepted next action, continuity, and authority state.
|
|
167
108
|
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
109
|
+
- Stable accepted content needing a durable source -> [Write Spec](../write-spec/SKILL.md).
|
|
110
|
+
- A supported ordered strategy needing a durable artifact -> [Write Plan](../write-plan/SKILL.md).
|
|
111
|
+
- Covered concrete work -> Workflow and Execute Work.
|
|
112
|
+
- One blocking owner choice -> Decision Gate.
|
|
113
|
+
- Unsupported failure cause -> Diagnose Failure.
|
|
114
|
+
- No action needed -> answer or stop.
|
|
174
115
|
|
|
175
|
-
|
|
116
|
+
Neither an artifact nor a planning milestone is mandatory. Stop recommending or preserving once the agreed discussion result is supported; do not begin implementation without the execution agreement.
|