@hassangameryt/freeflow 0.7.3 → 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/NOTICE +14 -0
- package/README.md +101 -159
- package/capabilities/cognitive-routing/SKILL.md +47 -210
- package/capabilities/cognitive-routing/references/coordinator.md +163 -0
- package/capabilities/cognitive-routing/references/worker.md +38 -0
- package/capabilities/compaction/SKILL.md +49 -0
- package/capabilities/compaction/references/summary-format.md +250 -0
- package/capabilities/messaging/SKILL.md +49 -0
- package/capabilities/task-memory/SKILL.md +87 -0
- package/command-surface.json +8 -52
- 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 +73 -83
- package/licenses/Apache-2.0.txt +55 -0
- package/package.json +42 -12
- package/pi-extension/README.md +41 -0
- 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 +417 -0
- package/pi-extension/dist/cognitive-routing/bootstrap.js +90 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/config.js +8 -6
- package/pi-extension/dist/cognitive-routing/economics.js +45 -0
- package/pi-extension/dist/cognitive-routing/event-schema.js +388 -0
- package/pi-extension/dist/{session-sources/events.js → cognitive-routing/event-store.js} +107 -41
- package/pi-extension/dist/cognitive-routing/gate.js +256 -0
- package/pi-extension/dist/cognitive-routing/handlers.js +901 -0
- package/pi-extension/dist/cognitive-routing/handoffs.js +350 -0
- package/pi-extension/dist/cognitive-routing/model-control.js +476 -0
- package/pi-extension/dist/cognitive-routing/projection.js +520 -0
- package/pi-extension/dist/cognitive-routing/provenance.js +83 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/render.js +15 -15
- package/pi-extension/dist/cognitive-routing/runtime.js +398 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/schemas.js +47 -11
- package/pi-extension/dist/cognitive-routing/session.js +223 -0
- package/pi-extension/dist/{session-sources → cognitive-routing}/sources.js +126 -87
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/state.js +55 -386
- package/pi-extension/dist/cognitive-routing/status.js +81 -0
- package/pi-extension/dist/cognitive-routing/tools.js +74 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/types.js +14 -11
- package/pi-extension/dist/compaction/carry.js +205 -0
- package/pi-extension/dist/compaction/config.js +24 -0
- package/pi-extension/dist/compaction/controller.js +494 -0
- package/pi-extension/dist/compaction/harness.js +93 -0
- package/pi-extension/dist/compaction/results.js +159 -0
- package/pi-extension/dist/compaction/thresholds.js +35 -0
- package/pi-extension/dist/compaction/tool.js +57 -0
- package/pi-extension/dist/host/branch.js +13 -0
- package/pi-extension/dist/host/canonical.js +12 -0
- package/pi-extension/dist/host/catalog.js +62 -0
- package/pi-extension/dist/host/config-validation.js +233 -0
- package/pi-extension/dist/host/config.js +361 -0
- package/pi-extension/dist/host/inbound.js +142 -0
- package/pi-extension/dist/host/projection-tags.js +60 -0
- package/pi-extension/dist/host/prompts.js +93 -0
- package/pi-extension/dist/{session-sources → host}/read-only-session.js +117 -1
- package/pi-extension/dist/{runtime → host}/request-history.js +125 -39
- package/pi-extension/dist/host/rows.js +25 -0
- package/pi-extension/dist/host/runtime-state.js +204 -0
- package/pi-extension/dist/host/section-keeper.js +85 -0
- package/pi-extension/dist/host/settings/freeflow-command.js +2323 -0
- package/pi-extension/dist/{settings/settings-tui.js → host/settings/settings-view.js} +205 -73
- package/pi-extension/dist/host/staging.js +28 -0
- package/pi-extension/dist/host/status.js +115 -0
- package/pi-extension/dist/index.js +1004 -188
- 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/anchor.js +21 -0
- package/pi-extension/dist/provider-support/cache/anthropic.js +102 -0
- package/pi-extension/dist/provider-support/cache/health.js +73 -0
- package/pi-extension/dist/provider-support/cache/index.js +58 -0
- package/pi-extension/dist/provider-support/cache/keepalive.js +222 -0
- package/pi-extension/dist/provider-support/cache/monitor.js +17 -0
- package/pi-extension/dist/provider-support/cache/openai-responses.js +48 -0
- package/pi-extension/dist/provider-support/effort.js +13 -0
- package/pi-extension/dist/provider-support/index.js +44 -3
- package/pi-extension/dist/provider-support/{astra → openai}/adapter.js +46 -29
- package/pi-extension/dist/provider-support/{astra → openai}/history.js +10 -8
- package/pi-extension/dist/provider-support/{astra → openai}/index.js +8 -4
- package/pi-extension/dist/provider-support/{astra → openai}/session-state.js +29 -38
- package/pi-extension/dist/provider-support/routes.js +17 -0
- 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/grammar.js +23 -0
- package/pi-extension/dist/tool-execution/apply-patch/match.js +38 -0
- package/pi-extension/dist/tool-execution/apply-patch/parser.js +177 -0
- package/pi-extension/dist/tool-execution/apply-patch/plan.js +201 -0
- package/pi-extension/dist/tool-execution/apply-patch/tool.js +84 -0
- package/pi-extension/dist/tool-execution/background.js +430 -0
- package/pi-extension/dist/tool-execution/bash-guard.js +23 -0
- package/pi-extension/dist/tool-execution/config.js +33 -0
- package/pi-extension/dist/tool-execution/edit-messages.js +120 -0
- package/pi-extension/dist/tool-execution/file-state.js +138 -0
- package/pi-extension/dist/tool-execution/file-tracking.js +163 -0
- package/pi-extension/dist/tool-execution/guidance-notices.js +124 -0
- package/pi-extension/dist/tool-execution/prompt.js +54 -0
- package/pi-extension/dist/tool-execution/skill-reads.js +143 -0
- package/pi-extension/dist/tool-execution/tools.js +16 -0
- package/pi-extension/freeflow/README.md +9 -0
- package/runtime/prompts/cognitive-routing.md +4 -4
- package/runtime/prompts/core.md +29 -72
- package/runtime/prompts/interaction-contract.md +18 -8
- package/runtime/prompts/tool-execution.md +25 -0
- package/runtime/prompts/working-method.md +25 -0
- 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 +13 -50
- 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 +121 -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} +239 -262
- 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 +218 -11
- package/skills/evaluate-behavior/scripts/pi-command-tool.mjs +159 -0
- 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 -72
- package/skills/execute-work/references/code-practices.md +27 -49
- 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 +94 -64
- 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 +69 -16
- package/skills/track-work/SKILL.md +135 -151
- 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 +201 -344
- package/skills/track-work/scripts/lib/document.mjs +79 -19
- package/skills/track-work/scripts/lib/format.mjs +18 -1
- 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 +53 -21
- package/skills/track-work/scripts/lib/transitions.mjs +79 -4
- package/skills/track-work/scripts/lib/views.mjs +50 -1
- package/skills/track-work/scripts/working-record.mjs +263 -22
- package/skills/verify-work/SKILL.md +64 -47
- 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 +27 -6
- package/skills/verify-work/scripts/test-changes.mjs +246 -0
- package/skills/write-docs/SKILL.md +171 -0
- package/skills/write-docs/references/documentation-shapes.md +184 -0
- 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 +229 -0
- package/skills/write-docs/scripts/plan-lint.mjs +123 -0
- package/skills/write-skill/SKILL.md +165 -165
- 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/similarity.mjs +56 -0
- package/skills/write-skill/scripts/lib/skill-author.mjs +197 -3
- package/skills/write-skill/scripts/skill-author.mjs +67 -8
- package/capabilities/context-virtualization/SKILL.md +0 -103
- package/capabilities/conversation-history/SKILL.md +0 -53
- package/hooks/tests/check-host-adapters.test.mjs +0 -82
- package/hooks/tests/check-runtime-context-hook.sh +0 -212
- package/pi-extension/dist/cognitive-routing-v2/projection.js +0 -330
- package/pi-extension/dist/cognitive-routing-v2/runtime.js +0 -2181
- package/pi-extension/dist/cognitive-routing-v2/tools.js +0 -60
- package/pi-extension/dist/context-virtualization/commands.js +0 -89
- package/pi-extension/dist/context-virtualization/projector.js +0 -42
- package/pi-extension/dist/context-virtualization/runtime.js +0 -378
- package/pi-extension/dist/context-virtualization/state.js +0 -57
- package/pi-extension/dist/context-virtualization/types.js +0 -10
- package/pi-extension/dist/conversation-history/passages.js +0 -66
- package/pi-extension/dist/conversation-history/ranking.js +0 -105
- package/pi-extension/dist/conversation-history/runtime.js +0 -226
- package/pi-extension/dist/conversation-history/search.js +0 -56
- package/pi-extension/dist/conversation-history/types.js +0 -1
- package/pi-extension/dist/freeflow-context/resolver.js +0 -120
- package/pi-extension/dist/freeflow-context/runtime.js +0 -80
- package/pi-extension/dist/freeflow-context/source-projector.js +0 -95
- package/pi-extension/dist/freeflow-context/tool.js +0 -314
- package/pi-extension/dist/freeflow-context/types.js +0 -12
- package/pi-extension/dist/freeflow-context/visibility.js +0 -28
- package/pi-extension/dist/integrations/mcp-config.js +0 -29
- package/pi-extension/dist/runtime/runtime-context.js +0 -754
- package/pi-extension/dist/runtime/runtime-identity.js +0 -5
- package/pi-extension/dist/session-sources/provenance.js +0 -32
- package/pi-extension/dist/settings/settings-ui.js +0 -1360
- package/pi-extension/dist/ui/text-component.js +0 -57
- package/pi-extension/src/cognitive-routing-v2/budget.ts +0 -42
- package/pi-extension/src/cognitive-routing-v2/config.ts +0 -173
- package/pi-extension/src/cognitive-routing-v2/projection.ts +0 -375
- package/pi-extension/src/cognitive-routing-v2/render.ts +0 -277
- package/pi-extension/src/cognitive-routing-v2/runtime.ts +0 -2241
- package/pi-extension/src/cognitive-routing-v2/schemas.ts +0 -180
- package/pi-extension/src/cognitive-routing-v2/state.ts +0 -839
- package/pi-extension/src/cognitive-routing-v2/tools.ts +0 -62
- package/pi-extension/src/cognitive-routing-v2/types.ts +0 -254
- package/pi-extension/src/context-virtualization/commands.ts +0 -111
- package/pi-extension/src/context-virtualization/projector.ts +0 -62
- package/pi-extension/src/context-virtualization/runtime.ts +0 -428
- package/pi-extension/src/context-virtualization/state.ts +0 -79
- package/pi-extension/src/context-virtualization/types.ts +0 -92
- package/pi-extension/src/conversation-history/passages.ts +0 -81
- package/pi-extension/src/conversation-history/ranking.ts +0 -155
- package/pi-extension/src/conversation-history/runtime.ts +0 -250
- package/pi-extension/src/conversation-history/search.ts +0 -79
- package/pi-extension/src/conversation-history/types.ts +0 -31
- package/pi-extension/src/freeflow-context/resolver.ts +0 -139
- package/pi-extension/src/freeflow-context/runtime.ts +0 -100
- package/pi-extension/src/freeflow-context/source-projector.ts +0 -106
- package/pi-extension/src/freeflow-context/tool.ts +0 -366
- package/pi-extension/src/freeflow-context/types.ts +0 -70
- package/pi-extension/src/freeflow-context/visibility.ts +0 -53
- package/pi-extension/src/index.ts +0 -390
- package/pi-extension/src/integrations/mcp-config.ts +0 -32
- package/pi-extension/src/provider-support/astra/adapter.ts +0 -108
- package/pi-extension/src/provider-support/astra/history.ts +0 -145
- package/pi-extension/src/provider-support/astra/index.ts +0 -12
- package/pi-extension/src/provider-support/astra/session-state.ts +0 -113
- package/pi-extension/src/provider-support/index.ts +0 -5
- package/pi-extension/src/runtime/request-history.ts +0 -243
- package/pi-extension/src/runtime/runtime-context.ts +0 -860
- package/pi-extension/src/runtime/runtime-identity.ts +0 -8
- package/pi-extension/src/session-sources/events.ts +0 -230
- package/pi-extension/src/session-sources/provenance.ts +0 -39
- package/pi-extension/src/session-sources/read-only-session.ts +0 -170
- package/pi-extension/src/session-sources/sources.ts +0 -334
- package/pi-extension/src/settings/settings-tui.ts +0 -501
- package/pi-extension/src/settings/settings-ui.ts +0 -1652
- package/pi-extension/src/ui/text-component.ts +0 -66
- package/pi-extension/tests/cache-reuse/history.test.js +0 -117
- package/pi-extension/tests/cache-reuse/native.test.js +0 -91
- package/pi-extension/tests/cache-reuse/settings.test.js +0 -211
- package/pi-extension/tests/cognitive-routing-v2/communication.test.js +0 -577
- package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +0 -183
- package/pi-extension/tests/cognitive-routing-v2/delegation.test.js +0 -557
- package/pi-extension/tests/cognitive-routing-v2/native.test.js +0 -474
- package/pi-extension/tests/cognitive-routing-v2/performance.test.js +0 -87
- package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +0 -300
- package/pi-extension/tests/cognitive-routing-v2/projection.test.js +0 -241
- package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +0 -1034
- package/pi-extension/tests/cognitive-routing-v2/render.test.js +0 -244
- package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +0 -423
- package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +0 -521
- package/pi-extension/tests/cognitive-routing-v2/state.test.js +0 -586
- package/pi-extension/tests/context-virtualization/extension.test.js +0 -775
- package/pi-extension/tests/context-virtualization/projector.test.js +0 -110
- package/pi-extension/tests/context-virtualization/runtime.test.js +0 -230
- package/pi-extension/tests/conversation-history/runtime.test.js +0 -98
- package/pi-extension/tests/conversation-history/search.test.js +0 -97
- package/pi-extension/tests/fixtures/pi-host.js +0 -4
- package/pi-extension/tests/fixtures/routing-native.js +0 -191
- package/pi-extension/tests/integration/mode-free-core.test.js +0 -220
- package/pi-extension/tests/integration/pi-extension.test.js +0 -1447
- package/pi-extension/tests/integration/prompt-architecture.test.js +0 -447
- package/pi-extension/tests/integration/unaffected-regressions.test.js +0 -478
- package/pi-extension/tests/provider-support/astra-boundaries.test.js +0 -75
- package/pi-extension/tests/provider-support/astra.test.js +0 -306
- package/pi-extension/tests/provider-support/cli.test.js +0 -92
- package/pi-extension/tests/provider-support/native.test.js +0 -183
- package/pi-extension/tests/settings/settings-tui.test.js +0 -243
- package/pi-extension/tsconfig.json +0 -16
- package/plugin.json +0 -33
- package/runtime/prompts/context-virtualization.md +0 -3
- package/runtime/prompts/conversation-history.md +0 -3
- package/skills/action-selection/SKILL.md +0 -100
- package/skills/action-selection/references/trajectory-stalls.md +0 -71
- package/skills/bypass/SKILL.md +0 -153
- package/skills/commit-work/SKILL.md +0 -145
- package/skills/commit-work/references/git-state-edges.md +0 -94
- package/skills/commit-work/references/simple-push.md +0 -92
- package/skills/commit-work/references/staging-decisions.md +0 -106
- package/skills/decision-gate/SKILL.md +0 -106
- package/skills/design-for-depth/SKILL.md +0 -117
- package/skills/design-for-depth/references/design-pressure-signals.md +0 -182
- package/skills/design-for-depth/references/implementation-decisions.md +0 -76
- package/skills/design-for-depth/references/interface-design-loop.md +0 -136
- package/skills/design-for-depth/references/module-and-dependency-design.md +0 -147
- package/skills/design-for-depth/references/software-design-philosophy.md +0 -202
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +0 -136
- package/skills/diagnose-failure/SKILL.md +0 -125
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +0 -48
- package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +0 -51
- package/skills/discuss/SKILL.md +0 -116
- package/skills/evaluate-skill/SKILL.md +0 -219
- package/skills/evaluate-skill/references/evaluation-definition-schema.md +0 -385
- package/skills/evaluate-skill/references/evaluation-design.md +0 -112
- package/skills/evaluate-skill/references/execution-and-evidence.md +0 -90
- package/skills/evaluate-skill/references/review-and-revision.md +0 -92
- package/skills/evaluate-skill/scripts/lib/definitions.mjs +0 -407
- 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/runner.mjs +0 -368
- package/skills/evaluate-skill/scripts/pi-guard.mjs +0 -164
- package/skills/evaluate-skill/scripts/skill-eval.mjs +0 -102
- package/skills/execute-work/references/execute-work-edges.md +0 -68
- 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 -142
- 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 -69
- package/skills/setup-freeflow/references/activation-contract.md +0 -109
- 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 -55
- package/skills/verify-work/references/integration-evidence.md +0 -47
- package/skills/verify-work/references/performance-evidence.md +0 -57
- package/skills/workflow/SKILL.md +0 -127
- package/skills/workflow/references/domain-skill-composition.md +0 -43
- 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 -104
- package/skills/write-skill/references/agent-first-instructions.md +0 -121
- package/skills/write-skill/references/progressive-disclosure.md +0 -127
- package/skills/write-skill/references/skill-dependency-graphs.md +0 -190
- package/skills/write-spec/SKILL.md +0 -92
- package/skills/write-spec/references/artifact-standards.md +0 -86
- package/skills/write-spec/references/decision-records.md +0 -78
- package/skills/write-spec/references/spec-shapes.md +0 -143
- /package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/budget.js +0 -0
- /package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/evidence.mjs +0 -0
- /package/skills/{evaluate-skill → evaluate-behavior}/scripts/pi-observer.mjs +0 -0
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
# Evaluation Definition Schema
|
|
2
|
-
|
|
3
|
-
Read this when authoring or checking schema-version-1 group and suite JSON.
|
|
4
|
-
|
|
5
|
-
This file owns user-authored definition shapes. Read [execution and evidence](execution-and-evidence.md) for commands, path resolution, run states, persistence, views, isolation, and safeguards.
|
|
6
|
-
|
|
7
|
-
## Definition Root
|
|
8
|
-
|
|
9
|
-
Run `skill-eval` from the repository or fixture root that owns the evaluation inputs.
|
|
10
|
-
|
|
11
|
-
| Input | Resolves from |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| `run <suite-or-group-path>` | current working directory |
|
|
14
|
-
| suite `groups` entries | directory containing the suite file |
|
|
15
|
-
| group `fixture` | definition root/current working directory |
|
|
16
|
-
| environment `skills` and `context` | definition root/current working directory, then the selected working tree or Git commit |
|
|
17
|
-
|
|
18
|
-
Definition files and declared paths are checked for lexical and canonical containment. Paths are slash-separated relative paths, not absolute paths.
|
|
19
|
-
|
|
20
|
-
## Common Group Shape
|
|
21
|
-
|
|
22
|
-
Every group contains exactly these fields, plus optional `model`:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"schema_version": 1,
|
|
27
|
-
"kind": "group",
|
|
28
|
-
"id": "one-behavioral-question",
|
|
29
|
-
"type": "description",
|
|
30
|
-
"input": { "prompt": "Natural task prompt." },
|
|
31
|
-
"fixture": null,
|
|
32
|
-
"tools": ["read"],
|
|
33
|
-
"variants": {
|
|
34
|
-
"baseline": {
|
|
35
|
-
"source": { "kind": "working-tree" },
|
|
36
|
-
"skills": [],
|
|
37
|
-
"target": null,
|
|
38
|
-
"context": []
|
|
39
|
-
},
|
|
40
|
-
"candidate": {
|
|
41
|
-
"source": { "kind": "working-tree" },
|
|
42
|
-
"skills": ["skills/target"],
|
|
43
|
-
"target": 0,
|
|
44
|
-
"context": []
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"expectations": [],
|
|
48
|
-
"review_questions": [],
|
|
49
|
-
"model": {
|
|
50
|
-
"model": "openai-codex/gpt-5.6-sol",
|
|
51
|
-
"thinking": "low"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Rules:
|
|
57
|
-
|
|
58
|
-
- `schema_version` is `1`.
|
|
59
|
-
- `kind` is `group`.
|
|
60
|
-
- `id` starts with a lowercase letter, contains lowercase letters, numbers, or single hyphens, and is at most 64 characters.
|
|
61
|
-
- `type` is `description` or `body`.
|
|
62
|
-
- `input` contains exactly one of:
|
|
63
|
-
- `prompt`: one non-empty string;
|
|
64
|
-
- `turns`: a non-empty ordered array of non-empty strings. Repeated natural turns are allowed.
|
|
65
|
-
- `fixture` is `null` or one contained relative directory/file path.
|
|
66
|
-
- `tools` is an ordered array with no duplicates.
|
|
67
|
-
- `variants` contains exactly `baseline` and `candidate`.
|
|
68
|
-
- `expectations` is an ordered array with unique expectation IDs.
|
|
69
|
-
- `review_questions` is an ordered string array. Questions are rendered for the reviewer and never sent to the subject.
|
|
70
|
-
- `model` is optional. `model.model` names the provider/model; optional `model.thinking` selects its thinking level. The CLI has no model override.
|
|
71
|
-
- `runtime` is optional. When omitted, the group runs under a plain `pi` host with no declared extensions. When present, it declares the host, ordered extension bundles, and string environment overrides.
|
|
72
|
-
|
|
73
|
-
## Description Group Example
|
|
74
|
-
|
|
75
|
-
A description group uses natural prompts and asks whether the exact target was read and when:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"schema_version": 1,
|
|
80
|
-
"kind": "group",
|
|
81
|
-
"id": "natural-activation",
|
|
82
|
-
"type": "description",
|
|
83
|
-
"input": {
|
|
84
|
-
"turns": [
|
|
85
|
-
"Help me inspect this ordinary change.",
|
|
86
|
-
"Now prepare a deployment rollback."
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
"fixture": null,
|
|
90
|
-
"tools": ["read"],
|
|
91
|
-
"variants": {
|
|
92
|
-
"baseline": {
|
|
93
|
-
"source": { "kind": "git", "ref": "before-description-change" },
|
|
94
|
-
"skills": ["skills/target"],
|
|
95
|
-
"target": 0,
|
|
96
|
-
"context": []
|
|
97
|
-
},
|
|
98
|
-
"candidate": {
|
|
99
|
-
"source": { "kind": "working-tree" },
|
|
100
|
-
"skills": ["skills/target"],
|
|
101
|
-
"target": 0,
|
|
102
|
-
"context": []
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"expectations": [
|
|
106
|
-
{
|
|
107
|
-
"id": "baseline-read-by-two",
|
|
108
|
-
"kind": "skill-read",
|
|
109
|
-
"variant": "baseline",
|
|
110
|
-
"expect": "by-turn",
|
|
111
|
-
"turn": 2,
|
|
112
|
-
"comparison": "target-read-by-two"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"id": "candidate-read-by-two",
|
|
116
|
-
"kind": "skill-read",
|
|
117
|
-
"variant": "candidate",
|
|
118
|
-
"expect": "by-turn",
|
|
119
|
-
"turn": 2,
|
|
120
|
-
"comparison": "target-read-by-two"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"review_questions": []
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
For a description-only revision, the two target snapshots must keep body and resources byte-identical while changing only frontmatter description text.
|
|
128
|
-
|
|
129
|
-
Description groups allow no tools or only `read`. `skill-read` is their target-activation check.
|
|
130
|
-
|
|
131
|
-
## Body Group Example
|
|
132
|
-
|
|
133
|
-
A body group explicitly delivers each target on turn one and observes first-read or later-turn behavior:
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"schema_version": 1,
|
|
138
|
-
"kind": "group",
|
|
139
|
-
"id": "retained-artifact-behavior",
|
|
140
|
-
"type": "body",
|
|
141
|
-
"input": {
|
|
142
|
-
"turns": [
|
|
143
|
-
"Inspect the task and prepare the work.",
|
|
144
|
-
"Complete it and write result.json."
|
|
145
|
-
]
|
|
146
|
-
},
|
|
147
|
-
"fixture": "fixtures/task",
|
|
148
|
-
"tools": ["read", "write", "edit"],
|
|
149
|
-
"variants": {
|
|
150
|
-
"baseline": {
|
|
151
|
-
"source": { "kind": "git", "ref": "before-body-change" },
|
|
152
|
-
"skills": ["skills/support", "skills/target"],
|
|
153
|
-
"target": 1,
|
|
154
|
-
"context": ["context/contract.md"]
|
|
155
|
-
},
|
|
156
|
-
"candidate": {
|
|
157
|
-
"source": { "kind": "working-tree" },
|
|
158
|
-
"skills": ["skills/support", "skills/target"],
|
|
159
|
-
"target": 1,
|
|
160
|
-
"context": ["context/contract.md"]
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"expectations": [
|
|
164
|
-
{
|
|
165
|
-
"id": "baseline-result",
|
|
166
|
-
"kind": "path",
|
|
167
|
-
"variant": "baseline",
|
|
168
|
-
"path": "result.json",
|
|
169
|
-
"turn": 2,
|
|
170
|
-
"expect": "exists",
|
|
171
|
-
"comparison": "result-exists"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"id": "candidate-result",
|
|
175
|
-
"kind": "path",
|
|
176
|
-
"variant": "candidate",
|
|
177
|
-
"path": "result.json",
|
|
178
|
-
"turn": 2,
|
|
179
|
-
"expect": "exists",
|
|
180
|
-
"comparison": "result-exists"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"id": "candidate-status",
|
|
184
|
-
"kind": "json",
|
|
185
|
-
"variant": "candidate",
|
|
186
|
-
"path": "result.json",
|
|
187
|
-
"turn": 2,
|
|
188
|
-
"expect": "field-equals",
|
|
189
|
-
"pointer": "/status",
|
|
190
|
-
"value": "complete"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"id": "candidate-changes",
|
|
194
|
-
"kind": "changed-paths",
|
|
195
|
-
"variant": "candidate",
|
|
196
|
-
"turn": 2,
|
|
197
|
-
"expect": "equals",
|
|
198
|
-
"paths": ["result.json"]
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
"review_questions": [
|
|
202
|
-
"Did the second turn apply the first-turn guidance without redelivery?"
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Description groups allow no tools or only built-in `read`. Body groups allow built-in `read`, `write`, and `edit`, plus custom tools declared by a runtime extension bundle. Native `bash`, `powershell`, `grep`, `find`, and `ls` tools are unsupported. A no-target baseline or runtime-only group may use `skills: []` and `target: null`; a candidate that declares skills must identify its target.
|
|
208
|
-
|
|
209
|
-
The examples are complete definition shapes. Replace fixture, resource, model, and Git-ref values with paths and identities that exist under your definition root.
|
|
210
|
-
|
|
211
|
-
## Runtime Profile
|
|
212
|
-
|
|
213
|
-
A runtime profile is shared by both baseline and candidate variants. It changes the host environment, not the skill target:
|
|
214
|
-
|
|
215
|
-
```json
|
|
216
|
-
{
|
|
217
|
-
"runtime": {
|
|
218
|
-
"host": "pi",
|
|
219
|
-
"session": false,
|
|
220
|
-
"extensions": [
|
|
221
|
-
{
|
|
222
|
-
"entry": "extensions/probe.mjs",
|
|
223
|
-
"resources": ["extensions"]
|
|
224
|
-
}
|
|
225
|
-
],
|
|
226
|
-
"environment": {
|
|
227
|
-
"literal": {
|
|
228
|
-
"PROBE_MODE": "injection-test"
|
|
229
|
-
},
|
|
230
|
-
"inherit": []
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
`host` is `pi` or `piflow`; the evaluator maps it to the corresponding installed host command and records the selected host. `session` controls whether the variant receives an isolated persistent session directory; it defaults to `false` in omitted runtime profiles. A runtime may declare zero or more bundles. Each bundle has an entry file and one or more directory resources copied under their original relative paths, so sibling imports and multi-tree extensions remain intact. Bundle bytes are snapshotted once and copied identically to both variants.
|
|
237
|
-
|
|
238
|
-
`environment.literal` contains non-secret string configuration and is recorded in run evidence. `environment.inherit` names parent-process variables whose values are passed to the child but never persisted; other parent variables are not passed. Missing inherited variables invalidate the variant. The evaluator supplies only a small host-runtime baseline such as `PATH` and `HOME`. Launch-control and loader keys are rejected from inherited values, literal and inherited names must not overlap, and secret-like literal keys are rejected.
|
|
239
|
-
|
|
240
|
-
Extensions are trusted executable inputs, not OS-sandboxed code. The evaluator proves declared identity and post-run immutability, but extension code retains its host permissions.
|
|
241
|
-
|
|
242
|
-
When a group declares `context-text` expectations, the evaluator loads its base isolation guard first, then declared bundles, then a non-mutating final observer. The observer records two per-turn surfaces: the chained `before_agent_start` system prompt and each provider-neutral `context` message projection. `context-text` expectations select `surface: "system-prompt"` or `surface: "provider-context"` and may select `request: "first"`, `"last"`, or a positive request number. Groups without context assertions do not create context-observation artifacts.
|
|
243
|
-
|
|
244
|
-
A custom tool name is allowed in `group.tools` only when the runtime declares an extension bundle. The evaluator remains extension-neutral: it does not interpret feature names or configuration schemas. Put feature configuration in the ordinary group fixture or runtime environment, and test combinations as separate suite groups.
|
|
245
|
-
|
|
246
|
-
## Variant Environment
|
|
247
|
-
|
|
248
|
-
Each environment has exactly:
|
|
249
|
-
|
|
250
|
-
```json
|
|
251
|
-
{
|
|
252
|
-
"source": { "kind": "git", "ref": "v1.2.3" },
|
|
253
|
-
"skills": ["skills/target", "skills/support"],
|
|
254
|
-
"target": 0,
|
|
255
|
-
"context": ["context/base-guidance.md"]
|
|
256
|
-
}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
`source` is either:
|
|
260
|
-
|
|
261
|
-
```json
|
|
262
|
-
{ "kind": "working-tree" }
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
or:
|
|
266
|
-
|
|
267
|
-
```json
|
|
268
|
-
{ "kind": "git", "ref": "<exact-ref>" }
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
A source applies only to declared skill and context paths in that variant. It never supplies the group fixture: `fixture` is snapshotted once from the definition-root working tree, then copied independently for selected variants. `skills` preserves registration order. `target` is `null` or a zero-based index into `skills`; the candidate target cannot be `null`. `context` preserves declaration order and may name UTF-8 files or directories.
|
|
272
|
-
|
|
273
|
-
## Expectations
|
|
274
|
-
|
|
275
|
-
Every expectation has:
|
|
276
|
-
|
|
277
|
-
- `id`: unique group-local ID using the group-ID syntax;
|
|
278
|
-
- `kind`: one supported deterministic kind;
|
|
279
|
-
- `variant`: `baseline` or `candidate`;
|
|
280
|
-
- optional `comparison`: shared by exactly one baseline and one candidate expectation describing the same expected check;
|
|
281
|
-
- optional body `turn`: one-based declared prompt/turn number.
|
|
282
|
-
|
|
283
|
-
Without `turn`, response checks use the final response and workspace checks use final state. Turn-scoped workspace checks cause an immutable workspace snapshot after each settled turn.
|
|
284
|
-
|
|
285
|
-
| `kind` | Kind-specific fields | `expect` |
|
|
286
|
-
| --- | --- | --- |
|
|
287
|
-
| `skill-read` | timing `turn` except for `never` | `never`, `on-turn`, `by-turn`, `not-before-turn` |
|
|
288
|
-
| `resource-read` | `resource`, optional `index`, `path`, optional body `turn` | `read`, `not-read` |
|
|
289
|
-
| `path` | workspace `path`, optional body `turn` | `exists`, `absent` |
|
|
290
|
-
| `changed-paths` | unique workspace `paths`, optional body `turn` | `equals`, `excludes` |
|
|
291
|
-
| `file-text` | workspace `path`, string `value`, optional body `turn` | `contains`, `not-contains`, `equals` |
|
|
292
|
-
| `json` | workspace `path`, optional body `turn`, conditional `pointer` and `value` | `available`, `missing`, `valid`, `malformed`, `field-present`, `field-absent`, `field-equals` |
|
|
293
|
-
| `response-text` | string `value`, optional body `turn` | `contains`, `not-contains`, `equals` |
|
|
294
|
-
| `tool-call` | string `tool`, optional body `turn`, optional `argumentContains`/`argumentNotContains` arrays | `called`, `succeeded`, `failed`, `not-called` |
|
|
295
|
-
| `context-text` | string `value`, optional `surface` (`system-prompt` or `provider-context`), optional `request`, optional body `turn` | `contains`, `not-contains`, `equals` |
|
|
296
|
-
|
|
297
|
-
For `tool-call` with `expect: "not-called"`, omitted argument filters require zero calls to the named tool. Supplied filters scope the absence check to calls matching those argument predicates.
|
|
298
|
-
|
|
299
|
-
### Resource paths
|
|
300
|
-
|
|
301
|
-
- `resource: "workspace"`: omit `index`; `path` is relative to the writable workspace.
|
|
302
|
-
- `resource: "skill"`: `index` selects the zero-based declared skill; `path` is relative to that skill directory.
|
|
303
|
-
- `resource: "context"`: `index` selects the zero-based declared context item; `path` is relative to that materialized item.
|
|
304
|
-
|
|
305
|
-
### Changed paths
|
|
306
|
-
|
|
307
|
-
- `equals`: the complete changed-file set must equal `paths`.
|
|
308
|
-
- `excludes`: none of `paths` may appear in the changed-file set.
|
|
309
|
-
|
|
310
|
-
Directory-only presence does not count as a changed file.
|
|
311
|
-
|
|
312
|
-
### JSON states
|
|
313
|
-
|
|
314
|
-
```json
|
|
315
|
-
[
|
|
316
|
-
{
|
|
317
|
-
"id": "file-missing",
|
|
318
|
-
"kind": "json",
|
|
319
|
-
"variant": "candidate",
|
|
320
|
-
"path": "missing.json",
|
|
321
|
-
"expect": "missing"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
"id": "file-malformed",
|
|
325
|
-
"kind": "json",
|
|
326
|
-
"variant": "candidate",
|
|
327
|
-
"path": "broken.json",
|
|
328
|
-
"expect": "malformed"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"id": "field-absent",
|
|
332
|
-
"kind": "json",
|
|
333
|
-
"variant": "candidate",
|
|
334
|
-
"path": "result.json",
|
|
335
|
-
"expect": "field-absent",
|
|
336
|
-
"pointer": "/optional"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"id": "field-null",
|
|
340
|
-
"kind": "json",
|
|
341
|
-
"variant": "candidate",
|
|
342
|
-
"path": "result.json",
|
|
343
|
-
"expect": "field-equals",
|
|
344
|
-
"pointer": "/value",
|
|
345
|
-
"value": null
|
|
346
|
-
}
|
|
347
|
-
]
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
A JSON Pointer is `""` for the complete value or begins with `/`; `~0` escapes `~` and `~1` escapes `/`.
|
|
351
|
-
|
|
352
|
-
### Comparison pair
|
|
353
|
-
|
|
354
|
-
Two expectations may share one comparison ID only when they have opposite variants and the same kind and expected predicate. The report records a factual transition such as `fail-to-pass`, never a quality verdict.
|
|
355
|
-
|
|
356
|
-
Definition loading validates common structure and unique IDs. Kind-specific expectation validation occurs during deterministic grading after run persistence. A malformed expectation therefore becomes separate `grade-error` evidence rather than changing the subject run. Use the documented shapes to avoid spending a subject run on an invalid check.
|
|
357
|
-
|
|
358
|
-
Definition-supplied commands and tests are unsupported.
|
|
359
|
-
|
|
360
|
-
## Suite
|
|
361
|
-
|
|
362
|
-
```json
|
|
363
|
-
{
|
|
364
|
-
"schema_version": 1,
|
|
365
|
-
"kind": "suite",
|
|
366
|
-
"id": "workflow-core",
|
|
367
|
-
"groups": [
|
|
368
|
-
"groups/natural-activation.json",
|
|
369
|
-
"groups/body-behavior.json"
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
A suite has only `schema_version`, `kind`, `id`, and ordered unique `groups`. Group references resolve from the suite directory; their resolved definition paths must remain inside the definition root. Referenced group IDs must also be unique.
|
|
375
|
-
|
|
376
|
-
## Selection
|
|
377
|
-
|
|
378
|
-
- With no selectors, every suite group and both variants are selected.
|
|
379
|
-
- `--group <id>` selects one stable group ID.
|
|
380
|
-
- `--group <position>` selects one one-based suite position.
|
|
381
|
-
- `--variant baseline|candidate` applies across selected groups.
|
|
382
|
-
- Excluded variants are `not-selected`, never failed.
|
|
383
|
-
- `--group` is invalid for a direct group definition.
|
|
384
|
-
|
|
385
|
-
Selection changes execution scope only. It does not modify the saved definitions.
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
# Evaluation Design
|
|
2
|
-
|
|
3
|
-
Read this before choosing or materially changing the behavioral question, evidence class, group shape, pressure, or baseline/candidate boundary.
|
|
4
|
-
|
|
5
|
-
## Keep Roles Distinct
|
|
6
|
-
|
|
7
|
-
- **Subject:** performs the declared task under one variant.
|
|
8
|
-
- **Evaluator:** isolates subjects and preserves canonical evidence.
|
|
9
|
-
- **Deterministic grader:** derives fixed mechanical facts after run persistence.
|
|
10
|
-
- **Reviewer:** the active agent or user judges unresolved meaning.
|
|
11
|
-
- **Author:** uses Write Skill to revise one measured pressure point.
|
|
12
|
-
- **User:** decides whether to revise, use, publish, or reject the skill.
|
|
13
|
-
|
|
14
|
-
The evaluator does not revise the skill, launch an automatic semantic grader, or own readiness, promotion, or production status.
|
|
15
|
-
|
|
16
|
-
## Map Claims To Evidence
|
|
17
|
-
|
|
18
|
-
| Claim | Required evidence |
|
|
19
|
-
| --- | --- |
|
|
20
|
-
| Description routes the earliest useful prompt | Natural activation |
|
|
21
|
-
| Body works with guaranteed context | Explicit body delivery |
|
|
22
|
-
| Nearby prompt is not hijacked | Natural activation plus behavioral output |
|
|
23
|
-
| Declared dependencies compose | Exact ordered composition |
|
|
24
|
-
| Guidance remains useful later | Multi-turn evidence |
|
|
25
|
-
| Files or structured state match | Artifact outcome |
|
|
26
|
-
| Behavior holds across named hosts | The same group semantics on every named host |
|
|
27
|
-
|
|
28
|
-
Record separately:
|
|
29
|
-
|
|
30
|
-
- declaration;
|
|
31
|
-
- resource materialization;
|
|
32
|
-
- delivery;
|
|
33
|
-
- observed reads;
|
|
34
|
-
- behavior;
|
|
35
|
-
- artifacts;
|
|
36
|
-
- derived grades;
|
|
37
|
-
- later semantic judgment.
|
|
38
|
-
|
|
39
|
-
A read does not prove compliance. Correct behavior does not prove which skill caused it.
|
|
40
|
-
|
|
41
|
-
## Choose The Smallest Group Shape
|
|
42
|
-
|
|
43
|
-
- **Description prompt:** natural activation and exact read timing.
|
|
44
|
-
- **Explicit body task:** first-read body behavior without activation ambiguity.
|
|
45
|
-
- **Fixture task:** files or repository state matter.
|
|
46
|
-
- **Stateful turns:** ordered conversation and retained use matter.
|
|
47
|
-
- **Saved-result review:** canonical evidence already answers the question.
|
|
48
|
-
- **Suite:** several independent questions require one ordered serial invocation.
|
|
49
|
-
|
|
50
|
-
Keep activation and body behavior separate unless their integrated interaction is the exact question and the current runner supports that observing boundary.
|
|
51
|
-
|
|
52
|
-
## Fix Exact Variants
|
|
53
|
-
|
|
54
|
-
Every group contains exactly:
|
|
55
|
-
|
|
56
|
-
- `baseline`;
|
|
57
|
-
- `candidate`.
|
|
58
|
-
|
|
59
|
-
For a new skill, baseline has no target.
|
|
60
|
-
|
|
61
|
-
For a revision, baseline names an exact immutable previous package. If no exact baseline exists, return to Write Skill before revision.
|
|
62
|
-
|
|
63
|
-
For a description-only revision, body and resources remain byte-identical.
|
|
64
|
-
|
|
65
|
-
Freeze prompts or turns, fixture, tools, model, thinking, other skills, context, runtime, and criteria across variants.
|
|
66
|
-
|
|
67
|
-
## Design Common Questions
|
|
68
|
-
|
|
69
|
-
### Description activation
|
|
70
|
-
|
|
71
|
-
Use the earliest natural prompt where the target should become useful.
|
|
72
|
-
|
|
73
|
-
For a nearby prompt, predeclare whether success means:
|
|
74
|
-
|
|
75
|
-
- non-trigger; or
|
|
76
|
-
- safe behavior after activation.
|
|
77
|
-
|
|
78
|
-
### First-read body
|
|
79
|
-
|
|
80
|
-
Explicitly deliver the exact target body with only guaranteed context. Ambient package context cannot repair a hidden dependency.
|
|
81
|
-
|
|
82
|
-
### Dependency composition
|
|
83
|
-
|
|
84
|
-
Materialize exact ordered skills and context. Vary only the target snapshot. Do not provide a hidden base stack.
|
|
85
|
-
|
|
86
|
-
### Retained use
|
|
87
|
-
|
|
88
|
-
Use ordered turns in one persistent subject process. Repeated body delivery does not prove retained use.
|
|
89
|
-
|
|
90
|
-
### Artifact outcome
|
|
91
|
-
|
|
92
|
-
Grade files, changed paths, structured state, and events before relying on the final response. Preserve turn-scoped workspace evidence when later turns may change earlier state.
|
|
93
|
-
|
|
94
|
-
## Apply Real Pressure
|
|
95
|
-
|
|
96
|
-
A useful group:
|
|
97
|
-
|
|
98
|
-
- creates a natural temptation to violate the intended behavior;
|
|
99
|
-
- keeps criteria and review questions outside the prompt;
|
|
100
|
-
- exposes deterministic evidence where possible;
|
|
101
|
-
- distinguishes baseline from candidate behavior;
|
|
102
|
-
- remains realistic enough that passing behavior is useful.
|
|
103
|
-
|
|
104
|
-
If both variants pass, the pressure may be weak or the baseline sufficient.
|
|
105
|
-
|
|
106
|
-
If both fail, classify skill, fixture, dependency, environment, host, isolation, or criterion before editing.
|
|
107
|
-
|
|
108
|
-
## Reuse Existing Evidence
|
|
109
|
-
|
|
110
|
-
When saved canonical evidence already answers the fixed question, inspect it through views and raw artifacts. Do not rerun merely to demonstrate process.
|
|
111
|
-
|
|
112
|
-
An explicitly delivered body may support first-read behavior while a natural prompt still fails activation. Preserve both conclusions; one does not repair the other.
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# Execution And Evidence
|
|
2
|
-
|
|
3
|
-
Read this when operating `run|view`, resolving paths, interpreting states, or reasoning about Pi execution, isolation, persistence, cancellation, and safeguards.
|
|
4
|
-
|
|
5
|
-
## Command And Path Contract
|
|
6
|
-
|
|
7
|
-
Run commands from the repository or fixture root that owns the definitions:
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
node <evaluate-skill-directory>/scripts/skill-eval.mjs run <suite-or-group-path> [--group <id-or-position>] [--variant baseline|candidate]
|
|
11
|
-
node <evaluate-skill-directory>/scripts/skill-eval.mjs view <result-id-or-directory> [--group <id-or-position>] [--variant baseline|candidate]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
- The current working directory is the definition root and result root.
|
|
15
|
-
- The `run` target resolves from that directory.
|
|
16
|
-
- Suite group references resolve relative to the suite file.
|
|
17
|
-
- Fixture, skill, and context declarations resolve from the definition root.
|
|
18
|
-
- Results are stored under `<cwd>/.skill-eval/runs/<result-id>`.
|
|
19
|
-
- A bare `view` target is tried first as a stored result ID, then as a path from the working directory.
|
|
20
|
-
- An absolute or path-like `view` target resolves as a directory path.
|
|
21
|
-
|
|
22
|
-
Examples:
|
|
23
|
-
|
|
24
|
-
```text
|
|
25
|
-
skill-eval run .skill-eval/my-skill/suite.json
|
|
26
|
-
skill-eval run .skill-eval/my-skill/suite.json --variant candidate
|
|
27
|
-
skill-eval view 20260720173209-a3649b8b
|
|
28
|
-
skill-eval view 20260720173209-a3649b8b --group 2 --variant candidate
|
|
29
|
-
skill-eval view /absolute/path/to/result
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
With no selectors, `run` or `view` selects every suite group and both variants. `--group` is invalid for a direct group definition/result.
|
|
33
|
-
|
|
34
|
-
## Current Execution Boundary
|
|
35
|
-
|
|
36
|
-
`run` executes description and body groups. Unsupported group types are rejected before subject execution. Description groups allow no tools or `read`; body groups allow no tools or path-guarded `read`, `write`, and `edit`, plus non-native custom tools supplied by a declared runtime extension bundle. Native `bash`, `powershell`, `grep`, `find`, and `ls` tools and definition-supplied commands are unsupported.
|
|
37
|
-
|
|
38
|
-
A runtime profile selects the installed `pi` or `piflow` host, whether the variant uses an isolated persistent session directory, zero or more ordered extension bundles, and declarative environment sources. Literal values are non-secret configuration; only explicitly inherited parent variables are passed to the child without being persisted, alongside a small host-runtime baseline. Missing inherited variables invalidate the variant. Launch-control and loader keys are rejected from inherited values, and literal and inherited names must not overlap. For body runs, delivery remains `unavailable` until target setup succeeds; `natural-prompt` or `explicit-skill-command` records a prompt attempt. When a group declares context assertions, the evaluator launches the base guard first, declared extensions second, and a final non-mutating observer last. The observer records both the effective `before_agent_start` system prompt and each provider-neutral `context` message projection; it does not replace or sanitize extension injections after the base guard has established evaluator-owned isolation.
|
|
39
|
-
|
|
40
|
-
Use fresh JSON-mode execution for one-shot descriptions. Use one persistent RPC process per selected variant for ordered description turns and all body groups. RPC correlates responses, waits for `agent_settled`, disables automatic retry and compaction, preserves directly observed partial-turn evidence, and cleans the process tree.
|
|
41
|
-
|
|
42
|
-
A body target is matched to the exact snapshotted `SKILL.md` and explicitly delivered on turn one. Later turns remain unchanged. Description groups use natural prompts and never explicit target delivery.
|
|
43
|
-
|
|
44
|
-
## Isolation And Resources
|
|
45
|
-
|
|
46
|
-
For each selected variant:
|
|
47
|
-
|
|
48
|
-
- snapshot exact declared skills, context, and the shared runtime bundle resources;
|
|
49
|
-
- copy the shared runtime bundles identically into the variant and verify their fingerprints before and after execution;
|
|
50
|
-
- snapshot the group fixture once from the definition-root working tree—never from a variant Git source—then create an independent writable copy;
|
|
51
|
-
- preserve skill order and target index;
|
|
52
|
-
- preserve runtime host, session mode, and extension order;
|
|
53
|
-
- preserve runtime bundle and provider-context observation evidence when requested;
|
|
54
|
-
- replace ambient instructions with evaluator-owned declared context;
|
|
55
|
-
- keep criteria and review questions outside the subject prompt;
|
|
56
|
-
- allow reads only from workspace and declared immutable resources;
|
|
57
|
-
- allow writes and edits only inside the workspace;
|
|
58
|
-
- reject traversal, symlink escape, unsupported Git entries, and invalid UTF-8;
|
|
59
|
-
- verify immutable resource fingerprints after execution.
|
|
60
|
-
|
|
61
|
-
Working-tree sources snapshot current paths. Git sources resolve one exact commit and record both the declared ref and resolved identity.
|
|
62
|
-
|
|
63
|
-
## Persistence And States
|
|
64
|
-
|
|
65
|
-
Each selected run is persisted before its counterpart. Grade and group evidence are persisted before later groups.
|
|
66
|
-
|
|
67
|
-
Run states are `complete`, `invalid`, `infrastructure-failed`, `cancelled`, and `not-selected`. Group and batch states are `complete`, `partially-complete`, `invalid` where applicable, and `cancelled`.
|
|
68
|
-
|
|
69
|
-
- Failed deterministic checks are ordinary complete behavioral evidence and exit zero when no infrastructure/grade failure exists.
|
|
70
|
-
- Variant-local invalidity or infrastructure failure preserves evidence and does not stop safe queued work.
|
|
71
|
-
- Shared fixture failure invalidates the group.
|
|
72
|
-
- Thrown grading or recoverable grade/group publication failure becomes explicit `grade-error` fallback evidence.
|
|
73
|
-
- If a run or required fallback cannot be preserved, queued work stops and no completed summary is published.
|
|
74
|
-
- Cancellation starts no queued subject and preserves observed diagnostics.
|
|
75
|
-
|
|
76
|
-
Invalidity, infrastructure failure, cancellation, or `grade-error` makes the final command exit nonzero after safe queued work finishes.
|
|
77
|
-
|
|
78
|
-
## Views And Raw Evidence
|
|
79
|
-
|
|
80
|
-
Views can render a complete result, all baseline or candidate variants, one group, or one group/variant. Grade appears before selected run evidence. The displayed absolute result path anchors result-relative artifact and workspace paths.
|
|
81
|
-
|
|
82
|
-
Path cells escape literal backslashes before tab, carriage return, and newline. Variant views exclude expectation-owned errors from the other variant while retaining comparison, group, and system errors.
|
|
83
|
-
|
|
84
|
-
Use ordinary file tools for raw `run.json`, events, transcript, final response, stderr, workspace, definition, grade, context observations, and group artifacts. Views remove transport noise; they do not replace canonical evidence. Tool-call grades distinguish attempted, succeeded, failed, and not-called outcomes.
|
|
85
|
-
|
|
86
|
-
## Safeguards And Limits
|
|
87
|
-
|
|
88
|
-
Normal completion follows settlement. Path guards, no-progress detection, cancellation, process-tree cleanup, and very high emergency ceilings stop runaway or unsafe infrastructure. Do not impose ordinary guessed turn, token, spend, output, or short time caps.
|
|
89
|
-
|
|
90
|
-
When an unsupported operation changes the question, reject it or run a clearly separate direct comparison with explicit limits. Never invoke archived evaluators as a fallback.
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Review And Revision
|
|
2
|
-
|
|
3
|
-
Read this after canonical evidence and deterministic grades exist, when evidence conflicts, meaning remains unresolved, the failed boundary must be classified, or revision and rerun scope must be chosen.
|
|
4
|
-
|
|
5
|
-
## Use The Strongest Evidence
|
|
6
|
-
|
|
7
|
-
Prefer, in order:
|
|
8
|
-
|
|
9
|
-
1. filesystem state, typed workspace manifests, diffs, and changed paths;
|
|
10
|
-
2. structured events, tool activity, usage, process results, logs, and saved reports;
|
|
11
|
-
3. final response;
|
|
12
|
-
4. full transcript when stronger surfaces cannot answer the question;
|
|
13
|
-
5. subject self-assessment.
|
|
14
|
-
|
|
15
|
-
Lower-priority evidence cannot repair a contradiction above it.
|
|
16
|
-
|
|
17
|
-
If a response claims success but a required file is absent, preserve both facts and judge from the stronger artifact evidence.
|
|
18
|
-
|
|
19
|
-
## Keep Deterministic Facts Separate
|
|
20
|
-
|
|
21
|
-
Built-in checks establish exact observable facts. Missing evidence remains unavailable. A failed check remains behavioral evidence and does not relabel a complete run as infrastructure failure.
|
|
22
|
-
|
|
23
|
-
The active agent or user may judge:
|
|
24
|
-
|
|
25
|
-
- reasoning quality;
|
|
26
|
-
- authority preservation;
|
|
27
|
-
- architectural fitness;
|
|
28
|
-
- recommendation quality;
|
|
29
|
-
- semantic completeness.
|
|
30
|
-
|
|
31
|
-
Keep semantic judgment, cited evidence, uncertainty, and limits outside canonical run and deterministic grade state.
|
|
32
|
-
|
|
33
|
-
Do not turn semantic judgment into evaluator-owned readiness or promotion status.
|
|
34
|
-
|
|
35
|
-
## Diagnose The Failed Boundary
|
|
36
|
-
|
|
37
|
-
Classify before revising:
|
|
38
|
-
|
|
39
|
-
- activation timing;
|
|
40
|
-
- description language unavailable before body read;
|
|
41
|
-
- first-read body comprehension;
|
|
42
|
-
- undeclared, undelivered, unread, or ambient-only dependency;
|
|
43
|
-
- normal guidance hidden behind the wrong resource boundary;
|
|
44
|
-
- nearby behavior that hijacks the task;
|
|
45
|
-
- retained-use or multi-turn failure;
|
|
46
|
-
- wording, placement, example, repetition, or stop-condition pressure;
|
|
47
|
-
- fixture, environment, isolation, host, runner, or deterministic-check failure.
|
|
48
|
-
|
|
49
|
-
Do not add broad prose before identifying which boundary failed.
|
|
50
|
-
|
|
51
|
-
## Return Revision To Write Skill
|
|
52
|
-
|
|
53
|
-
When evidence supports a skill change:
|
|
54
|
-
|
|
55
|
-
1. name the exact failed boundary;
|
|
56
|
-
2. cite the canonical evidence;
|
|
57
|
-
3. identify one measured pressure point;
|
|
58
|
-
4. preserve unrelated instructions and fixed criteria;
|
|
59
|
-
5. return the revision target to [Write Skill](../../write-skill/SKILL.md).
|
|
60
|
-
|
|
61
|
-
Write Skill owns package revision.
|
|
62
|
-
|
|
63
|
-
Evaluate Skill does not edit the skill or replace its baseline while evaluating it.
|
|
64
|
-
|
|
65
|
-
When evidence proves the group, fixture, or criterion is wrong, revise the evaluation instead. Preserve the old result and state that it no longer answers the revised question.
|
|
66
|
-
|
|
67
|
-
## Rerun The Complete Group
|
|
68
|
-
|
|
69
|
-
After a measured skill revision or resolved infrastructure cause:
|
|
70
|
-
|
|
71
|
-
- rerun the complete fixed group;
|
|
72
|
-
- run both baseline and candidate;
|
|
73
|
-
- keep every result visible;
|
|
74
|
-
- do not reuse an earlier baseline run as a fresh counterpart;
|
|
75
|
-
- do not rerun only the preferred variant;
|
|
76
|
-
- do not use partial evidence as a comparable full result;
|
|
77
|
-
- do not rerun merely to erase failure.
|
|
78
|
-
|
|
79
|
-
For variance, use independent complete invocations rather than repeated preferred variants.
|
|
80
|
-
|
|
81
|
-
## Report
|
|
82
|
-
|
|
83
|
-
Report:
|
|
84
|
-
|
|
85
|
-
- failed boundary and evidence;
|
|
86
|
-
- exact skill revision or evaluation correction;
|
|
87
|
-
- criteria that remained fixed;
|
|
88
|
-
- old and new result paths;
|
|
89
|
-
- deterministic transitions;
|
|
90
|
-
- remaining unsupported claims.
|
|
91
|
-
|
|
92
|
-
The user decides whether to revise further, use, publish, or reject the skill.
|