@kontourai/flow-agents 1.1.0 → 1.3.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 (119) hide show
  1. package/.github/workflows/ci.yml +6 -1
  2. package/.github/workflows/kit-gates-demo.yml +6 -2
  3. package/.github/workflows/runtime-compat.yml +5 -2
  4. package/CHANGELOG.md +51 -0
  5. package/CONTRIBUTING.md +30 -0
  6. package/README.md +26 -5
  7. package/agents/dev.json +1 -1
  8. package/agents/tool-planner.json +1 -1
  9. package/build/src/cli/{flow-kit.js → kit.js} +122 -108
  10. package/build/src/cli/validate-source-tree.js +4 -4
  11. package/build/src/cli/workflow-sidecar.js +70 -5
  12. package/build/src/cli.js +3 -3
  13. package/build/src/flow-kit/validate.js +89 -62
  14. package/build/src/tools/build-universal-bundles.js +78 -17
  15. package/build/src/tools/generate-context-map.js +49 -7
  16. package/build/src/tools/validate-source-tree.js +32 -1
  17. package/console.telemetry.json +1 -1
  18. package/docs/adr/0004-gates-expect-surface-claims.md +7 -7
  19. package/docs/adr/0007-flow-skill-kit-tool-boundary.md +169 -0
  20. package/docs/adr/0007-skill-audit.md +112 -0
  21. package/docs/adr/0008-kit-operation-boundary.md +88 -0
  22. package/docs/context-map.md +18 -22
  23. package/docs/flow-kit-repository-contract.md +5 -5
  24. package/docs/getting-started.md +177 -0
  25. package/docs/index.md +19 -8
  26. package/docs/kit-authoring-guide.md +125 -13
  27. package/docs/knowledge-kit.md +2 -2
  28. package/docs/operating-layers.md +2 -2
  29. package/docs/spec/runtime-hook-surface.md +1 -1
  30. package/docs/veritas-integration.md +4 -4
  31. package/docs/vision.md +1 -1
  32. package/docs/workflow-eval-strategy.md +2 -2
  33. package/docs/workflow-usage-guide.md +2 -2
  34. package/evals/acceptance/test_opencode_harness.sh +18 -10
  35. package/evals/acceptance/test_pi_harness.sh +10 -6
  36. package/evals/ci/run-baseline.sh +1 -1
  37. package/evals/fixtures/builder-kit-workflow-state/happy-path.json +2 -2
  38. package/evals/fixtures/builder-kit-workflow-state/mid-work-resume.json +2 -2
  39. package/evals/fixtures/console-learning-projection/artifacts/console-learning-correction/learning.json +1 -1
  40. package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/flows/runtime.flow.json +4 -4
  41. package/evals/fixtures/flow-kit-repository/valid-local-kit/flows/review.flow.json +4 -4
  42. package/evals/fixtures/kit-conformance-levels/k0-flows-only/flows/review.flow.json +4 -4
  43. package/evals/fixtures/kit-conformance-levels/k1-agent-extension/flows/build.flow.json +4 -4
  44. package/evals/fixtures/kit-conformance-levels/k2-with-evals/flows/synthesize.flow.json +4 -4
  45. package/evals/fixtures/kit-conformance-levels/third-party-extension/flows/review.flow.json +4 -4
  46. package/evals/fixtures/pull-work-provider/github-issues.json +5 -5
  47. package/evals/fixtures/surface-trust/accepted-claim-trust-report.json +2 -2
  48. package/evals/fixtures/surface-trust/artifact-absent.json +2 -2
  49. package/evals/fixtures/surface-trust/integrity-mismatch-trust-report.json +2 -2
  50. package/evals/fixtures/surface-trust/missing-authority-trust-report.json +2 -2
  51. package/evals/fixtures/surface-trust/provider-absent.json +2 -2
  52. package/evals/fixtures/surface-trust/rejected-claim-trust-report.json +2 -2
  53. package/evals/fixtures/surface-trust/stale-claim-trust-snapshot.json +2 -2
  54. package/evals/integration/test_activate_npx_context.sh +2 -2
  55. package/evals/integration/test_bundle_install.sh +17 -12
  56. package/evals/integration/test_console_learning_projection.sh +2 -2
  57. package/evals/integration/test_flow_kit_install_git.sh +7 -7
  58. package/evals/integration/test_flow_kit_repository.sh +4 -4
  59. package/evals/integration/test_goal_fit_hook.sh +144 -0
  60. package/evals/integration/test_kit_conformance_levels.sh +56 -2
  61. package/evals/integration/test_local_flow_kit_install.sh +7 -7
  62. package/evals/integration/test_publish_change_helper.sh +1 -1
  63. package/evals/integration/test_pull_work_provider.sh +1 -1
  64. package/evals/integration/test_runtime_adapter_activation.sh +3 -3
  65. package/evals/integration/test_workflow_sidecar_writer.sh +9 -9
  66. package/evals/lib/node.sh +2 -2
  67. package/evals/static/test_package.sh +3 -3
  68. package/evals/static/test_workflow_skills.sh +19 -19
  69. package/integrations/strands/flow_agents_strands/steering.py +1 -1
  70. package/integrations/strands-ts/src/hooks.ts +1 -1
  71. package/kits/builder/flows/build.flow.json +48 -48
  72. package/kits/builder/flows/shape.flow.json +36 -36
  73. package/kits/builder/kit.json +17 -0
  74. package/{skills → kits/builder/skills}/builder-shape/SKILL.md +4 -4
  75. package/{skills → kits/builder/skills}/idea-to-backlog/SKILL.md +1 -1
  76. package/kits/knowledge/adapters/obsidian-store/index.js +137 -26
  77. package/kits/knowledge/evals/contract-suite/suite.test.js +90 -0
  78. package/kits/knowledge/flows/compile.flow.json +12 -12
  79. package/kits/knowledge/flows/consolidate.flow.json +16 -16
  80. package/kits/knowledge/flows/ingest.flow.json +12 -12
  81. package/kits/knowledge/flows/retire.flow.json +16 -16
  82. package/kits/knowledge/flows/store-contract.flow.json +12 -12
  83. package/kits/knowledge/flows/synthesize.flow.json +16 -16
  84. package/kits/knowledge/kit.json +16 -9
  85. package/kits/release-evidence/flows/release-evidence.flow.json +3 -3
  86. package/package.json +11 -5
  87. package/packaging/packs.json +1 -21
  88. package/schemas/workflow-evidence.schema.json +2 -1
  89. package/scripts/README.md +1 -1
  90. package/scripts/hooks/stop-goal-fit.js +66 -18
  91. package/scripts/kit.js +2 -0
  92. package/skills/README.md +23 -0
  93. package/src/cli/{flow-kit.ts → kit.ts} +124 -109
  94. package/src/cli/validate-source-tree.ts +4 -4
  95. package/src/cli/workflow-sidecar.ts +62 -4
  96. package/src/cli.ts +3 -3
  97. package/src/flow-kit/validate.ts +118 -58
  98. package/src/tools/build-universal-bundles.ts +74 -13
  99. package/src/tools/generate-context-map.ts +36 -6
  100. package/src/tools/validate-source-tree.ts +27 -1
  101. package/scripts/flow-kit.js +0 -2
  102. package/skills/context-budget/SKILL.md +0 -40
  103. package/skills/explore/SKILL.md +0 -137
  104. package/skills/feedback-loop/SKILL.md +0 -87
  105. package/skills/frontend-design/SKILL.md +0 -80
  106. /package/{skills → kits/builder/skills}/deliver/SKILL.md +0 -0
  107. /package/{skills → kits/builder/skills}/design-probe/SKILL.md +0 -0
  108. /package/{skills → kits/builder/skills}/evidence-gate/SKILL.md +0 -0
  109. /package/{skills → kits/builder/skills}/execute-plan/SKILL.md +0 -0
  110. /package/{skills → kits/builder/skills}/fix-bug/SKILL.md +0 -0
  111. /package/{skills → kits/builder/skills}/learning-review/SKILL.md +0 -0
  112. /package/{skills → kits/builder/skills}/pickup-probe/SKILL.md +0 -0
  113. /package/{skills → kits/builder/skills}/plan-work/SKILL.md +0 -0
  114. /package/{skills → kits/builder/skills}/pull-work/SKILL.md +0 -0
  115. /package/{skills → kits/builder/skills}/release-readiness/SKILL.md +0 -0
  116. /package/{skills → kits/builder/skills}/review-work/SKILL.md +0 -0
  117. /package/{skills → kits/builder/skills}/tdd-workflow/SKILL.md +0 -0
  118. /package/{skills → kits/builder/skills}/verify-work/SKILL.md +0 -0
  119. /package/{skills → kits/knowledge/skills}/knowledge-capture/SKILL.md +0 -0
@@ -14,12 +14,12 @@
14
14
  "expects": [
15
15
  {
16
16
  "id": "similar-sources-found",
17
- "kind": "surface.claim",
17
+ "kind": "trust.bundle",
18
18
  "required": true,
19
19
  "description": "At least one compiled record similar to the target concept has been identified via the similarity detector. Similarity v1 uses category match + link-overlap heuristic. The result is a cluster of source record IDs to synthesize from.",
20
- "claim": {
21
- "type": "knowledge.synthesize.cluster",
22
- "subject": "artifact",
20
+ "bundle_claim": {
21
+ "claimType": "knowledge.synthesize.cluster",
22
+ "subjectType": "artifact",
23
23
  "accepted_statuses": ["trusted", "accepted"]
24
24
  }
25
25
  }
@@ -30,12 +30,12 @@
30
30
  "expects": [
31
31
  {
32
32
  "id": "proposal-recorded",
33
- "kind": "surface.claim",
33
+ "kind": "trust.bundle",
34
34
  "required": true,
35
35
  "description": "A proposal carrying source refs (proposer_id + source_ids in evidence) has been recorded via the store propose op. The concept body is NOT modified at this step — only a proposes link and mutation log entry are created.",
36
- "claim": {
37
- "type": "knowledge.synthesize.proposal",
38
- "subject": "artifact",
36
+ "bundle_claim": {
37
+ "claimType": "knowledge.synthesize.proposal",
38
+ "subjectType": "artifact",
39
39
  "accepted_statuses": ["trusted", "accepted"]
40
40
  }
41
41
  }
@@ -46,12 +46,12 @@
46
46
  "expects": [
47
47
  {
48
48
  "id": "proposal-carries-source-refs",
49
- "kind": "surface.claim",
49
+ "kind": "trust.bundle",
50
50
  "required": true,
51
51
  "description": "The proposal evidence includes source_ids referencing every compiled record that contributed to the proposed summary. Gate rejects if source_ids is empty or any referenced record does not exist.",
52
- "claim": {
53
- "type": "knowledge.synthesize.evidence",
54
- "subject": "artifact",
52
+ "bundle_claim": {
53
+ "claimType": "knowledge.synthesize.evidence",
54
+ "subjectType": "artifact",
55
55
  "accepted_statuses": ["trusted", "accepted"]
56
56
  }
57
57
  }
@@ -62,12 +62,12 @@
62
62
  "expects": [
63
63
  {
64
64
  "id": "mutation-gate-decision",
65
- "kind": "surface.claim",
65
+ "kind": "trust.bundle",
66
66
  "required": true,
67
67
  "description": "A gate decision (apply or reject) has been recorded. If applied: concept body is updated via the store apply op with rationale and all contributing source_ids in provenance. If rejected: the store reject op is called, the concept body is byte-identical to its pre-proposal state, and only a rejection log entry is appended.",
68
- "claim": {
69
- "type": "knowledge.synthesize.gate-decision",
70
- "subject": "artifact",
68
+ "bundle_claim": {
69
+ "claimType": "knowledge.synthesize.gate-decision",
70
+ "subjectType": "artifact",
71
71
  "accepted_statuses": ["trusted", "accepted"]
72
72
  }
73
73
  }
@@ -3,7 +3,7 @@
3
3
  "id": "knowledge",
4
4
  "name": "Knowledge Kit",
5
5
  "product_name": "Knowledge Kit",
6
- "description": "A Flow Kit for durable, gated knowledge storage. Provides a store contract with defined record types, mutation operations, and provenance rules \u2014 plus a default adapter backed by markdown files, YAML frontmatter, wikilinks, and a graph index.",
6
+ "description": "A Flow Kit for durable, gated knowledge storage. Provides a store contract with defined record types, mutation operations, and provenance rules plus a default adapter backed by markdown files, YAML frontmatter, wikilinks, and a graph index.",
7
7
  "flows": [
8
8
  {
9
9
  "id": "knowledge.store-contract",
@@ -13,17 +13,17 @@
13
13
  {
14
14
  "id": "knowledge.ingest",
15
15
  "path": "flows/ingest.flow.json",
16
- "description": "Ingest raw captures: capture \u2192 classify \u2192 route. Gate on classify requires category + type='raw' classification evidence per the store contract create op."
16
+ "description": "Ingest raw captures: capture classify route. Gate on classify requires category + type='raw' classification evidence per the store contract create op."
17
17
  },
18
18
  {
19
19
  "id": "knowledge.compile",
20
20
  "path": "flows/compile.flow.json",
21
- "description": "Compile classified raws into durable notes: select-raws \u2192 compile \u2192 link. Gate on compile requires provenance refs to every consumed raw record."
21
+ "description": "Compile classified raws into durable notes: select-raws compile link. Gate on compile requires provenance refs to every consumed raw record."
22
22
  },
23
23
  {
24
24
  "id": "knowledge.synthesize",
25
25
  "path": "flows/synthesize.flow.json",
26
- "description": "Synthesize compiled sources into concept summaries: detect-cluster \u2192 propose \u2192 evidence-gate \u2192 apply-or-reject. Mutation-gate policy: no summary mutates without an approved proposal carrying source refs; rejection leaves store untouched."
26
+ "description": "Synthesize compiled sources into concept summaries: detect-cluster propose evidence-gate apply-or-reject. Mutation-gate policy: no summary mutates without an approved proposal carrying source refs; rejection leaves store untouched."
27
27
  },
28
28
  {
29
29
  "id": "knowledge.consolidate",
@@ -33,7 +33,7 @@
33
33
  {
34
34
  "id": "knowledge.retire",
35
35
  "path": "flows/retire.flow.json",
36
- "description": "Retire implemented or obsolete records from the working set via gated lifecycle: identify \u2192 propose-retirement \u2192 evidence-gate \u2192 apply-or-reject. Evidence required: retirement rationale + implementedByRef (when targeting 'implemented' status) or supersededByRef (optional, for 'retired'). Rejection leaves record status byte-identical. Retired records remain fully queryable with provenance via includeRetired flag."
36
+ "description": "Retire implemented or obsolete records from the working set via gated lifecycle: identify propose-retirement evidence-gate apply-or-reject. Evidence required: retirement rationale + implementedByRef (when targeting 'implemented' status) or supersededByRef (optional, for 'retired'). Rejection leaves record status byte-identical. Retired records remain fully queryable with provenance via includeRetired flag."
37
37
  }
38
38
  ],
39
39
  "docs": [
@@ -55,7 +55,7 @@
55
55
  {
56
56
  "id": "knowledge.flow-runner",
57
57
  "path": "adapters/flow-runner/index.js",
58
- "description": "Executable flow logic: capture(rawText, meta) \u2192 classified raw record; compile(rawIds[]) \u2192 compiled record with provenance links; synthesize(conceptId | topicSelector, options) \u2192 concept summary proposal with mutation gate; consolidate(snapshotId | topicSelector, options) \u2192 decision snapshot consolidation with supersede-not-delete; retire(recordId, options) \u2192 gated status lifecycle transition (active\u2192implemented\u2192retired) with working-set exclusion. Emits canonical telemetry events at gate points."
58
+ "description": "Executable flow logic: capture(rawText, meta) classified raw record; compile(rawIds[]) compiled record with provenance links; synthesize(conceptId | topicSelector, options) concept summary proposal with mutation gate; consolidate(snapshotId | topicSelector, options) decision snapshot consolidation with supersede-not-delete; retire(recordId, options) gated status lifecycle transition (active→implemented→retired) with working-set exclusion. Emits canonical telemetry events at gate points."
59
59
  },
60
60
  {
61
61
  "id": "knowledge.similarity-vector",
@@ -82,7 +82,7 @@
82
82
  {
83
83
  "id": "knowledge.synthesis-suite",
84
84
  "path": "evals/synthesis/suite.test.js",
85
- "description": "Eval cases for synthesize: AC1 (similar source \u2192 proposal not mutation), AC2 (rejection leaves concept byte-identical), AC3 (apply updates with provenance to all contributing sources), pluggable-similarity interface test, gate telemetry."
85
+ "description": "Eval cases for synthesize: AC1 (similar source proposal not mutation), AC2 (rejection leaves concept byte-identical), AC3 (apply updates with provenance to all contributing sources), pluggable-similarity interface test, gate telemetry."
86
86
  },
87
87
  {
88
88
  "id": "knowledge.consolidation-suite",
@@ -92,7 +92,7 @@
92
92
  {
93
93
  "id": "knowledge.similarity-vector-suite",
94
94
  "path": "evals/similarity-vector/suite.test.js",
95
- "description": "Eval cases for the vector similarity adapter: unit tests (cosineSimilarity math, injectable embed, threshold, fail-closed), drop-in proof (runner.synthesize with injected embed produces valid proposals), and live-gated tests (real ollama nomic-embed-text round-trip \u2014 skipped when ollama unavailable)."
95
+ "description": "Eval cases for the vector similarity adapter: unit tests (cosineSimilarity math, injectable embed, threshold, fail-closed), drop-in proof (runner.synthesize with injected embed produces valid proposals), and live-gated tests (real ollama nomic-embed-text round-trip skipped when ollama unavailable)."
96
96
  },
97
97
  {
98
98
  "id": "knowledge.retirement-suite",
@@ -102,7 +102,14 @@
102
102
  {
103
103
  "id": "knowledge.entity-cards-suite",
104
104
  "path": "evals/entities/suite.test.js",
105
- "description": "Eval cases for person/entity cards (issue #48): AC1-AC4 \u2014 entity extraction from Attendees lines, exact-match resolution, possible-duplicate detection, merge via propose/apply/reject (union aliases+backlinks, supersede duplicate), Obsidian people/ folder rendering, and extended contract suite (person type validity) on both adapters."
105
+ "description": "Eval cases for person/entity cards (issue #48): AC1-AC4 entity extraction from Attendees lines, exact-match resolution, possible-duplicate detection, merge via propose/apply/reject (union aliases+backlinks, supersede duplicate), Obsidian people/ folder rendering, and extended contract suite (person type validity) on both adapters."
106
+ }
107
+ ],
108
+ "skills": [
109
+ {
110
+ "id": "knowledge.knowledge-capture",
111
+ "path": "skills/knowledge-capture/SKILL.md",
112
+ "description": "Save durable knowledge, lightweight pointers, user corrections, decisions, lessons, and source references into the knowledge base."
106
113
  }
107
114
  ]
108
115
  }
@@ -13,12 +13,12 @@
13
13
  "expects": [
14
14
  {
15
15
  "id": "release-claim-present",
16
- "kind": "surface.claim",
16
+ "kind": "trust.bundle",
17
17
  "required": true,
18
18
  "description": "A trusted release.evidence claim must be attached before this gate can pass.",
19
19
  "explore_hint": "Attach a trust-report JSON file with claim type release.evidence and status trusted.",
20
- "claim": {
21
- "type": "release.evidence",
20
+ "bundle_claim": {
21
+ "claimType": "release.evidence",
22
22
  "accepted_statuses": [
23
23
  "trusted"
24
24
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontourai/flow-agents",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Flow Agents — a Kontour product that applies Flow and Veritas discipline as a portable process layer inside the agent tools you already use: Claude Code, Codex, Kiro, opencode, pi, and GitHub Actions — with framework adapters (AWS Strands preview) on the same policy-engine contract.",
5
5
  "keywords": [
6
6
  "agents",
@@ -36,7 +36,6 @@
36
36
  "flow-agents-context-map": "build/src/cli.js",
37
37
  "flow-agents-effective-backlog-settings": "build/src/cli.js",
38
38
  "flow-agents-filter-installed-packs": "build/src/cli.js",
39
- "flow-agents-flow-kit": "build/src/cli.js",
40
39
  "flow-agents-fixture-retirement-audit": "build/src/cli.js",
41
40
  "flow-agents-promote-workflow-artifact": "build/src/cli.js",
42
41
  "flow-agents-publish-change": "build/src/cli.js",
@@ -49,7 +48,8 @@
49
48
  "flow-agents-validate-hook-influence": "build/src/cli.js",
50
49
  "flow-agents-validate-source": "build/src/cli.js",
51
50
  "flow-agents-workflow-artifact-cleanup-audit": "build/src/cli.js",
52
- "flow-agents-workflow-sidecar": "build/src/cli/workflow-sidecar.js"
51
+ "flow-agents-workflow-sidecar": "build/src/cli/workflow-sidecar.js",
52
+ "flow-agents-kit": "build/src/cli.js"
53
53
  },
54
54
  "files": [
55
55
  ".github/",
@@ -100,7 +100,6 @@
100
100
  "validate:package": "npm run build --silent && node build/src/cli.js validate-package",
101
101
  "workflow:sidecar": "npm run build --silent && node build/src/cli/workflow-sidecar.js",
102
102
  "workflow:validate-artifacts": "npm run build --silent && node build/src/cli/validate-workflow-artifacts.js",
103
- "flow-kit": "npm run build --silent && node build/src/cli.js flow-kit",
104
103
  "effective-backlog-settings": "npm run build --silent && node build/src/cli.js effective-backlog-settings",
105
104
  "pull-work-provider": "npm run build --silent && node build/src/cli.js pull-work-provider",
106
105
  "publish-change": "npm run build --silent && node build/src/cli.js publish-change",
@@ -125,11 +124,18 @@
125
124
  "promptfoo": "PROMPTFOO_CONFIG_DIR=.promptfoo PROMPTFOO_DISABLE_WAL_MODE=true PROMPTFOO_DISABLE_TELEMETRY=true promptfoo",
126
125
  "promptfoo:view": "PROMPTFOO_CONFIG_DIR=.promptfoo PROMPTFOO_DISABLE_WAL_MODE=true PROMPTFOO_DISABLE_TELEMETRY=true promptfoo view",
127
126
  "check:content-boundary": "node scripts/check-content-boundary.cjs",
128
- "prepack": "npm run build --silent && npm run validate:source --"
127
+ "prepack": "npm run build --silent && npm run validate:source --",
128
+ "kit": "npm run build --silent && node build/src/cli.js kit"
129
129
  },
130
130
  "devDependencies": {
131
131
  "@types/node": "^22.19.19",
132
132
  "promptfoo": "^0.121.15",
133
133
  "typescript": "^6.0.3"
134
+ },
135
+ "dependencies": {
136
+ "@kontourai/flow": "~1.3.0"
137
+ },
138
+ "optionalDependencies": {
139
+ "hachure": "^0.4.0"
134
140
  }
135
141
  }
@@ -7,13 +7,6 @@
7
7
  "description": "Small default surface for reliable coding and workflow execution.",
8
8
  "skills": [
9
9
  "search-first",
10
- "plan-work",
11
- "execute-plan",
12
- "review-work",
13
- "verify-work",
14
- "evidence-gate",
15
- "feedback-loop",
16
- "knowledge-capture",
17
10
  "browser-test"
18
11
  ],
19
12
  "agents": [
@@ -32,23 +25,10 @@
32
25
  "default": false,
33
26
  "description": "Development workflow depth for backlog, release, dependency, GitHub, TDD, and frontend work.",
34
27
  "skills": [
35
- "builder-shape",
36
- "idea-to-backlog",
37
- "pull-work",
38
- "design-probe",
39
- "pickup-probe",
40
- "deliver",
41
- "fix-bug",
42
- "tdd-workflow",
43
- "release-readiness",
44
- "learning-review",
45
28
  "dependency-update",
46
29
  "eval-rebuild",
47
- "explore",
48
30
  "github-cli",
49
- "frontend-design",
50
- "agentic-engineering",
51
- "context-budget"
31
+ "agentic-engineering"
52
32
  ],
53
33
  "agents": [
54
34
  "dev",
@@ -239,7 +239,8 @@
239
239
  "properties": {
240
240
  "artifact_kind": {
241
241
  "type": "string",
242
- "enum": ["TrustReport", "Trust Snapshot"]
242
+ "description": "Hachure-aligned artifact kind. trust.bundle is the canonical value; TrustReport and Trust Snapshot are legacy aliases.",
243
+ "enum": ["trust.bundle", "TrustReport", "Trust Snapshot"]
243
244
  },
244
245
  "artifact_ref": {
245
246
  "type": "string",
package/scripts/README.md CHANGED
@@ -11,7 +11,7 @@ These files are stable launchers for TypeScript code compiled under `build/src/`
11
11
  | `build-universal-bundles.js` | `build/src/tools/build-universal-bundles.js` |
12
12
  | `filter-installed-packs.js` | `build/src/tools/filter-installed-packs.js` |
13
13
  | `generate-context-map.js` | `build/src/tools/generate-context-map.js` |
14
- | `flow-kit.js` | `build/src/cli/flow-kit.js` |
14
+ | `kit.js` | `build/src/cli/kit.js` |
15
15
  | `pull-work-provider.js` | `build/src/cli/pull-work-provider.js` |
16
16
  | `effective-backlog-settings.js` | `build/src/cli/effective-backlog-settings.js` |
17
17
  | `publish-change-helper.js` | `build/src/cli/publish-change-helper.js` |
@@ -80,6 +80,15 @@ function hasSidecars(dir) {
80
80
  }
81
81
  }
82
82
 
83
+ /**
84
+ * Returns true if a line of validator output looks like a validator-environment
85
+ * error (shell/npm error, tsc missing, spawn failure) rather than a real
86
+ * artifact validation message. Environment errors must never block goal-fit.
87
+ */
88
+ function isEnvironmentError(line) {
89
+ return /tsc[:\s]|command not found|npm ERR!|npm error|ENOENT|EACCES|Cannot find module|node_modules\/.bin|TypeScript version|version conflict|error TS[0-9]/i.test(line);
90
+ }
91
+
83
92
  function sidecarValidation(root, artifactDir) {
84
93
  const requireSidecars = String(process.env.FLOW_AGENTS_REQUIRE_SIDECARS || '').toLowerCase() === 'true';
85
94
  const requireCritique = String(process.env.FLOW_AGENTS_REQUIRE_CRITIQUE || '').toLowerCase() === 'true';
@@ -88,8 +97,6 @@ function sidecarValidation(root, artifactDir) {
88
97
  const packageRoot = fs.existsSync(path.join(root, 'package.json'))
89
98
  ? root
90
99
  : path.resolve(__dirname, '..', '..');
91
- const packageJson = path.join(packageRoot, 'package.json');
92
- if (!fs.existsSync(packageJson)) return [`${relative(root, artifactDir)} sidecar validation: package.json is missing; cannot run TypeScript workflow validator.`];
93
100
 
94
101
  let sidecarFiles = [];
95
102
  try {
@@ -112,26 +119,67 @@ function sidecarValidation(root, artifactDir) {
112
119
 
113
120
  if (sidecarFiles.length === 0) return [];
114
121
 
115
- const args = ['run', 'workflow:validate-artifacts', '--silent', '--'];
116
- args.push('--skip-markdown-validation');
117
- if (requireSidecars) args.push('--require-sidecars');
118
- if (requireCritique) args.push('--require-critique');
119
- args.push(artifactDir);
122
+ // Part 1 fix: invoke the already-built validator directly via `node`, bypassing
123
+ // `npm run build` (tsc). npm-installed packages ship build/ in the package files,
124
+ // so the compiled JS is always available. Only fall back to npm run if build/ is
125
+ // absent (a raw dev checkout that hasn't been built yet).
126
+ const builtValidator = path.join(packageRoot, 'build', 'src', 'cli', 'validate-workflow-artifacts.js');
127
+ const hasBuild = fs.existsSync(builtValidator);
128
+
129
+ const validatorArgs = ['--skip-markdown-validation'];
130
+ if (requireSidecars) validatorArgs.push('--require-sidecars');
131
+ if (requireCritique) validatorArgs.push('--require-critique');
132
+ validatorArgs.push(artifactDir);
133
+
134
+ let result;
135
+ if (hasBuild) {
136
+ // Direct node invocation: no tsc, no npm build step, works from any npm install.
137
+ result = spawnSync(process.execPath, [builtValidator, ...validatorArgs], {
138
+ cwd: packageRoot,
139
+ encoding: 'utf8',
140
+ timeout: 30000,
141
+ });
142
+ } else {
143
+ // Dev checkout without build/: fall back to npm run (may trigger tsc).
144
+ // If this also fails due to environment issues, Part 2 handles it below.
145
+ const npmArgs = ['run', 'workflow:validate-artifacts', '--silent', '--', ...validatorArgs];
146
+ result = spawnSync('npm', npmArgs, {
147
+ cwd: packageRoot,
148
+ encoding: 'utf8',
149
+ timeout: 30000,
150
+ });
151
+ }
120
152
 
121
- const result = spawnSync('npm', args, {
122
- cwd: packageRoot,
123
- encoding: 'utf8',
124
- timeout: 30000,
125
- });
153
+ // Part 2 fix: treat validator-environment failures as SKIP, never as blocking.
154
+ // A spawn error (ENOENT, timeout) means the validator couldn't run at all.
155
+ if (result.error) {
156
+ // Validator couldn't be launched — environment issue, not a goal-fit failure.
157
+ return [`${relative(root, artifactDir)} sidecar validation skipped: validator could not run (${result.error.code || result.error.message})`];
158
+ }
126
159
 
127
160
  if (result.status === 0) return [];
128
- const output = `${result.stdout || ''}\n${result.stderr || ''}`
161
+
162
+ // Validator ran and exited non-zero. Separate real validation errors from
163
+ // environment errors (tsc missing, npm ERR!, shell errors) so that a broken
164
+ // validator environment never blocks goal-fit.
165
+ const allLines = `${result.stdout || ''}\n${result.stderr || ''}`
129
166
  .split('\n')
130
167
  .map(line => line.trim())
131
- .filter(Boolean)
132
- .slice(0, 12);
133
- if (output.length === 0) output.push(`validator exited with status ${result.status ?? 'unknown'}`);
134
- return output.map(line => `${relative(root, artifactDir)} sidecar validation: ${line}`);
168
+ .filter(Boolean);
169
+
170
+ const envLines = allLines.filter(isEnvironmentError);
171
+ const validationLines = allLines.filter(line => !isEnvironmentError(line));
172
+
173
+ if (envLines.length > 0 && validationLines.length === 0) {
174
+ // Pure environment failure — skip, do not block.
175
+ return [`${relative(root, artifactDir)} sidecar validation skipped: validator environment error (${envLines[0].slice(0, 120)})`];
176
+ }
177
+
178
+ // Real validation errors (possibly mixed with a few env noise lines).
179
+ const output = validationLines.length > 0 ? validationLines : allLines;
180
+ const trimmed = output.slice(0, 12);
181
+ if (trimmed.length === 0) trimmed.push(`validator exited with status ${result.status ?? 'unknown'}`);
182
+ return trimmed.map(line => `${relative(root, artifactDir)} sidecar validation: ${line}`);
135
183
  }
136
184
 
137
185
  function isWorkflowArtifact(artifact) {
@@ -295,7 +343,7 @@ function analyze(root, now = Date.now()) {
295
343
  }
296
344
  warnings.push(...sidecarGuidance(root, path.dirname(latest.file)));
297
345
 
298
- const blocking = warnings.some(w => /status:|Definition Of Done|Goal Fit|sidecar validation|contradicts evidence\.json|workflow state|evidence verdict|evidence check|NOT_VERIFIED gap|critique status|critique open|next action/.test(w));
346
+ const blocking = warnings.some(w => /status:|Definition Of Done|Goal Fit|sidecar validation:|contradicts evidence\.json|workflow state|evidence verdict|evidence check|NOT_VERIFIED gap|critique status|critique open|next action/.test(w));
299
347
  return { warnings, blocking };
300
348
  }
301
349
 
package/scripts/kit.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import("../build/src/cli/kit.js").then(({ main }) => main().then((code) => process.exit(code)));
@@ -0,0 +1,23 @@
1
+ # skills/
2
+
3
+ This directory contains standalone skills that are **not yet claimed by a specific kit**.
4
+
5
+ ## Status: Pending Tool Reclassification
6
+
7
+ The 6 items here are currently classified as TOOLS pending formal reclassification in a follow-up ADR pass (tracking: #62 follow-up, ADR 0007).
8
+
9
+ | Skill | Notes |
10
+ | --- | --- |
11
+ | agentic-engineering | Pending reclassification as a tool or context doc |
12
+ | browser-test | Pending reclassification — closely tied to Playwright power |
13
+ | dependency-update | Pending reclassification — tooling-oriented |
14
+ | eval-rebuild | Pending reclassification — project-specific build hook |
15
+ | github-cli | Pending reclassification — CLI tool wrapper |
16
+ | search-first | Pending reclassification — research heuristic |
17
+
18
+ ## Kit-owned skills
19
+
20
+ Builder Kit skills now live in `kits/builder/skills/`.
21
+ Knowledge Kit skills now live in `kits/knowledge/skills/`.
22
+
23
+ See `docs/adr/0007-skill-audit.md` for the full audit table and disposition rationale.