@hassangameryt/freeflow 0.8.0 → 0.9.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/.agents/plugins/marketplace.json +2 -2
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +3 -3
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +96 -149
- package/capabilities/cognitive-routing/SKILL.md +21 -129
- package/capabilities/cognitive-routing/references/coordinator.md +163 -0
- package/capabilities/cognitive-routing/references/worker.md +38 -0
- package/capabilities/compaction/SKILL.md +3 -3
- package/capabilities/compaction/references/summary-format.md +26 -15
- package/capabilities/messaging/SKILL.md +49 -0
- package/capabilities/task-memory/SKILL.md +87 -0
- package/command-surface.json +6 -54
- package/gemini-extension.json +1 -1
- package/hooks/claude/hooks.json +13 -3
- package/hooks/codex/hooks.json +2 -1
- package/hooks/shared/runtime-context.mjs +69 -77
- package/package.json +25 -8
- package/pi-extension/dist/ask-user/ask.js +108 -0
- package/pi-extension/dist/ask-user/form.js +250 -0
- package/pi-extension/dist/ask-user/questions.js +66 -0
- package/pi-extension/dist/ask-user/tool.js +124 -0
- package/pi-extension/dist/cognitive-routing/assembler.js +35 -11
- package/pi-extension/dist/cognitive-routing/bootstrap.js +90 -0
- package/pi-extension/dist/cognitive-routing/config.js +3 -4
- package/pi-extension/dist/cognitive-routing/event-store.js +4 -1
- package/pi-extension/dist/cognitive-routing/gate.js +20 -5
- package/pi-extension/dist/cognitive-routing/handlers.js +15 -13
- package/pi-extension/dist/cognitive-routing/model-control.js +17 -8
- package/pi-extension/dist/cognitive-routing/projection.js +23 -6
- package/pi-extension/dist/cognitive-routing/provenance.js +3 -1
- package/pi-extension/dist/cognitive-routing/render.js +15 -15
- package/pi-extension/dist/cognitive-routing/runtime.js +4 -2
- package/pi-extension/dist/cognitive-routing/schemas.js +4 -4
- package/pi-extension/dist/cognitive-routing/session.js +3 -1
- package/pi-extension/dist/cognitive-routing/sources.js +29 -4
- package/pi-extension/dist/cognitive-routing/state.js +18 -8
- package/pi-extension/dist/cognitive-routing/status.js +4 -3
- package/pi-extension/dist/cognitive-routing/tools.js +29 -15
- package/pi-extension/dist/cognitive-routing/types.js +10 -1
- package/pi-extension/dist/compaction/carry.js +36 -22
- package/pi-extension/dist/compaction/config.js +4 -2
- package/pi-extension/dist/compaction/controller.js +52 -29
- package/pi-extension/dist/compaction/harness.js +19 -3
- package/pi-extension/dist/compaction/results.js +14 -13
- package/pi-extension/dist/compaction/tool.js +6 -6
- package/pi-extension/dist/host/catalog.js +20 -35
- package/pi-extension/dist/host/config-validation.js +233 -0
- package/pi-extension/dist/host/config.js +78 -91
- package/pi-extension/dist/host/inbound.js +142 -0
- package/pi-extension/dist/host/projection-tags.js +1 -1
- package/pi-extension/dist/host/prompts.js +24 -13
- package/pi-extension/dist/host/read-only-session.js +6 -1
- package/pi-extension/dist/host/request-history.js +7 -3
- package/pi-extension/dist/host/rows.js +25 -0
- package/pi-extension/dist/host/runtime-state.js +17 -2
- package/pi-extension/dist/host/section-keeper.js +85 -0
- package/pi-extension/dist/host/settings/freeflow-command.js +846 -93
- package/pi-extension/dist/host/settings/settings-view.js +27 -8
- package/pi-extension/dist/host/status.js +19 -5
- package/pi-extension/dist/index.js +638 -72
- package/pi-extension/dist/messaging/config.js +27 -0
- package/pi-extension/dist/messaging/messaging.js +398 -0
- package/pi-extension/dist/messaging/registry.js +57 -0
- package/pi-extension/dist/messaging/render.js +90 -0
- package/pi-extension/dist/messaging/tools.js +109 -0
- package/pi-extension/dist/messaging/transport.js +101 -0
- package/pi-extension/dist/provider-support/cache/keepalive.js +16 -4
- package/pi-extension/dist/task-memory/config.js +49 -0
- package/pi-extension/dist/task-memory/registry.js +119 -0
- package/pi-extension/dist/task-memory/render.js +107 -0
- package/pi-extension/dist/task-memory/runtime.js +994 -0
- package/pi-extension/dist/task-memory/tool.js +233 -0
- package/pi-extension/dist/tool-execution/apply-patch/tool.js +1 -1
- package/pi-extension/dist/tool-execution/background.js +220 -28
- package/pi-extension/dist/tool-execution/config.js +14 -3
- package/pi-extension/dist/tool-execution/file-tracking.js +24 -4
- package/pi-extension/dist/tool-execution/guidance-notices.js +124 -0
- package/pi-extension/dist/tool-execution/skill-reads.js +143 -0
- package/pi-extension/dist/tool-execution/tools.js +2 -2
- package/runtime/prompts/cognitive-routing.md +4 -4
- package/runtime/prompts/core.md +24 -14
- package/runtime/prompts/interaction-contract.md +7 -4
- package/runtime/prompts/tool-execution.md +3 -16
- package/runtime/prompts/working-method.md +16 -99
- package/skills/deliver-work/SKILL.md +76 -0
- package/skills/deliver-work/references/branch-closeout.md +134 -0
- package/skills/deliver-work/references/commit.md +83 -0
- package/skills/deliver-work/references/launch.md +94 -0
- package/skills/deliver-work/references/release.md +85 -0
- package/skills/deliver-work/scripts/commit-state.mjs +139 -0
- package/skills/deliver-work/scripts/delivery-state.mjs +107 -0
- package/skills/deliver-work/scripts/lib/git-state.mjs +178 -0
- package/skills/deliver-work/scripts/push-route.mjs +122 -0
- package/skills/deliver-work/scripts/release-preflight.mjs +177 -0
- package/skills/discuss-work/SKILL.md +148 -0
- package/skills/{discuss → discuss-work}/references/discussion-continuity.md +10 -27
- package/skills/discuss-work/references/learning-action.md +36 -0
- package/skills/discuss-work/scripts/choices.mjs +101 -0
- package/skills/discuss-work/scripts/lib/choices.mjs +159 -0
- package/skills/evaluate-behavior/SKILL.md +107 -0
- package/skills/evaluate-behavior/references/authoring.md +381 -0
- package/skills/evaluate-behavior/references/coding-tasks.md +145 -0
- package/skills/evaluate-behavior/references/conversations-pipelines-judges.md +177 -0
- package/skills/evaluate-behavior/references/design-and-measurement.md +273 -0
- package/skills/evaluate-behavior/references/running-and-evidence.md +245 -0
- package/skills/evaluate-behavior/scripts/claude-guard.mjs +76 -0
- package/skills/evaluate-behavior/scripts/guard-rules.mjs +309 -0
- package/skills/evaluate-behavior/scripts/lib/agreement.mjs +90 -0
- package/skills/evaluate-behavior/scripts/lib/arms.mjs +55 -0
- package/skills/evaluate-behavior/scripts/lib/budget.mjs +87 -0
- package/skills/evaluate-behavior/scripts/lib/build-source.mjs +287 -0
- package/skills/evaluate-behavior/scripts/lib/clear.mjs +74 -0
- package/skills/evaluate-behavior/scripts/lib/container.mjs +395 -0
- package/skills/evaluate-behavior/scripts/lib/decision.mjs +418 -0
- package/skills/evaluate-behavior/scripts/lib/definitions.mjs +1072 -0
- package/skills/evaluate-behavior/scripts/lib/freeflow.mjs +103 -0
- package/skills/evaluate-behavior/scripts/lib/grade-command.mjs +591 -0
- package/skills/evaluate-behavior/scripts/lib/grade-comparison.mjs +90 -0
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/grade-interaction.mjs +19 -18
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/grade-support.mjs +32 -5
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/grade-workspace.mjs +28 -12
- package/skills/evaluate-behavior/scripts/lib/grade.mjs +101 -0
- package/skills/evaluate-behavior/scripts/lib/hooks.mjs +98 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/confinement.mjs +196 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/constraints.mjs +111 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/index.mjs +48 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/isolation.mjs +74 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/launch.mjs +123 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/model-call.mjs +73 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/recorder.mjs +178 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/session.mjs +494 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/skills.mjs +81 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/index.mjs +31 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/names.mjs +3 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/pi/confinement.mjs +173 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/pi/host.mjs +148 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/pi/index.mjs +70 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/pi/isolation.mjs +81 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/pi/model-call.mjs +79 -0
- package/skills/evaluate-behavior/scripts/lib/hosts/pi/process.mjs +241 -0
- package/skills/{evaluate-skill/scripts/lib → evaluate-behavior/scripts/lib/hosts/pi}/rpc.mjs +144 -26
- package/skills/evaluate-behavior/scripts/lib/identity.mjs +82 -0
- package/skills/evaluate-behavior/scripts/lib/judge.mjs +688 -0
- package/skills/evaluate-behavior/scripts/lib/metrics.mjs +332 -0
- package/skills/evaluate-behavior/scripts/lib/model-call.mjs +17 -0
- package/skills/evaluate-behavior/scripts/lib/participants.mjs +616 -0
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/process.mjs +22 -0
- package/skills/evaluate-behavior/scripts/lib/queue.mjs +54 -0
- package/skills/evaluate-behavior/scripts/lib/reference.mjs +343 -0
- package/skills/evaluate-behavior/scripts/lib/reuse.mjs +277 -0
- package/skills/evaluate-behavior/scripts/lib/review.mjs +933 -0
- package/skills/evaluate-behavior/scripts/lib/runner.mjs +732 -0
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/sandbox.mjs +119 -14
- package/skills/evaluate-behavior/scripts/lib/scan-shell.mjs +457 -0
- package/skills/evaluate-behavior/scripts/lib/scan.mjs +479 -0
- package/skills/evaluate-behavior/scripts/lib/seal.mjs +91 -0
- package/skills/evaluate-behavior/scripts/lib/shell.mjs +560 -0
- package/skills/evaluate-behavior/scripts/lib/source-override.mjs +64 -0
- package/skills/evaluate-behavior/scripts/lib/subject-file.mjs +88 -0
- package/skills/{evaluate-skill/scripts/lib/pi.mjs → evaluate-behavior/scripts/lib/subject.mjs} +235 -265
- package/skills/evaluate-behavior/scripts/lib/task-copy.mjs +124 -0
- package/skills/evaluate-behavior/scripts/lib/trials.mjs +524 -0
- package/skills/evaluate-behavior/scripts/lib/validity.mjs +68 -0
- package/skills/evaluate-behavior/scripts/lib/view-html.mjs +454 -0
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/view.mjs +159 -18
- package/skills/{evaluate-skill → evaluate-behavior}/scripts/pi-command-tool.mjs +21 -6
- package/skills/evaluate-behavior/scripts/pi-container-route.mjs +23 -0
- package/skills/evaluate-behavior/scripts/pi-guard.mjs +77 -0
- package/skills/evaluate-behavior/scripts/pi-login-refresh.mjs +31 -0
- package/skills/evaluate-behavior/scripts/skill-eval.mjs +586 -0
- package/skills/execute-work/SKILL.md +96 -104
- package/skills/execute-work/references/code-practices.md +27 -51
- package/skills/execute-work/references/design.md +271 -0
- package/skills/execute-work/references/diagnose.md +117 -0
- package/skills/execute-work/references/migration.md +108 -0
- package/skills/execute-work/references/simplify.md +65 -0
- package/skills/execute-work/scripts/self-review.mjs +422 -0
- package/skills/execute-work/scripts/touch-map.mjs +290 -0
- package/skills/review-work/SKILL.md +89 -65
- package/skills/review-work/references/adjudication.md +94 -0
- package/skills/review-work/references/artifact.md +198 -0
- package/skills/review-work/references/evals-and-judges.md +66 -0
- package/skills/review-work/references/work.md +177 -0
- package/skills/review-work/scripts/check-brief.mjs +128 -0
- package/skills/review-work/scripts/review-packet.mjs +233 -0
- package/skills/setup-freeflow/SKILL.md +68 -17
- package/skills/track-work/SKILL.md +52 -20
- package/skills/track-work/references/handoff.md +190 -0
- package/skills/track-work/references/projects.md +51 -0
- package/skills/track-work/references/working-record-format.md +36 -18
- package/skills/track-work/scripts/lib/document.mjs +17 -13
- package/skills/track-work/scripts/lib/format.mjs +2 -0
- package/skills/track-work/scripts/lib/recover.mjs +254 -0
- package/skills/track-work/scripts/lib/registry.mjs +656 -0
- package/skills/track-work/scripts/lib/search.mjs +40 -0
- package/skills/track-work/scripts/lib/store.mjs +46 -15
- package/skills/track-work/scripts/lib/views.mjs +50 -1
- package/skills/track-work/scripts/working-record.mjs +232 -13
- package/skills/verify-work/SKILL.md +45 -37
- package/skills/verify-work/references/feature-map.md +120 -0
- package/skills/verify-work/references/runtime-evidence.md +203 -0
- package/skills/verify-work/references/test-design.md +25 -6
- package/skills/verify-work/scripts/test-changes.mjs +246 -0
- package/skills/write-docs/SKILL.md +113 -25
- package/skills/write-docs/references/documentation-shapes.md +68 -3
- package/skills/write-docs/references/spec-and-plan-shapes.md +308 -0
- package/skills/write-docs/scripts/artifact-check.mjs +148 -0
- package/skills/write-docs/scripts/docs-check.mjs +96 -6
- package/skills/write-docs/scripts/plan-lint.mjs +123 -0
- package/skills/write-skill/SKILL.md +92 -52
- package/skills/write-skill/references/activation-and-wording.md +143 -0
- package/skills/write-skill/references/placement-and-dependencies.md +154 -0
- package/skills/write-skill/scripts/lib/compare.mjs +701 -0
- package/skills/write-skill/scripts/lib/skill-author.mjs +197 -3
- package/skills/write-skill/scripts/skill-author.mjs +51 -8
- package/capabilities/cognitive-routing/references/both-mode.md +0 -36
- package/capabilities/cognitive-routing/references/executor-mode.md +0 -48
- package/capabilities/cognitive-routing/references/helper-mode.md +0 -47
- package/plugin.json +0 -33
- package/skills/action-selection/SKILL.md +0 -92
- package/skills/action-selection/references/trajectory-stalls.md +0 -73
- package/skills/bypass/SKILL.md +0 -153
- package/skills/commit-work/SKILL.md +0 -93
- package/skills/commit-work/references/git-state-edges.md +0 -94
- package/skills/commit-work/references/simple-push.md +0 -94
- package/skills/commit-work/references/staging-decisions.md +0 -106
- package/skills/decision-gate/SKILL.md +0 -87
- package/skills/design-for-depth/SKILL.md +0 -108
- package/skills/design-for-depth/references/design-pressure-signals.md +0 -84
- package/skills/design-for-depth/references/implementation-decisions.md +0 -76
- package/skills/design-for-depth/references/interface-design-loop.md +0 -105
- package/skills/design-for-depth/references/module-and-dependency-design.md +0 -117
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +0 -125
- package/skills/diagnose-failure/SKILL.md +0 -140
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +0 -50
- package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +0 -51
- package/skills/discuss/SKILL.md +0 -140
- package/skills/evaluate-skill/SKILL.md +0 -188
- package/skills/evaluate-skill/references/evaluation-definition-schema.md +0 -415
- package/skills/evaluate-skill/references/evaluation-design.md +0 -112
- package/skills/evaluate-skill/references/execution-and-evidence.md +0 -111
- package/skills/evaluate-skill/references/review-and-revision.md +0 -94
- package/skills/evaluate-skill/scripts/lib/definitions.mjs +0 -448
- package/skills/evaluate-skill/scripts/lib/grade-comparison.mjs +0 -60
- package/skills/evaluate-skill/scripts/lib/grade.mjs +0 -64
- package/skills/evaluate-skill/scripts/lib/review.mjs +0 -196
- package/skills/evaluate-skill/scripts/lib/runner.mjs +0 -405
- package/skills/evaluate-skill/scripts/lib/trials.mjs +0 -103
- package/skills/evaluate-skill/scripts/pi-guard.mjs +0 -181
- package/skills/evaluate-skill/scripts/skill-eval.mjs +0 -182
- package/skills/execute-work/references/execute-work-edges.md +0 -78
- package/skills/finish-branch/SKILL.md +0 -117
- package/skills/finish-branch/references/integration-options.md +0 -80
- package/skills/handoff/SKILL.md +0 -82
- package/skills/handoff/references/handoff-templates.md +0 -150
- package/skills/launch-work/SKILL.md +0 -116
- package/skills/launch-work/references/launch-readiness.md +0 -85
- package/skills/migration-work/SKILL.md +0 -115
- package/skills/migration-work/references/migration-lifecycle.md +0 -82
- package/skills/release-work/SKILL.md +0 -118
- package/skills/release-work/references/release-evidence.md +0 -78
- package/skills/review-artifact/SKILL.md +0 -143
- package/skills/review-artifact/references/adjudicate-artifact-review.md +0 -101
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +0 -159
- package/skills/review-work/references/adjudicate-work-review.md +0 -97
- package/skills/review-work/references/independent-work-reviewer-contract.md +0 -139
- package/skills/review-work/references/security-risk-lens.md +0 -67
- package/skills/setup-freeflow/references/activation-contract.md +0 -103
- package/skills/setup-freeflow/references/host-setup.md +0 -67
- package/skills/simplify-code/SKILL.md +0 -85
- package/skills/simplify-code/references/simplification-patterns.md +0 -70
- package/skills/verify-work/references/browser-runtime-evidence.md +0 -51
- package/skills/verify-work/references/integration-evidence.md +0 -49
- package/skills/verify-work/references/performance-evidence.md +0 -59
- package/skills/workflow/SKILL.md +0 -171
- package/skills/workflow/references/domain-skill-composition.md +0 -45
- package/skills/write-plan/SKILL.md +0 -92
- package/skills/write-plan/references/plan-shapes.md +0 -156
- package/skills/write-skill/references/activation-boundaries.md +0 -106
- package/skills/write-skill/references/agent-first-instructions.md +0 -133
- package/skills/write-skill/references/progressive-disclosure.md +0 -129
- package/skills/write-skill/references/skill-dependency-graphs.md +0 -192
- package/skills/write-spec/SKILL.md +0 -85
- package/skills/write-spec/references/artifact-standards.md +0 -86
- package/skills/write-spec/references/decision-records.md +0 -80
- package/skills/write-spec/references/spec-shapes.md +0 -143
- /package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/evidence.mjs +0 -0
- /package/skills/{evaluate-skill → evaluate-behavior}/scripts/pi-observer.mjs +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Placement And Dependencies
|
|
2
|
+
|
|
3
|
+
This reference is judgment: adapt it to the goal. Its binding statements restate [Write Skill](../SKILL.md) Rules.
|
|
4
|
+
|
|
5
|
+
Goal: each behavior reaches the agent before the decision it affects, at the lowest cost, with one owner, on every path that leads to that decision.
|
|
6
|
+
|
|
7
|
+
## The Ladder
|
|
8
|
+
|
|
9
|
+
| Rung | The agent sees it | It costs | It holds |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| 0. Always-loaded instructions (system prompt, runtime prompts) | every request | every request, every session | what an ordinary turn needs before any skill could be read: authority, honesty, the rules every task keeps, the moment each skill's activity starts with the skill's name, recovery after context loss, shared terms |
|
|
12
|
+
| 1. Skill description | every request | one line per skill | the job and the situations that call for the skill, in the words a user would use; where a neighbor takes over when two would trigger on the same request |
|
|
13
|
+
| 2. Skill body | when its activity starts | only when used | the activity's normal route, Rules and judgment |
|
|
14
|
+
| 3. Reference | at a named step or observable branch | only when reached | depth for one step or condition |
|
|
15
|
+
| Point of use | at the tool call or event | per tool or event | mechanics of that tool or event: a tool's description and guideline, a script's output, a status line, a notice |
|
|
16
|
+
|
|
17
|
+
Place each behavior on the lowest rung that still reaches the agent before the decision. A higher rung keeps at most a one-line cue or guard that points down to it.
|
|
18
|
+
|
|
19
|
+
## Rung 0 Is For Ordinary Turns
|
|
20
|
+
|
|
21
|
+
Ask: **would a capable agent get this wrong on an ordinary turn, before it had any reason to load a skill?** If yes, it belongs at rung 0. If it matters only once an activity has started, it belongs in that activity's skill. Rung 0 then names the moment the activity starts and the skill to read there, in the words the skill's description uses, so the always-loaded text and the description point at the same skill.
|
|
22
|
+
|
|
23
|
+
Keep an activity's method out of rung 0. An agent that already has the method in context sees no reason to read the skill, follows the always-loaded copy, and never reaches what only the skill holds: its scripts, its references and its formats. Rung 0 keeps a rule as a one-line guard when breaking it on any turn would do harm.
|
|
24
|
+
|
|
25
|
+
Recovery after context loss stays at rung 0 as a cue: after a compaction no skill is in context, so the cue must say which skill to reload; the method itself stays in that skill.
|
|
26
|
+
|
|
27
|
+
A rung-0 instruction that appears in two always-loaded files is paid for twice on every request. Give it one owner there before anything else.
|
|
28
|
+
|
|
29
|
+
## A Description Is A Trigger
|
|
30
|
+
|
|
31
|
+
The agent decides from the description alone whether to read the body. A description that names internal terms, lists the body's steps, or omits the user's words fails at that decision, however good the body is. Write it per Write Skill's "Write The Description For Recall"; when two skills would match the same request, one short clause saying where the other takes over is worth its words.
|
|
32
|
+
|
|
33
|
+
## Repeat As A Guard, Not As A Method
|
|
34
|
+
|
|
35
|
+
A skill may restate a rung-0 rule as a one-line guard where the skill makes the affected choice: rung 0 can be missing on some paths (a host where the user switched a prompt off, a subagent). It does not restate the method around it. When rung 0 and a skill state the same rule, keep the wording compatible; two thresholds for the same behavior ("two or three", "two or more") make the agent choose between them. Do not copy complete orchestration, authority, review, or task-memory sections into every consumer.
|
|
36
|
+
|
|
37
|
+
## Send Only What Can Be Used
|
|
38
|
+
|
|
39
|
+
Instructions, skills and tools for a capability that is off are cost without use. Send them only while their capability is effective. A settings change that alters what is sent costs one prompt-cache write; that is acceptable, and repeating unused text on every request to avoid it is not.
|
|
40
|
+
|
|
41
|
+
## References
|
|
42
|
+
|
|
43
|
+
A separate file is worth its dependency cost only when it changes when content enters context, keeps one canonical owner, or isolates a real lifecycle boundary.
|
|
44
|
+
|
|
45
|
+
Dependency runs one way:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
guaranteed base context
|
|
49
|
+
-> description
|
|
50
|
+
-> SKILL.md
|
|
51
|
+
-> required or conditional resource
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
A later layer may rely on language an earlier guaranteed layer established, not the reverse. `SKILL.md` establishes the job, the normal route, necessary terms, stop and return behavior, and the observable point where each resource is read; keep those inline. Never hide the instruction needed to recognize a reference inside that reference: that is reconstruction, not disclosure.
|
|
55
|
+
|
|
56
|
+
Classify each reference by when it is read:
|
|
57
|
+
|
|
58
|
+
- **Conditional:** only when an observable branch occurs. The body teaches enough to recognize the branch before the read; "when unclear" is no condition when the reference holds the method for recognizing it. Most references should be this kind.
|
|
59
|
+
- **Activity-required:** before one named activity that many activations never reach, because the skill may first exit, defer, choose another route, or find the activity does not apply. When most activations perform it, inline it.
|
|
60
|
+
- **Entry-required:** before the skill can follow or reject its normal route. Use one only when separation has independent value: canonical reuse across packages, separate ownership or lifecycle, generated schemas or contracts, compatibility or host constraints, or independently versioned external policy. Otherwise inline it, even when `SKILL.md` becomes substantially longer.
|
|
61
|
+
|
|
62
|
+
Required means necessary: do not call a required reference recommended or optional. If skipping a reference preserves correct execution, make its concrete optional value explicit or remove it. Keep owned resources inside the package unless canonical cross-package ownership is required. Do not split a file to satisfy a line count.
|
|
63
|
+
|
|
64
|
+
Link each resource at the first choice that needs it, with its condition. Avoid:
|
|
65
|
+
|
|
66
|
+
> See references for more information.
|
|
67
|
+
|
|
68
|
+
Prefer:
|
|
69
|
+
|
|
70
|
+
> Read Test Design before designing or materially changing the behavior check.
|
|
71
|
+
|
|
72
|
+
For every extra file, ask:
|
|
73
|
+
|
|
74
|
+
1. What conditional branch, activity, shared ownership, or lifecycle requires it?
|
|
75
|
+
2. When can the agent recognize the read or run condition?
|
|
76
|
+
3. What prior language does it assume, and where is that language guaranteed?
|
|
77
|
+
4. What context or ownership value does separation provide, and why is inline content worse?
|
|
78
|
+
5. How will links, containment, and behavior be verified?
|
|
79
|
+
|
|
80
|
+
If separation changes neither loading nor ownership, inline the content or remove it.
|
|
81
|
+
|
|
82
|
+
## Scripts
|
|
83
|
+
|
|
84
|
+
A script earns its place when the skill owns a deterministic operation or can compute the facts of a decision; when doing it by hand would be error-prone, unsafe, materially wasteful, or out of context at the decision; when its interface and failure behavior can be tested; and when its output says what it checked and what it did not. Name it in the body where it is used, with the condition to run it.
|
|
85
|
+
|
|
86
|
+
## Skills That Depend On Each Other
|
|
87
|
+
|
|
88
|
+
A set of skills is a stateful, partially loaded prompt graph, not a mandatory sequence. A Markdown link declares a package dependency; it does not select the target owner or execute the linked skill. Tell the edges apart:
|
|
89
|
+
|
|
90
|
+
- **Activation:** causes a skill to be read or made effective, such as a natural prompt matching a description, an always-loaded cue naming a recovery skill, or a capability cue.
|
|
91
|
+
- **Owner route:** changes which activity controls the current bounded result. A plain-text return can express it without a package dependency.
|
|
92
|
+
- **Composition:** adds a method, lens, reviewer contract, or domain guide without changing the current owner.
|
|
93
|
+
- **Reference:** loads conditional or activity depth inside a package.
|
|
94
|
+
- **Environment interaction:** selects one observation or effect, then returns to the same owner.
|
|
95
|
+
- **Persistence:** earlier guidance stays in context and may affect later behavior without another read.
|
|
96
|
+
- **Recovery:** reintroduces required guidance after context loss through an always-loaded cue.
|
|
97
|
+
|
|
98
|
+
Give critical skills an upstream activation or recovery edge.
|
|
99
|
+
|
|
100
|
+
### Entry Paths
|
|
101
|
+
|
|
102
|
+
For each skill, list every valid way in: description activation, routes from other skills, direct user commands, capability cues, context-loss recovery, host-specific activation, and artifact or checkpoint routes. Do not optimize only for the most common path. A skill that can activate directly cannot depend on vocabulary introduced only by a skill that usually precedes it; one reached through a recovery cue cannot assume an earlier discussion or planning skill was read. Check each related skill on:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
direct natural activation
|
|
106
|
+
routed activation from the expected parent
|
|
107
|
+
nearby safe-read activation
|
|
108
|
+
retained use after another skill loads
|
|
109
|
+
recovery after context loss
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
A path that works only because another skill happened to be read is not valid dependency composition.
|
|
113
|
+
|
|
114
|
+
### Shared Terms
|
|
115
|
+
|
|
116
|
+
For every shared term:
|
|
117
|
+
|
|
118
|
+
1. list all consumers;
|
|
119
|
+
2. list every valid path to those consumers;
|
|
120
|
+
3. find the nearest upstream context guaranteed on all paths;
|
|
121
|
+
4. define the term there;
|
|
122
|
+
5. keep specialized detail with its owning skill.
|
|
123
|
+
|
|
124
|
+
Place shared vocabulary in always-available context only when independently activated consumers require it. Keep local terms local when other skills should route to the owner rather than implement its method. Do not duplicate full definitions to compensate for a broken activation graph.
|
|
125
|
+
|
|
126
|
+
### Cycles
|
|
127
|
+
|
|
128
|
+
Routing may be cyclic: execution goes to verification and review and back to execution. Terms and dependency order may not: they flow from guaranteed upstream context toward consumers, and a routing cycle does not justify a terminology cycle. `validate` lists link cycles among the Markdown files a skill reaches, leaving out links to any `SKILL.md`. For each one, decide which it is. References that route between methods can stay, though the routing usually belongs in the body's routing table. References that each need the other's terms, or that are read together, should merge, or give the shared part one owner both point to.
|
|
129
|
+
|
|
130
|
+
### Consistency
|
|
131
|
+
|
|
132
|
+
Across all changed skills, inspect:
|
|
133
|
+
|
|
134
|
+
- duplicate canonical definitions, and divergent wording for the same invariant;
|
|
135
|
+
- early commands contradicted by later caveats;
|
|
136
|
+
- two skills claiming the same current ownership, or a method or lens becoming an owner by accident;
|
|
137
|
+
- links with no activation, route, composition, or reference job;
|
|
138
|
+
- terms used before a guaranteed definition;
|
|
139
|
+
- a read condition stated differently at two links to the same resource;
|
|
140
|
+
- stale recovery cues, and direct routes that bypass required context;
|
|
141
|
+
- retained instructions hijacking later owners.
|
|
142
|
+
|
|
143
|
+
Distinguish semantic duplication from an intentional local guard (Write Skill's Repeat Instructions Deliberately).
|
|
144
|
+
|
|
145
|
+
### What Checks Establish
|
|
146
|
+
|
|
147
|
+
`validate` and `inspect` establish links, containment, link cycles, resource inventory, and, with a routing map, routing-map parity; `similarity` finds copied text. None of them establishes correct activation, safe retained influence, semantic consistency, useful repetition, behavior preservation, or readiness. Evaluate the exact graph claim: activation, first-read body behavior, dependency composition, retained use, recovery, or artifact outcome. A small edit to one skill needs no graph artifact; use this section when several skills, paths, terms, or owners change together.
|
|
148
|
+
|
|
149
|
+
## Check A Move
|
|
150
|
+
|
|
151
|
+
- **Moving guidance down a rung** (from always-loaded to on demand) risks the agent never reading it: compare before and after with the same fixed scenarios on the models in use, aimed at the behavior that moved.
|
|
152
|
+
- **Removing a duplicate** whose owner stays at the same or a higher rung: review against Write Skill, plus one smoke check.
|
|
153
|
+
- **Rewriting a description:** a trigger check per description, one natural request that should read the skill and one near miss that should not.
|
|
154
|
+
- **Measuring the cost:** capture a real request body and count each rung's characters; estimate tokens from that, not from intuition.
|