@wildo-ai/framework-knowledge 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/framework-knowledge.definitions.d.ts +1 -1
- package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -1
- package/dist/esm/framework-knowledge.definitions.js +43 -2
- package/dist/esm/framework-knowledge.definitions.js.map +1 -1
- package/dist/esm/framework-knowledge.loader.d.ts +19 -0
- package/dist/esm/framework-knowledge.loader.d.ts.map +1 -1
- package/dist/esm/framework-knowledge.loader.js +32 -0
- package/dist/esm/framework-knowledge.loader.js.map +1 -1
- package/dist/esm/framework-knowledge.schemas.d.ts +12 -0
- package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -1
- package/dist/esm/framework-knowledge.schemas.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts +46 -0
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js +55 -0
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +4 -4
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +3 -3
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +0 -3
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +0 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +0 -3
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +0 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +0 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +8 -3
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +22 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +0 -3
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +0 -1
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +4 -1
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +4 -1
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +1 -1
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +13 -13
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +3 -4
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +3 -3
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts +54 -0
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js +127 -0
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts +76 -0
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js +92 -0
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.d.ts +30 -0
- package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.js +29 -0
- package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +9 -44
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +4 -53
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.d.ts +31 -0
- package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.js +26 -0
- package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +0 -8
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +2 -7
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +5 -3
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +0 -3
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +0 -1
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +4 -5
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +25 -4
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -1
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -1
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/external-framework-mapping.json +1 -0
- package/dist/knowledge/manifest.json +8 -8
- package/dist/knowledge/playbooks/bottom_up.assemble-verify/method.md +51 -0
- package/dist/knowledge/playbooks/bottom_up.assemble-verify/playbook.json +43 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +27 -10
- package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +8 -7
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +6 -4
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +4 -6
- package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +5 -4
- package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +4 -6
- package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +0 -4
- package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +4 -6
- package/dist/knowledge/playbooks/bottom_up.foundation/method.md +49 -22
- package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +14 -6
- package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +2 -4
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +46 -1
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +7 -3
- package/dist/knowledge/playbooks/refinement.document-facts/method.md +18 -4
- package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +4 -2
- package/dist/knowledge/playbooks/top_down.brand-identity/method.md +2 -3
- package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +8 -7
- package/dist/knowledge/playbooks/top_down.business-model/playbook.json +3 -5
- package/dist/knowledge/playbooks/top_down.capability-map/method.md +0 -2
- package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +4 -6
- package/dist/knowledge/playbooks/top_down.compliance-analysis/method.md +41 -0
- package/dist/knowledge/playbooks/top_down.compliance-analysis/playbook.json +100 -0
- package/dist/knowledge/playbooks/top_down.compliance-conception/method.md +117 -0
- package/dist/knowledge/playbooks/top_down.compliance-conception/playbook.json +86 -0
- package/dist/knowledge/playbooks/top_down.compliance-evidence-adequacy/method.md +61 -0
- package/dist/knowledge/playbooks/top_down.compliance-evidence-adequacy/playbook.json +41 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +21 -4
- package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +14 -57
- package/dist/knowledge/playbooks/top_down.compliance-research/method.md +76 -0
- package/dist/knowledge/playbooks/top_down.compliance-research/playbook.json +42 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +3 -5
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +3 -1
- package/dist/knowledge/playbooks/top_down.market-research/playbook.json +3 -1
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +3 -5
- package/dist/knowledge/playbooks/top_down.phase-gate/method.md +8 -4
- package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +4 -6
- package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +9 -7
- package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +4 -6
- package/dist/knowledge/playbooks/top_down.scope-roadmap/method.md +2 -2
- package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +8 -7
- package/dist/knowledge/playbooks/top_down.value-proposition/method.md +0 -2
- package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +4 -6
- package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +2 -2
- package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +8 -7
- package/dist/knowledge/references/companion.technical-doc.service.md +102 -2
- package/dist/knowledge/references/example.config.app-shell.full.md +0 -1
- package/dist/knowledge/references/example.module.companion-exports.full.md +1 -0
- package/dist/knowledge/references/platform.config.saas.md +1 -0
- package/dist/knowledge/references/presets.models.surface-policy.md +19 -10
- package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +25 -1
- package/dist/knowledge/references/saas.frontend.composite-view.authoring.md +45 -0
- package/dist/knowledge/references/saas.frontend.display-layout.reading-measure.md +34 -0
- package/dist/knowledge/references/saas.frontend.navigation.operation-override.md +45 -0
- package/dist/knowledge/references/saas.frontend.public-shell.identity-mode.md +65 -0
- package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +89 -0
- package/dist/knowledge/references/saas.models.data-mode-read-list.md +31 -4
- package/dist/knowledge/references/saas.models.engine-capabilities.md +26 -6
- package/dist/knowledge/references/saas.models.file-upload-grant.md +179 -0
- package/dist/knowledge/references/saas.models.navigation.surface-vocabulary.md +124 -0
- package/dist/knowledge/references/saas.models.navigation.transition-vocabulary.md +99 -0
- package/dist/knowledge/references/saas.models.navigation.zone-declaration.md +127 -0
- package/dist/knowledge/references/saas.models.provider-capabilities.md +4 -3
- package/dist/knowledge/references/saas.models.resource-config.operation-variant-client-timeout.md +42 -0
- package/dist/knowledge/references/saas.specifications.application-authored-document-fact-specification.contract.md +29 -0
- package/dist/knowledge/references/saas.specifications.application-document-fact-specification.contract.md +11 -31
- package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +32 -2
- package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +29 -6
- package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +20 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-config.md +22 -0
- package/dist/knowledge/references/zod.decorators.display-edit-modes.md +6 -0
- package/dist/knowledge/references/zod.decorators.field-spec-params.md +31 -5
- package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +43 -0
- package/dist/knowledge/references/zod.decorators.primitive-ui.md +3 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-params.md +15 -0
- package/dist/knowledge/registries/assurance-authority-bases.json +3 -2
- package/dist/knowledge/registries/framework-topics.json +99 -1
- package/dist/knowledge/registries/playbooks.json +81 -8
- package/dist/knowledge/registries/source-tags.json +757 -588
- package/dist/knowledge/skills/INDEX.md +3 -3
- package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +2 -1
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +5 -1
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-fact-specification-contract.md +66 -37
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +40 -7
- package/dist/knowledge/skills/config-app-shell/SKILL.md +25 -1
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +25 -1
- package/dist/knowledge/skills/config-app-shell/references/framework-public-shell-identity-api.md +124 -0
- package/dist/knowledge/skills/config-design-system/SKILL.md +23 -1
- package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +19 -10
- package/dist/knowledge/skills/config-design-system/references/loading-placeholder-authoring.md +47 -0
- package/dist/knowledge/skills/config-navigation/SKILL.md +75 -2
- package/dist/knowledge/skills/config-navigation/references/framework-content-width-api.md +98 -0
- package/dist/knowledge/skills/config-navigation/references/framework-navigation-operation-override-api.md +54 -0
- package/dist/knowledge/skills/config-navigation/references/framework-navigation-vocabulary-api.md +232 -0
- package/dist/knowledge/skills/config-navigation/references/framework-navigation-zone-declaration-api.md +149 -0
- package/dist/knowledge/skills/config-navigation/references/how-navigation-resolves.md +114 -0
- package/dist/knowledge/skills/config-navigation/references/navigation-configuration-map.md +133 -0
- package/dist/knowledge/skills/config-saas/SKILL.md +19 -2
- package/dist/knowledge/skills/config-saas/references/compliance-declarations.md +111 -0
- package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +30 -9
- package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +1 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +2 -1
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +4 -3
- package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +20 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +20 -0
- package/dist/knowledge/skills/module-companion-exports/SKILL.md +1 -0
- package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +20 -0
- package/dist/knowledge/skills/resource-add-field/SKILL.md +3 -3
- package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +104 -0
- package/dist/knowledge/skills/resource-config-wiring/SKILL.md +13 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +71 -4
- package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +89 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +22 -1
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-file-upload-grant-contract.md +192 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +28 -8
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +15 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +6 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +89 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +43 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +3 -0
- package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +1 -1
- package/dist/knowledge/skills/spec-companion-exports/SKILL.md +1 -0
- package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +20 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-field-spec-params-api.md +31 -5
- package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +22 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-composite-view-contracts-api.md +45 -0
- package/dist/knowledge/topic-index.json +504 -156
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/esm/.builder.pid +0 -9
|
@@ -34,6 +34,25 @@ export declare function listFrameworkKnowledgeAssuranceAuthorityBases(): Framewo
|
|
|
34
34
|
* registry shipped in the same payload.
|
|
35
35
|
*/
|
|
36
36
|
export declare function getFrameworkKnowledgeAssuranceAuthorityBasis(ref: string, version?: number): FrameworkKnowledgeAssuranceAuthorityBasis | null;
|
|
37
|
+
/**
|
|
38
|
+
* The rights-classified WILDO-objective → external-source mapping shipped beside one basis (#266).
|
|
39
|
+
*
|
|
40
|
+
* ## What it answers, and the question it deliberately does not
|
|
41
|
+
*
|
|
42
|
+
* Which external requirement each WILDO objective was bound to, under whose review, with the
|
|
43
|
+
* attribution notices each source's rights record demands — and which objectives are recorded
|
|
44
|
+
* UNMAPPED, with a reason. It says nothing about whether an application MEETS any of them: that is a
|
|
45
|
+
* programme's coverage decision, and reading a mapping as conformity is the misreading the rights
|
|
46
|
+
* boundary exists to prevent.
|
|
47
|
+
*
|
|
48
|
+
* ## `null` means the payload predates the mapping, NOT that nothing is mapped
|
|
49
|
+
*
|
|
50
|
+
* The registry field is optional because a payload generated before #266 carries none, and a caller
|
|
51
|
+
* must not read that absence as "this basis binds no external source" — the two are opposite claims.
|
|
52
|
+
* A payload that DOES carry one and cannot be read throws instead, because that is a broken payload
|
|
53
|
+
* rather than an old one.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getFrameworkKnowledgeAssuranceExternalFrameworkMapping(ref: string, version?: number): FrameworkKnowledgeJsonArtifact<unknown> | null;
|
|
37
56
|
/**
|
|
38
57
|
* Returns the compiled skills router (`skills/INDEX.md`) — the single
|
|
39
58
|
* catalog the AI router reads to pick a skill from a user phrasing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-knowledge.loader.d.ts","sourceRoot":"","sources":["../../../src/framework-knowledge.loader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,yCAAyC,EAEzC,sDAAsD,EACtD,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,EAE1B,uCAAuC,EACvC,oCAAoC,EACpC,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAwC,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAoExH,wBAAgB,kCAAkC,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE/E;AAED,wBAAgB,qCAAqC,IAAI,8BAA8B,CAAC,0BAA0B,CAAC,CAalH;AAED,wBAAgB,6BAA6B,IAAI,0BAA0B,CAE1E;AAED,wBAAgB,gCAAgC,IAAI,oCAAoC,EAAE,CAEzF;AAED,wBAAgB,+BAA+B,IAAI,4BAA4B,CAE9E;AAED,wBAAgB,4BAA4B,IAAI,iCAAiC,EAAE,CAElF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI,CAyB1F;AAED,wBAAgB,6BAA6B,CAAC,aAAa,SAAS,8BAA8B,EAChG,YAAY,EAAE,aAAa,GAC1B,6BAA6B,CAAC,aAAa,CAAC,CAE9C;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,uCAAuC,EAAE,CAK3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,0BAA0B,GAAG,IAAI,CAmD5F;AAED,4EAA4E;AAC5E,wBAAgB,6CAA6C,IAAI,sDAAsD,EAAE,CAGxH;AAED;;;;;;GAMG;AACH,wBAAgB,4CAA4C,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,yCAAyC,GAAG,IAAI,CA0B5I;AAED;;;;;GAKG;AACH;;;;;;;GAOG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oCAAoC,IAAI,8BAA8B,EAAE,CAsBvF;AAED,wBAAgB,gCAAgC,IAAI,MAAM,GAAG,IAAI,CAQhE"}
|
|
1
|
+
{"version":3,"file":"framework-knowledge.loader.d.ts","sourceRoot":"","sources":["../../../src/framework-knowledge.loader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,yCAAyC,EAEzC,sDAAsD,EACtD,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,EAE1B,uCAAuC,EACvC,oCAAoC,EACpC,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAwC,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAoExH,wBAAgB,kCAAkC,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE/E;AAED,wBAAgB,qCAAqC,IAAI,8BAA8B,CAAC,0BAA0B,CAAC,CAalH;AAED,wBAAgB,6BAA6B,IAAI,0BAA0B,CAE1E;AAED,wBAAgB,gCAAgC,IAAI,oCAAoC,EAAE,CAEzF;AAED,wBAAgB,+BAA+B,IAAI,4BAA4B,CAE9E;AAED,wBAAgB,4BAA4B,IAAI,iCAAiC,EAAE,CAElF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI,CAyB1F;AAED,wBAAgB,6BAA6B,CAAC,aAAa,SAAS,8BAA8B,EAChG,YAAY,EAAE,aAAa,GAC1B,6BAA6B,CAAC,aAAa,CAAC,CAE9C;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,uCAAuC,EAAE,CAK3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,0BAA0B,GAAG,IAAI,CAmD5F;AAED,4EAA4E;AAC5E,wBAAgB,6CAA6C,IAAI,sDAAsD,EAAE,CAGxH;AAED;;;;;;GAMG;AACH,wBAAgB,4CAA4C,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,yCAAyC,GAAG,IAAI,CA0B5I;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sDAAsD,CACpE,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,MAAM,GACf,8BAA8B,CAAC,OAAO,CAAC,GAAG,IAAI,CAWhD;AAED;;;;;GAKG;AACH;;;;;;;GAOG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oCAAoC,IAAI,8BAA8B,EAAE,CAsBvF;AAED,wBAAgB,gCAAgC,IAAI,MAAM,GAAG,IAAI,CAQhE"}
|
|
@@ -206,6 +206,38 @@ export function getFrameworkKnowledgeAssuranceAuthorityBasis(ref, version) {
|
|
|
206
206
|
}
|
|
207
207
|
return { entry, basis, bytes };
|
|
208
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* The rights-classified WILDO-objective → external-source mapping shipped beside one basis (#266).
|
|
211
|
+
*
|
|
212
|
+
* ## What it answers, and the question it deliberately does not
|
|
213
|
+
*
|
|
214
|
+
* Which external requirement each WILDO objective was bound to, under whose review, with the
|
|
215
|
+
* attribution notices each source's rights record demands — and which objectives are recorded
|
|
216
|
+
* UNMAPPED, with a reason. It says nothing about whether an application MEETS any of them: that is a
|
|
217
|
+
* programme's coverage decision, and reading a mapping as conformity is the misreading the rights
|
|
218
|
+
* boundary exists to prevent.
|
|
219
|
+
*
|
|
220
|
+
* ## `null` means the payload predates the mapping, NOT that nothing is mapped
|
|
221
|
+
*
|
|
222
|
+
* The registry field is optional because a payload generated before #266 carries none, and a caller
|
|
223
|
+
* must not read that absence as "this basis binds no external source" — the two are opposite claims.
|
|
224
|
+
* A payload that DOES carry one and cannot be read throws instead, because that is a broken payload
|
|
225
|
+
* rather than an old one.
|
|
226
|
+
*/
|
|
227
|
+
export function getFrameworkKnowledgeAssuranceExternalFrameworkMapping(ref, version) {
|
|
228
|
+
const basis = getFrameworkKnowledgeAssuranceAuthorityBasis(ref, version);
|
|
229
|
+
if (basis === null)
|
|
230
|
+
return null;
|
|
231
|
+
const filePath = basis.entry.externalFrameworkMappingFilePath;
|
|
232
|
+
if (filePath === undefined)
|
|
233
|
+
return null;
|
|
234
|
+
const bytes = readBinaryKnowledgeAsset(filePath);
|
|
235
|
+
const value = parseJsonKnowledgeBytes(bytes, filePath);
|
|
236
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
237
|
+
throw new Error(`Framework Knowledge external-framework mapping for "${basis.entry.ref}" is not a JSON object.`);
|
|
238
|
+
}
|
|
239
|
+
return { value, bytes };
|
|
240
|
+
}
|
|
209
241
|
/**
|
|
210
242
|
* Every compiled skill's name and purpose — the catalog a generation call must choose from.
|
|
211
243
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-knowledge.loader.js","sourceRoot":"","sources":["../../../src/framework-knowledge.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAgBjE,OAAO,EAAE,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hF,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,sBAAsB,CAAC,eAAe,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import { existsSync, readFileSync, readdirSync } from 'node:fs';\nimport { createHash } from 'node:crypto';\nimport { isAbsolute, normalize, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { describeCaughtError } from '@wildo-ai/saas-backend-lib';\nimport type {\n FrameworkKnowledgeAssuranceAuthorityBasis,\n FrameworkKnowledgeAssuranceAuthorityBasisRegistry,\n FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry,\n FrameworkKnowledgeManifest,\n FrameworkKnowledgeJsonArtifact,\n FrameworkKnowledgePlaybook,\n FrameworkKnowledgePlaybookRegistry,\n FrameworkKnowledgePlaybookRegistryEntry,\n FrameworkKnowledgeRegistryDescriptor,\n FrameworkKnowledgeRegistryMap,\n FrameworkKnowledgeTopic,\n FrameworkKnowledgeTopicIndex,\n FrameworkKnowledgeTopicIndexEntry,\n} from './framework-knowledge.schemas.js';\nimport { FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION, FrameworkKnowledgeRegistryName } from './framework-knowledge.schemas.js';\n\n/**\n * This package is intentionally consumed from compiled `dist/esm`.\n * Resolving relative to `import.meta.url` keeps local package-preview and\n * published npm consumption on the same `dist/knowledge` seam.\n */\nfunction getFrameworkKnowledgeDirectoryPath(): string {\n return fileURLToPath(new URL('../knowledge/', import.meta.url));\n}\n\nfunction normalizeKnowledgeAssetRelativePath(relativePath: string): string {\n const normalizedRelativePath = normalize(relativePath).replaceAll('\\\\', '/');\n\n if (normalizedRelativePath.length === 0 || normalizedRelativePath === '.') {\n throw new Error('Framework knowledge asset paths must not be empty.');\n }\n\n if (isAbsolute(normalizedRelativePath) || normalizedRelativePath === '..' || normalizedRelativePath.startsWith('../')) {\n throw new Error(`Framework knowledge asset paths must stay inside the knowledge payload: \"${relativePath}\".`);\n }\n\n return normalizedRelativePath;\n}\n\nfunction resolveKnowledgeAssetPath(relativePath: string): string {\n const normalizedRelativePath = normalizeKnowledgeAssetRelativePath(relativePath);\n return resolve(getFrameworkKnowledgeDirectoryPath(), normalizedRelativePath);\n}\n\nfunction assertKnowledgeAssetExists(assetPath: string, relativePath: string): void {\n if (existsSync(assetPath)) {\n return;\n }\n\n throw new Error(\n `Missing framework knowledge asset \"${relativePath}\" at \"${assetPath}\". Run \"wildo fwk generate-docs\" to materialize the package payload before consuming it.`,\n );\n}\n\nfunction readJsonKnowledgeAsset<T>(relativePath: string): T {\n const assetPath = resolveKnowledgeAssetPath(relativePath);\n assertKnowledgeAssetExists(assetPath, relativePath);\n return JSON.parse(readFileSync(assetPath, 'utf8')) as T;\n}\n\nfunction readTextKnowledgeAsset(relativePath: string): string {\n const assetPath = resolveKnowledgeAssetPath(relativePath);\n assertKnowledgeAssetExists(assetPath, relativePath);\n return readFileSync(assetPath, 'utf8');\n}\n\nfunction readBinaryKnowledgeAsset(relativePath: string): Uint8Array {\n const assetPath = resolveKnowledgeAssetPath(relativePath);\n assertKnowledgeAssetExists(assetPath, relativePath);\n return readFileSync(assetPath);\n}\n\nfunction parseJsonKnowledgeBytes(bytes: Uint8Array, relativePath: string): unknown {\n try {\n return JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)) as unknown;\n } catch (error) {\n throw new Error(\n `Framework knowledge asset \"${relativePath}\" is not valid UTF-8 JSON: ${describeCaughtError(error)}`,\n );\n }\n}\n\nexport function resolveFrameworkKnowledgeAssetPath(relativePath: string): string {\n return resolveKnowledgeAssetPath(relativePath);\n}\n\nexport function getFrameworkKnowledgeManifestArtifact(): FrameworkKnowledgeJsonArtifact<FrameworkKnowledgeManifest> {\n const bytes = readBinaryKnowledgeAsset('manifest.json');\n const manifest = parseJsonKnowledgeBytes(bytes, 'manifest.json') as FrameworkKnowledgeManifest;\n if (manifest.artifactVersion !== FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION) {\n throw new Error(`Unsupported Framework Knowledge artifact version \"${manifest.artifactVersion}\"; expected \"${FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION}\".`);\n }\n const assuranceAuthorityBasisRegistry = manifest.registries.find(\n (registry) => registry.registryName === FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES,\n );\n if (!manifest.payload.assuranceAuthorityBasesDirectory || !assuranceAuthorityBasisRegistry) {\n throw new Error('Framework Knowledge artifact version 3 requires an assurance-authority-basis payload and registry.');\n }\n return { value: manifest, bytes };\n}\n\nexport function getFrameworkKnowledgeManifest(): FrameworkKnowledgeManifest {\n return getFrameworkKnowledgeManifestArtifact().value;\n}\n\nexport function listFrameworkKnowledgeRegistries(): FrameworkKnowledgeRegistryDescriptor[] {\n return getFrameworkKnowledgeManifest().registries;\n}\n\nexport function getFrameworkKnowledgeTopicIndex(): FrameworkKnowledgeTopicIndex {\n return readJsonKnowledgeAsset<FrameworkKnowledgeTopicIndex>('topic-index.json');\n}\n\nexport function listFrameworkKnowledgeTopics(): FrameworkKnowledgeTopicIndexEntry[] {\n return getFrameworkKnowledgeTopicIndex().topics;\n}\n\nexport function getFrameworkKnowledgeTopic(topicId: string): FrameworkKnowledgeTopic | null {\n const topicEntry = listFrameworkKnowledgeTopics().find((entry) => entry.topicId === topicId);\n\n if (!topicEntry) {\n return null;\n }\n\n const referencesByFile = Object.fromEntries(\n topicEntry.referenceFiles.map((referenceFileName) => [\n referenceFileName,\n readTextKnowledgeAsset(`references/${referenceFileName}`),\n ]),\n ) as Record<string, string>;\n const skillsByFile = Object.fromEntries(\n topicEntry.skillFiles.map((skillFileName) => [\n skillFileName,\n readTextKnowledgeAsset(`skills/${skillFileName}`),\n ]),\n ) as Record<string, string>;\n\n return {\n entry: topicEntry,\n referencesByFile,\n skillsByFile,\n };\n}\n\nexport function getFrameworkKnowledgeRegistry<TRegistryName extends FrameworkKnowledgeRegistryName>(\n registryName: TRegistryName,\n): FrameworkKnowledgeRegistryMap[TRegistryName] {\n return readJsonKnowledgeAsset<FrameworkKnowledgeRegistryMap[TRegistryName]>(`registries/${registryName}.json`);\n}\n\n/**\n * Lists the compiled meta-workflow playbooks from the `playbooks` registry,\n * sorted by `ref` for stable iteration.\n */\nexport function listFrameworkKnowledgePlaybooks(): FrameworkKnowledgePlaybookRegistryEntry[] {\n const registry = readJsonKnowledgeAsset<FrameworkKnowledgePlaybookRegistry>(\n `registries/${FrameworkKnowledgeRegistryName.PLAYBOOKS}.json`,\n );\n return Object.values(registry.entries).sort((left, right) => left.ref.localeCompare(right.ref));\n}\n\n/**\n * Hydrates one compiled playbook by its `ref` (the folder name under\n * `playbooks/`). Returns `null` when the ref is not in the registry.\n *\n * The returned `playbook` is the generator-validated compiled\n * `playbook.json` (with `method.guidance` inlined from the rendered\n * `method.md`); parse it with `MetaWorkflowPlaybookSchema` from\n * `@wildo-ai/saas-specifications` to recover the typed contract — this package\n * cannot carry that dependency itself.\n */\nexport function getFrameworkKnowledgePlaybook(ref: string): FrameworkKnowledgePlaybook | null {\n const entry = listFrameworkKnowledgePlaybooks().find((candidate) => candidate.ref === ref);\n\n if (!entry) {\n return null;\n }\n\n const evaluationProtocol = entry.evaluationProtocol\n ? (() => {\n const bytes = readBinaryKnowledgeAsset(entry.evaluationProtocol.filePath);\n return {\n value: parseJsonKnowledgeBytes(bytes, entry.evaluationProtocol.filePath),\n bytes,\n };\n })()\n : null;\n const evaluationTreatment = entry.evaluationTreatment\n ? (() => {\n const bytes = readBinaryKnowledgeAsset(entry.evaluationTreatment.filePath);\n return {\n value: parseJsonKnowledgeBytes(bytes, entry.evaluationTreatment.filePath),\n bytes,\n };\n })()\n : null;\n const structuredArtifactAction = entry.structuredArtifactAction\n ? (() => {\n const bytes = readBinaryKnowledgeAsset(entry.structuredArtifactAction.filePath);\n return {\n value: parseJsonKnowledgeBytes(bytes, entry.structuredArtifactAction.filePath),\n bytes,\n };\n })()\n : null;\n\n if ((evaluationProtocol === null) !== (evaluationTreatment === null)) {\n throw new Error(`Framework knowledge playbook \"${ref}\" must carry both evaluation protocol and treatment artifacts or neither.`);\n }\n const playbookBytes = readBinaryKnowledgeAsset(entry.playbookFilePath);\n const methodBytes = readBinaryKnowledgeAsset(entry.methodFilePath);\n\n return {\n entry,\n playbook: parseJsonKnowledgeBytes(playbookBytes, entry.playbookFilePath),\n playbookBytes,\n methodMarkdown: new TextDecoder('utf-8', { fatal: true }).decode(methodBytes),\n methodBytes,\n evaluationProtocol,\n evaluationTreatment,\n structuredArtifactAction,\n };\n}\n\n/** Lists portable assurance-authority bases in stable ref/version order. */\nexport function listFrameworkKnowledgeAssuranceAuthorityBases(): FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry[] {\n const registry = getFrameworkKnowledgeRegistry(FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES) as FrameworkKnowledgeAssuranceAuthorityBasisRegistry;\n return Object.values(registry.entries).sort((left, right) => left.ref.localeCompare(right.ref) || left.version - right.version);\n}\n\n/**\n * Hydrates one framework assurance-authority basis selected by ref and compatibility generation.\n *\n * `ref@version` is the whole identity — the compatibility generation an application pins. The\n * raw-byte digest verification here was removed 2026-08-27: it compared a payload file against a\n * registry shipped in the same payload.\n */\nexport function getFrameworkKnowledgeAssuranceAuthorityBasis(ref: string, version?: number): FrameworkKnowledgeAssuranceAuthorityBasis | null {\n const candidates = listFrameworkKnowledgeAssuranceAuthorityBases().filter(\n (entry) => entry.ref === ref && (version === undefined || entry.version === version),\n );\n if (candidates.length === 0) return null;\n if (candidates.length !== 1) throw new Error(`Framework Knowledge assurance-authority basis \"${ref}\" is ambiguous without an exact version.`);\n const entry = candidates[0]!;\n const bytes = readBinaryKnowledgeAsset(entry.filePath);\n const basis = parseJsonKnowledgeBytes(bytes, entry.filePath);\n if (basis === null || typeof basis !== 'object' || Array.isArray(basis)) {\n throw new Error(`Framework Knowledge assurance-authority basis \"${entry.ref}\" is not a JSON object.`);\n }\n const basisRecord = basis as Record<string, unknown>;\n const implementationRevision = basisRecord.implementationRevision;\n if (implementationRevision === null || typeof implementationRevision !== 'object' || Array.isArray(implementationRevision)) {\n throw new Error(`Framework Knowledge assurance-authority basis \"${entry.ref}\" has no implementation revision object.`);\n }\n const implementationRevisionRecord = implementationRevision as Record<string, unknown>;\n if (\n basisRecord.basisRef !== entry.ref ||\n basisRecord.basisVersion !== entry.version ||\n implementationRevisionRecord.sourceRevisionRef !== entry.sourceRevisionRef\n ) {\n throw new Error(`Framework Knowledge assurance-authority basis \"${entry.ref}\" does not match its registry identity.`);\n }\n return { entry, basis, bytes };\n}\n\n/**\n * Returns the compiled skills router (`skills/INDEX.md`) — the single\n * catalog the AI router reads to pick a skill from a user phrasing.\n * Returns `null` when the payload was generated without an authored\n * `src/skills/INDEX.md` (audit Rule 8 warns on that state).\n */\n/**\n * One compiled skill, reduced to what a MODEL choosing between skills needs.\n *\n * `purpose` is the description's leading clause — what the skill DOES — with the\n * `Use when \"…\"` trigger half deliberately dropped. That half exists so a host router can\n * match a human's utterance; a playbook binding a build TASK to a skill is answering a\n * different question, and the triggers trade ~2x the bytes for phrasing it cannot use.\n */\nexport interface FrameworkKnowledgeSkillSummary {\n readonly name: string;\n readonly purpose: string;\n}\n\n/**\n * Every compiled skill's name and purpose — the catalog a generation call must choose from.\n *\n * Exists because a playbook METHOD can instruct a model to \"route through the skills index\"\n * while the model has never been shown one: measured 2026-08-27, `skillRefs` appeared ZERO\n * times in the companion's brief composition, so `bottom_up.build-decompose` was binding 54\n * tasks to skill names it was recalling rather than reading. A dangling skill ref is a task\n * the dispatch playbook cannot run.\n *\n * The compiled `skills/INDEX.md` is the ROUTER and is not what a prompt should carry — it is\n * 76KB, more than the whole rest of a decompose brief. This projection is ~25KB for 104\n * skills and drops nothing a chooser needs.\n *\n * Sorted by name so a brief built twice from one artifact is byte-identical.\n */\nexport function listFrameworkKnowledgeSkillSummaries(): FrameworkKnowledgeSkillSummary[] {\n const skillsDirectory = getFrameworkKnowledgeManifest().payload.skillsDirectory;\n const absoluteSkillsDirectory = resolveKnowledgeAssetPath(skillsDirectory);\n if (!existsSync(absoluteSkillsDirectory)) {\n return [];\n }\n const summaries: FrameworkKnowledgeSkillSummary[] = [];\n for (const entry of readdirSync(absoluteSkillsDirectory, { withFileTypes: true })) {\n if (!entry.isDirectory()) continue;\n const skillPath = `${skillsDirectory}/${entry.name}/SKILL.md`;\n if (!existsSync(resolveKnowledgeAssetPath(skillPath))) continue;\n const frontmatter = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---/.exec(readTextKnowledgeAsset(skillPath));\n if (!frontmatter) continue;\n const name = /^name:\\s*(.+)$/m.exec(frontmatter[1]!)?.[1]?.trim();\n const description = /^description:\\s*(.+)$/m.exec(frontmatter[1]!)?.[1]?.trim();\n if (!name || !description) continue;\n const unquoted = description.replace(/^[\"']|[\"']$/g, '');\n // The trigger half starts at \"Use when\"; everything before it is the purpose.\n const purpose = unquoted.split(/\\s*Use when/)[0]!.trim();\n summaries.push({ name, purpose: purpose.length > 0 ? purpose : unquoted });\n }\n return summaries.sort((left, right) => left.name.localeCompare(right.name));\n}\n\nexport function getFrameworkKnowledgeSkillsIndex(): string | null {\n const skillsIndexPath = getFrameworkKnowledgeManifest().payload.skillsIndexPath;\n\n if (!skillsIndexPath) {\n return null;\n }\n\n return readTextKnowledgeAsset(skillsIndexPath);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"framework-knowledge.loader.js","sourceRoot":"","sources":["../../../src/framework-knowledge.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAgBjE,OAAO,EAAE,oCAAoC,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;A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IAAI,CAAC,IAAI,IAAI,CAAC,WAAW;YAAE,SAAS;QACpC,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QACzD,8EAA8E;QAC9E,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,CAAC;QACzD,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,MAAM,eAAe,GAAG,6BAA6B,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC;IAEhF,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,sBAAsB,CAAC,eAAe,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import { existsSync, readFileSync, readdirSync } from 'node:fs';\nimport { createHash } from 'node:crypto';\nimport { isAbsolute, normalize, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { describeCaughtError } from '@wildo-ai/saas-backend-lib';\nimport type {\n FrameworkKnowledgeAssuranceAuthorityBasis,\n FrameworkKnowledgeAssuranceAuthorityBasisRegistry,\n FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry,\n FrameworkKnowledgeManifest,\n FrameworkKnowledgeJsonArtifact,\n FrameworkKnowledgePlaybook,\n FrameworkKnowledgePlaybookRegistry,\n FrameworkKnowledgePlaybookRegistryEntry,\n FrameworkKnowledgeRegistryDescriptor,\n FrameworkKnowledgeRegistryMap,\n FrameworkKnowledgeTopic,\n FrameworkKnowledgeTopicIndex,\n FrameworkKnowledgeTopicIndexEntry,\n} from './framework-knowledge.schemas.js';\nimport { FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION, FrameworkKnowledgeRegistryName } from './framework-knowledge.schemas.js';\n\n/**\n * This package is intentionally consumed from compiled `dist/esm`.\n * Resolving relative to `import.meta.url` keeps local package-preview and\n * published npm consumption on the same `dist/knowledge` seam.\n */\nfunction getFrameworkKnowledgeDirectoryPath(): string {\n return fileURLToPath(new URL('../knowledge/', import.meta.url));\n}\n\nfunction normalizeKnowledgeAssetRelativePath(relativePath: string): string {\n const normalizedRelativePath = normalize(relativePath).replaceAll('\\\\', '/');\n\n if (normalizedRelativePath.length === 0 || normalizedRelativePath === '.') {\n throw new Error('Framework knowledge asset paths must not be empty.');\n }\n\n if (isAbsolute(normalizedRelativePath) || normalizedRelativePath === '..' || normalizedRelativePath.startsWith('../')) {\n throw new Error(`Framework knowledge asset paths must stay inside the knowledge payload: \"${relativePath}\".`);\n }\n\n return normalizedRelativePath;\n}\n\nfunction resolveKnowledgeAssetPath(relativePath: string): string {\n const normalizedRelativePath = normalizeKnowledgeAssetRelativePath(relativePath);\n return resolve(getFrameworkKnowledgeDirectoryPath(), normalizedRelativePath);\n}\n\nfunction assertKnowledgeAssetExists(assetPath: string, relativePath: string): void {\n if (existsSync(assetPath)) {\n return;\n }\n\n throw new Error(\n `Missing framework knowledge asset \"${relativePath}\" at \"${assetPath}\". Run \"wildo fwk generate-docs\" to materialize the package payload before consuming it.`,\n );\n}\n\nfunction readJsonKnowledgeAsset<T>(relativePath: string): T {\n const assetPath = resolveKnowledgeAssetPath(relativePath);\n assertKnowledgeAssetExists(assetPath, relativePath);\n return JSON.parse(readFileSync(assetPath, 'utf8')) as T;\n}\n\nfunction readTextKnowledgeAsset(relativePath: string): string {\n const assetPath = resolveKnowledgeAssetPath(relativePath);\n assertKnowledgeAssetExists(assetPath, relativePath);\n return readFileSync(assetPath, 'utf8');\n}\n\nfunction readBinaryKnowledgeAsset(relativePath: string): Uint8Array {\n const assetPath = resolveKnowledgeAssetPath(relativePath);\n assertKnowledgeAssetExists(assetPath, relativePath);\n return readFileSync(assetPath);\n}\n\nfunction parseJsonKnowledgeBytes(bytes: Uint8Array, relativePath: string): unknown {\n try {\n return JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)) as unknown;\n } catch (error) {\n throw new Error(\n `Framework knowledge asset \"${relativePath}\" is not valid UTF-8 JSON: ${describeCaughtError(error)}`,\n );\n }\n}\n\nexport function resolveFrameworkKnowledgeAssetPath(relativePath: string): string {\n return resolveKnowledgeAssetPath(relativePath);\n}\n\nexport function getFrameworkKnowledgeManifestArtifact(): FrameworkKnowledgeJsonArtifact<FrameworkKnowledgeManifest> {\n const bytes = readBinaryKnowledgeAsset('manifest.json');\n const manifest = parseJsonKnowledgeBytes(bytes, 'manifest.json') as FrameworkKnowledgeManifest;\n if (manifest.artifactVersion !== FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION) {\n throw new Error(`Unsupported Framework Knowledge artifact version \"${manifest.artifactVersion}\"; expected \"${FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION}\".`);\n }\n const assuranceAuthorityBasisRegistry = manifest.registries.find(\n (registry) => registry.registryName === FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES,\n );\n if (!manifest.payload.assuranceAuthorityBasesDirectory || !assuranceAuthorityBasisRegistry) {\n throw new Error('Framework Knowledge artifact version 3 requires an assurance-authority-basis payload and registry.');\n }\n return { value: manifest, bytes };\n}\n\nexport function getFrameworkKnowledgeManifest(): FrameworkKnowledgeManifest {\n return getFrameworkKnowledgeManifestArtifact().value;\n}\n\nexport function listFrameworkKnowledgeRegistries(): FrameworkKnowledgeRegistryDescriptor[] {\n return getFrameworkKnowledgeManifest().registries;\n}\n\nexport function getFrameworkKnowledgeTopicIndex(): FrameworkKnowledgeTopicIndex {\n return readJsonKnowledgeAsset<FrameworkKnowledgeTopicIndex>('topic-index.json');\n}\n\nexport function listFrameworkKnowledgeTopics(): FrameworkKnowledgeTopicIndexEntry[] {\n return getFrameworkKnowledgeTopicIndex().topics;\n}\n\nexport function getFrameworkKnowledgeTopic(topicId: string): FrameworkKnowledgeTopic | null {\n const topicEntry = listFrameworkKnowledgeTopics().find((entry) => entry.topicId === topicId);\n\n if (!topicEntry) {\n return null;\n }\n\n const referencesByFile = Object.fromEntries(\n topicEntry.referenceFiles.map((referenceFileName) => [\n referenceFileName,\n readTextKnowledgeAsset(`references/${referenceFileName}`),\n ]),\n ) as Record<string, string>;\n const skillsByFile = Object.fromEntries(\n topicEntry.skillFiles.map((skillFileName) => [\n skillFileName,\n readTextKnowledgeAsset(`skills/${skillFileName}`),\n ]),\n ) as Record<string, string>;\n\n return {\n entry: topicEntry,\n referencesByFile,\n skillsByFile,\n };\n}\n\nexport function getFrameworkKnowledgeRegistry<TRegistryName extends FrameworkKnowledgeRegistryName>(\n registryName: TRegistryName,\n): FrameworkKnowledgeRegistryMap[TRegistryName] {\n return readJsonKnowledgeAsset<FrameworkKnowledgeRegistryMap[TRegistryName]>(`registries/${registryName}.json`);\n}\n\n/**\n * Lists the compiled meta-workflow playbooks from the `playbooks` registry,\n * sorted by `ref` for stable iteration.\n */\nexport function listFrameworkKnowledgePlaybooks(): FrameworkKnowledgePlaybookRegistryEntry[] {\n const registry = readJsonKnowledgeAsset<FrameworkKnowledgePlaybookRegistry>(\n `registries/${FrameworkKnowledgeRegistryName.PLAYBOOKS}.json`,\n );\n return Object.values(registry.entries).sort((left, right) => left.ref.localeCompare(right.ref));\n}\n\n/**\n * Hydrates one compiled playbook by its `ref` (the folder name under\n * `playbooks/`). Returns `null` when the ref is not in the registry.\n *\n * The returned `playbook` is the generator-validated compiled\n * `playbook.json` (with `method.guidance` inlined from the rendered\n * `method.md`); parse it with `MetaWorkflowPlaybookSchema` from\n * `@wildo-ai/saas-specifications` to recover the typed contract — this package\n * cannot carry that dependency itself.\n */\nexport function getFrameworkKnowledgePlaybook(ref: string): FrameworkKnowledgePlaybook | null {\n const entry = listFrameworkKnowledgePlaybooks().find((candidate) => candidate.ref === ref);\n\n if (!entry) {\n return null;\n }\n\n const evaluationProtocol = entry.evaluationProtocol\n ? (() => {\n const bytes = readBinaryKnowledgeAsset(entry.evaluationProtocol.filePath);\n return {\n value: parseJsonKnowledgeBytes(bytes, entry.evaluationProtocol.filePath),\n bytes,\n };\n })()\n : null;\n const evaluationTreatment = entry.evaluationTreatment\n ? (() => {\n const bytes = readBinaryKnowledgeAsset(entry.evaluationTreatment.filePath);\n return {\n value: parseJsonKnowledgeBytes(bytes, entry.evaluationTreatment.filePath),\n bytes,\n };\n })()\n : null;\n const structuredArtifactAction = entry.structuredArtifactAction\n ? (() => {\n const bytes = readBinaryKnowledgeAsset(entry.structuredArtifactAction.filePath);\n return {\n value: parseJsonKnowledgeBytes(bytes, entry.structuredArtifactAction.filePath),\n bytes,\n };\n })()\n : null;\n\n if ((evaluationProtocol === null) !== (evaluationTreatment === null)) {\n throw new Error(`Framework knowledge playbook \"${ref}\" must carry both evaluation protocol and treatment artifacts or neither.`);\n }\n const playbookBytes = readBinaryKnowledgeAsset(entry.playbookFilePath);\n const methodBytes = readBinaryKnowledgeAsset(entry.methodFilePath);\n\n return {\n entry,\n playbook: parseJsonKnowledgeBytes(playbookBytes, entry.playbookFilePath),\n playbookBytes,\n methodMarkdown: new TextDecoder('utf-8', { fatal: true }).decode(methodBytes),\n methodBytes,\n evaluationProtocol,\n evaluationTreatment,\n structuredArtifactAction,\n };\n}\n\n/** Lists portable assurance-authority bases in stable ref/version order. */\nexport function listFrameworkKnowledgeAssuranceAuthorityBases(): FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry[] {\n const registry = getFrameworkKnowledgeRegistry(FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES) as FrameworkKnowledgeAssuranceAuthorityBasisRegistry;\n return Object.values(registry.entries).sort((left, right) => left.ref.localeCompare(right.ref) || left.version - right.version);\n}\n\n/**\n * Hydrates one framework assurance-authority basis selected by ref and compatibility generation.\n *\n * `ref@version` is the whole identity — the compatibility generation an application pins. The\n * raw-byte digest verification here was removed 2026-08-27: it compared a payload file against a\n * registry shipped in the same payload.\n */\nexport function getFrameworkKnowledgeAssuranceAuthorityBasis(ref: string, version?: number): FrameworkKnowledgeAssuranceAuthorityBasis | null {\n const candidates = listFrameworkKnowledgeAssuranceAuthorityBases().filter(\n (entry) => entry.ref === ref && (version === undefined || entry.version === version),\n );\n if (candidates.length === 0) return null;\n if (candidates.length !== 1) throw new Error(`Framework Knowledge assurance-authority basis \"${ref}\" is ambiguous without an exact version.`);\n const entry = candidates[0]!;\n const bytes = readBinaryKnowledgeAsset(entry.filePath);\n const basis = parseJsonKnowledgeBytes(bytes, entry.filePath);\n if (basis === null || typeof basis !== 'object' || Array.isArray(basis)) {\n throw new Error(`Framework Knowledge assurance-authority basis \"${entry.ref}\" is not a JSON object.`);\n }\n const basisRecord = basis as Record<string, unknown>;\n const implementationRevision = basisRecord.implementationRevision;\n if (implementationRevision === null || typeof implementationRevision !== 'object' || Array.isArray(implementationRevision)) {\n throw new Error(`Framework Knowledge assurance-authority basis \"${entry.ref}\" has no implementation revision object.`);\n }\n const implementationRevisionRecord = implementationRevision as Record<string, unknown>;\n if (\n basisRecord.basisRef !== entry.ref ||\n basisRecord.basisVersion !== entry.version ||\n implementationRevisionRecord.sourceRevisionRef !== entry.sourceRevisionRef\n ) {\n throw new Error(`Framework Knowledge assurance-authority basis \"${entry.ref}\" does not match its registry identity.`);\n }\n return { entry, basis, bytes };\n}\n\n/**\n * The rights-classified WILDO-objective → external-source mapping shipped beside one basis (#266).\n *\n * ## What it answers, and the question it deliberately does not\n *\n * Which external requirement each WILDO objective was bound to, under whose review, with the\n * attribution notices each source's rights record demands — and which objectives are recorded\n * UNMAPPED, with a reason. It says nothing about whether an application MEETS any of them: that is a\n * programme's coverage decision, and reading a mapping as conformity is the misreading the rights\n * boundary exists to prevent.\n *\n * ## `null` means the payload predates the mapping, NOT that nothing is mapped\n *\n * The registry field is optional because a payload generated before #266 carries none, and a caller\n * must not read that absence as \"this basis binds no external source\" — the two are opposite claims.\n * A payload that DOES carry one and cannot be read throws instead, because that is a broken payload\n * rather than an old one.\n */\nexport function getFrameworkKnowledgeAssuranceExternalFrameworkMapping(\n ref: string,\n version?: number,\n): FrameworkKnowledgeJsonArtifact<unknown> | null {\n const basis = getFrameworkKnowledgeAssuranceAuthorityBasis(ref, version);\n if (basis === null) return null;\n const filePath = basis.entry.externalFrameworkMappingFilePath;\n if (filePath === undefined) return null;\n const bytes = readBinaryKnowledgeAsset(filePath);\n const value = parseJsonKnowledgeBytes(bytes, filePath);\n if (value === null || typeof value !== 'object' || Array.isArray(value)) {\n throw new Error(`Framework Knowledge external-framework mapping for \"${basis.entry.ref}\" is not a JSON object.`);\n }\n return { value, bytes };\n}\n\n/**\n * Returns the compiled skills router (`skills/INDEX.md`) — the single\n * catalog the AI router reads to pick a skill from a user phrasing.\n * Returns `null` when the payload was generated without an authored\n * `src/skills/INDEX.md` (audit Rule 8 warns on that state).\n */\n/**\n * One compiled skill, reduced to what a MODEL choosing between skills needs.\n *\n * `purpose` is the description's leading clause — what the skill DOES — with the\n * `Use when \"…\"` trigger half deliberately dropped. That half exists so a host router can\n * match a human's utterance; a playbook binding a build TASK to a skill is answering a\n * different question, and the triggers trade ~2x the bytes for phrasing it cannot use.\n */\nexport interface FrameworkKnowledgeSkillSummary {\n readonly name: string;\n readonly purpose: string;\n}\n\n/**\n * Every compiled skill's name and purpose — the catalog a generation call must choose from.\n *\n * Exists because a playbook METHOD can instruct a model to \"route through the skills index\"\n * while the model has never been shown one: measured 2026-08-27, `skillRefs` appeared ZERO\n * times in the companion's brief composition, so `bottom_up.build-decompose` was binding 54\n * tasks to skill names it was recalling rather than reading. A dangling skill ref is a task\n * the dispatch playbook cannot run.\n *\n * The compiled `skills/INDEX.md` is the ROUTER and is not what a prompt should carry — it is\n * 76KB, more than the whole rest of a decompose brief. This projection is ~25KB for 104\n * skills and drops nothing a chooser needs.\n *\n * Sorted by name so a brief built twice from one artifact is byte-identical.\n */\nexport function listFrameworkKnowledgeSkillSummaries(): FrameworkKnowledgeSkillSummary[] {\n const skillsDirectory = getFrameworkKnowledgeManifest().payload.skillsDirectory;\n const absoluteSkillsDirectory = resolveKnowledgeAssetPath(skillsDirectory);\n if (!existsSync(absoluteSkillsDirectory)) {\n return [];\n }\n const summaries: FrameworkKnowledgeSkillSummary[] = [];\n for (const entry of readdirSync(absoluteSkillsDirectory, { withFileTypes: true })) {\n if (!entry.isDirectory()) continue;\n const skillPath = `${skillsDirectory}/${entry.name}/SKILL.md`;\n if (!existsSync(resolveKnowledgeAssetPath(skillPath))) continue;\n const frontmatter = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---/.exec(readTextKnowledgeAsset(skillPath));\n if (!frontmatter) continue;\n const name = /^name:\\s*(.+)$/m.exec(frontmatter[1]!)?.[1]?.trim();\n const description = /^description:\\s*(.+)$/m.exec(frontmatter[1]!)?.[1]?.trim();\n if (!name || !description) continue;\n const unquoted = description.replace(/^[\"']|[\"']$/g, '');\n // The trigger half starts at \"Use when\"; everything before it is the purpose.\n const purpose = unquoted.split(/\\s*Use when/)[0]!.trim();\n summaries.push({ name, purpose: purpose.length > 0 ? purpose : unquoted });\n }\n return summaries.sort((left, right) => left.name.localeCompare(right.name));\n}\n\nexport function getFrameworkKnowledgeSkillsIndex(): string | null {\n const skillsIndexPath = getFrameworkKnowledgeManifest().payload.skillsIndexPath;\n\n if (!skillsIndexPath) {\n return null;\n }\n\n return readTextKnowledgeAsset(skillsIndexPath);\n}\n"]}
|
|
@@ -170,6 +170,18 @@ export interface FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry {
|
|
|
170
170
|
version: number;
|
|
171
171
|
sourceRevisionRef: string;
|
|
172
172
|
filePath: string;
|
|
173
|
+
/**
|
|
174
|
+
* The rights-classified WILDO-objective → external-source mapping DERIVED from this basis (#266).
|
|
175
|
+
*
|
|
176
|
+
* Beside the basis rather than in its own channel because it is a projection of exactly these
|
|
177
|
+
* bytes: derived in the same pass, from the same value, so it cannot describe a different basis
|
|
178
|
+
* than the one it ships with. A separate channel would be free to disagree, and a mapping is read
|
|
179
|
+
* precisely by people who cannot check it.
|
|
180
|
+
*
|
|
181
|
+
* OPTIONAL for the same reason `rulesDirectory` is: a payload generated before this existed carries
|
|
182
|
+
* none, and a required field would make every one of them unloadable to fix a delivery gap.
|
|
183
|
+
*/
|
|
184
|
+
externalFrameworkMappingFilePath?: string;
|
|
173
185
|
}
|
|
174
186
|
/** Portable authority-basis bytes; consumers recover the typed assurance contract at their semantic boundary. */
|
|
175
187
|
export interface FrameworkKnowledgeAssuranceAuthorityBasis {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-knowledge.schemas.d.ts","sourceRoot":"","sources":["../../../src/framework-knowledge.schemas.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAExD,oBAAY,8BAA8B;IACxC,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,yBAAyB,8BAA8B;CACxD;AAED,oBAAY,qCAAqC;IAC/C,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,oBAAY,sCAAsC;IAChD,gCAAgC,qCAAqC;CACtE;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kCAAkC;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,2GAA2G;IAC3G,gCAAgC,EAAE,MAAM,CAAC;IACzC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EA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;KAClB,CAAC;IACF,wBAAwB,CAAC,EAAE;QACzB,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,sDAAsD;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"framework-knowledge.schemas.d.ts","sourceRoot":"","sources":["../../../src/framework-knowledge.schemas.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAExD,oBAAY,8BAA8B;IACxC,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,yBAAyB,8BAA8B;CACxD;AAED,oBAAY,qCAAqC;IAC/C,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,oBAAY,sCAAsC;IAChD,gCAAgC,qCAAqC;CACtE;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kCAAkC;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,2GAA2G;IAC3G,gCAAgC,EAAE,MAAM,CAAC;IACzC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oCAAoC;IACnD,YAAY,EAAE,8BAA8B,CAAC;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAA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,EAHW,qCAAqC,KAArC,qCAAqC,QAGhD;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,sCAEX;AAFD,WAAY,sCAAsC;IAChD,+GAAqE,CAAA;AACvE,CAAC,EAFW,sCAAsC,KAAtC,sCAAsC,QAEjD","sourcesContent":["export const FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION = '3';\n\nexport enum FrameworkKnowledgeRegistryName {\n SOURCE_TAGS = 'source-tags',\n FRAMEWORK_TOPICS = 'framework-topics',\n PLAYBOOKS = 'playbooks',\n ASSURANCE_AUTHORITY_BASES = 'assurance-authority-bases',\n}\n\nexport enum FrameworkKnowledgeSourceReferenceKind {\n FULL_FILE = 'full-file',\n PART_RANGE = 'part-range',\n}\n\n/**\n * The JSON-v1 authoring format was retired (and its member deleted) at the\n * first-activation hard cut; every authored playbook is an effect-free native\n * TypeScript declaration.\n */\nexport enum FrameworkKnowledgePlaybookSourceFormat {\n EFFECT_FREE_TYPESCRIPT_MODULE_V1 = 'EFFECT_FREE_TYPESCRIPT_MODULE_V1',\n}\n\n/**\n * Directory/file inventory of the compiled payload, mirrored 1:1 by the\n * generator-local `FrameworkKnowledgeManifestShape` in\n * `wildo-cli/src/services/framework/framework-knowledge-generation.service.ts`.\n * The two shapes are deliberately duplicated (the audit/generator must stay\n * buildless w.r.t. this package) — extending one WITHOUT the other silently\n * ships a payload the typed loader cannot see. Keep them in lockstep.\n */\nexport interface FrameworkKnowledgePayloadInventory {\n topicIndexPath: string;\n registriesDirectory: string;\n referencesDirectory: string;\n skillsDirectory: string;\n /** Compiled meta-workflow playbooks home (`playbooks/<ref>/playbook.json` + `method.md`). */\n playbooksDirectory: string;\n /** Compiled application-creation transition route home. */\n /** Compiled, portable assurance-authority bases; published bytes never contain repository source paths. */\n assuranceAuthorityBasesDirectory: string;\n /**\n * Compiled ALWAYS-ON rules home (`rules/*.md`), installed into an application's `.claude/rules/`.\n *\n * Distinct from a skill: a skill is reached when the router matches a request description, which\n * requires the agent to already suspect the topic. A rule is policy that must be present when the\n * agent opens a matching file, without being asked for.\n *\n * OPTIONAL, unlike its siblings: it was introduced by issue #98 after the channel had been\n * documented and never built, so a payload generated before that carries none. A required field\n * would make every previously generated payload unloadable to fix a delivery gap.\n */\n rulesDirectory?: string;\n /**\n * Compiled skills router (`skills/INDEX.md`), rendered from the authored\n * `src/skills/INDEX.md` — the single router truth. Absent when the authored\n * catalog file does not exist (audit Rule 8 warns on that state). It is\n * deliberately NOT attached to any topic entry: the catalog is cross-topic\n * and `getFrameworkKnowledgeTopic` would misfile it.\n */\n skillsIndexPath?: string;\n}\n\nexport interface FrameworkKnowledgeRegistryDescriptor {\n registryName: FrameworkKnowledgeRegistryName;\n filePath: string;\n description: string;\n entryCount: number;\n}\n\nexport interface FrameworkKnowledgeManifest {\n artifactVersion: string;\n frameworkVersion: string;\n generatorVersion: string;\n generatedAt: string;\n packageName: string;\n topicCount: number;\n referenceFileCount: number;\n payload: FrameworkKnowledgePayloadInventory;\n registries: FrameworkKnowledgeRegistryDescriptor[];\n}\n\nexport interface FrameworkKnowledgeSourceReference {\n kind: FrameworkKnowledgeSourceReferenceKind;\n tagName: string;\n filePath: string;\n startLine?: number;\n endLine?: number;\n}\n\nexport interface FrameworkKnowledgeTopicIndexEntry {\n topicId: string;\n title: string;\n tags: string[];\n facets: string[];\n categories: string[];\n sourceReferences: FrameworkKnowledgeSourceReference[];\n referenceFiles: string[];\n skillFiles: string[];\n registryKeys: FrameworkKnowledgeRegistryName[];\n}\n\nexport interface FrameworkKnowledgeTopicIndex {\n topics: FrameworkKnowledgeTopicIndexEntry[];\n}\n\nexport interface FrameworkKnowledgeTopic {\n entry: FrameworkKnowledgeTopicIndexEntry;\n referencesByFile: Record<string, string>;\n skillsByFile: Record<string, string>;\n}\n\nexport interface FrameworkKnowledgeTopicRegistryEntry {\n topicId: string;\n title: string;\n categories: string[];\n referenceFilePath?: string;\n sourceReferenceCount: number;\n}\n\nexport interface FrameworkKnowledgeSourceTagRegistryEntry {\n referenceFilePath: string;\n skillFilePath?: string;\n extractedAt: string;\n facets: string[];\n sourceReferences: FrameworkKnowledgeSourceReference[];\n}\n\n/**\n * One compiled meta-workflow playbook, as listed in the `playbooks` registry.\n *\n * Enum-backed playbook fields (`phase`, `executor`, `functionalTopics`) are\n * surfaced as plain strings here: this package has zero dependencies by\n * design, so it cannot import the `MetaWorkflow_*` enums from\n * `@wildo-ai/saas-specifications`. Consumers that need the typed contract must parse\n * the playbook JSON (see {@link FrameworkKnowledgePlaybook.playbook}) with\n * `MetaWorkflowPlaybookSchema` at their own seam — the generator has already\n * validated it, so the parse is a type-recovery step, not a trust boundary.\n */\nexport interface FrameworkKnowledgePlaybookRegistryEntry {\n ref: string;\n version: string;\n phase: string;\n /** Absent when the playbook runs no single tier — see `MetaWorkflow_Executor` (#115). */\n executor?: string;\n intent: string;\n functionalTopics: string[];\n /** App-knowledge skill ids the playbook's method delegates the technical HOW to. */\n skillRefs: string[];\n /** Payload-relative path of the compiled `playbook.json`. */\n playbookFilePath: string;\n /** Payload-relative path of the rendered `method.md`. */\n methodFilePath: string;\n /** Canonical structured authoring format used to compile this entry. */\n sourceFormat: FrameworkKnowledgePlaybookSourceFormat;\n evaluationProtocol?: {\n protocolRef: string;\n protocolVersion: number;\n filePath: string;\n };\n evaluationTreatment?: {\n definitionRef: string;\n definitionVersion: number;\n filePath: string;\n };\n structuredArtifactAction?: {\n definitionRef: string;\n definitionVersion: number;\n filePath: string;\n };\n}\n\n/**\n * Zero-dependency registry identity for one compiled assurance-authority basis.\n *\n * `ref@version` IS the identity: `version` is the declared compatibility generation. The three\n * content digests this carried (basis, source revision, artifact bytes) were removed 2026-08-27 —\n * they compared the compiled payload against a registry that ships in the same payload, and the\n * basis digest additionally forced every consuming application to re-accept its controls on any\n * engine byte movement (`.claude/rules/one-source-of-truth.md`).\n */\nexport interface FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry {\n ref: string;\n version: number;\n sourceRevisionRef: string;\n filePath: string;\n}\n\n/** Portable authority-basis bytes; consumers recover the typed assurance contract at their semantic boundary. */\nexport interface FrameworkKnowledgeAssuranceAuthorityBasis {\n entry: FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry;\n basis: unknown;\n bytes: Uint8Array;\n}\n\n/** Exact JSON artifact bytes plus their parsed zero-dependency projection. */\nexport interface FrameworkKnowledgeJsonArtifact<TValue> {\n value: TValue;\n bytes: Uint8Array;\n}\n\n/**\n * Hydrated playbook returned by `getFrameworkKnowledgePlaybook(ref)`.\n */\nexport interface FrameworkKnowledgePlaybook {\n entry: FrameworkKnowledgePlaybookRegistryEntry;\n /**\n * Parsed compiled `playbook.json` — schema-valid `MetaWorkflowPlaybook`\n * content (with `method.guidance` inlined from the rendered `method.md`).\n * Typed `unknown` because this package cannot depend on\n * `@wildo-ai/saas-specifications`; parse with `MetaWorkflowPlaybookSchema` to\n * recover the typed contract.\n */\n playbook: unknown;\n /** Exact compiled `playbook.json` bytes used for source provenance. */\n playbookBytes: Uint8Array;\n /** Rendered `method.md` prose (same content as `playbook.method.guidance`). */\n methodMarkdown: string;\n /** Exact rendered `method.md` bytes used for source provenance. */\n methodBytes: Uint8Array;\n /** Exact compiled protocol bytes and parsed value, absent for contained JSON-v1 entries. */\n evaluationProtocol: {\n value: unknown;\n bytes: Uint8Array;\n } | null;\n /** Exact compiled treatment bytes and parsed value, absent for contained JSON-v1 entries. */\n evaluationTreatment: {\n value: unknown;\n bytes: Uint8Array;\n } | null;\n /** Exact compiled structured-artifact Action bytes, when the playbook declares one. */\n structuredArtifactAction: {\n value: unknown;\n bytes: Uint8Array;\n } | null;\n}\n\nexport interface FrameworkKnowledgeRegistryBase<TName extends FrameworkKnowledgeRegistryName, TEntry> {\n name: TName;\n metadata?: Record<string, unknown>;\n entries: Record<string, TEntry>;\n}\n\nexport type FrameworkKnowledgeSourceTagRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.SOURCE_TAGS,\n FrameworkKnowledgeSourceTagRegistryEntry\n>;\n\nexport type FrameworkKnowledgeTopicRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.FRAMEWORK_TOPICS,\n FrameworkKnowledgeTopicRegistryEntry\n>;\n\nexport type FrameworkKnowledgePlaybookRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.PLAYBOOKS,\n FrameworkKnowledgePlaybookRegistryEntry\n>;\n\nexport type FrameworkKnowledgeAssuranceAuthorityBasisRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES,\n FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry\n>;\n\nexport interface FrameworkKnowledgeRegistryMap {\n [FrameworkKnowledgeRegistryName.SOURCE_TAGS]: FrameworkKnowledgeSourceTagRegistry;\n [FrameworkKnowledgeRegistryName.FRAMEWORK_TOPICS]: FrameworkKnowledgeTopicRegistry;\n [FrameworkKnowledgeRegistryName.PLAYBOOKS]: FrameworkKnowledgePlaybookRegistry;\n [FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES]: FrameworkKnowledgeAssuranceAuthorityBasisRegistry;\n}\n\nexport type FrameworkKnowledgeRegistry = FrameworkKnowledgeRegistryMap[FrameworkKnowledgeRegistryName];\n"]}
|
|
1
|
+
{"version":3,"file":"framework-knowledge.schemas.js","sourceRoot":"","sources":["../../../src/framework-knowledge.schemas.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,CAAC;AAExD,MAAM,CAAN,IAAY,8BAKX;AALD,WAAY,8BAA8B;IACxC,6DAA2B,CAAA;IAC3B,uEAAqC,CAAA;IACrC,yDAAuB,CAAA;IACvB,yFAAuD,CAAA;AACzD,CAAC,EALW,8BAA8B,KAA9B,8BAA8B,QAKzC;AAED,MAAM,CAAN,IAAY,qCAGX;AAHD,WAAY,qCAAqC;IAC/C,gEAAuB,CAAA;IACvB,kEAAyB,CAAA;AAC3B,CAAC,EAHW,qCAAqC,KAArC,qCAAqC,QAGhD;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,sCAEX;AAFD,WAAY,sCAAsC;IAChD,+GAAqE,CAAA;AACvE,CAAC,EAFW,sCAAsC,KAAtC,sCAAsC,QAEjD","sourcesContent":["export const FRAMEWORK_KNOWLEDGE_ARTIFACT_VERSION = '3';\n\nexport enum FrameworkKnowledgeRegistryName {\n SOURCE_TAGS = 'source-tags',\n FRAMEWORK_TOPICS = 'framework-topics',\n PLAYBOOKS = 'playbooks',\n ASSURANCE_AUTHORITY_BASES = 'assurance-authority-bases',\n}\n\nexport enum FrameworkKnowledgeSourceReferenceKind {\n FULL_FILE = 'full-file',\n PART_RANGE = 'part-range',\n}\n\n/**\n * The JSON-v1 authoring format was retired (and its member deleted) at the\n * first-activation hard cut; every authored playbook is an effect-free native\n * TypeScript declaration.\n */\nexport enum FrameworkKnowledgePlaybookSourceFormat {\n EFFECT_FREE_TYPESCRIPT_MODULE_V1 = 'EFFECT_FREE_TYPESCRIPT_MODULE_V1',\n}\n\n/**\n * Directory/file inventory of the compiled payload, mirrored 1:1 by the\n * generator-local `FrameworkKnowledgeManifestShape` in\n * `wildo-cli/src/services/framework/framework-knowledge-generation.service.ts`.\n * The two shapes are deliberately duplicated (the audit/generator must stay\n * buildless w.r.t. this package) — extending one WITHOUT the other silently\n * ships a payload the typed loader cannot see. Keep them in lockstep.\n */\nexport interface FrameworkKnowledgePayloadInventory {\n topicIndexPath: string;\n registriesDirectory: string;\n referencesDirectory: string;\n skillsDirectory: string;\n /** Compiled meta-workflow playbooks home (`playbooks/<ref>/playbook.json` + `method.md`). */\n playbooksDirectory: string;\n /** Compiled application-creation transition route home. */\n /** Compiled, portable assurance-authority bases; published bytes never contain repository source paths. */\n assuranceAuthorityBasesDirectory: string;\n /**\n * Compiled ALWAYS-ON rules home (`rules/*.md`), installed into an application's `.claude/rules/`.\n *\n * Distinct from a skill: a skill is reached when the router matches a request description, which\n * requires the agent to already suspect the topic. A rule is policy that must be present when the\n * agent opens a matching file, without being asked for.\n *\n * OPTIONAL, unlike its siblings: it was introduced by issue #98 after the channel had been\n * documented and never built, so a payload generated before that carries none. A required field\n * would make every previously generated payload unloadable to fix a delivery gap.\n */\n rulesDirectory?: string;\n /**\n * Compiled skills router (`skills/INDEX.md`), rendered from the authored\n * `src/skills/INDEX.md` — the single router truth. Absent when the authored\n * catalog file does not exist (audit Rule 8 warns on that state). It is\n * deliberately NOT attached to any topic entry: the catalog is cross-topic\n * and `getFrameworkKnowledgeTopic` would misfile it.\n */\n skillsIndexPath?: string;\n}\n\nexport interface FrameworkKnowledgeRegistryDescriptor {\n registryName: FrameworkKnowledgeRegistryName;\n filePath: string;\n description: string;\n entryCount: number;\n}\n\nexport interface FrameworkKnowledgeManifest {\n artifactVersion: string;\n frameworkVersion: string;\n generatorVersion: string;\n generatedAt: string;\n packageName: string;\n topicCount: number;\n referenceFileCount: number;\n payload: FrameworkKnowledgePayloadInventory;\n registries: FrameworkKnowledgeRegistryDescriptor[];\n}\n\nexport interface FrameworkKnowledgeSourceReference {\n kind: FrameworkKnowledgeSourceReferenceKind;\n tagName: string;\n filePath: string;\n startLine?: number;\n endLine?: number;\n}\n\nexport interface FrameworkKnowledgeTopicIndexEntry {\n topicId: string;\n title: string;\n tags: string[];\n facets: string[];\n categories: string[];\n sourceReferences: FrameworkKnowledgeSourceReference[];\n referenceFiles: string[];\n skillFiles: string[];\n registryKeys: FrameworkKnowledgeRegistryName[];\n}\n\nexport interface FrameworkKnowledgeTopicIndex {\n topics: FrameworkKnowledgeTopicIndexEntry[];\n}\n\nexport interface FrameworkKnowledgeTopic {\n entry: FrameworkKnowledgeTopicIndexEntry;\n referencesByFile: Record<string, string>;\n skillsByFile: Record<string, string>;\n}\n\nexport interface FrameworkKnowledgeTopicRegistryEntry {\n topicId: string;\n title: string;\n categories: string[];\n referenceFilePath?: string;\n sourceReferenceCount: number;\n}\n\nexport interface FrameworkKnowledgeSourceTagRegistryEntry {\n referenceFilePath: string;\n skillFilePath?: string;\n extractedAt: string;\n facets: string[];\n sourceReferences: FrameworkKnowledgeSourceReference[];\n}\n\n/**\n * One compiled meta-workflow playbook, as listed in the `playbooks` registry.\n *\n * Enum-backed playbook fields (`phase`, `executor`, `functionalTopics`) are\n * surfaced as plain strings here: this package has zero dependencies by\n * design, so it cannot import the `MetaWorkflow_*` enums from\n * `@wildo-ai/saas-specifications`. Consumers that need the typed contract must parse\n * the playbook JSON (see {@link FrameworkKnowledgePlaybook.playbook}) with\n * `MetaWorkflowPlaybookSchema` at their own seam — the generator has already\n * validated it, so the parse is a type-recovery step, not a trust boundary.\n */\nexport interface FrameworkKnowledgePlaybookRegistryEntry {\n ref: string;\n version: string;\n phase: string;\n /** Absent when the playbook runs no single tier — see `MetaWorkflow_Executor` (#115). */\n executor?: string;\n intent: string;\n functionalTopics: string[];\n /** App-knowledge skill ids the playbook's method delegates the technical HOW to. */\n skillRefs: string[];\n /** Payload-relative path of the compiled `playbook.json`. */\n playbookFilePath: string;\n /** Payload-relative path of the rendered `method.md`. */\n methodFilePath: string;\n /** Canonical structured authoring format used to compile this entry. */\n sourceFormat: FrameworkKnowledgePlaybookSourceFormat;\n evaluationProtocol?: {\n protocolRef: string;\n protocolVersion: number;\n filePath: string;\n };\n evaluationTreatment?: {\n definitionRef: string;\n definitionVersion: number;\n filePath: string;\n };\n structuredArtifactAction?: {\n definitionRef: string;\n definitionVersion: number;\n filePath: string;\n };\n}\n\n/**\n * Zero-dependency registry identity for one compiled assurance-authority basis.\n *\n * `ref@version` IS the identity: `version` is the declared compatibility generation. The three\n * content digests this carried (basis, source revision, artifact bytes) were removed 2026-08-27 —\n * they compared the compiled payload against a registry that ships in the same payload, and the\n * basis digest additionally forced every consuming application to re-accept its controls on any\n * engine byte movement (`.claude/rules/one-source-of-truth.md`).\n */\nexport interface FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry {\n ref: string;\n version: number;\n sourceRevisionRef: string;\n filePath: string;\n /**\n * The rights-classified WILDO-objective → external-source mapping DERIVED from this basis (#266).\n *\n * Beside the basis rather than in its own channel because it is a projection of exactly these\n * bytes: derived in the same pass, from the same value, so it cannot describe a different basis\n * than the one it ships with. A separate channel would be free to disagree, and a mapping is read\n * precisely by people who cannot check it.\n *\n * OPTIONAL for the same reason `rulesDirectory` is: a payload generated before this existed carries\n * none, and a required field would make every one of them unloadable to fix a delivery gap.\n */\n externalFrameworkMappingFilePath?: string;\n}\n\n/** Portable authority-basis bytes; consumers recover the typed assurance contract at their semantic boundary. */\nexport interface FrameworkKnowledgeAssuranceAuthorityBasis {\n entry: FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry;\n basis: unknown;\n bytes: Uint8Array;\n}\n\n/** Exact JSON artifact bytes plus their parsed zero-dependency projection. */\nexport interface FrameworkKnowledgeJsonArtifact<TValue> {\n value: TValue;\n bytes: Uint8Array;\n}\n\n/**\n * Hydrated playbook returned by `getFrameworkKnowledgePlaybook(ref)`.\n */\nexport interface FrameworkKnowledgePlaybook {\n entry: FrameworkKnowledgePlaybookRegistryEntry;\n /**\n * Parsed compiled `playbook.json` — schema-valid `MetaWorkflowPlaybook`\n * content (with `method.guidance` inlined from the rendered `method.md`).\n * Typed `unknown` because this package cannot depend on\n * `@wildo-ai/saas-specifications`; parse with `MetaWorkflowPlaybookSchema` to\n * recover the typed contract.\n */\n playbook: unknown;\n /** Exact compiled `playbook.json` bytes used for source provenance. */\n playbookBytes: Uint8Array;\n /** Rendered `method.md` prose (same content as `playbook.method.guidance`). */\n methodMarkdown: string;\n /** Exact rendered `method.md` bytes used for source provenance. */\n methodBytes: Uint8Array;\n /** Exact compiled protocol bytes and parsed value, absent for contained JSON-v1 entries. */\n evaluationProtocol: {\n value: unknown;\n bytes: Uint8Array;\n } | null;\n /** Exact compiled treatment bytes and parsed value, absent for contained JSON-v1 entries. */\n evaluationTreatment: {\n value: unknown;\n bytes: Uint8Array;\n } | null;\n /** Exact compiled structured-artifact Action bytes, when the playbook declares one. */\n structuredArtifactAction: {\n value: unknown;\n bytes: Uint8Array;\n } | null;\n}\n\nexport interface FrameworkKnowledgeRegistryBase<TName extends FrameworkKnowledgeRegistryName, TEntry> {\n name: TName;\n metadata?: Record<string, unknown>;\n entries: Record<string, TEntry>;\n}\n\nexport type FrameworkKnowledgeSourceTagRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.SOURCE_TAGS,\n FrameworkKnowledgeSourceTagRegistryEntry\n>;\n\nexport type FrameworkKnowledgeTopicRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.FRAMEWORK_TOPICS,\n FrameworkKnowledgeTopicRegistryEntry\n>;\n\nexport type FrameworkKnowledgePlaybookRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.PLAYBOOKS,\n FrameworkKnowledgePlaybookRegistryEntry\n>;\n\nexport type FrameworkKnowledgeAssuranceAuthorityBasisRegistry = FrameworkKnowledgeRegistryBase<\n FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES,\n FrameworkKnowledgeAssuranceAuthorityBasisRegistryEntry\n>;\n\nexport interface FrameworkKnowledgeRegistryMap {\n [FrameworkKnowledgeRegistryName.SOURCE_TAGS]: FrameworkKnowledgeSourceTagRegistry;\n [FrameworkKnowledgeRegistryName.FRAMEWORK_TOPICS]: FrameworkKnowledgeTopicRegistry;\n [FrameworkKnowledgeRegistryName.PLAYBOOKS]: FrameworkKnowledgePlaybookRegistry;\n [FrameworkKnowledgeRegistryName.ASSURANCE_AUTHORITY_BASES]: FrameworkKnowledgeAssuranceAuthorityBasisRegistry;\n}\n\nexport type FrameworkKnowledgeRegistry = FrameworkKnowledgeRegistryMap[FrameworkKnowledgeRegistryName];\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical native declaration for topic 7 — the app-wide assemble/verify step.
|
|
3
|
+
*
|
|
4
|
+
* REBUILT rather than restored (issue #147). A playbook of this ref existed from
|
|
5
|
+
* 2026-07-10 and was deleted on 2026-08-25 with the app-creation digest
|
|
6
|
+
* demolition; the question it asked went with it, even though answering "does
|
|
7
|
+
* the built application assemble?" needs no digests. Restoring it verbatim was
|
|
8
|
+
* rejected: it declared the retired `COMPOSITE` executor, depended on two
|
|
9
|
+
* families the demolition removed (`foundation-manifest`, `build-verification`),
|
|
10
|
+
* and its method was explicit that NONE of its checks were actually run by the
|
|
11
|
+
* runner — `// TODO CLI COMMAND:` placeholders and "companion affordances that
|
|
12
|
+
* do not exist yet".
|
|
13
|
+
*
|
|
14
|
+
* What is different now is that the checks RUN. `DETERMINISTIC_CLI` is honoured
|
|
15
|
+
* by the runtime as of #147, and the check refs below resolve through the same
|
|
16
|
+
* closed `APPLICATION_CODING_TASK_VERIFICATION_CATALOG` a coding task uses, so
|
|
17
|
+
* an unknown ref is refused rather than silently skipped.
|
|
18
|
+
*/
|
|
19
|
+
export declare const playbookDefinition: {
|
|
20
|
+
readonly ref: "bottom_up.assemble-verify";
|
|
21
|
+
readonly version: "0.2.0";
|
|
22
|
+
readonly phase: "bottom_up";
|
|
23
|
+
readonly intent: "Bottom-up assemble & verify — the FINAL bottom-up step and the capstone of the build: the pivot from having BUILT the application (the decompose / dispatch / scale loop authored its modules, resources, config and integrations) to answering ONE mechanical question — does the built application ASSEMBLE? It runs the deterministic verification set over the application's four workspace packages (specifications, shared-lib, backend-api, frontend) OUTSIDE any coding agent, and reports a per-check outcome. It fixes NOTHING: a failure is surfaced for a refinement re-dispatch, which is a different playbook's job, and it authors no schemas and writes no code. Deliberately DISTINCT from the refinement phase's coverage audit, which also binds topic 7 but asks a SEMANTIC question (does the built app match the intent — specs diffed against introspected reality). This playbook never diffs intent against reality; if you are judging coverage you are in the refinement lane. Scope honesty for v0.2: the check set is the whole-application TYPECHECK across the four packages — the question 'does it compile as one program', which no per-task check can answer because the dispatch lane typechecks only the package a task mutated. A boot probe, the whole test suite, `wildo config validate` and OpenAPI/docs regeneration are NOT in this set: each needs a running stack or a companion affordance that does not exist, and declaring them here without running them is exactly what made the deleted version of this playbook inert.";
|
|
24
|
+
readonly functionalTopics: readonly ["assemble_verify_and_iterate"];
|
|
25
|
+
readonly preconditions: readonly [{
|
|
26
|
+
readonly kind: "artifact_exists";
|
|
27
|
+
readonly selector: {
|
|
28
|
+
readonly family: "build-plan";
|
|
29
|
+
};
|
|
30
|
+
}];
|
|
31
|
+
readonly inputs: readonly [{
|
|
32
|
+
readonly family: "build-plan";
|
|
33
|
+
}];
|
|
34
|
+
readonly outputs: readonly [];
|
|
35
|
+
readonly method: {
|
|
36
|
+
readonly skillRefs: readonly ["journey-status", "journey-report", "journey-approve"];
|
|
37
|
+
};
|
|
38
|
+
readonly executor: "deterministic_cli";
|
|
39
|
+
readonly approval: "approve_result";
|
|
40
|
+
readonly budget: {
|
|
41
|
+
readonly maxRuns: 40;
|
|
42
|
+
readonly maxDurationMs: 3600000;
|
|
43
|
+
};
|
|
44
|
+
readonly onFailure: "keep_and_flag";
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=playbook.definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playbook.definition.d.ts","sourceRoot":"","sources":["../../../../../src/playbooks/bottom_up.assemble-verify/playbook.definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCrB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical native declaration for topic 7 — the app-wide assemble/verify step.
|
|
3
|
+
*
|
|
4
|
+
* REBUILT rather than restored (issue #147). A playbook of this ref existed from
|
|
5
|
+
* 2026-07-10 and was deleted on 2026-08-25 with the app-creation digest
|
|
6
|
+
* demolition; the question it asked went with it, even though answering "does
|
|
7
|
+
* the built application assemble?" needs no digests. Restoring it verbatim was
|
|
8
|
+
* rejected: it declared the retired `COMPOSITE` executor, depended on two
|
|
9
|
+
* families the demolition removed (`foundation-manifest`, `build-verification`),
|
|
10
|
+
* and its method was explicit that NONE of its checks were actually run by the
|
|
11
|
+
* runner — `// TODO CLI COMMAND:` placeholders and "companion affordances that
|
|
12
|
+
* do not exist yet".
|
|
13
|
+
*
|
|
14
|
+
* What is different now is that the checks RUN. `DETERMINISTIC_CLI` is honoured
|
|
15
|
+
* by the runtime as of #147, and the check refs below resolve through the same
|
|
16
|
+
* closed `APPLICATION_CODING_TASK_VERIFICATION_CATALOG` a coding task uses, so
|
|
17
|
+
* an unknown ref is refused rather than silently skipped.
|
|
18
|
+
*/
|
|
19
|
+
export const playbookDefinition = {
|
|
20
|
+
"ref": "bottom_up.assemble-verify",
|
|
21
|
+
"version": "0.2.0",
|
|
22
|
+
"phase": "bottom_up",
|
|
23
|
+
"intent": "Bottom-up assemble & verify — the FINAL bottom-up step and the capstone of the build: the pivot from having BUILT the application (the decompose / dispatch / scale loop authored its modules, resources, config and integrations) to answering ONE mechanical question — does the built application ASSEMBLE? It runs the deterministic verification set over the application's four workspace packages (specifications, shared-lib, backend-api, frontend) OUTSIDE any coding agent, and reports a per-check outcome. It fixes NOTHING: a failure is surfaced for a refinement re-dispatch, which is a different playbook's job, and it authors no schemas and writes no code. Deliberately DISTINCT from the refinement phase's coverage audit, which also binds topic 7 but asks a SEMANTIC question (does the built app match the intent — specs diffed against introspected reality). This playbook never diffs intent against reality; if you are judging coverage you are in the refinement lane. Scope honesty for v0.2: the check set is the whole-application TYPECHECK across the four packages — the question 'does it compile as one program', which no per-task check can answer because the dispatch lane typechecks only the package a task mutated. A boot probe, the whole test suite, `wildo config validate` and OpenAPI/docs regeneration are NOT in this set: each needs a running stack or a companion affordance that does not exist, and declaring them here without running them is exactly what made the deleted version of this playbook inert.",
|
|
24
|
+
"functionalTopics": ["assemble_verify_and_iterate"],
|
|
25
|
+
"preconditions": [
|
|
26
|
+
{ "kind": "artifact_exists", "selector": { "family": "build-plan" } }
|
|
27
|
+
],
|
|
28
|
+
"inputs": [
|
|
29
|
+
{ "family": "build-plan" }
|
|
30
|
+
],
|
|
31
|
+
"outputs": [],
|
|
32
|
+
"method": {
|
|
33
|
+
"skillRefs": [
|
|
34
|
+
"journey-status",
|
|
35
|
+
"journey-report",
|
|
36
|
+
"journey-approve"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"executor": "deterministic_cli",
|
|
40
|
+
"approval": "approve_result",
|
|
41
|
+
/*
|
|
42
|
+
* Token and model-call ceilings are OMITTED, not zeroed.
|
|
43
|
+
*
|
|
44
|
+
* Every field here is optional, and this tier makes no model calls at all — it runs typechecks in
|
|
45
|
+
* a subprocess. Declaring `maxModelCalls: 0` is rejected by the schema (positive only), and
|
|
46
|
+
* declaring `1` to satisfy it would state a ceiling nobody chose for a resource that is never
|
|
47
|
+
* consumed. What IS bounded is wall-clock and how many times the step may run.
|
|
48
|
+
*/
|
|
49
|
+
"budget": {
|
|
50
|
+
"maxRuns": 40,
|
|
51
|
+
"maxDurationMs": 3600000
|
|
52
|
+
},
|
|
53
|
+
"onFailure": "keep_and_flag",
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=playbook.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playbook.definition.js","sourceRoot":"","sources":["../../../../../src/playbooks/bottom_up.assemble-verify/playbook.definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC/B;IACE,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,8+CAA8+C;IACx/C,kBAAkB,EAAE,CAAC,6BAA6B,CAAC;IACnD,eAAe,EAAE;QACf,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE;KACtE;IACD,QAAQ,EAAE;QACR,EAAE,QAAQ,EAAE,YAAY,EAAE;KAC3B;IACD,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,gBAAgB;YAChB,gBAAgB;YAChB,iBAAiB;SAClB;KACF;IACD,UAAU,EAAE,mBAAmB;IAC/B,UAAU,EAAE,gBAAgB;IAC5B;;;;;;;OAOG;IACH,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,OAAO;KACzB;IACD,WAAW,EAAE,eAAe;CACpB,CAAC","sourcesContent":["/**\n * Canonical native declaration for topic 7 — the app-wide assemble/verify step.\n *\n * REBUILT rather than restored (issue #147). A playbook of this ref existed from\n * 2026-07-10 and was deleted on 2026-08-25 with the app-creation digest\n * demolition; the question it asked went with it, even though answering \"does\n * the built application assemble?\" needs no digests. Restoring it verbatim was\n * rejected: it declared the retired `COMPOSITE` executor, depended on two\n * families the demolition removed (`foundation-manifest`, `build-verification`),\n * and its method was explicit that NONE of its checks were actually run by the\n * runner — `// TODO CLI COMMAND:` placeholders and \"companion affordances that\n * do not exist yet\".\n *\n * What is different now is that the checks RUN. `DETERMINISTIC_CLI` is honoured\n * by the runtime as of #147, and the check refs below resolve through the same\n * closed `APPLICATION_CODING_TASK_VERIFICATION_CATALOG` a coding task uses, so\n * an unknown ref is refused rather than silently skipped.\n */\nexport const playbookDefinition =\n{\n \"ref\": \"bottom_up.assemble-verify\",\n \"version\": \"0.2.0\",\n \"phase\": \"bottom_up\",\n \"intent\": \"Bottom-up assemble & verify — the FINAL bottom-up step and the capstone of the build: the pivot from having BUILT the application (the decompose / dispatch / scale loop authored its modules, resources, config and integrations) to answering ONE mechanical question — does the built application ASSEMBLE? It runs the deterministic verification set over the application's four workspace packages (specifications, shared-lib, backend-api, frontend) OUTSIDE any coding agent, and reports a per-check outcome. It fixes NOTHING: a failure is surfaced for a refinement re-dispatch, which is a different playbook's job, and it authors no schemas and writes no code. Deliberately DISTINCT from the refinement phase's coverage audit, which also binds topic 7 but asks a SEMANTIC question (does the built app match the intent — specs diffed against introspected reality). This playbook never diffs intent against reality; if you are judging coverage you are in the refinement lane. Scope honesty for v0.2: the check set is the whole-application TYPECHECK across the four packages — the question 'does it compile as one program', which no per-task check can answer because the dispatch lane typechecks only the package a task mutated. A boot probe, the whole test suite, `wildo config validate` and OpenAPI/docs regeneration are NOT in this set: each needs a running stack or a companion affordance that does not exist, and declaring them here without running them is exactly what made the deleted version of this playbook inert.\",\n \"functionalTopics\": [\"assemble_verify_and_iterate\"],\n \"preconditions\": [\n { \"kind\": \"artifact_exists\", \"selector\": { \"family\": \"build-plan\" } }\n ],\n \"inputs\": [\n { \"family\": \"build-plan\" }\n ],\n \"outputs\": [],\n \"method\": {\n \"skillRefs\": [\n \"journey-status\",\n \"journey-report\",\n \"journey-approve\"\n ]\n },\n \"executor\": \"deterministic_cli\",\n \"approval\": \"approve_result\",\n /*\n * Token and model-call ceilings are OMITTED, not zeroed.\n *\n * Every field here is optional, and this tier makes no model calls at all — it runs typechecks in\n * a subprocess. Declaring `maxModelCalls: 0` is rejected by the schema (positive only), and\n * declaring `1` to satisfy it would state a ceiling nobody chose for a resource that is never\n * consumed. What IS bounded is wall-clock and how many times the step may run.\n */\n \"budget\": {\n \"maxRuns\": 40,\n \"maxDurationMs\": 3600000\n },\n \"onFailure\": \"keep_and_flag\",\n} as const;\n"]}
|
|
@@ -9,14 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const playbookDefinition: {
|
|
11
11
|
readonly ref: "bottom_up.build-decompose";
|
|
12
|
-
readonly version: "0.
|
|
12
|
+
readonly version: "0.2.0";
|
|
13
13
|
readonly phase: "bottom_up";
|
|
14
14
|
readonly intent: "Bottom-up build decomposition — the FIRST build-execution playbook, the pivot from planning the domain (the domain-plan) to decomposing the BUILD. Reads the approved domain-plan (the ModuleBusinessSemantics module drafts + per-module resource inventory), the relationship drafts inside it (the inter-resource relationship intents), and the definition set (roadmap for phasing, requirements + feature-drafts for task-brief context), and the PLACEMENT PLAN (where each settings destination, resource operation and view sits in the shell, decided upstream), and DECOMPOSES the build work into an ordered set of coding-agent tasks. Each task is bound onto (a) the 7-topic functional taxonomy (configure_application_foundation -> model_domain_graph -> define_interaction_semantics -> shape_user_experience -> extend_application -> connect_runtime_and_external_capabilities -> assemble_verify_and_iterate) and (b) the app-knowledge skill catalog (each task names the skill(s) that carry its technical HOW). The tasks follow the per-resource inner order (schema -> config -> ui-behavior -> spec, then operations / interaction semantics, then UX, then extensions, then integrations), with companion-owned generation steps (labels / i18n, email templates, seeds) interleaved at the points their inputs exist. This playbook PRODUCES the ordered task graph (a build-plan artifact); it does NOT dispatch tasks to coding agents (that is the dispatch-orchestration playbook downstream), does NOT capture change-sets / single-flight-lock / verify, and does NOT solve multi-agent scale or interleaving. It authors no schemas and generates no code. v1 scaffold methodology — a typed build-task-graph contract, a dependency-DAG solver, and a collection validator are a later depth phase, not here.";
|
|
15
15
|
readonly functionalTopics: readonly [];
|
|
16
16
|
readonly preconditions: readonly [{
|
|
17
|
-
readonly kind: "phase_is";
|
|
18
|
-
readonly phase: "bottom_up";
|
|
19
|
-
}, {
|
|
20
17
|
readonly kind: "artifact_exists";
|
|
21
18
|
readonly selector: {
|
|
22
19
|
readonly family: "domain-plan";
|
|
@@ -32,6 +29,9 @@ export declare const playbookDefinition: {
|
|
|
32
29
|
readonly family: "feature-drafts";
|
|
33
30
|
}, {
|
|
34
31
|
readonly family: "placement-plan";
|
|
32
|
+
}, {
|
|
33
|
+
readonly family: "vision-brief";
|
|
34
|
+
readonly "//": "Carries the landed COMPLIANCE POSTURE and constraints. Measured 2026-09-04 (#309): without this input the decomposer, given a landed GDPR/ePrivacy posture, produced ZERO posture-derived tasks — the obligations lived in a family the brief never carried. No intent slice: the posture must arrive whole.";
|
|
35
35
|
}];
|
|
36
36
|
readonly outputs: readonly [{
|
|
37
37
|
readonly family: "build-plan";
|
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export const playbookDefinition = {
|
|
11
11
|
"ref": "bottom_up.build-decompose",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.2.0",
|
|
13
13
|
"phase": "bottom_up",
|
|
14
14
|
"intent": "Bottom-up build decomposition — the FIRST build-execution playbook, the pivot from planning the domain (the domain-plan) to decomposing the BUILD. Reads the approved domain-plan (the ModuleBusinessSemantics module drafts + per-module resource inventory), the relationship drafts inside it (the inter-resource relationship intents), and the definition set (roadmap for phasing, requirements + feature-drafts for task-brief context), and the PLACEMENT PLAN (where each settings destination, resource operation and view sits in the shell, decided upstream), and DECOMPOSES the build work into an ordered set of coding-agent tasks. Each task is bound onto (a) the 7-topic functional taxonomy (configure_application_foundation -> model_domain_graph -> define_interaction_semantics -> shape_user_experience -> extend_application -> connect_runtime_and_external_capabilities -> assemble_verify_and_iterate) and (b) the app-knowledge skill catalog (each task names the skill(s) that carry its technical HOW). The tasks follow the per-resource inner order (schema -> config -> ui-behavior -> spec, then operations / interaction semantics, then UX, then extensions, then integrations), with companion-owned generation steps (labels / i18n, email templates, seeds) interleaved at the points their inputs exist. This playbook PRODUCES the ordered task graph (a build-plan artifact); it does NOT dispatch tasks to coding agents (that is the dispatch-orchestration playbook downstream), does NOT capture change-sets / single-flight-lock / verify, and does NOT solve multi-agent scale or interleaving. It authors no schemas and generates no code. v1 scaffold methodology — a typed build-task-graph contract, a dependency-DAG solver, and a collection validator are a later depth phase, not here.",
|
|
15
15
|
"functionalTopics": [],
|
|
16
16
|
"preconditions": [
|
|
17
|
-
{ "kind": "phase_is", "phase": "bottom_up" },
|
|
18
17
|
{ "kind": "artifact_exists", "selector": { "family": "domain-plan" } }
|
|
19
18
|
],
|
|
20
19
|
"inputs": [
|
|
@@ -22,7 +21,8 @@ export const playbookDefinition = {
|
|
|
22
21
|
{ "family": "roadmap" },
|
|
23
22
|
{ "family": "requirements" },
|
|
24
23
|
{ "family": "feature-drafts" },
|
|
25
|
-
{ "family": "placement-plan" }
|
|
24
|
+
{ "family": "placement-plan" },
|
|
25
|
+
{ "family": "vision-brief", "//": "Carries the landed COMPLIANCE POSTURE and constraints. Measured 2026-09-04 (#309): without this input the decomposer, given a landed GDPR/ePrivacy posture, produced ZERO posture-derived tasks — the obligations lived in a family the brief never carried. No intent slice: the posture must arrive whole." }
|
|
26
26
|
],
|
|
27
27
|
"outputs": [
|
|
28
28
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook.definition.js","sourceRoot":"","sources":["../../../../../src/playbooks/bottom_up.build-decompose/playbook.definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC/B;IACE,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,qvDAAqvD;IAC/vD,kBAAkB,EAAE,EAAE;IACtB,eAAe,EAAE;QACf,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"playbook.definition.js","sourceRoot":"","sources":["../../../../../src/playbooks/bottom_up.build-decompose/playbook.definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC/B;IACE,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,qvDAAqvD;IAC/vD,kBAAkB,EAAE,EAAE;IACtB,eAAe,EAAE;QACf,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE;KACvE;IACD,QAAQ,EAAE;QACR,EAAE,QAAQ,EAAE,aAAa,EAAE;QAC3B,EAAE,QAAQ,EAAE,SAAS,EAAE;QACvB,EAAE,QAAQ,EAAE,cAAc,EAAE;QAC5B,EAAE,QAAQ,EAAE,gBAAgB,EAAE;QAC9B,EAAE,QAAQ,EAAE,gBAAgB,EAAE;QAC9B,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,8SAA8S,EAAE;KACnV;IACD,SAAS,EAAE;QACT;YACE,QAAQ,EAAE,YAAY;YACtB,WAAW,EAAE,wCAAwC;YACrD,aAAa,EAAE,6iFAA6iF;SAC7jF;KACF;IACD,QAAQ,EAAE;QACR,kBAAkB,EAAE,gfAAgf;QACpgB,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,eAAe,CAAC;QACtD,WAAW,EAAE;YACX,gBAAgB;YAChB,qBAAqB;YACrB,uBAAuB;YACvB,2BAA2B;YAC3B,wBAAwB;YACxB,sBAAsB;YACtB,sBAAsB;YACtB,sBAAsB;YACtB,qBAAqB;SACtB;KACF;IACD,UAAU,EAAE,iBAAiB;IAC7B,UAAU,EAAE,gBAAgB;IAC5B,QAAQ,EAAE;QACR,SAAS,EAAE,CAAC;KACb;IACD,WAAW,EAAE,eAAe;CACpB,CAAC","sourcesContent":["/**\n * Canonical native declaration for this reusable application-creation method.\n *\n * The structured method remains intentionally rich: its intent, inputs, output\n * contracts, elicitation, deterministic verification and skill routing are the\n * application knowledge a later generic assessment loop composes. This source\n * intentionally omits the superseded per-playbook evaluation-treatment object;\n * generation records that absence rather than fabricating legacy judge behavior.\n */\nexport const playbookDefinition =\n{\n \"ref\": \"bottom_up.build-decompose\",\n \"version\": \"0.2.0\",\n \"phase\": \"bottom_up\",\n \"intent\": \"Bottom-up build decomposition — the FIRST build-execution playbook, the pivot from planning the domain (the domain-plan) to decomposing the BUILD. Reads the approved domain-plan (the ModuleBusinessSemantics module drafts + per-module resource inventory), the relationship drafts inside it (the inter-resource relationship intents), and the definition set (roadmap for phasing, requirements + feature-drafts for task-brief context), and the PLACEMENT PLAN (where each settings destination, resource operation and view sits in the shell, decided upstream), and DECOMPOSES the build work into an ordered set of coding-agent tasks. Each task is bound onto (a) the 7-topic functional taxonomy (configure_application_foundation -> model_domain_graph -> define_interaction_semantics -> shape_user_experience -> extend_application -> connect_runtime_and_external_capabilities -> assemble_verify_and_iterate) and (b) the app-knowledge skill catalog (each task names the skill(s) that carry its technical HOW). The tasks follow the per-resource inner order (schema -> config -> ui-behavior -> spec, then operations / interaction semantics, then UX, then extensions, then integrations), with companion-owned generation steps (labels / i18n, email templates, seeds) interleaved at the points their inputs exist. This playbook PRODUCES the ordered task graph (a build-plan artifact); it does NOT dispatch tasks to coding agents (that is the dispatch-orchestration playbook downstream), does NOT capture change-sets / single-flight-lock / verify, and does NOT solve multi-agent scale or interleaving. It authors no schemas and generates no code. v1 scaffold methodology — a typed build-task-graph contract, a dependency-DAG solver, and a collection validator are a later depth phase, not here.\",\n \"functionalTopics\": [],\n \"preconditions\": [\n { \"kind\": \"artifact_exists\", \"selector\": { \"family\": \"domain-plan\" } }\n ],\n \"inputs\": [\n { \"family\": \"domain-plan\" },\n { \"family\": \"roadmap\" },\n { \"family\": \"requirements\" },\n { \"family\": \"feature-drafts\" },\n { \"family\": \"placement-plan\" },\n { \"family\": \"vision-brief\", \"//\": \"Carries the landed COMPLIANCE POSTURE and constraints. Measured 2026-09-04 (#309): without this input the decomposer, given a landed GDPR/ePrivacy posture, produced ZERO posture-derived tasks — the obligations lived in a family the brief never carried. No intent slice: the posture must arrive whole.\" }\n ],\n \"outputs\": [\n {\n \"family\": \"build-plan\",\n \"schemaRef\": \"saas-specifications:BuildPlanTaskGraph\",\n \"description\": \"The build decomposition — an ORDERED set of coding-agent build tasks (a task graph) that turns the approved domain plan into a sequence of buildable units. Each task carries: a stable task ref, the target it builds (a module, a resource + one of its build stages, a relationship, a companion-generation step, a shell-surface placement config), the ONE functional topic it belongs to (a real MetaWorkflow_FunctionalTopic value), the skill(s) that carry its technical HOW (real folders from the app-knowledge skill catalog, resolved via the skills router), and its ordering intent (which tasks must precede it — expressed as prose prerequisite references, NOT a solved DAG). The ordering respects two axes: (a) the cross-app topic dependency edges (model_domain_graph before define_interaction_semantics before app-level shape_user_experience before extend_application before connect_runtime_and_external_capabilities; foundation and assemble/verify are owned by sibling playbooks) and (b) the per-resource stage sequence schema -> config -> ui-behavior -> spec — which deliberately CROSSES topics (ui-behavior is shape_user_experience; the spec is a model_domain_graph documentation capstone ordered last) and so is not monotonic on axis (a); a roadmap-driven MVP-first preference breaks ties within a band. TYPED since the flexible-intelligence Block 3: the `_core` build-task-graph contract (`BuildPlanTaskGraph` — `tasks[]` with a stable `taskRef`, a closed `BuildPlanTaskTargetKind` target (MODULE / RESOURCE_STAGE / RELATIONSHIP / COMPANION_GENERATION_STEP / SHELL_PLACEMENT), exactly one `functionalTopic`, `skillRefs`, DECLARED `prerequisiteTaskRefs` the host resolves for readiness, and traceability `servesRefs`) is the family schema; the provider answers the strict `BuildPlanTaskGraphGeneration` shape and the trusted runtime stamps refs and version. The task never carries paths, commands, prompts or runtime controls — the dispatch host derives mutation scope and verification from the target kind. `validateBuildPlanTaskGraph` is the deterministic validator (prerequisite cycles are a hard floor; a resource stage without its predecessor stage is an authoring warning); the coherence reviewer checklist (`build-plan-coherent`, in the method) remains the semantic check and the creator's approve_result review the trust floor. Consumed by the bottom-up DISPATCH-ORCHESTRATION playbook (which single-flight-dispatches each task through the coding-agent contract) and the SCALE playbook (which parallelises + interleaves the companion generation steps) — both downstream of this decomposition.\"\n }\n ],\n \"method\": {\n \"//contextSources\": \"WORKSPACE_TRUTH — this playbook plans against CODE, not against definition artifacts: it needs real module ids and per-resource present schema fields, or it invents ids that do not resolve and every task it emits fails at dispatch. SKILL_CATALOG — its method routes THROUGH the skills router and binds every emitted task to a skill folder, so it must choose from the real set; measured 2026-08-27 it was choosing from recall, and a dangling skill ref is a task the dispatch playbook cannot run.\",\n \"contextSources\": [\"workspace_truth\", \"skill_catalog\"],\n \"skillRefs\": [\n \"journey-status\",\n \"resource-add-module\",\n \"resource-add-resource\",\n \"resource-schema-authoring\",\n \"resource-config-wiring\",\n \"resource-ui-behavior\",\n \"spec-resource-update\",\n \"module-relationships\",\n \"module-registration\"\n ]\n },\n \"executor\": \"companion_agent\",\n \"approval\": \"approve_result\",\n \"budget\": {\n \"maxRuns\": 3\n },\n \"onFailure\": \"keep_and_flag\"\n} as const;\n"]}
|
|
@@ -17,9 +17,6 @@ export declare const playbookDefinition: {
|
|
|
17
17
|
readonly intent: "Bottom-up build dispatch — the SECOND build-execution playbook, the pivot from DECOMPOSING the build (the build-plan task graph) to DISPATCHING it: turning one ordered task into an actually-run, verified coding-agent run under the D4 dispatch contract. Reads the approved TYPED build-plan (`BuildPlanTaskGraph` — each task carries a closed target kind, ONE MetaWorkflow_FunctionalTopic, its skill refs, and DECLARED prerequisite task refs) and the current journey state, selects the NEXT READY task (`selectReadyBuildPlanTasks`: every declared prerequisite has landed — resolved by the host, never inferred from prose; SINGLE-FLIGHT — exactly ONE workspace-mutating run at a time), and dispatches exactly that typed task: (1) the runner builds the context pack (task brief + the task's skill pointers + the relevant journey/definition artifacts + introspected app reality + repo paths); (2) it runs ONE prompt turn against the coding agent over the Agent Client Protocol, in a session rooted at the app workspace (cwd = app root, so CLAUDE.md / .claude skills load naturally), answering the agent's permission requests within the execution profile's declared ceiling and refusing anything above it or outside the task's mutation scope; (3) it captures the change-set around the run (git baseline/post-run worktree snapshots → per-file attribution → a structured GitChangeSetCapture recorded on the task row); (4) it runs the VERIFY gate OUTSIDE the coding agent (a deterministic typecheck the runner maps onto the dispatch verification hook — pnpm exec tsc --noEmit — the trust-but-verify floor); (5) it records the result + applies the onFailure disposition (keep_and_flag: a failed/timed-out run keeps its captured change-set flagged for human triage, never a silent half-applied state). Then loop to the next ready task. This playbook PRODUCES the per-task dispatch contract + execution semantics; it authors no schemas and generates no code (the coding agent does that at dispatch time). It does NOT decompose the plan (that is the build-decompose playbook, upstream — it owns the task graph) and does NOT solve multi-agent SCALE — parallelism across several coding agents, the concurrency schedule, and interleaving the companion generation steps at scale are the downstream scale playbook. v1 scaffold: the single-flight dispatch contract; multi-agent parallelism, a run-completion serializer, and a revert_changeset failure path are later phases (revert is a MUTATING git op outside the read-only change-set carve-out, deliberately deferred).";
|
|
18
18
|
readonly functionalTopics: readonly [];
|
|
19
19
|
readonly preconditions: readonly [{
|
|
20
|
-
readonly kind: "phase_is";
|
|
21
|
-
readonly phase: "bottom_up";
|
|
22
|
-
}, {
|
|
23
20
|
readonly kind: "artifact_exists";
|
|
24
21
|
readonly selector: {
|
|
25
22
|
readonly family: "build-plan";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook.definition.d.ts","sourceRoot":"","sources":["../../../../../src/playbooks/bottom_up.build-dispatch/playbook.definition.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oCAAoC,EACpC,kCAAkC,EAClC,wCAAwC,EACxC,+BAA+B,EAC/B,gCAAgC,EAChC,sCAAsC,EACtC,0CAA0C,EAC1C,6CAA6C,EAC7C,8BAA8B,EAC9B,oCAAoC,EACpC,6BAA6B,EAC9B,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"playbook.definition.d.ts","sourceRoot":"","sources":["../../../../../src/playbooks/bottom_up.build-dispatch/playbook.definition.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oCAAoC,EACpC,kCAAkC,EAClC,wCAAwC,EACxC,+BAA+B,EAC/B,gCAAgC,EAChC,sCAAsC,EACtC,0CAA0C,EAC1C,6CAA6C,EAC7C,8BAA8B,EAC9B,oCAAoC,EACpC,6BAA6B,EAC9B,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCrB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKW,CAAC"}
|
|
@@ -17,7 +17,6 @@ export const playbookDefinition = {
|
|
|
17
17
|
"intent": "Bottom-up build dispatch — the SECOND build-execution playbook, the pivot from DECOMPOSING the build (the build-plan task graph) to DISPATCHING it: turning one ordered task into an actually-run, verified coding-agent run under the D4 dispatch contract. Reads the approved TYPED build-plan (`BuildPlanTaskGraph` — each task carries a closed target kind, ONE MetaWorkflow_FunctionalTopic, its skill refs, and DECLARED prerequisite task refs) and the current journey state, selects the NEXT READY task (`selectReadyBuildPlanTasks`: every declared prerequisite has landed — resolved by the host, never inferred from prose; SINGLE-FLIGHT — exactly ONE workspace-mutating run at a time), and dispatches exactly that typed task: (1) the runner builds the context pack (task brief + the task's skill pointers + the relevant journey/definition artifacts + introspected app reality + repo paths); (2) it runs ONE prompt turn against the coding agent over the Agent Client Protocol, in a session rooted at the app workspace (cwd = app root, so CLAUDE.md / .claude skills load naturally), answering the agent's permission requests within the execution profile's declared ceiling and refusing anything above it or outside the task's mutation scope; (3) it captures the change-set around the run (git baseline/post-run worktree snapshots → per-file attribution → a structured GitChangeSetCapture recorded on the task row); (4) it runs the VERIFY gate OUTSIDE the coding agent (a deterministic typecheck the runner maps onto the dispatch verification hook — pnpm exec tsc --noEmit — the trust-but-verify floor); (5) it records the result + applies the onFailure disposition (keep_and_flag: a failed/timed-out run keeps its captured change-set flagged for human triage, never a silent half-applied state). Then loop to the next ready task. This playbook PRODUCES the per-task dispatch contract + execution semantics; it authors no schemas and generates no code (the coding agent does that at dispatch time). It does NOT decompose the plan (that is the build-decompose playbook, upstream — it owns the task graph) and does NOT solve multi-agent SCALE — parallelism across several coding agents, the concurrency schedule, and interleaving the companion generation steps at scale are the downstream scale playbook. v1 scaffold: the single-flight dispatch contract; multi-agent parallelism, a run-completion serializer, and a revert_changeset failure path are later phases (revert is a MUTATING git op outside the read-only change-set carve-out, deliberately deferred).",
|
|
18
18
|
"functionalTopics": [],
|
|
19
19
|
"preconditions": [
|
|
20
|
-
{ "kind": "phase_is", "phase": "bottom_up" },
|
|
21
20
|
{ "kind": "artifact_exists", "selector": { "family": "build-plan" } }
|
|
22
21
|
],
|
|
23
22
|
"inputs": [
|