@acidicsoil/portable-capabilities 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +231 -0
  3. package/canonical/exceptions/antigravity-unsupported-primitives.yaml +16 -0
  4. package/canonical/exceptions/claude-code-unsupported-primitives.yaml +16 -0
  5. package/canonical/exceptions/codex-unsupported-primitives.yaml +16 -0
  6. package/canonical/exceptions/dcode-unsupported-primitives.yaml +16 -0
  7. package/canonical/exceptions/oh-my-pi-unsupported-primitives.yaml +16 -0
  8. package/canonical/exceptions/opencode-unsupported-primitives.yaml +16 -0
  9. package/canonical/exceptions/pi-unsupported-primitives.yaml +16 -0
  10. package/canonical/families/comparative-traceability.yaml +18 -0
  11. package/canonical/families/context-template-generation.yaml +18 -0
  12. package/canonical/families/corrective-transformation.yaml +18 -0
  13. package/canonical/families/exemplar-modeling.yaml +18 -0
  14. package/canonical/families/guardrails-evaluation.yaml +18 -0
  15. package/canonical/families/workflow-intent-abstraction.yaml +18 -0
  16. package/canonical/fixtures/runtime-primitive-matrix-112.json +1956 -0
  17. package/canonical/operations/compare.artifacts.yaml +22 -0
  18. package/canonical/operations/generation.render.yaml +22 -0
  19. package/canonical/operations/inference.classify.yaml +22 -0
  20. package/canonical/operations/ingest.sources.yaml +22 -0
  21. package/canonical/operations/normalize.artifacts.yaml +22 -0
  22. package/canonical/operations/patterns.extract.yaml +22 -0
  23. package/canonical/operations/segment.surfaces.yaml +22 -0
  24. package/canonical/operations/trace.build-evidence-ledger.yaml +22 -0
  25. package/canonical/operations/validation.contract.yaml +22 -0
  26. package/canonical/policies/evidence-policy.yaml +22 -0
  27. package/canonical/roles/acceptance-criteria-synthesis.yaml +84 -0
  28. package/canonical/roles/anti-pattern-inversion.yaml +83 -0
  29. package/canonical/roles/behavior-preserving-refactor.yaml +88 -0
  30. package/canonical/roles/canonical-exemplar-generalization.yaml +84 -0
  31. package/canonical/roles/constrained-exemplar-adaptation.yaml +85 -0
  32. package/canonical/roles/convention-mining.yaml +81 -0
  33. package/canonical/roles/conversation-to-specification.yaml +83 -0
  34. package/canonical/roles/delta-analysis.yaml +84 -0
  35. package/canonical/roles/domain-context-boundary.yaml +82 -0
  36. package/canonical/roles/evaluation-harness-design.yaml +86 -0
  37. package/canonical/roles/failure-to-guardrail.yaml +81 -0
  38. package/canonical/roles/multi-exemplar-consensus.yaml +81 -0
  39. package/canonical/roles/reference-trace-mapping.yaml +83 -0
  40. package/canonical/roles/reusable-workflow-abstraction.yaml +82 -0
  41. package/canonical/roles/structural-pattern-extraction.yaml +82 -0
  42. package/canonical/roles/template-family-generation.yaml +83 -0
  43. package/canonical/runtime-primitive-policy.yaml +100 -0
  44. package/canonical/runtime-profiles/antigravity.yaml +60 -0
  45. package/canonical/runtime-profiles/claude-code.yaml +65 -0
  46. package/canonical/runtime-profiles/codex.yaml +71 -0
  47. package/canonical/runtime-profiles/dcode.yaml +67 -0
  48. package/canonical/runtime-profiles/oh-my-pi.yaml +62 -0
  49. package/canonical/runtime-profiles/opencode.yaml +65 -0
  50. package/canonical/runtime-profiles/pi.yaml +66 -0
  51. package/canonical/schemas/acceptance-criteria-synthesis.output.schema.json +63 -0
  52. package/canonical/schemas/anti-pattern-inversion.output.schema.json +63 -0
  53. package/canonical/schemas/behavior-preserving-refactor.output.schema.json +63 -0
  54. package/canonical/schemas/canonical-exemplar-generalization.output.schema.json +63 -0
  55. package/canonical/schemas/constrained-exemplar-adaptation.output.schema.json +63 -0
  56. package/canonical/schemas/convention-mining.output.schema.json +63 -0
  57. package/canonical/schemas/conversation-to-specification.output.schema.json +63 -0
  58. package/canonical/schemas/delta-analysis.output.schema.json +63 -0
  59. package/canonical/schemas/domain-context-boundary.output.schema.json +63 -0
  60. package/canonical/schemas/evaluation-harness-design.output.schema.json +73 -0
  61. package/canonical/schemas/failure-to-guardrail.output.schema.json +63 -0
  62. package/canonical/schemas/multi-exemplar-consensus.output.schema.json +63 -0
  63. package/canonical/schemas/reference-trace-mapping.output.schema.json +63 -0
  64. package/canonical/schemas/reusable-workflow-abstraction.output.schema.json +73 -0
  65. package/canonical/schemas/structural-pattern-extraction.output.schema.json +63 -0
  66. package/canonical/schemas/template-family-generation.output.schema.json +63 -0
  67. package/canonical/taxonomy/analytical-capabilities.yaml +95 -0
  68. package/package.json +66 -0
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: compare.artifacts
3
+ version: 1.0.0
4
+ purpose: Compare artifacts and preserve material differences.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/compare.artifacts.output.schema.json
11
+ description: Structured output for compare.artifacts.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: generation.render
3
+ version: 1.0.0
4
+ purpose: Render structured analytical outputs.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/generation.render.output.schema.json
11
+ description: Structured output for generation.render.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: inference.classify
3
+ version: 1.0.0
4
+ purpose: Classify claims by evidential status.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/inference.classify.output.schema.json
11
+ description: Structured output for inference.classify.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: ingest.sources
3
+ version: 1.0.0
4
+ purpose: Load declared sources while preserving identity.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/ingest.sources.output.schema.json
11
+ description: Structured output for ingest.sources.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: normalize.artifacts
3
+ version: 1.0.0
4
+ purpose: Normalize source artifacts deterministically.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/normalize.artifacts.output.schema.json
11
+ description: Structured output for normalize.artifacts.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: patterns.extract
3
+ version: 1.0.0
4
+ purpose: Extract recurring structures and conventions.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/patterns.extract.output.schema.json
11
+ description: Structured output for patterns.extract.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: segment.surfaces
3
+ version: 1.0.0
4
+ purpose: Segment artifacts into addressable analytical surfaces.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/segment.surfaces.output.schema.json
11
+ description: Structured output for segment.surfaces.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: trace.build-evidence-ledger
3
+ version: 1.0.0
4
+ purpose: Build traceable material-claim evidence records.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/trace.build-evidence-ledger.output.schema.json
11
+ description: Structured output for trace.build-evidence-ledger.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ id: validation.contract
3
+ version: 1.0.0
4
+ purpose: Validate outputs against their contracts.
5
+ inputs:
6
+ - name: artifacts
7
+ description: Addressable source artifacts.
8
+ required: true
9
+ outputs:
10
+ - schema: canonical/schemas/validation.contract.output.schema.json
11
+ description: Structured output for validation.contract.
12
+ requiredBehavior:
13
+ - Preserve deterministic ordering and source identity.
14
+ forbiddenBehavior:
15
+ - Do not invent unsupported material claims.
16
+ traceability:
17
+ materialClaimsRequireSources: true
18
+ ledgerFormat: jsonl
19
+ artifacts: content-addressed
20
+ evaluation:
21
+ criteria:
22
+ - Output validates and remains reproducible.
@@ -0,0 +1,22 @@
1
+ schemaVersion: "1.0"
2
+ claimClasses:
3
+ - observed
4
+ - derived
5
+ - inferred
6
+ - recommended
7
+ - unresolved
8
+ precedence:
9
+ - sourceClass: explicit-contract
10
+ rank: 0
11
+ - sourceClass: observed-artifact
12
+ rank: 1
13
+ - sourceClass: inference
14
+ rank: 2
15
+ conflicts:
16
+ equalHighestRank: unresolved
17
+ noMatchingRule: unresolved
18
+ retainCounterevidence: true
19
+ storage:
20
+ ledgerFormat: jsonl
21
+ artifacts: content-addressed
22
+ digest: sha256
@@ -0,0 +1,84 @@
1
+ schemaVersion: '1.0'
2
+ id: acceptance-criteria-synthesis
3
+ purpose: Derive measurable acceptance criteria from intent and evidence.
4
+ family:
5
+ id: guardrails-evaluation
6
+ version: 1.0.0
7
+ taxonomy:
8
+ id: acceptance-criteria-synthesis
9
+ displayName: Acceptance Criteria Synthesis
10
+ transformation: Derive measurable acceptance criteria from intent and evidence.
11
+ intendedOutput: Acceptance criteria set
12
+ inputs:
13
+ - name: intent-and-requirements
14
+ description: The intent, requirements, or obligations to be accepted.
15
+ required: true
16
+ - name: implementation-evidence
17
+ description: Evidence about the system or artifact under evaluation.
18
+ required: false
19
+ - name: quality-thresholds
20
+ description: Measurable thresholds and tolerances.
21
+ required: false
22
+ precedence:
23
+ - sourceClass: explicit-contract
24
+ rank: 0
25
+ - sourceClass: observed-artifact
26
+ rank: 1
27
+ - sourceClass: inference
28
+ rank: 2
29
+ pipeline:
30
+ - id: ingest.sources
31
+ version: 1.0.0
32
+ - id: trace.build-evidence-ledger
33
+ version: 1.0.0
34
+ - id: validation.contract
35
+ version: 1.0.0
36
+ output:
37
+ schema: canonical/schemas/acceptance-criteria-synthesis.output.schema.json
38
+ description: Acceptance criteria set
39
+ requiredBehavior:
40
+ - 'activation: Use acceptance-criteria-synthesis only when the requested outcome requires this transformation: Derive
41
+ measurable acceptance criteria from intent and evidence.'
42
+ - 'sufficiency: Require all role inputs marked required and enough evidence to complete these gates: Every obligation
43
+ maps to at least one unambiguous criterion, each criterion names evidence and pass/fail conditions, and coverage
44
+ gaps are explicit.'
45
+ - 'conflict: Apply declared source precedence; when equally authoritative evidence changes the decision, preserve
46
+ both positions and return the affected output field as unresolved.'
47
+ - 'ambiguity: Isolate ambiguous terms or boundaries, show which stage and output fields they affect, and request
48
+ clarification rather than selecting an unsupported interpretation.'
49
+ - 'abstention: Abstain from acceptance-criteria-synthesis when required inputs are absent, the decision rule cannot
50
+ be applied, or evidence cannot satisfy the completion gate.'
51
+ - 'stop: Stop before emitting Acceptance criteria set unless Every obligation maps to at least one unambiguous criterion,
52
+ each criterion names evidence and pass/fail conditions, and coverage gaps are explicit.'
53
+ - 'resources: Load requirements, governing contracts, implementation evidence, and measurement standards; load examples
54
+ only to clarify boundary conditions.'
55
+ - 'transformation: Execute the ordered analytical procedure: 1) decompose intent into observable obligations; 2)
56
+ identify success failure boundary and edge conditions; 3) write measurable criteria with evidence and threshold
57
+ requirements; 4) check completeness ambiguity independence and testability.'
58
+ - 'output: Populate and validate canonical/schemas/acceptance-criteria-synthesis.output.schema.json with required
59
+ fields criteria, evidenceRequirements, thresholds, failureConditions, coverageMap; do not replace missing fields
60
+ with prose.'
61
+ - 'traceability: Link every material output field to source identifiers and the analytical stage or decision that
62
+ produced it; retain counterevidence for unresolved results.'
63
+ - 'evaluation: Pass only when the output schema validates, the ordered stages are evidenced, the role decision rule
64
+ was applied, and this completion gate holds: Every obligation maps to at least one unambiguous criterion, each
65
+ criterion names evidence and pass/fail conditions, and coverage gaps are explicit.'
66
+ forbiddenBehavior:
67
+ - Do not substitute generic analytical behavior for the role-specific acceptance-criteria-synthesis transformation.
68
+ - Do not skip, reorder, or silently collapse the role's declared analytical stages.
69
+ - Do not invent missing evidence, resolve authority conflicts by convenience, or emit a completed result after a
70
+ stop or abstention condition.
71
+ - Do not copy operation-owned ingestion, ledger, or schema-validation mechanics into the role contract.
72
+ traceability:
73
+ materialClaimsRequireSources: true
74
+ ledgerFormat: jsonl
75
+ artifacts: content-addressed
76
+ evaluation:
77
+ criteria:
78
+ - The authoritative transformation and intended output for acceptance-criteria-synthesis are preserved.
79
+ - 'Required inputs and the decision rule are satisfied: Accept a criterion only when an independent evaluator
80
+ can determine pass or fail from named evidence without inferring unstated intent.'
81
+ - 'The ordered analytical stages are evidenced and the output completion gate passes: Every obligation maps to
82
+ at least one unambiguous criterion, each criterion names evidence and pass/fail conditions, and coverage gaps
83
+ are explicit.'
84
+ - Conflict, ambiguity, insufficient-evidence, abstention, and stop behavior remain explicit and testable.
@@ -0,0 +1,83 @@
1
+ schemaVersion: '1.0'
2
+ id: anti-pattern-inversion
3
+ purpose: Invert documented anti-patterns into positive construction rules.
4
+ family:
5
+ id: corrective-transformation
6
+ version: 1.0.0
7
+ taxonomy:
8
+ id: anti-pattern-inversion
9
+ displayName: Anti-Pattern Inversion
10
+ transformation: Invert documented anti-patterns into positive construction rules.
11
+ intendedOutput: Corrective rule set
12
+ inputs:
13
+ - name: anti-pattern-catalog
14
+ description: Documented anti-patterns and failure examples.
15
+ required: true
16
+ - name: construction-context
17
+ description: The context in which positive rules will be applied.
18
+ required: true
19
+ - name: existing-controls
20
+ description: Existing rules or controls that may overlap.
21
+ required: false
22
+ precedence:
23
+ - sourceClass: explicit-contract
24
+ rank: 0
25
+ - sourceClass: observed-artifact
26
+ rank: 1
27
+ - sourceClass: inference
28
+ rank: 2
29
+ pipeline:
30
+ - id: ingest.sources
31
+ version: 1.0.0
32
+ - id: trace.build-evidence-ledger
33
+ version: 1.0.0
34
+ - id: validation.contract
35
+ version: 1.0.0
36
+ output:
37
+ schema: canonical/schemas/anti-pattern-inversion.output.schema.json
38
+ description: Corrective rule set
39
+ requiredBehavior:
40
+ - 'activation: Use anti-pattern-inversion only when the requested outcome requires this transformation: Invert documented
41
+ anti-patterns into positive construction rules.'
42
+ - 'sufficiency: Require all role inputs marked required and enough evidence to complete these gates: Every rule
43
+ traces to a harmful mechanism, passes original failure cases, and documents legitimate exceptions and overlap
44
+ with existing controls.'
45
+ - 'conflict: Apply declared source precedence; when equally authoritative evidence changes the decision, preserve
46
+ both positions and return the affected output field as unresolved.'
47
+ - 'ambiguity: Isolate ambiguous terms or boundaries, show which stage and output fields they affect, and request
48
+ clarification rather than selecting an unsupported interpretation.'
49
+ - 'abstention: Abstain from anti-pattern-inversion when required inputs are absent, the decision rule cannot be
50
+ applied, or evidence cannot satisfy the completion gate.'
51
+ - 'stop: Stop before emitting Corrective rule set unless Every rule traces to a harmful mechanism, passes original
52
+ failure cases, and documents legitimate exceptions and overlap with existing controls.'
53
+ - 'resources: Load anti-pattern evidence, construction context, existing controls, and exception examples; load
54
+ each failure trace to validate causal coverage.'
55
+ - 'transformation: Execute the ordered analytical procedure: 1) identify the harmful mechanism and triggering conditions;
56
+ 2) derive the positive invariant that prevents the mechanism; 3) translate the invariant into actionable construction
57
+ and review rules; 4) test rules against original failures and legitimate exceptions.'
58
+ - 'output: Populate and validate canonical/schemas/anti-pattern-inversion.output.schema.json with required fields
59
+ antiPatternMap, positiveRules, exceptions, verificationChecks, coverageEvidence; do not replace missing fields
60
+ with prose.'
61
+ - 'traceability: Link every material output field to source identifiers and the analytical stage or decision that
62
+ produced it; retain counterevidence for unresolved results.'
63
+ - 'evaluation: Pass only when the output schema validates, the ordered stages are evidenced, the role decision rule
64
+ was applied, and this completion gate holds: Every rule traces to a harmful mechanism, passes original failure
65
+ cases, and documents legitimate exceptions and overlap with existing controls.'
66
+ forbiddenBehavior:
67
+ - Do not substitute generic analytical behavior for the role-specific anti-pattern-inversion transformation.
68
+ - Do not skip, reorder, or silently collapse the role's declared analytical stages.
69
+ - Do not invent missing evidence, resolve authority conflicts by convenience, or emit a completed result after a
70
+ stop or abstention condition.
71
+ - Do not copy operation-owned ingestion, ledger, or schema-validation mechanics into the role contract.
72
+ traceability:
73
+ materialClaimsRequireSources: true
74
+ ledgerFormat: jsonl
75
+ artifacts: content-addressed
76
+ evaluation:
77
+ criteria:
78
+ - The authoritative transformation and intended output for anti-pattern-inversion are preserved.
79
+ - 'Required inputs and the decision rule are satisfied: Adopt a positive rule only when it blocks the harmful
80
+ mechanism without prohibiting documented legitimate behavior.'
81
+ - 'The ordered analytical stages are evidenced and the output completion gate passes: Every rule traces to a harmful
82
+ mechanism, passes original failure cases, and documents legitimate exceptions and overlap with existing controls.'
83
+ - Conflict, ambiguity, insufficient-evidence, abstention, and stop behavior remain explicit and testable.
@@ -0,0 +1,88 @@
1
+ schemaVersion: '1.0'
2
+ id: behavior-preserving-refactor
3
+ purpose: Transform structure while preserving observable behavior.
4
+ family:
5
+ id: corrective-transformation
6
+ version: 1.0.0
7
+ taxonomy:
8
+ id: behavior-preserving-refactor
9
+ displayName: Behavior-Preserving Refactor
10
+ transformation: Transform structure while preserving observable behavior.
11
+ intendedOutput: Refactored artifact with equivalence evidence
12
+ inputs:
13
+ - name: source-artifact
14
+ description: The artifact to restructure.
15
+ required: true
16
+ - name: behavior-contract
17
+ description: Observable behavior that must be preserved.
18
+ required: true
19
+ - name: refactor-goals
20
+ description: Structural goals and allowed change scope.
21
+ required: true
22
+ - name: equivalence-fixtures
23
+ description: Tests or traces used to prove equivalence.
24
+ required: true
25
+ precedence:
26
+ - sourceClass: explicit-contract
27
+ rank: 0
28
+ - sourceClass: observed-artifact
29
+ rank: 1
30
+ - sourceClass: inference
31
+ rank: 2
32
+ pipeline:
33
+ - id: ingest.sources
34
+ version: 1.0.0
35
+ - id: trace.build-evidence-ledger
36
+ version: 1.0.0
37
+ - id: validation.contract
38
+ version: 1.0.0
39
+ output:
40
+ schema: canonical/schemas/behavior-preserving-refactor.output.schema.json
41
+ description: Refactored artifact with equivalence evidence
42
+ requiredBehavior:
43
+ - 'activation: Use behavior-preserving-refactor only when the requested outcome requires this transformation: Transform
44
+ structure while preserving observable behavior.'
45
+ - 'sufficiency: Require all role inputs marked required and enough evidence to complete these gates: All affected
46
+ behavior passes equivalence checks, any difference is declared out of scope or rejected, and the structural goal
47
+ is demonstrably achieved.'
48
+ - 'conflict: Apply declared source precedence; when equally authoritative evidence changes the decision, preserve
49
+ both positions and return the affected output field as unresolved.'
50
+ - 'ambiguity: Isolate ambiguous terms or boundaries, show which stage and output fields they affect, and request
51
+ clarification rather than selecting an unsupported interpretation.'
52
+ - 'abstention: Abstain from behavior-preserving-refactor when required inputs are absent, the decision rule cannot
53
+ be applied, or evidence cannot satisfy the completion gate.'
54
+ - 'stop: Stop before emitting Refactored artifact with equivalence evidence unless All affected behavior passes
55
+ equivalence checks, any difference is declared out of scope or rejected, and the structural goal is demonstrably
56
+ achieved.'
57
+ - 'resources: Load the source artifact, behavior contract, baseline tests, execution traces, and refactor constraints;
58
+ run only read-safe analysis unless an explicit execution harness is provided.'
59
+ - 'transformation: Execute the ordered analytical procedure: 1) establish a pre-change behavioral baseline; 2) identify
60
+ structural changes that do not alter the behavior contract; 3) apply changes in reversible increments; 4) compare
61
+ outputs side effects and failure behavior against the baseline.'
62
+ - 'output: Populate and validate canonical/schemas/behavior-preserving-refactor.output.schema.json with required
63
+ fields refactoredArtifact, changeMap, equivalenceEvidence, behavioralDiffs, rollbackNotes; do not replace missing
64
+ fields with prose.'
65
+ - 'traceability: Link every material output field to source identifiers and the analytical stage or decision that
66
+ produced it; retain counterevidence for unresolved results.'
67
+ - 'evaluation: Pass only when the output schema validates, the ordered stages are evidenced, the role decision rule
68
+ was applied, and this completion gate holds: All affected behavior passes equivalence checks, any difference is
69
+ declared out of scope or rejected, and the structural goal is demonstrably achieved.'
70
+ forbiddenBehavior:
71
+ - Do not substitute generic analytical behavior for the role-specific behavior-preserving-refactor transformation.
72
+ - Do not skip, reorder, or silently collapse the role's declared analytical stages.
73
+ - Do not invent missing evidence, resolve authority conflicts by convenience, or emit a completed result after a
74
+ stop or abstention condition.
75
+ - Do not copy operation-owned ingestion, ledger, or schema-validation mechanics into the role contract.
76
+ traceability:
77
+ materialClaimsRequireSources: true
78
+ ledgerFormat: jsonl
79
+ artifacts: content-addressed
80
+ evaluation:
81
+ criteria:
82
+ - The authoritative transformation and intended output for behavior-preserving-refactor are preserved.
83
+ - 'Required inputs and the decision rule are satisfied: Permit a structural change only when equivalence evidence
84
+ covers affected behavior; classify intentional behavior changes outside this role.'
85
+ - 'The ordered analytical stages are evidenced and the output completion gate passes: All affected behavior passes
86
+ equivalence checks, any difference is declared out of scope or rejected, and the structural goal is demonstrably
87
+ achieved.'
88
+ - Conflict, ambiguity, insufficient-evidence, abstention, and stop behavior remain explicit and testable.
@@ -0,0 +1,84 @@
1
+ schemaVersion: '1.0'
2
+ id: canonical-exemplar-generalization
3
+ purpose: Transform concrete exemplars into a reusable canonical model.
4
+ family:
5
+ id: exemplar-modeling
6
+ version: 1.0.0
7
+ taxonomy:
8
+ id: canonical-exemplar-generalization
9
+ displayName: Canonical Exemplar Generalization
10
+ transformation: Transform concrete exemplars into a reusable canonical model.
11
+ intendedOutput: Canonical generalized model
12
+ inputs:
13
+ - name: exemplars
14
+ description: Representative concrete exemplars to generalize.
15
+ required: true
16
+ - name: variation-samples
17
+ description: Counterexamples or variants used to test generality.
18
+ required: true
19
+ - name: scope-constraints
20
+ description: Explicit boundaries the generalized model must respect.
21
+ required: false
22
+ precedence:
23
+ - sourceClass: explicit-contract
24
+ rank: 0
25
+ - sourceClass: observed-artifact
26
+ rank: 1
27
+ - sourceClass: inference
28
+ rank: 2
29
+ pipeline:
30
+ - id: ingest.sources
31
+ version: 1.0.0
32
+ - id: trace.build-evidence-ledger
33
+ version: 1.0.0
34
+ - id: validation.contract
35
+ version: 1.0.0
36
+ output:
37
+ schema: canonical/schemas/canonical-exemplar-generalization.output.schema.json
38
+ description: Canonical generalized model
39
+ requiredBehavior:
40
+ - 'activation: Use canonical-exemplar-generalization only when the requested outcome requires this transformation:
41
+ Transform concrete exemplars into a reusable canonical model.'
42
+ - 'sufficiency: Require all role inputs marked required and enough evidence to complete these gates: Every invariant
43
+ is supported by multiple exemplars, every variation point is bounded, and held-out variants are either covered
44
+ or explicitly excluded.'
45
+ - 'conflict: Apply declared source precedence; when equally authoritative evidence changes the decision, preserve
46
+ both positions and return the affected output field as unresolved.'
47
+ - 'ambiguity: Isolate ambiguous terms or boundaries, show which stage and output fields they affect, and request
48
+ clarification rather than selecting an unsupported interpretation.'
49
+ - 'abstention: Abstain from canonical-exemplar-generalization when required inputs are absent, the decision rule
50
+ cannot be applied, or evidence cannot satisfy the completion gate.'
51
+ - 'stop: Stop before emitting Canonical generalized model unless Every invariant is supported by multiple exemplars,
52
+ every variation point is bounded, and held-out variants are either covered or explicitly excluded.'
53
+ - 'resources: Load the exemplar corpus, scope constraints, and held-out variation set; load each only when it contributes
54
+ coverage or falsification evidence.'
55
+ - 'transformation: Execute the ordered analytical procedure: 1) inventory invariant and variable features across
56
+ exemplars; 2) separate essential structure from incidental detail; 3) propose the smallest reusable model covering
57
+ supported variation; 4) challenge the model against held-out variants and record exclusions.'
58
+ - 'output: Populate and validate canonical/schemas/canonical-exemplar-generalization.output.schema.json with required
59
+ fields model, invariants, variationPoints, excludedDetails, coverageEvidence; do not replace missing fields with
60
+ prose.'
61
+ - 'traceability: Link every material output field to source identifiers and the analytical stage or decision that
62
+ produced it; retain counterevidence for unresolved results.'
63
+ - 'evaluation: Pass only when the output schema validates, the ordered stages are evidenced, the role decision rule
64
+ was applied, and this completion gate holds: Every invariant is supported by multiple exemplars, every variation
65
+ point is bounded, and held-out variants are either covered or explicitly excluded.'
66
+ forbiddenBehavior:
67
+ - Do not substitute generic analytical behavior for the role-specific canonical-exemplar-generalization transformation.
68
+ - Do not skip, reorder, or silently collapse the role's declared analytical stages.
69
+ - Do not invent missing evidence, resolve authority conflicts by convenience, or emit a completed result after a
70
+ stop or abstention condition.
71
+ - Do not copy operation-owned ingestion, ledger, or schema-validation mechanics into the role contract.
72
+ traceability:
73
+ materialClaimsRequireSources: true
74
+ ledgerFormat: jsonl
75
+ artifacts: content-addressed
76
+ evaluation:
77
+ criteria:
78
+ - The authoritative transformation and intended output for canonical-exemplar-generalization are preserved.
79
+ - 'Required inputs and the decision rule are satisfied: Retain a feature only when it is necessary across supported
80
+ exemplars or explicitly required by scope; otherwise classify it as optional or excluded.'
81
+ - 'The ordered analytical stages are evidenced and the output completion gate passes: Every invariant is supported
82
+ by multiple exemplars, every variation point is bounded, and held-out variants are either covered or explicitly
83
+ excluded.'
84
+ - Conflict, ambiguity, insufficient-evidence, abstention, and stop behavior remain explicit and testable.
@@ -0,0 +1,85 @@
1
+ schemaVersion: '1.0'
2
+ id: constrained-exemplar-adaptation
3
+ purpose: Adapt an exemplar under explicit constraints.
4
+ family:
5
+ id: exemplar-modeling
6
+ version: 1.0.0
7
+ taxonomy:
8
+ id: constrained-exemplar-adaptation
9
+ displayName: Constrained Exemplar Adaptation
10
+ transformation: Adapt an exemplar under explicit constraints.
11
+ intendedOutput: Constraint-compliant adaptation
12
+ inputs:
13
+ - name: source-exemplar
14
+ description: The exemplar whose structure or behavior is being adapted.
15
+ required: true
16
+ - name: target-constraints
17
+ description: Mandatory target-environment constraints.
18
+ required: true
19
+ - name: preservation-requirements
20
+ description: Properties that must remain unchanged.
21
+ required: true
22
+ - name: target-context
23
+ description: Optional target conventions and integration context.
24
+ required: false
25
+ precedence:
26
+ - sourceClass: explicit-contract
27
+ rank: 0
28
+ - sourceClass: observed-artifact
29
+ rank: 1
30
+ - sourceClass: inference
31
+ rank: 2
32
+ pipeline:
33
+ - id: ingest.sources
34
+ version: 1.0.0
35
+ - id: trace.build-evidence-ledger
36
+ version: 1.0.0
37
+ - id: validation.contract
38
+ version: 1.0.0
39
+ output:
40
+ schema: canonical/schemas/constrained-exemplar-adaptation.output.schema.json
41
+ description: Constraint-compliant adaptation
42
+ requiredBehavior:
43
+ - 'activation: Use constrained-exemplar-adaptation only when the requested outcome requires this transformation:
44
+ Adapt an exemplar under explicit constraints.'
45
+ - 'sufficiency: Require all role inputs marked required and enough evidence to complete these gates: All mandatory
46
+ constraints pass, preserved properties remain equivalent, and every deviation has an evidence-backed rationale.'
47
+ - 'conflict: Apply declared source precedence; when equally authoritative evidence changes the decision, preserve
48
+ both positions and return the affected output field as unresolved.'
49
+ - 'ambiguity: Isolate ambiguous terms or boundaries, show which stage and output fields they affect, and request
50
+ clarification rather than selecting an unsupported interpretation.'
51
+ - 'abstention: Abstain from constrained-exemplar-adaptation when required inputs are absent, the decision rule cannot
52
+ be applied, or evidence cannot satisfy the completion gate.'
53
+ - 'stop: Stop before emitting Constraint-compliant adaptation unless All mandatory constraints pass, preserved properties
54
+ remain equivalent, and every deviation has an evidence-backed rationale.'
55
+ - 'resources: Load the source exemplar, target constraint set, preservation checks, and target conventions only
56
+ when a mapped element depends on them.'
57
+ - 'transformation: Execute the ordered analytical procedure: 1) extract the exemplar properties relevant to the
58
+ target; 2) classify target constraints as mandatory, negotiable, or conflicting; 3) map exemplar elements to target-compatible
59
+ replacements; 4) validate preserved properties and document every intentional deviation.'
60
+ - 'output: Populate and validate canonical/schemas/constrained-exemplar-adaptation.output.schema.json with required
61
+ fields adaptedArtifact, constraintMapping, preservedProperties, deviations, validationResults; do not replace
62
+ missing fields with prose.'
63
+ - 'traceability: Link every material output field to source identifiers and the analytical stage or decision that
64
+ produced it; retain counterevidence for unresolved results.'
65
+ - 'evaluation: Pass only when the output schema validates, the ordered stages are evidenced, the role decision rule
66
+ was applied, and this completion gate holds: All mandatory constraints pass, preserved properties remain equivalent,
67
+ and every deviation has an evidence-backed rationale.'
68
+ forbiddenBehavior:
69
+ - Do not substitute generic analytical behavior for the role-specific constrained-exemplar-adaptation transformation.
70
+ - Do not skip, reorder, or silently collapse the role's declared analytical stages.
71
+ - Do not invent missing evidence, resolve authority conflicts by convenience, or emit a completed result after a
72
+ stop or abstention condition.
73
+ - Do not copy operation-owned ingestion, ledger, or schema-validation mechanics into the role contract.
74
+ traceability:
75
+ materialClaimsRequireSources: true
76
+ ledgerFormat: jsonl
77
+ artifacts: content-addressed
78
+ evaluation:
79
+ criteria:
80
+ - The authoritative transformation and intended output for constrained-exemplar-adaptation are preserved.
81
+ - 'Required inputs and the decision rule are satisfied: Prefer the least-divergent adaptation that satisfies all
82
+ mandatory constraints; abstain when two mandatory constraints cannot be jointly satisfied.'
83
+ - 'The ordered analytical stages are evidenced and the output completion gate passes: All mandatory constraints
84
+ pass, preserved properties remain equivalent, and every deviation has an evidence-backed rationale.'
85
+ - Conflict, ambiguity, insufficient-evidence, abstention, and stop behavior remain explicit and testable.