@jadelclemens/pi-forge 0.0.0-stage → 0.6.1
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/CHANGELOG.md +486 -0
- package/LICENSE +21 -0
- package/PUBLIC_API.md +5 -0
- package/README.md +204 -2
- package/README.zh-CN.md +128 -0
- package/SUBAGENT_ADAPTER_CONTRACT.md +7 -0
- package/dist/active-state.d.ts +148 -0
- package/dist/active-state.d.ts.map +1 -0
- package/dist/active-state.js +374 -0
- package/dist/active-state.js.map +1 -0
- package/dist/agent-profile.d.ts +51 -0
- package/dist/agent-profile.d.ts.map +1 -0
- package/dist/agent-profile.js +197 -0
- package/dist/agent-profile.js.map +1 -0
- package/dist/capabilities.d.ts +39 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +160 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/capability-anchors.d.ts +45 -0
- package/dist/capability-anchors.d.ts.map +1 -0
- package/dist/capability-anchors.js +263 -0
- package/dist/capability-anchors.js.map +1 -0
- package/dist/capability-command.d.ts +4 -0
- package/dist/capability-command.d.ts.map +1 -0
- package/dist/capability-command.js +164 -0
- package/dist/capability-command.js.map +1 -0
- package/dist/capability-events.d.ts +79 -0
- package/dist/capability-events.d.ts.map +1 -0
- package/dist/capability-events.js +478 -0
- package/dist/capability-events.js.map +1 -0
- package/dist/capability-projection.d.ts +22 -0
- package/dist/capability-projection.d.ts.map +1 -0
- package/dist/capability-projection.js +273 -0
- package/dist/capability-projection.js.map +1 -0
- package/dist/capability-protocol.d.ts +21 -0
- package/dist/capability-protocol.d.ts.map +1 -0
- package/dist/capability-protocol.js +15 -0
- package/dist/capability-protocol.js.map +1 -0
- package/dist/capability-state.d.ts +74 -0
- package/dist/capability-state.d.ts.map +1 -0
- package/dist/capability-state.js +43 -0
- package/dist/capability-state.js.map +1 -0
- package/dist/capability-tool.d.ts +11 -0
- package/dist/capability-tool.d.ts.map +1 -0
- package/dist/capability-tool.js +25 -0
- package/dist/capability-tool.js.map +1 -0
- package/dist/capability-web-host.d.ts +11 -0
- package/dist/capability-web-host.d.ts.map +1 -0
- package/dist/capability-web-host.js +105 -0
- package/dist/capability-web-host.js.map +1 -0
- package/dist/catalog.d.ts +27 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +59 -0
- package/dist/catalog.js.map +1 -0
- package/dist/codecs/agent-profile.d.ts +53 -0
- package/dist/codecs/agent-profile.d.ts.map +1 -0
- package/dist/codecs/agent-profile.js +176 -0
- package/dist/codecs/agent-profile.js.map +1 -0
- package/dist/codecs/capability.d.ts +71 -0
- package/dist/codecs/capability.d.ts.map +1 -0
- package/dist/codecs/capability.js +363 -0
- package/dist/codecs/capability.js.map +1 -0
- package/dist/codecs/index.d.ts +5 -0
- package/dist/codecs/index.d.ts.map +1 -0
- package/dist/codecs/index.js +3 -0
- package/dist/codecs/index.js.map +1 -0
- package/dist/codecs/prompt-stack.d.ts +18 -0
- package/dist/codecs/prompt-stack.d.ts.map +1 -0
- package/dist/codecs/prompt-stack.js +623 -0
- package/dist/codecs/prompt-stack.js.map +1 -0
- package/dist/command-contribution/index.d.ts +21 -0
- package/dist/command-contribution/index.d.ts.map +1 -0
- package/dist/command-contribution/index.js +14 -0
- package/dist/command-contribution/index.js.map +1 -0
- package/dist/compile-cycle.d.ts +26 -0
- package/dist/compile-cycle.d.ts.map +1 -0
- package/dist/compile-cycle.js +16 -0
- package/dist/compile-cycle.js.map +1 -0
- package/dist/compiler.d.ts +22 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +737 -0
- package/dist/compiler.js.map +1 -0
- package/dist/context-diff-history.d.ts +69 -0
- package/dist/context-diff-history.d.ts.map +1 -0
- package/dist/context-diff-history.js +107 -0
- package/dist/context-diff-history.js.map +1 -0
- package/dist/context-diff-snapshot.d.ts +19 -0
- package/dist/context-diff-snapshot.d.ts.map +1 -0
- package/dist/context-diff-snapshot.js +146 -0
- package/dist/context-diff-snapshot.js.map +1 -0
- package/dist/context-diff.d.ts +70 -0
- package/dist/context-diff.d.ts.map +1 -0
- package/dist/context-diff.js +259 -0
- package/dist/context-diff.js.map +1 -0
- package/dist/extension-registry.d.ts +25 -0
- package/dist/extension-registry.d.ts.map +1 -0
- package/dist/extension-registry.js +9 -0
- package/dist/extension-registry.js.map +1 -0
- package/dist/forge-command.d.ts +10 -0
- package/dist/forge-command.d.ts.map +1 -0
- package/dist/forge-command.js +106 -0
- package/dist/forge-command.js.map +1 -0
- package/dist/forge-config.d.ts +9 -0
- package/dist/forge-config.d.ts.map +1 -0
- package/dist/forge-config.js +15 -0
- package/dist/forge-config.js.map +1 -0
- package/dist/forge-extensions.d.ts +28 -0
- package/dist/forge-extensions.d.ts.map +1 -0
- package/dist/forge-extensions.js +198 -0
- package/dist/forge-extensions.js.map +1 -0
- package/dist/forge-v1/analyzer.d.ts +3 -0
- package/dist/forge-v1/analyzer.d.ts.map +1 -0
- package/dist/forge-v1/analyzer.js +50 -0
- package/dist/forge-v1/analyzer.js.map +1 -0
- package/dist/forge-v1/index.d.ts +6 -0
- package/dist/forge-v1/index.d.ts.map +1 -0
- package/dist/forge-v1/index.js +13 -0
- package/dist/forge-v1/index.js.map +1 -0
- package/dist/forge-v1/parser.d.ts +3 -0
- package/dist/forge-v1/parser.d.ts.map +1 -0
- package/dist/forge-v1/parser.js +186 -0
- package/dist/forge-v1/parser.js.map +1 -0
- package/dist/forge-v1/renderer.d.ts +9 -0
- package/dist/forge-v1/renderer.d.ts.map +1 -0
- package/dist/forge-v1/renderer.js +181 -0
- package/dist/forge-v1/renderer.js.map +1 -0
- package/dist/forge-v1/types.d.ts +87 -0
- package/dist/forge-v1/types.d.ts.map +1 -0
- package/dist/forge-v1/types.js +4 -0
- package/dist/forge-v1/types.js.map +1 -0
- package/dist/host-compatibility.d.ts +13 -0
- package/dist/host-compatibility.d.ts.map +1 -0
- package/dist/host-compatibility.js +41 -0
- package/dist/host-compatibility.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +183 -0
- package/dist/index.js.map +1 -0
- package/dist/json-fingerprint.d.ts +11 -0
- package/dist/json-fingerprint.d.ts.map +1 -0
- package/dist/json-fingerprint.js +66 -0
- package/dist/json-fingerprint.js.map +1 -0
- package/dist/lifecycle.d.ts +46 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +330 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/loader.d.ts +21 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +58 -0
- package/dist/loader.js.map +1 -0
- package/dist/macro-engine.d.ts +18 -0
- package/dist/macro-engine.d.ts.map +1 -0
- package/dist/macro-engine.js +29 -0
- package/dist/macro-engine.js.map +1 -0
- package/dist/payload-capture.d.ts +31 -0
- package/dist/payload-capture.d.ts.map +1 -0
- package/dist/payload-capture.js +253 -0
- package/dist/payload-capture.js.map +1 -0
- package/dist/payload-command.d.ts +12 -0
- package/dist/payload-command.d.ts.map +1 -0
- package/dist/payload-command.js +197 -0
- package/dist/payload-command.js.map +1 -0
- package/dist/payload-state.d.ts +20 -0
- package/dist/payload-state.d.ts.map +1 -0
- package/dist/payload-state.js +20 -0
- package/dist/payload-state.js.map +1 -0
- package/dist/policy.d.ts +7 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +41 -0
- package/dist/policy.js.map +1 -0
- package/dist/preset-command.d.ts +19 -0
- package/dist/preset-command.d.ts.map +1 -0
- package/dist/preset-command.js +261 -0
- package/dist/preset-command.js.map +1 -0
- package/dist/preview-inspection.d.ts +68 -0
- package/dist/preview-inspection.d.ts.map +1 -0
- package/dist/preview-inspection.js +293 -0
- package/dist/preview-inspection.js.map +1 -0
- package/dist/preview-text.d.ts +5 -0
- package/dist/preview-text.d.ts.map +1 -0
- package/dist/preview-text.js +27 -0
- package/dist/preview-text.js.map +1 -0
- package/dist/preview.d.ts +32 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +272 -0
- package/dist/preview.js.map +1 -0
- package/dist/profile-command.d.ts +17 -0
- package/dist/profile-command.d.ts.map +1 -0
- package/dist/profile-command.js +385 -0
- package/dist/profile-command.js.map +1 -0
- package/dist/profile-service.d.ts +107 -0
- package/dist/profile-service.d.ts.map +1 -0
- package/dist/profile-service.js +248 -0
- package/dist/profile-service.js.map +1 -0
- package/dist/prompt-analysis.d.ts +24 -0
- package/dist/prompt-analysis.d.ts.map +1 -0
- package/dist/prompt-analysis.js +84 -0
- package/dist/prompt-analysis.js.map +1 -0
- package/dist/prompt-cache-warning.d.ts +23 -0
- package/dist/prompt-cache-warning.d.ts.map +1 -0
- package/dist/prompt-cache-warning.js +74 -0
- package/dist/prompt-cache-warning.js.map +1 -0
- package/dist/prompt-runtime.d.ts +19 -0
- package/dist/prompt-runtime.d.ts.map +1 -0
- package/dist/prompt-runtime.js +34 -0
- package/dist/prompt-runtime.js.map +1 -0
- package/dist/regex.d.ts +19 -0
- package/dist/regex.d.ts.map +1 -0
- package/dist/regex.js +507 -0
- package/dist/regex.js.map +1 -0
- package/dist/render-helpers.d.ts +38 -0
- package/dist/render-helpers.d.ts.map +1 -0
- package/dist/render-helpers.js +85 -0
- package/dist/render-helpers.js.map +1 -0
- package/dist/repositories/agent-profile.d.ts +36 -0
- package/dist/repositories/agent-profile.d.ts.map +1 -0
- package/dist/repositories/agent-profile.js +153 -0
- package/dist/repositories/agent-profile.js.map +1 -0
- package/dist/repositories/capability.d.ts +53 -0
- package/dist/repositories/capability.d.ts.map +1 -0
- package/dist/repositories/capability.js +294 -0
- package/dist/repositories/capability.js.map +1 -0
- package/dist/repositories/index.d.ts +3 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +3 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/prompt-stack.d.ts +57 -0
- package/dist/repositories/prompt-stack.d.ts.map +1 -0
- package/dist/repositories/prompt-stack.js +175 -0
- package/dist/repositories/prompt-stack.js.map +1 -0
- package/dist/resource-identity.d.ts +33 -0
- package/dist/resource-identity.d.ts.map +1 -0
- package/dist/resource-identity.js +56 -0
- package/dist/resource-identity.js.map +1 -0
- package/dist/runtime/capability-runtime.d.ts +95 -0
- package/dist/runtime/capability-runtime.d.ts.map +1 -0
- package/dist/runtime/capability-runtime.js +991 -0
- package/dist/runtime/capability-runtime.js.map +1 -0
- package/dist/runtime/profile-runtime.d.ts +14 -0
- package/dist/runtime/profile-runtime.d.ts.map +1 -0
- package/dist/runtime/profile-runtime.js +56 -0
- package/dist/runtime/profile-runtime.js.map +1 -0
- package/dist/runtime/prompt-stack-runtime.d.ts +27 -0
- package/dist/runtime/prompt-stack-runtime.d.ts.map +1 -0
- package/dist/runtime/prompt-stack-runtime.js +149 -0
- package/dist/runtime/prompt-stack-runtime.js.map +1 -0
- package/dist/runtime/tool-policy-runtime.d.ts +25 -0
- package/dist/runtime/tool-policy-runtime.d.ts.map +1 -0
- package/dist/runtime/tool-policy-runtime.js +386 -0
- package/dist/runtime/tool-policy-runtime.js.map +1 -0
- package/dist/runtime/web-editor-runtime.d.ts +11 -0
- package/dist/runtime/web-editor-runtime.d.ts.map +1 -0
- package/dist/runtime/web-editor-runtime.js +141 -0
- package/dist/runtime/web-editor-runtime.js.map +1 -0
- package/dist/session-adapter.d.ts +30 -0
- package/dist/session-adapter.d.ts.map +1 -0
- package/dist/session-adapter.js +167 -0
- package/dist/session-adapter.js.map +1 -0
- package/dist/session-state.d.ts +23 -0
- package/dist/session-state.d.ts.map +1 -0
- package/dist/session-state.js +44 -0
- package/dist/session-state.js.map +1 -0
- package/dist/session-usage.d.ts +65 -0
- package/dist/session-usage.d.ts.map +1 -0
- package/dist/session-usage.js +134 -0
- package/dist/session-usage.js.map +1 -0
- package/dist/slot-renderers.d.ts +38 -0
- package/dist/slot-renderers.d.ts.map +1 -0
- package/dist/slot-renderers.js +285 -0
- package/dist/slot-renderers.js.map +1 -0
- package/dist/stack-migration.d.ts +35 -0
- package/dist/stack-migration.d.ts.map +1 -0
- package/dist/stack-migration.js +123 -0
- package/dist/stack-migration.js.map +1 -0
- package/dist/status-text.d.ts +6 -0
- package/dist/status-text.d.ts.map +1 -0
- package/dist/status-text.js +11 -0
- package/dist/status-text.js.map +1 -0
- package/dist/storage.d.ts +24 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +94 -0
- package/dist/storage.js.map +1 -0
- package/dist/subagent/fingerprints.d.ts +12 -0
- package/dist/subagent/fingerprints.d.ts.map +1 -0
- package/dist/subagent/fingerprints.js +17 -0
- package/dist/subagent/fingerprints.js.map +1 -0
- package/dist/subagent/host-port.d.ts +296 -0
- package/dist/subagent/host-port.d.ts.map +1 -0
- package/dist/subagent/host-port.js +560 -0
- package/dist/subagent/host-port.js.map +1 -0
- package/dist/subagent/index.d.ts +16 -0
- package/dist/subagent/index.d.ts.map +1 -0
- package/dist/subagent/index.js +15 -0
- package/dist/subagent/index.js.map +1 -0
- package/dist/subagent-host.d.ts +125 -0
- package/dist/subagent-host.d.ts.map +1 -0
- package/dist/subagent-host.js +327 -0
- package/dist/subagent-host.js.map +1 -0
- package/dist/template-render.d.ts +18 -0
- package/dist/template-render.d.ts.map +1 -0
- package/dist/template-render.js +232 -0
- package/dist/template-render.js.map +1 -0
- package/dist/types.d.ts +213 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui-contribution/contrib-port.d.ts +170 -0
- package/dist/ui-contribution/contrib-port.d.ts.map +1 -0
- package/dist/ui-contribution/contrib-port.js +640 -0
- package/dist/ui-contribution/contrib-port.js.map +1 -0
- package/dist/ui-contribution/index.d.ts +3 -0
- package/dist/ui-contribution/index.d.ts.map +1 -0
- package/dist/ui-contribution/index.js +2 -0
- package/dist/ui-contribution/index.js.map +1 -0
- package/dist/web-editor/client-script.d.ts +2 -0
- package/dist/web-editor/client-script.d.ts.map +1 -0
- package/dist/web-editor/client-script.generated.d.ts +2 -0
- package/dist/web-editor/client-script.generated.d.ts.map +1 -0
- package/dist/web-editor/client-script.generated.js +3 -0
- package/dist/web-editor/client-script.generated.js.map +1 -0
- package/dist/web-editor/client-script.js +2 -0
- package/dist/web-editor/client-script.js.map +1 -0
- package/dist/web-editor/client-styles.d.ts +2 -0
- package/dist/web-editor/client-styles.d.ts.map +1 -0
- package/dist/web-editor/client-styles.generated.d.ts +2 -0
- package/dist/web-editor/client-styles.generated.d.ts.map +1 -0
- package/dist/web-editor/client-styles.generated.js +3 -0
- package/dist/web-editor/client-styles.generated.js.map +1 -0
- package/dist/web-editor/client-styles.js +2 -0
- package/dist/web-editor/client-styles.js.map +1 -0
- package/dist/web-editor/contrib-service.d.ts +41 -0
- package/dist/web-editor/contrib-service.d.ts.map +1 -0
- package/dist/web-editor/contrib-service.js +174 -0
- package/dist/web-editor/contrib-service.js.map +1 -0
- package/dist/web-editor/index.d.ts +3 -0
- package/dist/web-editor/index.d.ts.map +1 -0
- package/dist/web-editor/index.js +2 -0
- package/dist/web-editor/index.js.map +1 -0
- package/dist/web-editor/line-diff.d.ts +28 -0
- package/dist/web-editor/line-diff.d.ts.map +1 -0
- package/dist/web-editor/line-diff.js +216 -0
- package/dist/web-editor/line-diff.js.map +1 -0
- package/dist/web-editor/page.d.ts +4 -0
- package/dist/web-editor/page.d.ts.map +1 -0
- package/dist/web-editor/page.js +26 -0
- package/dist/web-editor/page.js.map +1 -0
- package/dist/web-editor/schema-form.d.ts +63 -0
- package/dist/web-editor/schema-form.d.ts.map +1 -0
- package/dist/web-editor/schema-form.js +213 -0
- package/dist/web-editor/schema-form.js.map +1 -0
- package/dist/web-editor/server.d.ts +4 -0
- package/dist/web-editor/server.d.ts.map +1 -0
- package/dist/web-editor/server.js +637 -0
- package/dist/web-editor/server.js.map +1 -0
- package/dist/web-editor/styles.d.ts +2 -0
- package/dist/web-editor/styles.d.ts.map +1 -0
- package/dist/web-editor/styles.js +1744 -0
- package/dist/web-editor/styles.js.map +1 -0
- package/dist/web-editor/types.d.ts +304 -0
- package/dist/web-editor/types.d.ts.map +1 -0
- package/dist/web-editor/types.js +2 -0
- package/dist/web-editor/types.js.map +1 -0
- package/dist/web-host.d.ts +56 -0
- package/dist/web-host.d.ts.map +1 -0
- package/dist/web-host.js +750 -0
- package/dist/web-host.js.map +1 -0
- package/dist/workspace.d.ts +85 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +409 -0
- package/dist/workspace.js.map +1 -0
- package/docs/README.md +49 -0
- package/docs/concepts/agent-profiles.md +62 -0
- package/docs/concepts/prompt-stacks.md +99 -0
- package/docs/design/0.5.1-plan.md +237 -0
- package/docs/design/README.md +37 -0
- package/docs/design/architecture-0.5.md +254 -0
- package/docs/design/archive/0.5-full-proposal/0.5-consumer-audit.md +62 -0
- package/docs/design/archive/0.5-full-proposal/0.5-inventory.md +208 -0
- package/docs/design/archive/0.5-full-proposal/0.5-phase0-decision-drafts.md +237 -0
- package/docs/design/archive/0.5-full-proposal/README.md +12 -0
- package/docs/design/archive/0.5-full-proposal/architecture-0.5.md +423 -0
- package/docs/design/archive/0.5-full-proposal/host-discovery-spike.md +103 -0
- package/docs/design/archive/0.5-full-proposal/template-language-spike.md +156 -0
- package/docs/design/archive/2026-09-12-system-update-design.md +229 -0
- package/docs/design/context-diff-plan.md +78 -0
- package/docs/design/decision-template.md +33 -0
- package/docs/design/pi-forge-system-update-design-notes.md +157 -0
- package/docs/design/roadmap-0.4-archive.md +216 -0
- package/docs/design/subagents/design-review.md +220 -0
- package/docs/design/subagents/interface-design.md +274 -0
- package/docs/design/subagents/sdk-spike-findings.md +117 -0
- package/docs/development/architecture-rules.md +148 -0
- package/docs/development/complexity-review.md +86 -0
- package/docs/development/release.md +59 -0
- package/docs/development/roadmap.md +117 -0
- package/docs/development/scoped-global-profiles-stacks.md +325 -0
- package/docs/development/setup.md +99 -0
- package/docs/getting-started.md +96 -0
- package/docs/guides/custom-macros-and-slots.md +69 -0
- package/docs/guides/debugging.md +39 -0
- package/docs/guides/delegation.md +105 -0
- package/docs/guides/migrating-to-0.5.md +136 -0
- package/docs/guides/pi-1-compatibility.md +160 -0
- package/docs/guides/use-cases.md +67 -0
- package/docs/guides/web-editor.md +161 -0
- package/docs/reference/active-state.md +77 -0
- package/docs/reference/capabilities.md +288 -0
- package/docs/reference/commands.md +89 -0
- package/docs/reference/configuration.md +70 -0
- package/docs/reference/features.md +305 -0
- package/docs/reference/macros-and-slots.md +103 -0
- package/docs/reference/provider-support.md +67 -0
- package/docs/reference/public-api.md +133 -0
- package/docs/reference/session-cache.md +112 -0
- package/docs/reference/stack-schema.md +243 -0
- package/docs/reference/subagent-host-port.md +57 -0
- package/docs/reference/ui-contribution-port.md +51 -0
- package/docs/zh-CN/README.md +41 -0
- package/docs/zh-CN/concepts/agent-profiles.md +48 -0
- package/docs/zh-CN/concepts/prompt-stacks.md +48 -0
- package/docs/zh-CN/getting-started.md +82 -0
- package/docs/zh-CN/guides/delegation.md +76 -0
- package/docs/zh-CN/guides/migrating-to-0.5.md +121 -0
- package/docs/zh-CN/guides/pi-1-compatibility.md +158 -0
- package/docs/zh-CN/guides/web-editor.md +134 -0
- package/docs/zh-CN/reference/capabilities.md +288 -0
- package/docs/zh-CN/reference/commands.md +89 -0
- package/docs/zh-CN/reference/provider-support.md +67 -0
- package/docs/zh-CN/reference/session-cache.md +112 -0
- package/examples/capabilities/review.json +12 -0
- package/examples/capabilities/write-tools.json +15 -0
- package/examples/custom-system-status-extension/index.ts +144 -0
- package/examples/custom-system-status-extension/prompt-stack.json +40 -0
- package/examples/default-prompt-stack.json +125 -0
- package/examples/fake-assistant-direct-output-prompt-stack.json +48 -0
- package/examples/hack-prompt-stack.json +118 -0
- package/examples/minimal-prompt-stack.json +40 -0
- package/examples/read-first-worker-prompt-stack.json +49 -0
- package/examples/validation-issues-prompt-stack.json +38 -0
- package/package.json +114 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Agent profiles
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md) · [中文](../zh-CN/concepts/agent-profiles.md)
|
|
4
|
+
|
|
5
|
+
An agent profile is a project-local, schema-versioned preset that references one exact model, thinking level, and prompt stack. It is deliberately small and portable.
|
|
6
|
+
|
|
7
|
+
## Schema
|
|
8
|
+
|
|
9
|
+
Profiles live in `.pi/forge/agent-profiles/*.json` (project scope) or `~/.pi/forge/agent-profiles/*.json` (global scope). Commands accept `reviewer`, `project:reviewer`, and `global:reviewer`; a project profile shadows a same-ID global profile for unqualified lookups. A profile's `promptStack` reference resolves relative to the profile's own scope: a project profile may reference its own project stack by bare ID or a global stack as `global:<id>`; a global profile may only reference global stacks.
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"schemaVersion": 1,
|
|
14
|
+
"type": "pi-forge.agent-profile",
|
|
15
|
+
"id": "reviewer",
|
|
16
|
+
"name": "Reviewer",
|
|
17
|
+
"description": "Reviews code without making changes.",
|
|
18
|
+
"autoActivate": true,
|
|
19
|
+
"model": {
|
|
20
|
+
"provider": "provider-id",
|
|
21
|
+
"id": "model-id"
|
|
22
|
+
},
|
|
23
|
+
"thinkingLevel": "high",
|
|
24
|
+
"promptStack": "reviewer"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`promptStack` may be `null`. Unsupported fields are errors: generation settings, tools, skills, backend selection, and runner policy are intentionally not profile-v1 data. The referenced prompt stack is the sole source of tool policy and model-visible skill filtering.
|
|
29
|
+
|
|
30
|
+
## Capture and application
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
/profile save reviewer
|
|
34
|
+
/profile preview reviewer
|
|
35
|
+
/profile use reviewer
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Save captures the current provider/model, thinking level, and stack without secrets, history, tools, or provenance. `--overwrite` is required to replace an existing file; existing display metadata is preserved.
|
|
39
|
+
|
|
40
|
+
Application is transactional and one-shot. pi-forge first validates the profile, model, configured authentication, thinking-level support, prompt stack, and tool allow patterns. It changes nothing when preflight fails. If an application step fails, it attempts rollback and does not record successful provenance.
|
|
41
|
+
|
|
42
|
+
After a successful application, later manual changes are respected. The profile does not continuously own model or thinking state, although the selected prompt stack continues enforcing its policy.
|
|
43
|
+
|
|
44
|
+
## Auto-activation
|
|
45
|
+
|
|
46
|
+
At most one profile may set `autoActivate: true`. It applies once when Pi starts a fresh session and takes precedence over standalone prompt-stack autoload, including when `promptStack` is `null`.
|
|
47
|
+
|
|
48
|
+
Auto-profile settings and preset/tool selection may apply before first-turn prompt compatibility is observed. Later detection of missing required prompt inputs does not roll back those settings, abort provider dispatch, or automatically clear independently applied tool policy. CLI application preflights command prompt APIs; this is not universal startup detection or support for forks such as OMP. See [unsupported-host boundaries](../guides/pi-1-compatibility.md#unsupported-host-boundaries).
|
|
49
|
+
|
|
50
|
+
Restored branch selections take precedence over auto-activation. Invalid or ambiguous profile auto-activation fails closed: pi-forge will not partially apply it or silently fall back to a stack.
|
|
51
|
+
|
|
52
|
+
## Provenance and drift
|
|
53
|
+
|
|
54
|
+
`/profile status` compares the current runtime with the last-applied resolved snapshot. It reports source-definition changes separately from runtime drift in model, thinking level, or stack.
|
|
55
|
+
|
|
56
|
+
Provenance is branch-scoped status metadata, not ownership. Reload, resume, tree navigation, and compaction never reapply a profile. `/profile forget` removes provenance without changing runtime state.
|
|
57
|
+
|
|
58
|
+
## Delegation is separate
|
|
59
|
+
|
|
60
|
+
Ordinary profiles cannot be delegated by default. Delegation authorization is owned by the optional `@zihanw/pi-forge-subagents` package in dedicated files, using canonical `project:<id>` or `global:<id>` keys with per-profile backend/timeout overrides. Bare authorization keys are project-only compatibility aliases regardless of file location. The main package reads no subagent configuration, and deleting a profile does not touch `subagents.json`.
|
|
61
|
+
|
|
62
|
+
Read the [experimental delegation guide](../guides/delegation.md) before enabling it.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Presets and Stacks
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md) · [中文](../zh-CN/concepts/prompt-stacks.md)
|
|
4
|
+
|
|
5
|
+
A **Preset** is the complete declarative resource Pi Forge applies. Its **Stack** is the ordered prompt composition made from static **Blocks** and dynamic **Slots**; the same Preset also carries policy, Regex, parameters, and extension references.
|
|
6
|
+
|
|
7
|
+
> **0.5.3 compatibility note.** The UI uses Preset → Stack terminology. The file path, JSON type, profile field, API route, and internal type names retain their existing `prompt-stack` / `promptStack` spellings in this patch.
|
|
8
|
+
|
|
9
|
+
## Blocks and slots
|
|
10
|
+
|
|
11
|
+
A block inserts static text with a role:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"kind": "block",
|
|
16
|
+
"id": "review-rules",
|
|
17
|
+
"name": "Review rules",
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"role": "system",
|
|
20
|
+
"content": "Prioritize correctness, regressions, security, and missing tests."
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
A slot renders current Pi data at that position:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"kind": "slot",
|
|
29
|
+
"id": "history",
|
|
30
|
+
"name": "Conversation",
|
|
31
|
+
"enabled": true,
|
|
32
|
+
"role": "user",
|
|
33
|
+
"slot": "chat-history",
|
|
34
|
+
"options": { "includeLastUserMessage": false }
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Slots cover conversation history, tools, tool guidance, skills, project context, appended system text, model, date, and working directory. See [macros and slots](../reference/macros-and-slots.md).
|
|
39
|
+
|
|
40
|
+
## Compilation order
|
|
41
|
+
|
|
42
|
+
For each new user turn, pi-forge:
|
|
43
|
+
|
|
44
|
+
1. Orders enabled blocks and slots exactly as written.
|
|
45
|
+
2. Builds `system` content and applies the Preset's `replace`, `append`, or `prepend` mode.
|
|
46
|
+
3. Inserts synthetic user/assistant messages around the movable `chat-history` slot.
|
|
47
|
+
4. Compiles forge-v1 templates over `runtime.*`, `parameters.*`, and `extensions.*`.
|
|
48
|
+
5. Applies the Preset's tool policy to Pi and filters skills rendered by pi-forge.
|
|
49
|
+
6. Applies outgoing history/compiled regex rules.
|
|
50
|
+
7. Optionally applies destructive finalize rules when an assistant message completes.
|
|
51
|
+
|
|
52
|
+
The context rewrite happens only on the first provider request for a user-submitted turn. Pi can then continue its normal tool loop without repeatedly rebuilding the same context.
|
|
53
|
+
|
|
54
|
+
A Stack can optionally merge runs of consecutive same-role items into a single message with `context.mergeConsecutiveRoles` (and an optional `context.mergeSeparator`); chat-history output and custom-role items are never merged. See the [Preset schema](../reference/stack-schema.md#context-options).
|
|
55
|
+
|
|
56
|
+
## System modes
|
|
57
|
+
|
|
58
|
+
- `replace` is the default and gives the Preset complete control. An empty replacement falls back to Pi's base prompt.
|
|
59
|
+
- `append` adds the Stack's system content after Pi's base prompt.
|
|
60
|
+
- `prepend` adds the Stack's system content before Pi's base prompt.
|
|
61
|
+
|
|
62
|
+
Use `replace` when the model-visible skill list must be controlled. With `append` or `prepend`, Pi's base prompt may already contain an unfiltered skill listing.
|
|
63
|
+
|
|
64
|
+
## History placement
|
|
65
|
+
|
|
66
|
+
`chat-history` is movable. A useful task-focused layout is:
|
|
67
|
+
|
|
68
|
+
1. Long-lived system rules.
|
|
69
|
+
2. Runtime tools and project context.
|
|
70
|
+
3. Chat history with `includeLastUserMessage: false`.
|
|
71
|
+
4. A final user block containing `{{ runtime.lastUserMessage }}`.
|
|
72
|
+
|
|
73
|
+
This preserves prior context while presenting the current request once, in an explicit final position. History can also filter summaries and roles, drop previous tool traffic, strip assistant thinking, and limit recent messages or characters. pi-forge repairs dangling tool-call/result pairs after filtering.
|
|
74
|
+
|
|
75
|
+
## Tool and skill policy
|
|
76
|
+
|
|
77
|
+
Presets may use either `allow` or `deny` patterns for each resource. Tool policy changes Pi's active tools and is guarded at tool-call time; it remains enforced while the Preset is selected. Skill policy only filters skills rendered by pi-forge—it does not prevent explicit skill invocation and is not a security boundary.
|
|
78
|
+
|
|
79
|
+
External tool additions are preserved in the baseline restored when a restrictive Preset is disabled. See the exact behavior in the [Preset policy reference](../reference/stack-schema.md#tool-and-skill-policy).
|
|
80
|
+
|
|
81
|
+
## Scopes and shadowing
|
|
82
|
+
|
|
83
|
+
Presets currently live in the compatibility paths `~/.pi/forge/prompt-stacks/` or `.pi/forge/prompt-stacks/`. A project Preset shadows a same-ID global Preset for unqualified commands. Selectors are `reviewer`, `project:reviewer`, or `global:reviewer`. Duplicate IDs are errors only within one scope.
|
|
84
|
+
|
|
85
|
+
## Activation and session behavior
|
|
86
|
+
|
|
87
|
+
- A Preset may set `autoActivate: true`; conflicting auto-activation in one scope is invalid and fails closed.
|
|
88
|
+
- `default.json` has no special filename role anymore; missing `autoActivate` yields a migration warning.
|
|
89
|
+
- `/preset use none` records an explicit session opt-out.
|
|
90
|
+
- Active Preset selection follows Pi's session-tree branch.
|
|
91
|
+
- Restored branch state takes precedence over fresh-session auto-activation.
|
|
92
|
+
- Project auto-activation candidates take precedence over global ones; an invalid or ambiguous project candidate never falls back to a global Preset.
|
|
93
|
+
- An auto-activated Agent Profile takes precedence over standalone Preset autoload.
|
|
94
|
+
|
|
95
|
+
## Extensions and transforms
|
|
96
|
+
|
|
97
|
+
Immutable `parameters` support forge-v1 interpolation and pure filters; tool/slot conditionals use `runtime.tool.*` / `runtime.slot.*` booleans. Trusted JavaScript/TypeScript registration modules can add macros and slots without putting executable code in Preset JSON. Deterministic Regex rules can transform model-bound prompt text or, with an explicit warning, replace finalized assistant transcript text.
|
|
98
|
+
|
|
99
|
+
See [custom macros and slots](../guides/custom-macros-and-slots.md), [macro reference](../reference/macros-and-slots.md), and [regex schema](../reference/stack-schema.md#regex-transforms).
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# @jadelclemens/pi-forge 0.5.1 — Combined Release Plan
|
|
2
|
+
|
|
3
|
+
Status: active. Target release: 0.5.1 (first feature release after 0.5.0).
|
|
4
|
+
Owner of truth: this document. Supersedes/folds in:
|
|
5
|
+
- `docs/design/context-diff-plan.md` (context diff, now Lane 2)
|
|
6
|
+
- The subagent UI-contribution discussion from the 0.5.x review thread (now Lane 1)
|
|
7
|
+
|
|
8
|
+
Theme: **observability + subagent usability**. 0.5.0 was the architecture-split
|
|
9
|
+
release; 0.5.1 ships per-turn prompt observability and makes the optional
|
|
10
|
+
subagent package configurable without hand-editing JSON.
|
|
11
|
+
|
|
12
|
+
## Lane ordering (deliberate)
|
|
13
|
+
|
|
14
|
+
**Lane 1 ships first.** Its tab-registry refactor turns the web editor's tab
|
|
15
|
+
system data-driven, which Lane 2's Preview dock builds on. Both lanes touch the
|
|
16
|
+
client build pipeline and the tab area — do not run them in parallel in the
|
|
17
|
+
same working tree.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Lane 1 — UI contribution framework + subagent config UI
|
|
22
|
+
|
|
23
|
+
### Goal
|
|
24
|
+
|
|
25
|
+
Let the optional `@zihanw/pi-forge-subagents` package own its configuration UI
|
|
26
|
+
(schema, validation, defaults, file writes) while the rendered settings tab
|
|
27
|
+
appears inside the pi-forge web editor when — and only when — the subagent
|
|
28
|
+
package is installed.
|
|
29
|
+
|
|
30
|
+
Non-goal: arbitrary JS/component injection into the forge web UI. The event bus
|
|
31
|
+
carries JSON only; that rule does not bend for UI.
|
|
32
|
+
|
|
33
|
+
### Architecture (schema-driven contribution, "plan A")
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
┌─ pi-forge-subagents ─────────────┐ ┌─ pi-forge ─────────────────┐
|
|
37
|
+
│ UI contribution provider: │ bus │ web host discovers provider │
|
|
38
|
+
│ · getContribution() → { tabId, │ ◄────── │ at startup (capability │
|
|
39
|
+
│ title, icon, schema, values } │ JSON │ negotiation) │
|
|
40
|
+
│ · writeValues(patch) → validate │ ──────► │ generic schema-form tab │
|
|
41
|
+
│ + write subagents.json │ │ (self-contained Vue comp.) │
|
|
42
|
+
└──────────────────────────────────┘ │ PUT /api/contrib/<id> proxy │
|
|
43
|
+
└─────────────────────────────┘
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- **Contribution protocol**: new versioned port, separate version counter from
|
|
47
|
+
the v1 host port. All payloads are plain recursively-validated JSON (schema +
|
|
48
|
+
values), same discipline as `host-port.ts`.
|
|
49
|
+
- **Forge side** is fully generic: it knows nothing about subagents. No
|
|
50
|
+
provider discovered → no contributed tab, zero cost.
|
|
51
|
+
- **Config ownership stays put**: `subagents.json` (project/global + legacy
|
|
52
|
+
fallback) remains owned and written by the subagent package. Forge's web
|
|
53
|
+
server only proxies the bus call.
|
|
54
|
+
|
|
55
|
+
### Forge-side changes (~1.5–2d)
|
|
56
|
+
|
|
57
|
+
1. Tab registry: replace the hardcoded `"policy" | "regex" | "stack"` union in
|
|
58
|
+
`vue-tab-host.ts` with a data-driven registry (string tab ids, dynamic
|
|
59
|
+
buttons in `App.vue`).
|
|
60
|
+
2. Generic schema-form renderer: self-contained Vue component, bridged via the
|
|
61
|
+
vue-host mechanism. Restricted field types for v1: boolean, number, enum,
|
|
62
|
+
string, plus a record/table shape for per-profile entries. **Do NOT add
|
|
63
|
+
imperative code to `legacy-editor.ts`.**
|
|
64
|
+
3. Web server: `PUT /api/contrib/<tabId>` route proxying `writeValues` over the
|
|
65
|
+
bus; contribution descriptors fetched at page load through `/api/contrib`.
|
|
66
|
+
4. Contribution discovery: web host acts as client toward the provider port;
|
|
67
|
+
tolerate provider disappear/reappear across sessions.
|
|
68
|
+
|
|
69
|
+
### Subagents-side changes (~1d)
|
|
70
|
+
|
|
71
|
+
1. Provider endpoint implementing the contribution protocol.
|
|
72
|
+
2. `ForgeSubagentSettings` → schema mapping (backend, timeoutMs,
|
|
73
|
+
approval flag, summary-in-description flag, per-profile
|
|
74
|
+
enabled/backend/timeout table).
|
|
75
|
+
3. Server-side re-validation on write, reusing existing validators
|
|
76
|
+
(`isValidSubagentTimeoutMs` et al.). Never trust the web client.
|
|
77
|
+
4. TUI companion: `/forge-agent config` subcommand for the same settings
|
|
78
|
+
(internal to the package, no cross-repo coordination).
|
|
79
|
+
|
|
80
|
+
### Known v1 limitation
|
|
81
|
+
|
|
82
|
+
Pure schema cannot express "dropdown fed by live forge data" (e.g. a profileId
|
|
83
|
+
picker backed by `listProfiles`). v1: plain text input + validation errors.
|
|
84
|
+
v2 candidate: a "remote data source" field type. Do not gold-plate v1.
|
|
85
|
+
|
|
86
|
+
### Lane 1B — subagent call-time UX (subagents package only)
|
|
87
|
+
|
|
88
|
+
Two usability extras that live entirely in `@zihanw/pi-forge-subagents`; no
|
|
89
|
+
forge-side coupling, safe to build in parallel with the forge contribution
|
|
90
|
+
framework.
|
|
91
|
+
|
|
92
|
+
**1. Call-time model override** (~0.5d)
|
|
93
|
+
|
|
94
|
+
Main agent may pick the execution model per `forge_subagent` call; default
|
|
95
|
+
remains the profile's model. Feasibility already verified: the wire carries
|
|
96
|
+
model facts (`ForgeBackendFacts.model`, `ForgePrepareResponse.model`), and the
|
|
97
|
+
pi-subagent-runtime subprocess backend already spawns with `--model` — only
|
|
98
|
+
the tool surface lacks the knob.
|
|
99
|
+
|
|
100
|
+
- Add optional `model` parameter (`provider/id` string, parsed + validated) to
|
|
101
|
+
`ForgeSubagentParameters`.
|
|
102
|
+
- Resolution order: `model` param > profile default.
|
|
103
|
+
- Same policy as the `backend` param: override allowed for interactively
|
|
104
|
+
approved runs; unattended invocation is pinned to the profile/configured
|
|
105
|
+
model.
|
|
106
|
+
- Approval summary's existing `Model:` line shows the effective model for free.
|
|
107
|
+
- Update tool description accordingly.
|
|
108
|
+
|
|
109
|
+
**2. Restore rich TUI rendering for subagent runs** (~0.5–1d)
|
|
110
|
+
|
|
111
|
+
The 0.4 tool shipped `renderCall`/`renderResult` (pi-tui Container/Markdown,
|
|
112
|
+
collapsed/expanded states, live progress, usage stats); the 0.5 split dropped
|
|
113
|
+
them, falling back to the default tool display. Streaming infrastructure is
|
|
114
|
+
still intact (`onUpdate` progress pushes, `details.progress` ring buffer at
|
|
115
|
+
`MAX_PROGRESS_ITEMS`).
|
|
116
|
+
|
|
117
|
+
- Port the 0.4.1 renderers from git history (`v0.4.1:src/subagent-tool.ts`)
|
|
118
|
+
into `forge-subagent.ts`, adapted to the current details shape and including
|
|
119
|
+
the approval receipt.
|
|
120
|
+
- `@earendil-works/pi-tui` is already an optional peer dependency.
|
|
121
|
+
- Reference the historical render tests where recoverable.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Lane 2 — Context diff (folded from context-diff-plan.md)
|
|
126
|
+
|
|
127
|
+
### Goal
|
|
128
|
+
|
|
129
|
+
Per-turn observability for prompt changes so users can optimize KV-cache reuse:
|
|
130
|
+
|
|
131
|
+
- Mark which blocks of the prompt changed after each turn.
|
|
132
|
+
- Show token delta (added/removed/modified) vs the previous turn.
|
|
133
|
+
- Mark where the KV-cache prefix survives ("cache boundary").
|
|
134
|
+
|
|
135
|
+
Secondary goal: merge with live preview — while editing a stack,
|
|
136
|
+
debounce-compile and diff against the previous compile, so edits show their
|
|
137
|
+
prompt/token impact immediately.
|
|
138
|
+
|
|
139
|
+
### Existing building blocks
|
|
140
|
+
|
|
141
|
+
- `src/payload-capture.ts` — real provider request payload (secret-redacted),
|
|
142
|
+
with deliberately rough `approxTokens` (chars/4).
|
|
143
|
+
- Pi's authoritative assistant `message_end` usage — input, output, cache read,
|
|
144
|
+
and cache write token buckets correlated FIFO with captured provider requests.
|
|
145
|
+
- `src/preview.ts` — edit-time compile output split into sections (system +
|
|
146
|
+
per-message), each with chars/approxTokens.
|
|
147
|
+
- Legacy editor already polls payload state every 2s.
|
|
148
|
+
|
|
149
|
+
### Two data sources
|
|
150
|
+
|
|
151
|
+
| Scenario | Source | Question answered |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| Edit time (live preview merge point) | debounced compile vs previous compile | "what does this edit change, how many tokens" |
|
|
154
|
+
| Run time (request structure) | diff of consecutive real payloads | "where would the reusable serialized prefix end, and what changed" |
|
|
155
|
+
| Run time (provider truth) | correlated assistant usage | "how many prompt tokens and cache reads/writes did the provider report" |
|
|
156
|
+
|
|
157
|
+
### Core engine: `src/context-diff.ts` (host-neutral pure functions)
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
TurnSnapshot { turnId, capturedAt, stackId, blocks: Block[] }
|
|
161
|
+
Block { key, role, text, chars, approxTokens, hash }
|
|
162
|
+
TurnDiff { blocks: DiffBlock[], prefixTokens, prefixRatio, deltaTokens, summary }
|
|
163
|
+
DiffBlock { status: same|added|removed|modified, before?, after?, tokenDelta }
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Cache-boundary algorithm: KV-cache hits depend on the longest common prefix of
|
|
167
|
+
the serialized request. Walk the block arrays in order while hashes match; at
|
|
168
|
+
the first mismatch, trim a char-level common prefix inside that block and
|
|
169
|
+
convert to tokens. Render a boundary marker: "cache valid up to ~18,204 tokens
|
|
170
|
+
(63% of prompt)". No Myers diff needed — prefix + block classification
|
|
171
|
+
suffices.
|
|
172
|
+
|
|
173
|
+
Honesty note: diff token figures remain chars/4 estimates and are always labeled
|
|
174
|
+
as such. Provider prompt/cache usage is displayed separately. Cache hit rate is
|
|
175
|
+
`cacheRead / (input + cacheRead + cacheWrite)` only after cache activity has
|
|
176
|
+
been observed for that provider/model; an all-zero normalized cache bucket is
|
|
177
|
+
otherwise reported as unavailable because it cannot distinguish a true miss
|
|
178
|
+
from a provider that did not report cache detail.
|
|
179
|
+
|
|
180
|
+
### UI
|
|
181
|
+
|
|
182
|
+
Promote the Preview modal into a dockable right-side panel with three tabs:
|
|
183
|
+
|
|
184
|
+
- **Compiled** — current preview content, auto-refresh with 500ms debounce
|
|
185
|
+
while editing (this is the live preview).
|
|
186
|
+
- **Draft diff** and **Run diff** — git-style unified/split line views with
|
|
187
|
+
old/new line numbers, inline changed spans, and selectable changes-only,
|
|
188
|
+
three-line, or full context. Run metadata keeps estimated reusable prefix
|
|
189
|
+
separate from actual provider usage and cache-hit rate.
|
|
190
|
+
|
|
191
|
+
Run-time mode: payload poll captures a new payload → rolling history (last 20
|
|
192
|
+
turns) → auto-compute diff.
|
|
193
|
+
Edit mode: diff current edited compile vs the active on-disk version.
|
|
194
|
+
|
|
195
|
+
Implementation constraint: self-contained Vue component bridged via the
|
|
196
|
+
vue-host mechanism, riding Lane 1's data-driven dock/tab registry. Do NOT add
|
|
197
|
+
more imperative code to `legacy-editor.ts`. Do NOT refactor the legacy editor
|
|
198
|
+
in the same lane.
|
|
199
|
+
|
|
200
|
+
### Phases / estimate
|
|
201
|
+
|
|
202
|
+
| Phase | Content | Effort |
|
|
203
|
+
|---|---|---|
|
|
204
|
+
| 0 | Design freeze + golden fixtures (turn payload sets) | 0.5d |
|
|
205
|
+
| 1 | `context-diff.ts` engine + unit tests (prefix/add/remove/modify/token rollups) | 1d |
|
|
206
|
+
| 2 | Server endpoint + rolling snapshot state on the web host | 0.5d |
|
|
207
|
+
| 3 | Web UI: preview dock + Diff view (self-contained Vue, bridged, on Lane 1's registry) | 1.5d |
|
|
208
|
+
| 4 | Browser tests + docs + changelog | 0.5–1d |
|
|
209
|
+
|
|
210
|
+
Lane 2 total ~4–5 working days. Descope option (~3d): run-time diff only,
|
|
211
|
+
live preview reduced to plain auto-refresh without edit-time diffing.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Combined estimate
|
|
216
|
+
|
|
217
|
+
| Lane | Content | Effort |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| 1 | UI contribution framework (forge) + provider & config UI (subagents) | ~2.5–3d |
|
|
220
|
+
| 1B | Call-time model override + rich TUI restore (subagents only) | ~1–1.5d |
|
|
221
|
+
| 2 | Context diff engine + dock UI | ~4–5d |
|
|
222
|
+
|
|
223
|
+
~8.5–9.5 working days total, ~2 calendar weeks with review. Both lanes require
|
|
224
|
+
coordinated releases: forge 0.5.1 must understand the contribution protocol
|
|
225
|
+
before (or simultaneously with) subagents 0.5.1 advertising it — the
|
|
226
|
+
capability negotiation makes order-independent rollout safe. Lane 1B lives
|
|
227
|
+
entirely in subagents 0.5.1 and ships with it; the promo should present both
|
|
228
|
+
packages together.
|
|
229
|
+
|
|
230
|
+
## Release narrative
|
|
231
|
+
|
|
232
|
+
0.5.1 headlines "observability + subagent UX". The promo video leads with the
|
|
233
|
+
context diff money shot (edit one system-prompt line, watch the cache-boundary
|
|
234
|
+
marker jump). Promo pipeline follows the AIGC/VIDEO_PRODUCTION ep02 reference:
|
|
235
|
+
`PLAN.md` → script draft → `narration.json` → roughcut → review; terminology
|
|
236
|
+
rule: plain words first, formal term named once ("KV cache" on first mention,
|
|
237
|
+
then "prefix cache / cache reuse region").
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Architecture and design
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md)
|
|
4
|
+
|
|
5
|
+
The active plan defines the executable forward-looking work. Archived documents preserve the long-term target, decisions, reviews, spikes, and implementation history; they are not the authoritative description of current user behavior. Use the [guides](../README.md#guides) and [reference](../README.md#reference) for released behavior.
|
|
6
|
+
|
|
7
|
+
## Active lean 0.5 plan
|
|
8
|
+
|
|
9
|
+
- [Lean 0.5.0 architecture plan](architecture-0.5.md) — executable breaking-cleanup scope, accepted decisions, implementation lanes, and release gates.
|
|
10
|
+
- [Architecture and development rules](../development/architecture-rules.md) — dependency direction and ownership rules for the full target.
|
|
11
|
+
- [Architecture decision template](decision-template.md) — structure for future boundary/product decisions.
|
|
12
|
+
- [Capabilities (0.5.5)](pi-forge-system-update-design-notes.md) — accepted staged implementation; foundation and human CLI core implemented, Preset authorization/Agent control and UI remain later lanes.
|
|
13
|
+
- [September 12 system-update proposal](archive/2026-09-12-system-update-design.md) — historical upstream-blocked thin-sections design, superseded by the 0.86 spike.
|
|
14
|
+
|
|
15
|
+
## Archived 0.5 full proposal
|
|
16
|
+
|
|
17
|
+
The original six-phase target remains the long-term goal and is preserved here:
|
|
18
|
+
|
|
19
|
+
- [Full proposal index](archive/0.5-full-proposal/README.md)
|
|
20
|
+
- [Full 0.5 architecture plan](archive/0.5-full-proposal/architecture-0.5.md)
|
|
21
|
+
- [Migration inventory](archive/0.5-full-proposal/0.5-inventory.md)
|
|
22
|
+
- [Public-consumer audit](archive/0.5-full-proposal/0.5-consumer-audit.md)
|
|
23
|
+
- [Phase-0 decision drafts](archive/0.5-full-proposal/0.5-phase0-decision-drafts.md)
|
|
24
|
+
- [Template-language spike](archive/0.5-full-proposal/template-language-spike.md)
|
|
25
|
+
- [Pi host-discovery spike](archive/0.5-full-proposal/host-discovery-spike.md)
|
|
26
|
+
|
|
27
|
+
## Subagent design history
|
|
28
|
+
|
|
29
|
+
- [Request/response design](subagents/interface-design.md) — accepted architecture and completed implementation iterations.
|
|
30
|
+
- [Design review](subagents/design-review.md) — issues that drove preflight, task preservation, policy, fingerprint, and response revisions.
|
|
31
|
+
- [Pi SDK spike findings](subagents/sdk-spike-findings.md) — historical 0.80.6 investigation; its harness was removed after findings were productized.
|
|
32
|
+
|
|
33
|
+
## Project planning history
|
|
34
|
+
|
|
35
|
+
- [0.4 roadmap and implementation log](roadmap-0.4-archive.md)
|
|
36
|
+
|
|
37
|
+
The 0.5 host boundary is in the [subagent host port contract](../reference/subagent-host-port.md); accepted work ordering is in the [roadmap](../development/roadmap.md).
|