@hassangameryt/freeflow 0.6.0 → 0.7.0
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 +2 -2
- package/.codex-plugin/plugin.json +4 -5
- package/README.md +39 -55
- package/capabilities/cognitive-routing/SKILL.md +288 -130
- package/command-surface.json +0 -24
- package/hooks/freeflow-runtime-context.mjs +42 -477
- package/hooks/hooks.json +1 -26
- package/hooks/tests/check-runtime-context-hook.sh +108 -319
- package/package.json +4 -2
- package/pi-extension/dist/cognitive-routing/commands.js +3 -3
- package/pi-extension/dist/cognitive-routing/config.js +16 -20
- package/pi-extension/dist/cognitive-routing/controller.js +478 -48
- package/pi-extension/dist/cognitive-routing/history.js +12 -0
- package/pi-extension/dist/cognitive-routing/host.js +74 -12
- package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
- package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
- package/pi-extension/dist/cognitive-routing/tool.js +1 -0
- package/pi-extension/dist/cognitive-routing/types.js +1 -1
- package/pi-extension/dist/index.js +236 -219
- package/pi-extension/dist/runtime/runtime-context.js +126 -286
- package/pi-extension/dist/settings/settings-ui.js +52 -336
- package/pi-extension/src/cognitive-routing/commands.ts +15 -5
- package/pi-extension/src/cognitive-routing/config.ts +16 -20
- package/pi-extension/src/cognitive-routing/controller.ts +561 -51
- package/pi-extension/src/cognitive-routing/history.ts +12 -0
- package/pi-extension/src/cognitive-routing/host.ts +110 -16
- package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
- package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
- package/pi-extension/src/cognitive-routing/tool.ts +1 -0
- package/pi-extension/src/cognitive-routing/types.ts +1 -1
- package/pi-extension/src/index.ts +249 -239
- package/pi-extension/src/runtime/runtime-context.ts +129 -305
- package/pi-extension/src/settings/settings-ui.ts +53 -371
- package/pi-extension/tests/cognitive-routing/commands.test.js +1 -1
- package/pi-extension/tests/cognitive-routing/controller.test.js +69 -40
- package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +128 -57
- package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
- package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
- package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
- package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +47 -4
- package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
- package/pi-extension/tests/integration/pi-extension.test.js +430 -2478
- package/pi-extension/tests/integration/prompt-architecture.test.js +124 -79
- package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
- package/runtime/prompts/cognitive-routing.md +5 -4
- package/runtime/prompts/conversation-history.md +1 -1
- package/runtime/prompts/core.md +77 -6
- package/runtime/prompts/interaction-contract.md +6 -2
- package/skills/action-selection/SKILL.md +93 -44
- package/skills/action-selection/references/trajectory-stalls.md +71 -0
- package/skills/bypass/SKILL.md +109 -39
- package/skills/commit-work/SKILL.md +94 -55
- package/skills/commit-work/references/git-state-edges.md +94 -0
- package/skills/commit-work/references/simple-push.md +92 -0
- package/skills/commit-work/references/staging-decisions.md +79 -46
- package/skills/decision-gate/SKILL.md +80 -22
- package/skills/design-for-depth/SKILL.md +208 -43
- package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
- package/skills/design-for-depth/references/interface-design-loop.md +77 -97
- package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
- package/skills/design-for-depth/references/software-design-philosophy.md +127 -173
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
- package/skills/diagnose-failure/SKILL.md +198 -52
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +19 -5
- package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +13 -5
- package/skills/discuss/SKILL.md +118 -76
- package/skills/discuss/references/discussion-continuity.md +84 -32
- package/skills/evaluate-skill/SKILL.md +166 -52
- package/skills/evaluate-skill/references/evaluation-definition-schema.md +2 -2
- package/skills/evaluate-skill/references/evaluation-design.md +56 -30
- package/skills/evaluate-skill/references/execution-and-evidence.md +1 -1
- package/skills/evaluate-skill/references/review-and-revision.md +62 -21
- package/skills/execute-work/SKILL.md +98 -59
- package/skills/execute-work/references/code-practices.md +4 -4
- package/skills/execute-work/references/execute-work-edges.md +42 -22
- package/skills/review-artifact/SKILL.md +132 -71
- package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +52 -41
- package/skills/review-work/SKILL.md +115 -72
- package/skills/review-work/references/adjudicate-work-review.md +97 -0
- package/skills/review-work/references/independent-work-reviewer-contract.md +40 -35
- package/skills/review-work/references/security-risk-lens.md +17 -15
- package/skills/setup-freeflow/SKILL.md +14 -17
- package/skills/setup-freeflow/references/activation-contract.md +24 -30
- package/skills/setup-freeflow/references/host-setup.md +6 -7
- package/skills/simplify-code/SKILL.md +97 -39
- package/skills/simplify-code/references/simplification-patterns.md +1 -1
- package/skills/tdd/SKILL.md +108 -41
- package/skills/tdd/references/test-design.md +1 -1
- package/skills/track-work/SKILL.md +133 -300
- package/skills/track-work/references/working-record-format.md +515 -0
- package/skills/track-work/scripts/lib/document.mjs +713 -0
- package/skills/track-work/scripts/lib/format.mjs +166 -0
- package/skills/track-work/scripts/lib/store.mjs +233 -0
- package/skills/track-work/scripts/lib/transitions.mjs +790 -0
- package/skills/track-work/scripts/lib/views.mjs +27 -430
- package/skills/track-work/scripts/working-record.mjs +292 -98
- package/skills/verify-work/SKILL.md +46 -20
- package/skills/verify-work/references/browser-runtime-evidence.md +1 -1
- package/skills/verify-work/references/integration-evidence.md +1 -7
- package/skills/verify-work/references/performance-evidence.md +1 -1
- package/skills/workflow/SKILL.md +110 -80
- package/skills/workflow/references/domain-skill-composition.md +24 -18
- package/skills/write-skill/SKILL.md +218 -62
- package/skills/write-skill/references/activation-boundaries.md +63 -21
- package/skills/write-skill/references/agent-first-instructions.md +61 -27
- package/skills/write-skill/references/progressive-disclosure.md +91 -41
- package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
- package/runtime/prompts/skills.md +0 -65
- package/skills/mode-contract/SKILL.md +0 -104
- package/skills/track-work/scripts/lib/codec.mjs +0 -570
- package/skills/track-work/scripts/lib/commands.mjs +0 -568
- package/skills/track-work/scripts/lib/contract.mjs +0 -303
- package/skills/track-work/scripts/lib/model.mjs +0 -506
- package/skills/track-work/scripts/lib/operations.mjs +0 -965
- package/skills/track-work/scripts/lib/record-store.mjs +0 -264
- package/skills/track-work/scripts/lib/result.mjs +0 -37
- package/skills/track-work/scripts/lib/rewrites.mjs +0 -740
- package/skills/track-work/scripts/lib/schema.mjs +0 -277
- package/skills/track-work/scripts/lib/source-inventory.mjs +0 -162
- package/skills/track-work/scripts/lib/workspace.mjs +0 -134
|
@@ -5,96 +5,236 @@ description: Use when creating or revising an agent skill.
|
|
|
5
5
|
|
|
6
6
|
# Write Skill
|
|
7
7
|
|
|
8
|
-
Write the smallest agent-first skill that changes one
|
|
8
|
+
Write the smallest agent-first skill package that changes one coherent behavioral policy.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
A skill is a prompt intervention, not merely a document. A host may read its body once and retain it across later messages and tool interactions until context projection or loss. Design the first useful read, retained influence, dependencies, and recovery paths; do not assume the body will be reread before every use.
|
|
11
|
+
|
|
12
|
+
Smallest means behaviorally minimal—not shortest. A detailed skill is justified when each instruction changes action or judgment, makes a dependency executable, protects a behavioral boundary whose failure is supported by evidence, or establishes an evidence, return, or stop condition.
|
|
13
|
+
|
|
14
|
+
## Establish The Behavioral Claim
|
|
11
15
|
|
|
12
16
|
Before writing, identify:
|
|
13
17
|
|
|
14
|
-
- the behavior
|
|
15
|
-
- the
|
|
16
|
-
- the
|
|
17
|
-
-
|
|
18
|
-
-
|
|
18
|
+
- the behavior the skill should produce;
|
|
19
|
+
- the failure or misclassification it must prevent;
|
|
20
|
+
- the earliest decision where its guidance can change the trajectory;
|
|
21
|
+
- cues visible before the body is read;
|
|
22
|
+
- context guaranteed across every valid activation path;
|
|
23
|
+
- a nearby case that should not be hijacked;
|
|
24
|
+
- how the skill should stop influencing behavior after its method no longer applies;
|
|
25
|
+
- the evidence that could support or contradict the intended effect.
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
Do not begin with sections, wording, examples, or file layout. Begin with the behavioral intervention.
|
|
21
28
|
|
|
22
|
-
If
|
|
29
|
+
If accepted behavior, public dependencies, safety, compatibility, or another user-owned boundary remains unsettled, stop and resolve it before encoding a runtime rule.
|
|
23
30
|
|
|
24
|
-
## Preserve
|
|
31
|
+
## Preserve The Exact Baseline
|
|
25
32
|
|
|
26
|
-
Before
|
|
33
|
+
Before substantially revising an existing skill, preserve the complete current package:
|
|
27
34
|
|
|
28
|
-
|
|
35
|
+
- `SKILL.md`;
|
|
36
|
+
- references;
|
|
37
|
+
- scripts;
|
|
38
|
+
- assets and other owned resources;
|
|
39
|
+
- exact package identity.
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
Use a recoverable Git ref or task evidence outside the active package so the revision cannot replace its own baseline.
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
A small local correction does not require another snapshot when the exact previous state is already recoverable and the change does not alter behavior, activation, dependencies, resource structure, or compatibility.
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
Preserving a baseline supports recovery and comparison. It does not prove that the baseline or candidate behaves correctly.
|
|
46
|
+
|
|
47
|
+
## Design The First Read
|
|
48
|
+
|
|
49
|
+
A skill cannot activate itself. Its first read must be caused by context already available to the agent:
|
|
50
|
+
|
|
51
|
+
- an observable skill description;
|
|
52
|
+
- guaranteed base or system guidance;
|
|
53
|
+
- an already-loaded owner or sibling;
|
|
54
|
+
- an effective capability cue;
|
|
55
|
+
- another declared upstream route.
|
|
56
|
+
|
|
57
|
+
Do not rely on an instruction inside the unread skill to cause that skill to be read.
|
|
58
|
+
|
|
59
|
+
Optimize activation for the earliest useful decision. Missing that decision may be much more harmful than a harmless early read.
|
|
60
|
+
|
|
61
|
+
A nearby case can pass by:
|
|
62
|
+
|
|
63
|
+
- not loading the skill; or
|
|
64
|
+
- loading it safely, recognizing that its method does not apply, and exiting without later hijacking retained behavior.
|
|
65
|
+
|
|
66
|
+
False-positive activation is cheap only when the body remains safe after retention. A skill that exits on the first turn but continues distorting later work is not a safe read.
|
|
67
|
+
|
|
68
|
+
Read [Activation Boundaries](references/activation-boundaries.md) when activation is unclear or evidence shows missed, late, early, task-hijacking, or retained-interference behavior.
|
|
69
|
+
|
|
70
|
+
## Write The Description For Recall
|
|
71
|
+
|
|
72
|
+
Treat the description as a routing interface, not a summary of the body.
|
|
40
73
|
|
|
41
|
-
|
|
74
|
+
- State the broad core job in plain language.
|
|
75
|
+
- Use natural user verbs or task conditions visible before activation.
|
|
76
|
+
- Prefer recall when nearby reads are safe and missed activation is materially worse.
|
|
77
|
+
- Do not require terminology or classifications introduced only inside the skill or an optional dependency.
|
|
78
|
+
- Do not encode future-duration guesses, named internal phases, exhaustive trigger catalogs, or marketing claims.
|
|
79
|
+
- Do not compress the body into the description.
|
|
80
|
+
- Treat “Use when…” as useful wording, not mandatory grammar.
|
|
42
81
|
|
|
43
|
-
|
|
82
|
+
Optimize for the first useful read, not repeated reads. Do not narrow a description solely to prevent harmless activation. Do not broaden it when retained guidance routinely overrides another owner or method.
|
|
44
83
|
|
|
45
84
|
## Write For The Executing Agent
|
|
46
85
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
86
|
+
Write for an agent seeing the skill for the first time with only guaranteed context.
|
|
87
|
+
|
|
88
|
+
1. Establish the job immediately.
|
|
89
|
+
2. Define necessary terms before using them.
|
|
90
|
+
3. Put each rule where the agent first makes the affected choice.
|
|
91
|
+
4. Keep the normal route understandable from `SKILL.md`.
|
|
92
|
+
5. State what to do, what not to do, and when to stop, return, or route.
|
|
93
|
+
6. Prefer a positive route; use negative instructions to block plausible or observed failure.
|
|
94
|
+
7. Pair a negative rule with the correct action or owner whenever possible.
|
|
95
|
+
8. State why only when it helps the agent generalize or avoid a harmful literal reading.
|
|
96
|
+
9. Keep the skill focused on one coherent job. Do not copy the surrounding workflow’s authority, routing, continuity, review, or completion method into a focused skill; repeat only the local guard needed at the affected choice.
|
|
97
|
+
10. Keep authoring status, evaluation summaries, evidence gaps, changelog notes, and readiness prose out of the executing package.
|
|
57
98
|
|
|
58
|
-
|
|
99
|
+
A useful rule normally identifies:
|
|
59
100
|
|
|
60
|
-
|
|
101
|
+
```text
|
|
102
|
+
observable pressure
|
|
103
|
+
-> required or forbidden action
|
|
104
|
+
-> evidence, return, or stop condition
|
|
105
|
+
```
|
|
61
106
|
|
|
62
|
-
|
|
107
|
+
Use discussion, research, and author reasoning to understand the behavior. Compile that understanding into runtime instructions. Do not copy conversation history, rejected drafts, author debate, fixture narration, or explanation whose only reader is the author.
|
|
108
|
+
|
|
109
|
+
A skill may rely on guaranteed base context and dependencies explicitly required before use. It may not rely on an unread optional sibling or reference, a common-but-unguaranteed route, or an accidental earlier read.
|
|
110
|
+
|
|
111
|
+
Read [Agent-First Instructions](references/agent-first-instructions.md) when a concrete first-read or retained-use failure involves wording, placement, undeclared context, author explanation, or competing instructions.
|
|
63
112
|
|
|
64
113
|
## Use Examples Deliberately
|
|
65
114
|
|
|
66
|
-
Add a compact
|
|
115
|
+
Add a compact example when prose alone leaves a likely behavioral misclassification.
|
|
116
|
+
|
|
117
|
+
Show:
|
|
118
|
+
|
|
119
|
+
- the observable situation;
|
|
120
|
+
- the required action or judgment;
|
|
121
|
+
- the relevant stop, exit, or return.
|
|
122
|
+
|
|
123
|
+
Keep examples transferable. Do not turn the body into a transcript, fixture library, or scenario catalog.
|
|
124
|
+
|
|
125
|
+
Inline examples teach the subject and are part of the candidate intervention. They are not independent evidence that the skill works.
|
|
126
|
+
|
|
127
|
+
## Plan Terminology And Dependencies
|
|
128
|
+
|
|
129
|
+
For one self-contained skill, declare only the dependencies its normal and conditional routes need.
|
|
130
|
+
|
|
131
|
+
Before creating or revising multiple related skills, shared terminology, cross-skill links, capability activation, direct or routed entry paths, or context-loss recovery, read [Skill Dependency Graphs](references/skill-dependency-graphs.md).
|
|
132
|
+
|
|
133
|
+
For every skill:
|
|
67
134
|
|
|
68
|
-
|
|
135
|
+
- identify every valid direct and routed activation path;
|
|
136
|
+
- rely only on context guaranteed across all valid paths;
|
|
137
|
+
- place shared vocabulary in the nearest upstream context guaranteed before every consumer;
|
|
138
|
+
- keep leaf-specific terms local;
|
|
139
|
+
- distinguish owner routes, method composition, environment interactions, references, capability cues, and retained context;
|
|
140
|
+
- ensure critical skills have an upstream activation or recovery edge;
|
|
141
|
+
- do not assume a commonly preceding skill is guaranteed.
|
|
69
142
|
|
|
70
|
-
|
|
143
|
+
A Markdown link declares a package dependency. It does not automatically select the target owner or execute the linked skill.
|
|
71
144
|
|
|
72
|
-
|
|
145
|
+
## Compact Without Erasing Behavior
|
|
73
146
|
|
|
74
|
-
|
|
147
|
+
Compact after the behavioral policy, dependencies, and failure boundaries are understood.
|
|
75
148
|
|
|
76
|
-
|
|
77
|
-
- Add a conditional reference when a distinct branch needs depth that would obscure the normal route; state the observable condition for reading it.
|
|
78
|
-
- Add a script for repeated deterministic work or a feature the skill owns when automation is safer, clearer, or materially less wasteful than retyping it.
|
|
79
|
-
- Make the body instruction and reference introduction name the same read condition; neither may silently narrow or widen it.
|
|
80
|
-
- Link every agent-facing reference, asset, declared dependency, and executable entrypoint from `SKILL.md`; internal implementation modules need not be linked.
|
|
81
|
-
- Keep owned resources inside the skill package unless a declared package dependency is required.
|
|
82
|
-
- Treat unlinked-file inspection as factual inventory, not an automatic defect.
|
|
83
|
-
- Do not add resources merely to make the package look complete.
|
|
149
|
+
For each instruction, ask:
|
|
84
150
|
|
|
85
|
-
|
|
151
|
+
> Can this be removed without losing required behavior, introducing ambiguity, obscuring a dependency, or reintroducing a previously observed failure?
|
|
152
|
+
|
|
153
|
+
If yes, remove or merge it. If uncertain, preserve it until evidence distinguishes the variants.
|
|
154
|
+
|
|
155
|
+
Do not compact by:
|
|
156
|
+
|
|
157
|
+
- deleting the positive route while retaining only prohibitions;
|
|
158
|
+
- moving normal required behavior into an always-read reference;
|
|
159
|
+
- merging rules whose triggers or stop conditions differ;
|
|
160
|
+
- replacing a concrete instruction with generic quality language;
|
|
161
|
+
- removing terminology required by a direct activation path;
|
|
162
|
+
- deleting repetition that protects a distinct decision or recovery boundary.
|
|
163
|
+
|
|
164
|
+
Length is a diagnostic fact, not a quality verdict. A long skill may be minimal. A short skill may force the agent to reconstruct missing judgment through reasoning or environment interactions.
|
|
165
|
+
|
|
166
|
+
## Repeat Rules Deliberately
|
|
167
|
+
|
|
168
|
+
Repetition is justified when local presence protects:
|
|
169
|
+
|
|
170
|
+
- an independently activated skill;
|
|
171
|
+
- a distinct decision point;
|
|
172
|
+
- a context-loss or host path;
|
|
173
|
+
- a dangerous literal interpretation;
|
|
174
|
+
- a previously observed failure;
|
|
175
|
+
- a required body-to-reference read condition.
|
|
176
|
+
|
|
177
|
+
Use one canonical owner for the full definition or method. Repeat only the compact local guard needed at the affected choice.
|
|
178
|
+
|
|
179
|
+
> Repeat the behavioral invariant, not the owning skill’s entire explanation.
|
|
180
|
+
|
|
181
|
+
Do not repeat rules merely for emphasis, author reassurance, or stylistic consistency. Check that repeated wording preserves the same meaning and route.
|
|
182
|
+
|
|
183
|
+
When removing, merging, moving, or rewording a rule that protects measured behavior, treat the candidate as a behavioral change and evaluate the affected boundary.
|
|
184
|
+
|
|
185
|
+
## Add Resources Only When They Change Loading Or Ownership
|
|
186
|
+
|
|
187
|
+
Before adding or reorganizing references, assets, or scripts, read [Progressive Disclosure](references/progressive-disclosure.md).
|
|
188
|
+
|
|
189
|
+
Start with one `SKILL.md`. Remove accidental complexity before splitting files.
|
|
190
|
+
|
|
191
|
+
- Keep normal first-read behavior inline.
|
|
192
|
+
- Add an activity-required reference when one named normal activity genuinely needs separately owned depth but the skill may exit before that activity.
|
|
193
|
+
- Add a conditional reference when an observable branch requires depth that would obscure the normal route.
|
|
194
|
+
- Use an entry-required reference only when separation has independent value, such as canonical reuse, separate ownership or lifecycle, generated contracts, compatibility, or host constraints.
|
|
195
|
+
- Inline entry-required content when every useful activation reads it and separation provides no distinct value.
|
|
196
|
+
- Add a script when deterministic repeated work owned by the skill is safer, clearer, or materially less wasteful than model-generated operations.
|
|
197
|
+
- Link every agent-facing resource, package dependency, and executable entrypoint from the body at its first useful decision.
|
|
198
|
+
- Keep owned resources inside the package unless canonical cross-package ownership is required.
|
|
199
|
+
|
|
200
|
+
The body and reference must name the same read condition. A reference cannot activate itself.
|
|
201
|
+
|
|
202
|
+
There is no universal body template, line limit, reference count, or requirement that a script follow an earlier failure.
|
|
86
203
|
|
|
87
204
|
## Evaluate The Behavioral Claim
|
|
88
205
|
|
|
89
|
-
Static validation
|
|
206
|
+
Static inspection and package validation prove structure, not behavior.
|
|
207
|
+
|
|
208
|
+
Name the exact claim being tested:
|
|
209
|
+
|
|
210
|
+
- description activation;
|
|
211
|
+
- first-read body behavior;
|
|
212
|
+
- nearby behavior;
|
|
213
|
+
- dependency composition;
|
|
214
|
+
- retained use;
|
|
215
|
+
- artifact outcome;
|
|
216
|
+
- cross-host behavior.
|
|
217
|
+
|
|
218
|
+
Use [Evaluate Skill](../evaluate-skill/SKILL.md) to compare exact baseline and candidate environments under fixed declared inputs.
|
|
219
|
+
|
|
220
|
+
Preserve adequate existing evidence. Revise one measured pressure point at a time. After a behavior-sensitive change, rerun the complete fixed group with both variants.
|
|
90
221
|
|
|
91
|
-
|
|
222
|
+
Do not claim:
|
|
92
223
|
|
|
93
|
-
|
|
224
|
+
- activation from explicit body injection;
|
|
225
|
+
- retained use from one turn;
|
|
226
|
+
- dependency behavior from ambient context;
|
|
227
|
+
- unchanged behavior from prose review;
|
|
228
|
+
- improvement from structural validation;
|
|
229
|
+
- readiness from one favorable example.
|
|
230
|
+
|
|
231
|
+
Small wording, ordering, vocabulary, repetition, and structural changes may alter model behavior. Human review can establish intended meaning; behavioral evidence establishes observed effect.
|
|
232
|
+
|
|
233
|
+
Keep evaluation conclusions and missing evidence in the evaluation artifact, task record, or delivery report—not in the executing skill.
|
|
94
234
|
|
|
95
235
|
## Check The Package
|
|
96
236
|
|
|
97
|
-
Use the bundled [skill author](scripts/skill-author.mjs) for deterministic
|
|
237
|
+
Use the bundled [skill author](scripts/skill-author.mjs) for deterministic package work:
|
|
98
238
|
|
|
99
239
|
```text
|
|
100
240
|
node <write-skill-directory>/scripts/skill-author.mjs init <directory> --name <name> --description <text>
|
|
@@ -102,19 +242,35 @@ node <write-skill-directory>/scripts/skill-author.mjs validate <directory> [--pa
|
|
|
102
242
|
node <write-skill-directory>/scripts/skill-author.mjs inspect <directory> [--package-root <directory>]
|
|
103
243
|
```
|
|
104
244
|
|
|
105
|
-
Choose the
|
|
245
|
+
Choose the operation by its evidence:
|
|
246
|
+
|
|
247
|
+
- `init`: create a new minimal package; never overwrite an existing one.
|
|
248
|
+
- `validate`: check frontmatter, heading shape, recursive links, declared package dependencies, and containment.
|
|
249
|
+
- `inspect`: report body sizes, resource classes, scripts, unlinked files, and validation findings.
|
|
250
|
+
|
|
251
|
+
Run `validate` after structural or dependency changes and before claiming package validity. Use `inspect` when factual inventory or package composition matters.
|
|
106
252
|
|
|
107
|
-
|
|
108
|
-
- `validate`: use after structural or resource changes and before claiming structural validity. It checks frontmatter, the top-level heading, recursive links, package dependencies, cycles, and containment.
|
|
109
|
-
- `inspect`: use when body sizes, resource classes, scripts, unlinked files, and validation findings are needed. It reports facts rather than quality.
|
|
253
|
+
Commands emit JSON. Invalid structure still emits a report and exits nonzero; command errors emit structured error JSON.
|
|
110
254
|
|
|
111
|
-
|
|
255
|
+
Package root defaults to the nearest `package.json` ancestor, then the skill directory’s parent. Use `--package-root` when validating a candidate in an overlay or another package context.
|
|
112
256
|
|
|
113
|
-
|
|
114
|
-
- Frontmatter accepts flat plain strings or JSON-compatible double-quoted strings. Double-quote values when there is any ambiguity, especially punctuation, numbers, booleans, or null-like text.
|
|
257
|
+
Frontmatter accepts flat plain strings or JSON-compatible double-quoted strings. Quote ambiguous punctuation, number-like, boolean-like, or null-like values.
|
|
115
258
|
|
|
116
|
-
|
|
259
|
+
Package validity does not prove behavioral quality. Never use deprecated authoring tooling.
|
|
117
260
|
|
|
118
261
|
## Stop
|
|
119
262
|
|
|
120
|
-
Stop when the requested
|
|
263
|
+
Stop when the requested package:
|
|
264
|
+
|
|
265
|
+
- expresses one coherent behavioral policy;
|
|
266
|
+
- activates at the earliest useful boundary;
|
|
267
|
+
- remains safe on nearby and retained use;
|
|
268
|
+
- works from guaranteed context on every valid path;
|
|
269
|
+
- keeps its normal route executable on first read;
|
|
270
|
+
- declares dependencies and resource conditions honestly;
|
|
271
|
+
- contains no unsupported author-facing residue;
|
|
272
|
+
- passes required structural checks.
|
|
273
|
+
|
|
274
|
+
Stop and ask when accepted behavior, activation, dependencies, safety, compatibility, or another user-owned boundary cannot be settled from evidence.
|
|
275
|
+
|
|
276
|
+
Do not add sections, references, examples, scripts, or procedure merely to make the package look complete.
|
|
@@ -1,51 +1,79 @@
|
|
|
1
1
|
# Activation Boundaries
|
|
2
2
|
|
|
3
|
-
Read this when
|
|
3
|
+
Read this when activation is unclear or evidence shows missed, late, early, task-hijacking, or retained-interference behavior.
|
|
4
4
|
|
|
5
|
-
A description should make the skill available at the earliest useful
|
|
5
|
+
A description should make the skill available at the earliest useful decision without requiring language introduced by the skill itself.
|
|
6
6
|
|
|
7
7
|
## Diagnose The First Read
|
|
8
8
|
|
|
9
9
|
Identify:
|
|
10
10
|
|
|
11
|
-
- the earliest natural prompt or state where the
|
|
11
|
+
- the earliest natural prompt or task state where the skill can change behavior;
|
|
12
12
|
- cues visible before the body is read;
|
|
13
13
|
- context guaranteed before activation;
|
|
14
|
-
- the consequence of missing
|
|
15
|
-
- the consequence if a nearby prompt also loads the skill
|
|
14
|
+
- the consequence of missing or delaying the read;
|
|
15
|
+
- the consequence if a nearby prompt also loads the skill;
|
|
16
|
+
- how retained guidance should behave after the immediate method ends.
|
|
16
17
|
|
|
17
|
-
Do not optimize for repeated reads.
|
|
18
|
+
Do not optimize for repeated reads. A body may enter context once and continue influencing later messages and tool interactions until context projection or loss.
|
|
19
|
+
|
|
20
|
+
## Compare Activation Costs
|
|
21
|
+
|
|
22
|
+
False-positive and false-negative activation have different costs.
|
|
23
|
+
|
|
24
|
+
A false-positive read may be acceptable when:
|
|
25
|
+
|
|
26
|
+
- loading cost is proportionate;
|
|
27
|
+
- the body identifies that its method does not apply;
|
|
28
|
+
- it exits without changing ownership or route;
|
|
29
|
+
- retained instructions do not hijack later work.
|
|
30
|
+
|
|
31
|
+
A false negative is material when missing the first useful read causes:
|
|
32
|
+
|
|
33
|
+
- an irreversible or expensive action;
|
|
34
|
+
- a wrong owner or method;
|
|
35
|
+
- repeated low-value environment interactions;
|
|
36
|
+
- missing safety or evidence boundaries;
|
|
37
|
+
- later work that the skill cannot reliably undo.
|
|
38
|
+
|
|
39
|
+
Prefer recall when nearby reads are demonstrably safe and missed activation is materially worse. Tighten activation when early or retained guidance can distort ordinary work.
|
|
18
40
|
|
|
19
41
|
## Check The Cues
|
|
20
42
|
|
|
21
|
-
Useful cues include
|
|
43
|
+
Useful cues include:
|
|
44
|
+
|
|
45
|
+
- the skill’s core job;
|
|
46
|
+
- natural user verbs;
|
|
47
|
+
- visible task situations;
|
|
48
|
+
- observable distinctions from neighboring jobs.
|
|
22
49
|
|
|
23
50
|
Reject cues that depend on:
|
|
24
51
|
|
|
25
52
|
- vocabulary defined only in the body or an optional sibling;
|
|
26
53
|
- future-duration guesses;
|
|
27
|
-
- unexplained classifications or named phases;
|
|
54
|
+
- unexplained internal classifications or named phases;
|
|
28
55
|
- generic “help with” or “improve” language;
|
|
29
|
-
- marketing claims
|
|
56
|
+
- marketing claims;
|
|
57
|
+
- exhaustive trigger catalogs.
|
|
30
58
|
|
|
31
59
|
Guaranteed base context may define a term. Otherwise use plain observable language.
|
|
32
60
|
|
|
33
|
-
## Test Nearby Behavior
|
|
61
|
+
## Test Nearby And Retained Behavior
|
|
34
62
|
|
|
35
|
-
A nearby case can pass
|
|
63
|
+
A nearby case can pass through:
|
|
36
64
|
|
|
37
|
-
- **Non-trigger:** the skill
|
|
38
|
-
- **Safe read:**
|
|
65
|
+
- **Non-trigger:** the skill is not read.
|
|
66
|
+
- **Safe read:** the body loads, exits or defers correctly, and does not interfere later.
|
|
39
67
|
|
|
40
|
-
|
|
68
|
+
Test both the immediate response and later declared turns when retained influence matters.
|
|
41
69
|
|
|
42
|
-
|
|
70
|
+
Examples:
|
|
43
71
|
|
|
44
|
-
Broad
|
|
72
|
+
Broad useful trigger:
|
|
45
73
|
|
|
46
74
|
> Use when committing work.
|
|
47
75
|
|
|
48
|
-
Over-specified trigger that hides the job
|
|
76
|
+
Over-specified trigger that hides the job:
|
|
49
77
|
|
|
50
78
|
> Use after final verification when a planned checkpoint requires a locally reviewable commit.
|
|
51
79
|
|
|
@@ -53,10 +81,24 @@ Broad safe-read trigger:
|
|
|
53
81
|
|
|
54
82
|
> Use when working with software design—especially boundaries, interfaces, ownership, state, and failure behavior.
|
|
55
83
|
|
|
56
|
-
The body
|
|
84
|
+
The body must exit when the local interface remains sound and avoid turning later local choices into architecture work.
|
|
85
|
+
|
|
86
|
+
## Preserve The Evidence Boundary
|
|
87
|
+
|
|
88
|
+
Natural activation proves the host read the exact skill snapshot from a natural prompt.
|
|
89
|
+
|
|
90
|
+
Explicit body delivery tests first-read instructions, not activation.
|
|
91
|
+
|
|
92
|
+
Dependency composition tests exact declared skill and context order.
|
|
93
|
+
|
|
94
|
+
Multi-turn evidence tests retained use.
|
|
95
|
+
|
|
96
|
+
Artifact and transcript evidence show whether activation helped, exited safely, or hijacked behavior.
|
|
57
97
|
|
|
58
|
-
|
|
98
|
+
Preserve:
|
|
59
99
|
|
|
60
|
-
|
|
100
|
+
- the earliest useful positive prompt;
|
|
101
|
+
- at least one close nearby case;
|
|
102
|
+
- later-turn evidence when retained influence is part of the claim.
|
|
61
103
|
|
|
62
|
-
|
|
104
|
+
Do not infer one evidence class from another.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent-First Instructions
|
|
2
2
|
|
|
3
|
-
Read this when a concrete first-read failure involves wording, placement, undeclared context, or
|
|
3
|
+
Read this when a concrete first-read or retained-use failure involves wording, placement, undeclared context, author explanation, or competing instructions.
|
|
4
4
|
|
|
5
5
|
## Reconstruct The Reader’s Context
|
|
6
6
|
|
|
@@ -9,8 +9,9 @@ Assume the agent is seeing the skill for the first time.
|
|
|
9
9
|
- State the job before local vocabulary.
|
|
10
10
|
- Define terms before relying on them.
|
|
11
11
|
- Assume only guaranteed runtime or declared base context.
|
|
12
|
-
- Do not rely on an optional sibling, reference, or accidental earlier read.
|
|
12
|
+
- Do not rely on an optional sibling, reference, common route, or accidental earlier read.
|
|
13
13
|
- Make required reads explicit before their content is used.
|
|
14
|
+
- Do not assume the skill will be reread before later use.
|
|
14
15
|
|
|
15
16
|
Dependency direction remains:
|
|
16
17
|
|
|
@@ -29,19 +30,28 @@ Keep a sentence only when it:
|
|
|
29
30
|
|
|
30
31
|
- changes an action or judgment;
|
|
31
32
|
- defines required language;
|
|
32
|
-
- protects a likely failure boundary;
|
|
33
|
-
- states an evidence,
|
|
34
|
-
-
|
|
33
|
+
- protects a likely or observed failure boundary;
|
|
34
|
+
- states an evidence, return, or stop condition;
|
|
35
|
+
- makes a dependency executable;
|
|
36
|
+
- provides a compact example resolving likely misclassification.
|
|
35
37
|
|
|
36
|
-
Translate rationale into a direct rule plus only the why needed to generalize.
|
|
38
|
+
Translate rationale into a direct rule plus only the why needed to generalize.
|
|
39
|
+
|
|
40
|
+
Translate debate into the selected boundary and stop condition.
|
|
41
|
+
|
|
42
|
+
Translate a measured failure into the smallest transferable guard that prevents it.
|
|
43
|
+
|
|
44
|
+
Omit rejected drafts, conversation history, fixture narration, evaluation status, and explanation whose only audience is the author.
|
|
37
45
|
|
|
38
46
|
## Strengthen Rules
|
|
39
47
|
|
|
40
48
|
A useful rule names:
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
```text
|
|
51
|
+
observable trigger or pressure
|
|
52
|
+
-> required or forbidden action
|
|
53
|
+
-> evidence, return, or stop condition
|
|
54
|
+
```
|
|
45
55
|
|
|
46
56
|
Prefer:
|
|
47
57
|
|
|
@@ -51,37 +61,61 @@ Over:
|
|
|
51
61
|
|
|
52
62
|
> Keep evaluation efficient and aligned with best practices.
|
|
53
63
|
|
|
64
|
+
Concrete rules reduce the judgment the agent must reconstruct.
|
|
65
|
+
|
|
54
66
|
## Pair Negative Rules With The Route
|
|
55
67
|
|
|
56
|
-
```text
|
|
57
68
|
Bad:
|
|
58
|
-
|
|
69
|
+
|
|
70
|
+
> Do not recreate the old worker/verifier architecture.
|
|
59
71
|
|
|
60
72
|
Better:
|
|
61
|
-
The active agent owns implementation and verification.
|
|
62
|
-
Workflow selects optional independent review.
|
|
63
|
-
```
|
|
64
73
|
|
|
65
|
-
|
|
74
|
+
> The producing activity handles implementation and verification. The surrounding workflow may select independent review.
|
|
75
|
+
|
|
66
76
|
Bad:
|
|
67
|
-
|
|
77
|
+
|
|
78
|
+
> Do not implement the recommendation.
|
|
68
79
|
|
|
69
80
|
Better:
|
|
70
|
-
Return the recommendation to Workflow.
|
|
71
|
-
Implementation requires authorized execution.
|
|
72
|
-
```
|
|
73
81
|
|
|
74
|
-
|
|
82
|
+
> Return the recommendation to the owning workflow. Implementation requires separate authorization.
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Do not split it into MVP or roadmap phases without approval.
|
|
79
|
-
```
|
|
84
|
+
A negative rule may preserve an invariant directly when the positive route is already clear:
|
|
85
|
+
|
|
86
|
+
> Preserve the accepted scope. Do not split it into MVP or roadmap phases without approval.
|
|
80
87
|
|
|
81
88
|
## Fix Placement Before Adding Prose
|
|
82
89
|
|
|
83
|
-
Put a rule where the agent first makes the affected choice.
|
|
90
|
+
Put a rule where the agent first makes the affected choice.
|
|
91
|
+
|
|
92
|
+
A late caveat rarely defeats an early command. Move or sharpen the controlling sentence before adding another section.
|
|
93
|
+
|
|
94
|
+
When an early rule and later exception conflict, restructure the route rather than adding another disclaimer.
|
|
95
|
+
|
|
96
|
+
## Repeat Local Guards Deliberately
|
|
97
|
+
|
|
98
|
+
Repeat a shared rule only when local presence protects:
|
|
99
|
+
|
|
100
|
+
- an independently activated path;
|
|
101
|
+
- a distinct decision point;
|
|
102
|
+
- retained behavior;
|
|
103
|
+
- context-loss recovery;
|
|
104
|
+
- a dangerous literal interpretation;
|
|
105
|
+
- a measured failure.
|
|
106
|
+
|
|
107
|
+
Keep one canonical owner for the full definition or method. Repeat only the compact local guard needed at the choice.
|
|
108
|
+
|
|
109
|
+
> Repeat the behavioral invariant, not the owning method.
|
|
110
|
+
|
|
111
|
+
Do not copy complete orchestration, authority, review, or task-memory sections into every consumer.
|
|
112
|
+
|
|
113
|
+
## End The Skill’s Influence
|
|
114
|
+
|
|
115
|
+
A skill body may remain in context after its immediate method ends.
|
|
116
|
+
|
|
117
|
+
State stop, return, or exit conditions clearly enough that retained instructions do not continue claiming ownership or broadening later work.
|
|
84
118
|
|
|
85
|
-
|
|
119
|
+
A first-turn exit is insufficient when later turns still show method hijacking.
|
|
86
120
|
|
|
87
|
-
After editing, rerun the same first-read pressure while keeping unrelated rules stable.
|
|
121
|
+
After editing, rerun the same first-read and retained-use pressure while keeping unrelated rules stable.
|