@thebackstoryis/engineering-with-ai 0.2.9

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 (334) hide show
  1. package/Docs/README.md +50 -0
  2. package/Docs/adoption/consultancy-and-multi-project-rollout.md +135 -0
  3. package/Docs/adoption/non-technical-team-guide.md +126 -0
  4. package/Docs/archaeology-technology-and-hosting-discovery.md +212 -0
  5. package/Docs/blast-radius-and-impact-routing-guide.md +325 -0
  6. package/Docs/blueprints/internal-blueprint-catalogue.md +146 -0
  7. package/Docs/blueprints/maintaining-organisation-blueprints.md +154 -0
  8. package/Docs/blueprints/validation-and-troubleshooting.md +168 -0
  9. package/Docs/cli-reference.md +113 -0
  10. package/Docs/completed-phase-evidence-amendments.md +74 -0
  11. package/Docs/consultancy-network-rollout-control-plane-guide.md +202 -0
  12. package/Docs/context-aware-delivery-companion-guide.md +198 -0
  13. package/Docs/context-aware-delivery-companion-user-guide.md +184 -0
  14. package/Docs/context-management-and-token-efficiency.md +113 -0
  15. package/Docs/design-systems/design-system-implementation-guide.md +85 -0
  16. package/Docs/design-systems/design-system-pack-authoring-guide.md +95 -0
  17. package/Docs/design-systems/design-system-review-guide.md +51 -0
  18. package/Docs/design-systems/design-system-user-guide.md +96 -0
  19. package/Docs/design-systems/product-owner-guide.md +49 -0
  20. package/Docs/designing-organisation-blueprint-packs.md +384 -0
  21. package/Docs/developer-delivery-guide.md +224 -0
  22. package/Docs/error-reporting-guide.md +110 -0
  23. package/Docs/error-reporting-provider-guide.md +49 -0
  24. package/Docs/examples/error-report-adapter.md +70 -0
  25. package/Docs/examples/meeting-review.md +76 -0
  26. package/Docs/examples/minimal-design-system.md +67 -0
  27. package/Docs/examples/prototype-review-inputs.md +175 -0
  28. package/Docs/examples/reproducible-archaeology-depth-example.md +144 -0
  29. package/Docs/examples/test-scenario-input.md +68 -0
  30. package/Docs/examples/worked-examples.md +147 -0
  31. package/Docs/existing-project-onboarding-guide.md +214 -0
  32. package/Docs/explanation/core-concepts.md +26 -0
  33. package/Docs/explanation/delivery-workflow.md +48 -0
  34. package/Docs/governance/governance-team-guide.md +139 -0
  35. package/Docs/governed-starter-project-materialisation-guide.md +284 -0
  36. package/Docs/guide-catalogue.md +117 -0
  37. package/Docs/guided-discovery-facilitator-guide.md +172 -0
  38. package/Docs/guided-intent-workspace-guide.md +109 -0
  39. package/Docs/guided-phase-evidence-drafting-guide.md +119 -0
  40. package/Docs/human-approval-and-assurance-guide.md +146 -0
  41. package/Docs/knowledge-proposals-implementer-guide.md +106 -0
  42. package/Docs/knowledge-proposals-user-guide.md +247 -0
  43. package/Docs/maintainers/context-benchmarks.md +29 -0
  44. package/Docs/maintainers/contributing.md +58 -0
  45. package/Docs/maintainers/evidence-depth-acceptance.md +72 -0
  46. package/Docs/maintainers/verification-walkthroughs.md +104 -0
  47. package/Docs/meeting-evidence-implementer-guide.md +132 -0
  48. package/Docs/meeting-evidence-user-guide.md +200 -0
  49. package/Docs/operations/dashboard-and-delivery-state.md +153 -0
  50. package/Docs/operations/dashboard-configuration.md +87 -0
  51. package/Docs/operations/installation-updating-and-entitlements.md +135 -0
  52. package/Docs/operations/premium-personas-setup.md +76 -0
  53. package/Docs/operations/troubleshooting-and-recovery.md +205 -0
  54. package/Docs/organisation-rollout-guide.md +142 -0
  55. package/Docs/persona-entitlement-provider-guide.md +199 -0
  56. package/Docs/persona-guided-prototype-iteration.md +129 -0
  57. package/Docs/personas/organisation-specific-personas.md +103 -0
  58. package/Docs/personas/persona-authoring-cookbook.md +176 -0
  59. package/Docs/personas/persona-engagement-ui.md +133 -0
  60. package/Docs/personas/persona-governance.md +118 -0
  61. package/Docs/platform-export-analysis-guide.md +336 -0
  62. package/Docs/policies/governance-owner-guide.md +36 -0
  63. package/Docs/policies/implementation-guide.md +42 -0
  64. package/Docs/policies/organisation-policy-design-gates.md +58 -0
  65. package/Docs/policies/policy-pack-authoring-guide.md +108 -0
  66. package/Docs/policies/product-owner-guide.md +43 -0
  67. package/Docs/policies/technical-owner-guide.md +37 -0
  68. package/Docs/product-owner-guide.md +327 -0
  69. package/Docs/project-portfolio-orchestration-guide.md +199 -0
  70. package/Docs/quality/manual-qa-and-acceptance.md +162 -0
  71. package/Docs/quality/persona-driven-test-scenarios.md +172 -0
  72. package/Docs/quality/reproducible-archaeology-depth-review-checklist.md +89 -0
  73. package/Docs/reference/capabilities-and-project-layout.md +678 -0
  74. package/Docs/reference/cli-and-configuration.md +398 -0
  75. package/Docs/reference/contributions-api.md +23 -0
  76. package/Docs/reference/security-adapter-authoring.md +81 -0
  77. package/Docs/reference/starter-adapter-authoring.md +74 -0
  78. package/Docs/repository-source-map-guide.md +381 -0
  79. package/Docs/reproducible-archaeology-and-discovery-depth.md +292 -0
  80. package/Docs/screen-prototype-creation-guide.md +324 -0
  81. package/Docs/security-validation-guide.md +353 -0
  82. package/Docs/solution-readiness-review-guide.md +123 -0
  83. package/Docs/standards/project-standards-authoring.md +157 -0
  84. package/Docs/team-hub-guide.md +162 -0
  85. package/Docs/team-hub-resource-registry-guide.md +167 -0
  86. package/Docs/tutorials/first-delivery.md +83 -0
  87. package/Docs/tutorials/first-session.md +62 -0
  88. package/Docs/using-lifecycle-hooks.md +381 -0
  89. package/Docs/working-with-personas.md +274 -0
  90. package/LICENSE +165 -0
  91. package/README.md +96 -0
  92. package/agents-src/claude/ewai-security-reviewer.md +15 -0
  93. package/bin/ewai +5 -0
  94. package/config/archaeology-record-families.yaml +59 -0
  95. package/config/delivery-artifacts.yaml +121 -0
  96. package/config/delivery-stages.yaml +77 -0
  97. package/config/design-system.schema.json +46 -0
  98. package/config/error-reporting.schema.json +79 -0
  99. package/config/evidence-depth.schema.json +53 -0
  100. package/config/intent.schema.json +90 -0
  101. package/config/knowledge-proposals-proposal.schema.json +34 -0
  102. package/config/lifecycle-event.schema.json +68 -0
  103. package/config/lifecycle-handler.schema.json +45 -0
  104. package/config/lifecycle-hook-ack.schema.json +19 -0
  105. package/config/meeting-evidence-candidate.schema.json +102 -0
  106. package/config/organisation-policy.schema.json +137 -0
  107. package/config/pack.schema.json +250 -0
  108. package/config/persona-pack.schema.json +21 -0
  109. package/config/persona.schema.json +17 -0
  110. package/config/policy-evaluation.schema.json +77 -0
  111. package/config/policy-facts.schema.json +140 -0
  112. package/config/portfolio.schema.json +68 -0
  113. package/config/project.schema.json +313 -0
  114. package/config/prototype-iteration.schema.json +128 -0
  115. package/config/rollout.schema.json +87 -0
  116. package/config/security-adapter.schema.json +31 -0
  117. package/config/security-scan-request.schema.json +64 -0
  118. package/config/security-scan-response.schema.json +52 -0
  119. package/config/security-validation-policy.schema.json +74 -0
  120. package/config/starter-source-acknowledgement.schema.json +13 -0
  121. package/config/starter-source-adapter.schema.json +38 -0
  122. package/config/starter-source-request.schema.json +61 -0
  123. package/package.json +77 -0
  124. package/packs/core/pack.yaml +7 -0
  125. package/packs/design-systems/default/experience-promise.md +9 -0
  126. package/packs/design-systems/default/intentional-review.md +10 -0
  127. package/packs/design-systems/default/interaction-and-entry.md +9 -0
  128. package/packs/design-systems/default/meaningful-content-and-states.md +9 -0
  129. package/packs/design-systems/default/pack.yaml +44 -0
  130. package/packs/design-systems/default/principles.md +10 -0
  131. package/packs/personas/core/pack.yaml +7 -0
  132. package/packs/personas/core/personas/archaeologist.md +37 -0
  133. package/packs/personas/core/personas/end-user.md +17 -0
  134. package/packs/personas/core/personas/maintainer.md +17 -0
  135. package/packs/personas/core/personas/operator.md +17 -0
  136. package/packs/personas/core/personas/specs-knowledge-curator.md +35 -0
  137. package/packs/technologies/laravel/pack.yaml +30 -0
  138. package/packs/technologies/laravel-nuxt/pack.yaml +30 -0
  139. package/packs/technologies/nuxt/pack.yaml +30 -0
  140. package/packs/technologies/power-platform/pack.yaml +31 -0
  141. package/packs/technologies/salesforce/pack.yaml +25 -0
  142. package/public/app.js +4896 -0
  143. package/public/apple-touch-icon.png +0 -0
  144. package/public/assets/backstory-icon.png +0 -0
  145. package/public/dashboard-navigation.js +98 -0
  146. package/public/favicon-16.png +0 -0
  147. package/public/favicon-32.png +0 -0
  148. package/public/favicon.ico +0 -0
  149. package/public/index.html +789 -0
  150. package/public/styles.css +2693 -0
  151. package/public/team-hub/app.js +202 -0
  152. package/public/team-hub/index.html +79 -0
  153. package/public/team-hub/styles.css +90 -0
  154. package/scripts/publication-check.mjs +140 -0
  155. package/scripts/setup.mjs +21 -0
  156. package/skills-src/ewai-archaeology/SKILL.md +334 -0
  157. package/skills-src/ewai-archaeology/agents/openai.yaml +4 -0
  158. package/skills-src/ewai-archaeology/references/archaeology-contract.md +201 -0
  159. package/skills-src/ewai-archaeology/references/lifecycle-reconstruction.md +177 -0
  160. package/skills-src/ewai-archaeology/references/maximum-detail-reconstruction.md +97 -0
  161. package/skills-src/ewai-archaeology/references/model-routing.md +26 -0
  162. package/skills-src/ewai-architecture/SKILL.md +108 -0
  163. package/skills-src/ewai-architecture/agents/openai.yaml +4 -0
  164. package/skills-src/ewai-architecture/references/architecture-contract.md +176 -0
  165. package/skills-src/ewai-context/SKILL.md +68 -0
  166. package/skills-src/ewai-context/agents/openai.yaml +4 -0
  167. package/skills-src/ewai-context-import/SKILL.md +118 -0
  168. package/skills-src/ewai-context-import/agents/openai.yaml +4 -0
  169. package/skills-src/ewai-context-import/references/context-import-contract.md +106 -0
  170. package/skills-src/ewai-dashboard-configuration/SKILL.md +20 -0
  171. package/skills-src/ewai-deliver/SKILL.md +122 -0
  172. package/skills-src/ewai-deliver/references/delivery-evidence.md +92 -0
  173. package/skills-src/ewai-deliver/references/phase-routing.md +31 -0
  174. package/skills-src/ewai-design-system-apply/SKILL.md +27 -0
  175. package/skills-src/ewai-design-system-apply/agents/openai.yaml +4 -0
  176. package/skills-src/ewai-design-system-apply/references/application-contract.md +36 -0
  177. package/skills-src/ewai-design-system-author/SKILL.md +28 -0
  178. package/skills-src/ewai-design-system-author/agents/openai.yaml +4 -0
  179. package/skills-src/ewai-design-system-author/references/authoring-contract.md +38 -0
  180. package/skills-src/ewai-design-system-review/SKILL.md +26 -0
  181. package/skills-src/ewai-design-system-review/agents/openai.yaml +4 -0
  182. package/skills-src/ewai-design-system-review/references/review-contract.md +40 -0
  183. package/skills-src/ewai-error-reporting/SKILL.md +46 -0
  184. package/skills-src/ewai-error-reporting/agents/openai.yaml +4 -0
  185. package/skills-src/ewai-error-reporting/references/provider-contract.md +74 -0
  186. package/skills-src/ewai-evidence-depth/SKILL.md +72 -0
  187. package/skills-src/ewai-evidence-depth/agents/openai.yaml +4 -0
  188. package/skills-src/ewai-evidence-depth/references/evidence-depth-contract.md +127 -0
  189. package/skills-src/ewai-intent/SKILL.md +68 -0
  190. package/skills-src/ewai-intent/agents/openai.yaml +4 -0
  191. package/skills-src/ewai-intent/references/intent-contract.md +42 -0
  192. package/skills-src/ewai-knowledge-proposals/SKILL.md +105 -0
  193. package/skills-src/ewai-knowledge-proposals/agents/openai.yaml +4 -0
  194. package/skills-src/ewai-knowledge-proposals/references/proposal-contract.md +59 -0
  195. package/skills-src/ewai-meeting-evidence/SKILL.md +106 -0
  196. package/skills-src/ewai-meeting-evidence/agents/openai.yaml +4 -0
  197. package/skills-src/ewai-meeting-evidence/references/candidate-contract.md +64 -0
  198. package/skills-src/ewai-organisation-policy/SKILL.md +62 -0
  199. package/skills-src/ewai-organisation-policy/agents/openai.yaml +4 -0
  200. package/skills-src/ewai-organisation-policy/references/policy-contract.md +94 -0
  201. package/skills-src/ewai-palace-housekeeping/SKILL.md +55 -0
  202. package/skills-src/ewai-palace-housekeeping/agents/openai.yaml +4 -0
  203. package/skills-src/ewai-persona-entitlement/SKILL.md +60 -0
  204. package/skills-src/ewai-persona-entitlement/agents/openai.yaml +4 -0
  205. package/skills-src/ewai-phase-evidence/SKILL.md +79 -0
  206. package/skills-src/ewai-phase-evidence/agents/openai.yaml +4 -0
  207. package/skills-src/ewai-pipeline/SKILL.md +130 -0
  208. package/skills-src/ewai-pipeline/agents/openai.yaml +4 -0
  209. package/skills-src/ewai-pipeline/references/cli.md +86 -0
  210. package/skills-src/ewai-pipeline/references/specs-contract.md +16 -0
  211. package/skills-src/ewai-portfolio/SKILL.md +70 -0
  212. package/skills-src/ewai-portfolio/agents/openai.yaml +4 -0
  213. package/skills-src/ewai-portfolio/references/portfolio-contract.md +67 -0
  214. package/skills-src/ewai-project-discovery/SKILL.md +95 -0
  215. package/skills-src/ewai-project-discovery/agents/openai.yaml +4 -0
  216. package/skills-src/ewai-project-discovery/references/discovery-contract.md +34 -0
  217. package/skills-src/ewai-prototype-iteration/SKILL.md +30 -0
  218. package/skills-src/ewai-prototype-iteration/agents/openai.yaml +4 -0
  219. package/skills-src/ewai-prototype-iteration/references/review-contract.md +49 -0
  220. package/skills-src/ewai-retro/SKILL.md +48 -0
  221. package/skills-src/ewai-retro/agents/openai.yaml +4 -0
  222. package/skills-src/ewai-retro/references/asset-routing.md +14 -0
  223. package/skills-src/ewai-rollout/SKILL.md +74 -0
  224. package/skills-src/ewai-rollout/agents/openai.yaml +4 -0
  225. package/skills-src/ewai-rollout/references/rollout-contract.md +74 -0
  226. package/skills-src/ewai-shape-intents/SKILL.md +84 -0
  227. package/skills-src/ewai-shape-intents/agents/openai.yaml +4 -0
  228. package/skills-src/ewai-shape-intents/references/intent-mapping-contract.md +109 -0
  229. package/skills-src/ewai-solution-readiness/SKILL.md +55 -0
  230. package/skills-src/ewai-solution-readiness/agents/openai.yaml +4 -0
  231. package/skills-src/ewai-standards-check/SKILL.md +93 -0
  232. package/skills-src/ewai-standards-check/agents/openai.yaml +4 -0
  233. package/skills-src/ewai-standards-check/references/report-contract.md +116 -0
  234. package/skills-src/ewai-test-scenarios/SKILL.md +94 -0
  235. package/skills-src/ewai-test-scenarios/agents/openai.yaml +4 -0
  236. package/skills-src/ewai-test-scenarios/references/scenario-contract.md +88 -0
  237. package/src/afk-worker.mjs +16 -0
  238. package/src/archaeology.mjs +1333 -0
  239. package/src/checkin.mjs +261 -0
  240. package/src/cli.mjs +2427 -0
  241. package/src/companion-guidance.mjs +257 -0
  242. package/src/companion-opening.mjs +62 -0
  243. package/src/companion.mjs +256 -0
  244. package/src/context.mjs +210 -0
  245. package/src/dashboard-preferences.mjs +80 -0
  246. package/src/delivery-artifacts.mjs +204 -0
  247. package/src/delivery-documents.mjs +248 -0
  248. package/src/delivery-gates.mjs +317 -0
  249. package/src/delivery.mjs +1433 -0
  250. package/src/design-system-application.mjs +291 -0
  251. package/src/design-system-authoring.mjs +101 -0
  252. package/src/design-systems.mjs +466 -0
  253. package/src/discovery.mjs +1314 -0
  254. package/src/error-reporting.mjs +323 -0
  255. package/src/evidence-depth.mjs +543 -0
  256. package/src/execution-state.mjs +243 -0
  257. package/src/install.mjs +166 -0
  258. package/src/intent-dependencies.mjs +117 -0
  259. package/src/intent-maps.mjs +402 -0
  260. package/src/intents.mjs +747 -0
  261. package/src/knowledge-proposals.mjs +717 -0
  262. package/src/launcher.mjs +51 -0
  263. package/src/meeting-evidence.mjs +703 -0
  264. package/src/network-rollout.mjs +386 -0
  265. package/src/organisation-blueprints.mjs +438 -0
  266. package/src/organisation-policies.mjs +448 -0
  267. package/src/packs.mjs +44 -0
  268. package/src/paths.mjs +62 -0
  269. package/src/persona-entitlements.mjs +438 -0
  270. package/src/persona-licence-config.mjs +98 -0
  271. package/src/persona-website-provider.mjs +134 -0
  272. package/src/persona-zip.mjs +87 -0
  273. package/src/personas.mjs +159 -0
  274. package/src/platform-metadata-analysis.mjs +314 -0
  275. package/src/policy-design-gates.mjs +623 -0
  276. package/src/policy-gate-integration.mjs +318 -0
  277. package/src/portfolio.mjs +509 -0
  278. package/src/power-platform-source-map.mjs +190 -0
  279. package/src/project.mjs +449 -0
  280. package/src/prototype-iterations.mjs +730 -0
  281. package/src/repository-source-map.mjs +603 -0
  282. package/src/runtime/afk-conductor.mjs +973 -0
  283. package/src/runtime/context-assembly.mjs +457 -0
  284. package/src/runtime/context-benchmarks.mjs +115 -0
  285. package/src/runtime/dashboard-actions.mjs +109 -0
  286. package/src/runtime/dashboard-handoffs.mjs +149 -0
  287. package/src/runtime/dashboard-server.mjs +1272 -0
  288. package/src/runtime/dashboard.mjs +197 -0
  289. package/src/runtime/database.mjs +789 -0
  290. package/src/runtime/error-reporting.mjs +581 -0
  291. package/src/runtime/evidence-depth-workspace.mjs +412 -0
  292. package/src/runtime/execution-leases.mjs +299 -0
  293. package/src/runtime/guided-discovery.mjs +350 -0
  294. package/src/runtime/guided-intents.mjs +517 -0
  295. package/src/runtime/impact-analysis.mjs +535 -0
  296. package/src/runtime/intents.mjs +222 -0
  297. package/src/runtime/knowledge.mjs +86 -0
  298. package/src/runtime/lifecycle-hooks.mjs +1239 -0
  299. package/src/runtime/mcp-config.mjs +110 -0
  300. package/src/runtime/mcp-server.mjs +1885 -0
  301. package/src/runtime/palace.mjs +362 -0
  302. package/src/runtime/paths.mjs +58 -0
  303. package/src/runtime/persona-engagement.mjs +255 -0
  304. package/src/runtime/phase-contributions.mjs +594 -0
  305. package/src/runtime/policy-workspace.mjs +170 -0
  306. package/src/runtime/prototype-iterations.mjs +235 -0
  307. package/src/runtime/provider-adapters.mjs +163 -0
  308. package/src/runtime/repository-index.mjs +838 -0
  309. package/src/runtime/runs.mjs +185 -0
  310. package/src/runtime/security-validation.mjs +1230 -0
  311. package/src/runtime/starter-materialisation.mjs +1155 -0
  312. package/src/runtime/team-hub-client.mjs +479 -0
  313. package/src/runtime/team-hub-database.mjs +288 -0
  314. package/src/runtime/team-hub-server.mjs +191 -0
  315. package/src/runtime/team-hub.mjs +110 -0
  316. package/src/runtime/tree-sitter-index.mjs +390 -0
  317. package/src/runtime/version.mjs +1 -0
  318. package/src/runtime/work.mjs +633 -0
  319. package/src/salesforce-source-map.mjs +212 -0
  320. package/src/security-validation-config.mjs +224 -0
  321. package/src/solution-readiness.mjs +620 -0
  322. package/src/starter-materialisation-contract.mjs +407 -0
  323. package/src/task-graph.mjs +544 -0
  324. package/src/team-hub-resources.mjs +239 -0
  325. package/src/team-hub.mjs +242 -0
  326. package/src/test-scenarios.mjs +622 -0
  327. package/src/validation-config.mjs +289 -0
  328. package/templates/SPECS/1.Scope/personas/registry.yaml +12 -0
  329. package/templates/SPECS/5.Strategy/patterns/context-packet.md +119 -0
  330. package/templates/SPECS/6.Build/_tracker-template.md +16 -0
  331. package/templates/SPECS/pipeline.yaml +62 -0
  332. package/templates/discovery-answers.yaml +86 -0
  333. package/templates/intent-body.md +21 -0
  334. package/tests/fixtures/context-benchmarks.json +9 -0
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: ewai-standards-check
3
+ description: Verify a supplied code snippet, one file, several files, a directory, a change set, or an entire repository against the accepted project standards and related decisions captured in SPECS. Use when an EWAI project owner asks whether code follows project standards, requests a standards audit or compliance check, needs gate evidence before moving work forward, or wants a durable Markdown standards-check report.
4
+ ---
5
+
6
+ # EWAI Standards Check
7
+
8
+ Check implementation evidence against project-owned standards. Resolve the SPECS root from `.ewai-pipeline/project.json`, treat it as the source of truth, and write a durable Markdown review; do not substitute generic best practice for a missing project rule.
9
+
10
+ ## Establish the review boundary
11
+
12
+ 1. Resolve the workspace and configured SPECS root from `.ewai-pipeline/project.json`; fall back to `./SPECS` only for a legacy/default project without a locator.
13
+ 2. Run the normal EWAI check-in when this is the first substantive action in the conversation.
14
+ 3. Confirm the target from the request:
15
+ - code supplied in the conversation;
16
+ - one file or an explicit list of files;
17
+ - a directory, commit, branch diff, or working-tree change set;
18
+ - the whole repository.
19
+ 4. Confirm whether the user wants review only or also wants fixes. Default to review only. Never alter code merely because a non-conformity is found.
20
+ 5. If the configured SPECS root is absent, stop and explain that there is no project standards contract to verify. Offer EWAI initialization or Archaeology rather than inventing a baseline.
21
+
22
+ For a whole-repository request, inventory the source surfaces before checking them. Exclude generated, vendored, cache, build-output, dependency, and binary paths unless a project standard explicitly brings them into scope. Record every exclusion. Do not describe a sampled or partially inspected repository as compliant.
23
+
24
+ ## Build the applicable standards set
25
+
26
+ Read project sources before inspecting implementation:
27
+
28
+ 1. Read `SPECS/5.Strategy/standards-index.md` when it exists and follow its routing instructions.
29
+ 2. Read applicable accepted rules under `SPECS/4.Constraints/`, including compliance constraints.
30
+ 3. Read accepted architecture, patterns, anti-patterns, decisions, schemas, SOPs, and stack guidance under `SPECS/5.Strategy/` when they constrain the target.
31
+ 4. Read relevant scope, domain, intent, requirement, journey, risk, gate, and Build records when they determine expected behaviour or required evidence.
32
+ 5. Read repository-local agent instructions named by the project, such as `AGENTS.md` or `CLAUDE.md`, only when SPECS adopts or routes to them. Record their authority explicitly.
33
+
34
+ Create an applicability matrix before judging the code. Give each rule a stable identifier from the source when available; otherwise use `<relative-path>#<heading>`. For each rule record:
35
+
36
+ - why it applies to this target;
37
+ - which implementation surfaces can prove or disprove it;
38
+ - what validation evidence is required;
39
+ - whether it is `applicable`, `not-applicable`, `conflicting`, or `unresolved`.
40
+
41
+ Do not silently choose between conflicting accepted records. Report the conflict as a standards defect and keep the affected checks unresolved until a project owner decides precedence.
42
+
43
+ ## Inspect implementation evidence
44
+
45
+ Read the target and enough surrounding code to evaluate it accurately. Follow imports, callers, routes, schemas, tests, configuration, generated contracts, and framework conventions where the standard crosses file boundaries. A file-only request limits the reported target, not the contextual reading needed to understand it.
46
+
47
+ Use the most specific available evidence:
48
+
49
+ - source paths and line numbers;
50
+ - symbols, routes, migrations, schemas, or configuration keys;
51
+ - tests and their assertions;
52
+ - formatter, linter, type-checker, static-analysis, security, or project validation output;
53
+ - repository history when the standard or exception depends on an accepted decision.
54
+
55
+ Run safe project-defined validation commands when they are necessary and available. Follow the project's execution instructions and record the exact command and outcome. A green tool result is evidence for the rules it actually covers, not proof that every project standard passes.
56
+
57
+ Classify each applicable rule as:
58
+
59
+ - `pass`: direct evidence satisfies the rule;
60
+ - `non-conformity`: direct evidence contradicts the rule;
61
+ - `warning`: the code creates a material concern but the rule is advisory or incomplete;
62
+ - `unverified`: evidence is missing, inaccessible, ambiguous, or requires runtime/human validation;
63
+ - `not-applicable`: the rule was considered and does not govern this target;
64
+ - `standards-conflict`: accepted project sources disagree.
65
+
66
+ Assign `critical`, `high`, `medium`, `low`, or `information` severity to non-passing findings. Separate certainty about the evidence from severity of the impact. Never claim security, compliance, correctness, or whole-repository conformance from absence of detected failures.
67
+
68
+ ## Write the Markdown report
69
+
70
+ Read [the standards-check report contract](references/report-contract.md) completely before writing the result.
71
+
72
+ Create:
73
+
74
+ ```text
75
+ SPECS/3.Evidence/reviews/standards/<YYYY-MM-DD>-<target-slug>-standards-check.md
76
+ ```
77
+
78
+ Use a collision-safe suffix rather than overwriting an existing report. Keep sensitive code out of the report; cite paths and describe evidence instead. For supplied snippets, assign displayed line numbers and label the evidence as conversation-supplied rather than repository-verified.
79
+
80
+ The report must contain the target, commit or working-tree state, standards sources, applicability matrix, inspected evidence, exclusions, command results, outcome counts, detailed findings, unverified items, conflicts, and a proportionate remediation order. Include passes as well as problems so the report shows real coverage.
81
+
82
+ If the check belongs to an intent or delivery stage, link the report from the applicable Build tracker or evidence record without changing the stage automatically. A report does not pass a gate by itself; the project's gate contract decides that.
83
+
84
+ ## Present the outcome
85
+
86
+ Lead with the bounded conclusion and the report path. State:
87
+
88
+ - how many rules passed, failed, warned, remained unverified, conflicted, or were not applicable;
89
+ - the highest-severity findings;
90
+ - whether coverage was complete, partial, or blocked for the requested boundary;
91
+ - what decision, evidence, or remediation should happen next.
92
+
93
+ If the user requested fixes, propose the smallest safe sequence and ask for any authority needed by the project before editing. After fixes, create a new report or an explicitly dated re-check section; preserve the original evidence.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "EWAI Standards Check"
3
+ short_description: "Verify code against project SPECS standards"
4
+ default_prompt: "Use $ewai-standards-check to verify this code against the standards captured in the project SPECS and write a Markdown report."
@@ -0,0 +1,116 @@
1
+ # Standards-check report contract
2
+
3
+ Use this contract for every report written by `$ewai-standards-check`.
4
+
5
+ ## Required frontmatter
6
+
7
+ ```yaml
8
+ ---
9
+ title: Standards check — <target>
10
+ date: YYYY-MM-DD
11
+ status: complete | partial | blocked
12
+ scope: snippet | files | directory | change-set | repository
13
+ target: <human-readable target>
14
+ repository_revision: <commit SHA, working-tree state, or not-repository-backed>
15
+ standards_baseline: <commit SHA or working-tree state for SPECS>
16
+ reviewer: <AI host/model when known>
17
+ ---
18
+ ```
19
+
20
+ Use `complete` only when every in-scope source surface and applicable standard has a supported outcome. Use `partial` for sampling, explicit exclusions that prevent full coverage, interrupted commands, or unresolved evidence. Use `blocked` when the standards baseline or target cannot be inspected meaningfully.
21
+
22
+ ## Required sections
23
+
24
+ ### 1. Conclusion
25
+
26
+ State the bounded result in plain language. Never use an unqualified “compliant” for a partial review.
27
+
28
+ ### 2. Review scope
29
+
30
+ Record:
31
+
32
+ - requested target and review mode;
33
+ - repositories, paths, symbols, snippet lines, commits, or diff range inspected;
34
+ - revision and dirty-working-tree state;
35
+ - generated, vendored, binary, unavailable, or deliberately excluded surfaces;
36
+ - whether coverage is complete, partial, or blocked.
37
+
38
+ ### 3. Standards baseline
39
+
40
+ List every SPECS source used, with a relative path and relevant heading or rule identifier. Distinguish:
41
+
42
+ - binding constraints;
43
+ - accepted decisions or patterns;
44
+ - behavioural expectations and gate evidence;
45
+ - advisory material;
46
+ - unresolved or conflicting sources.
47
+
48
+ Do not paste large sections of standards. Paraphrase the rule and link it to its source.
49
+
50
+ ### 4. Outcome summary
51
+
52
+ Use this table:
53
+
54
+ | Outcome | Count |
55
+ |---|---:|
56
+ | Pass | 0 |
57
+ | Non-conformity | 0 |
58
+ | Warning | 0 |
59
+ | Unverified | 0 |
60
+ | Standards conflict | 0 |
61
+ | Not applicable | 0 |
62
+
63
+ Add severity counts for non-passing findings when useful.
64
+
65
+ ### 5. Applicability and coverage matrix
66
+
67
+ Use one row per considered rule:
68
+
69
+ | Standard | Why it applies | Evidence inspected | Outcome | Finding |
70
+ |---|---|---|---|---|
71
+
72
+ Use a source-provided standard identifier when available; otherwise use `<path>#<heading>`. A whole-repository report must make unexamined source surfaces visible.
73
+
74
+ ### 6. Findings
75
+
76
+ Give each non-passing finding a stable identifier such as `SC-001` and include:
77
+
78
+ - outcome and severity;
79
+ - standard source and concise rule;
80
+ - implementation evidence with path and line or symbol references;
81
+ - impact and affected scope;
82
+ - confidence and any uncertainty;
83
+ - smallest useful remediation;
84
+ - verification needed after remediation.
85
+
86
+ Keep one independently resolvable issue per finding. Do not combine unrelated violations to reduce the finding count.
87
+
88
+ ### 7. Confirmed conformance
89
+
90
+ Summarize meaningful passes with their evidence. Avoid listing trivial formatting checks when they add no assurance.
91
+
92
+ ### 8. Unverified items and standards conflicts
93
+
94
+ Explain missing evidence, runtime-only checks, inaccessible systems, ambiguous wording, contradictory records, and the accountable decision needed. Do not convert unknowns into passes.
95
+
96
+ ### 9. Validation commands
97
+
98
+ Record each command, execution context, exit status, and relevant result. If no commands ran, say why.
99
+
100
+ ### 10. Recommended next actions
101
+
102
+ Order actions by risk and dependency. Separate:
103
+
104
+ 1. standards decisions or missing evidence;
105
+ 2. critical and high remediation;
106
+ 3. lower-severity improvements;
107
+ 4. re-check and gate evidence.
108
+
109
+ ## Evidence rules
110
+
111
+ - Prefer repository-relative links and line references.
112
+ - Cite the standards baseline and implementation revision independently when they differ.
113
+ - Mark conversation-supplied snippets as non-repository-backed.
114
+ - Do not expose secrets, credentials, personal data, or unnecessarily reproduce vulnerable code.
115
+ - Treat tool output as scoped evidence, not an authority beyond the checks the tool performs.
116
+ - Preserve the original report. A later re-check should be a new dated report or a clearly attributable appended review event.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: ewai-test-scenarios
3
+ description: Design source-grounded test scenarios with a dynamically selected ensemble of installed EWAI personas, record reviewed scenario evidence, and build automated tests from accepted scenario oracles. Use during EWAI Test Plan when persona perspectives can expose missing paths, or during Build when accepted automated or hybrid PTS scenarios apply to the current task.
4
+ ---
5
+
6
+ # EWAI Persona-Driven Test Scenarios
7
+
8
+ Resolve the project and configured SPECS root before acting. Read [the scenario contract](references/scenario-contract.md) before preparing, recording, or implementing a pack.
9
+
10
+ Use the deterministic CLI for source truth and durable writes. Use agent judgement only to challenge coverage, propose hypotheses, reconcile scenarios, and implement tests. Never treat a persona perspective as evidence, a requirement, an approval, or a substitute for a real user or accountable specialist.
11
+
12
+ ## Choose the mode
13
+
14
+ - During **Test Plan**, design and record scenarios through the preparation workflow below.
15
+ - During **Build**, implement only accepted automated or hybrid scenarios assigned to the current leased task.
16
+ - If both are needed, finish reviewed scenario design before using its oracles to build tests.
17
+
18
+ ## Prepare authoritative context
19
+
20
+ Run:
21
+
22
+ ```bash
23
+ ewai test-scenarios prepare <slug> --focus "<current testing concern>" --project . --json
24
+ ```
25
+
26
+ Do not draft scenarios before preparation succeeds. The result owns the current source digest, bounded source references, contextual impact evidence, installed-tier availability, and active persona ensemble.
27
+
28
+ Show the active persona name, tier, matched concerns, and engagement reason before semantic challenge. Engage only the returned ensemble. When the focus changes materially, prepare again and replace the ensemble with the newly selected personas; do not accumulate stale participants.
29
+
30
+ Premium personas may participate only when reported as installed. Never sync, download, update, or expose premium persona bodies as part of this skill.
31
+
32
+ ## Challenge coverage with personas
33
+
34
+ Ask each active persona to challenge one or more distinct concerns within its engagement reason. Consider happy path, alternate path, errors, permissions, accessibility, security and privacy, operations, recovery, data, misuse, adversarial behaviour, and regression only when the sources or an explicitly labelled hypothesis make them relevant.
35
+
36
+ For every proposal:
37
+
38
+ 1. Cite one or more returned authoritative source IDs for the expected behaviour.
39
+ 2. Record the persona ID and the concern that prompted the proposal.
40
+ 3. Express preconditions, actions, and observable expected results.
41
+ 4. Route proof to automated tests, Manual QA, specialist assurance, or representative-user validation.
42
+ 5. Keep a proposal as an unresolved hypothesis when no authoritative source permits the oracle.
43
+
44
+ An inferred Blast Radius concern can explain why a scenario should be investigated. It cannot, by itself, authorise expected product behaviour.
45
+
46
+ When an organisation policy baseline is enabled, treat its current matched policy rule and accepted control evidence as an authoritative source for relevant test scenarios. Preserve the policy rule, control, evaluation digest, and evidence route in the scenario trace. Persona challenges may broaden misuse, privacy, security, accessibility, operational, or recovery coverage, but they cannot alter the policy oracle or satisfy a named-human or specialist-review control.
47
+
48
+ ## Review and record
49
+
50
+ Before recording, have a named accountable reviewer:
51
+
52
+ - de-duplicate equivalent scenarios;
53
+ - resolve conflicting source interpretations or retain the conflict as a gap;
54
+ - reject unsupported accepted oracles;
55
+ - select the evidence route and owner;
56
+ - name the planned test file and test name for automated or hybrid scenarios;
57
+ - retain blocked, superseded, and unresolved hypotheses rather than deleting inconvenient history.
58
+
59
+ Create a project-local candidate JSON file that follows `ewai.persona-test-scenarios/v1`, then run:
60
+
61
+ ```bash
62
+ ewai test-scenarios record <slug> \
63
+ --input <project-relative-candidate.json> \
64
+ --reviewed-by "<named reviewer>" \
65
+ --project . \
66
+ --json
67
+ ```
68
+
69
+ Inspect durable state with:
70
+
71
+ ```bash
72
+ ewai test-scenarios status <slug> --project . --json
73
+ ```
74
+
75
+ If status is `stale`, prepare and review again. If it is `invalid`, preserve the evidence and investigate the reported pair or digest failure; do not repair it by editing Markdown.
76
+
77
+ ## Build tests from accepted scenarios
78
+
79
+ Read the current task contract, test standards, and authoritative `test-scenarios.json`. Select only accepted scenarios whose automation is `automated` or `hybrid` and whose planned test belongs to the current task write set.
80
+
81
+ For each selected scenario ID:
82
+
83
+ 1. Read the cited source and accepted observable result.
84
+ 2. Write the failing test first and capture the expected RED evidence.
85
+ 3. Preserve the accepted oracle; never weaken or reverse it to match current code.
86
+ 4. Implement the smallest production change needed for that scenario.
87
+ 5. Run the focused GREEN command and then the task's refactor checks.
88
+ 6. Report the scenario ID, test file and name, command result, and remaining human evidence route.
89
+
90
+ Do not mark Manual QA, specialist assurance, or representative-user validation as passed. Those routes require named human evidence even when an automated portion also passes.
91
+
92
+ ## Stop conditions
93
+
94
+ Stop and escalate when source references disagree, a requested oracle has no authoritative source, the planned test falls outside the leased task, implementation would change an approval, a persona body would need to enter a safe projection, or a human evidence route is being simulated.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "EWAI Test Scenarios"
3
+ short_description: "Design persona-led scenarios and build traceable tests"
4
+ default_prompt: "Use $ewai-test-scenarios to design source-grounded persona test scenarios or build tests from an accepted scenario pack."
@@ -0,0 +1,88 @@
1
+ # Persona test-scenario contract
2
+
3
+ Read this reference when preparing a candidate pack, reviewing validation errors, implementing accepted tests, or interpreting workspace status.
4
+
5
+ ## Authority layers
6
+
7
+ | Layer | May do | Must not do |
8
+ | --- | --- | --- |
9
+ | Authoritative source | Define an accepted outcome, constraint, journey, criterion, standard, claim, or test obligation | Be silently replaced by persona output |
10
+ | Contextual impact evidence | Identify an observed or inferred area worth challenging | Authorise expected product behaviour by itself |
11
+ | Persona contribution | Expose a concern, edge case, ambiguity, or hypothesis | Act as stakeholder fact, approval, or completed evidence |
12
+ | Human decision | Accept, reject, block, supersede, or route a scenario | Be inferred from model fluency |
13
+ | Test evidence | Demonstrate the accepted observable result through the named route | Rewrite the oracle to make current code pass |
14
+
15
+ ## Preparation contract
16
+
17
+ `ewai test-scenarios prepare <slug> --focus "..." --project . --json` returns `ewai.persona-test-brief/v1` with:
18
+
19
+ - `sourceDigest` for the bounded project evidence;
20
+ - `authoritativeSources[]` containing stable IDs, kind, label, safe path, digest, and excerpt;
21
+ - `contextualEvidence[]` for non-authoritative impact context;
22
+ - `activePersonas[]` containing only ID, name, tier, category, bounded description, matched signals, and engagement reason;
23
+ - installed availability for core, premium, personal, and project tiers;
24
+ - unresolved questions, recording enums, and the human-authority boundary.
25
+
26
+ Preparation is read-only. It never invokes a network, Git, an LLM, or premium synchronisation.
27
+
28
+ ## Candidate schema
29
+
30
+ Use this shape:
31
+
32
+ ```json
33
+ {
34
+ "schema": "ewai.persona-test-scenarios/v1",
35
+ "slug": "customer-access",
36
+ "focus": "permission and recovery",
37
+ "preparedSourceDigest": "<digest from preparation>",
38
+ "scenarios": [
39
+ {
40
+ "id": "PTS-001",
41
+ "title": "Authorised delegate completes the request",
42
+ "type": "happy-path",
43
+ "sourceRefs": ["intent:journey:J-001", "intent:acceptance:AC-001"],
44
+ "personaContributions": [
45
+ {
46
+ "personaId": "project.product-owner",
47
+ "concern": "Prove the intended outcome and permission boundary."
48
+ }
49
+ ],
50
+ "preconditions": ["An authenticated delegate may request access."],
51
+ "actions": ["Submit a valid access request."],
52
+ "expectedResults": ["The request is accepted and a clear success outcome is displayed."],
53
+ "evidenceRoute": "automated",
54
+ "automation": "automated",
55
+ "plannedTest": {
56
+ "file": "tests/access.test.mjs",
57
+ "name": "authorised delegate completes access request"
58
+ },
59
+ "owner": "Delivery team",
60
+ "status": "accepted"
61
+ }
62
+ ],
63
+ "gaps": []
64
+ }
65
+ ```
66
+
67
+ Scenario IDs use `PTS-###` and remain stable. Supported types are `happy-path`, `alternate`, `error`, `permissions`, `accessibility`, `security-privacy`, `operations`, `recovery`, `data`, `misuse`, `adversarial`, and `regression`.
68
+
69
+ Supported status values are `accepted`, `blocked`, `superseded`, and `hypothesis`. An accepted scenario needs at least one known authoritative source reference. A blocked or hypothesis item may preserve a question without presenting it as accepted behaviour.
70
+
71
+ Evidence routes are `automated`, `manual-qa`, `specialist-assurance`, and `representative-user`. Automation values are `automated`, `manual`, and `hybrid`. Automated and hybrid scenarios require a safe repository-relative planned test file and named test.
72
+
73
+ ## Evidence and status
74
+
75
+ Recording writes authoritative `test-scenarios.json` and readable `test-scenarios.md` under the delivery root. The JSON retains the content digest and the Markdown digest. Identical input is idempotent; conflicting accepted evidence is not overwritten.
76
+
77
+ Status means:
78
+
79
+ - `missing`: no reviewed pack exists;
80
+ - `recorded`: the pair and current sources match;
81
+ - `stale`: an authoritative source changed after review;
82
+ - `invalid`: the pair, schema, slug, content digest, or Markdown digest does not match.
83
+
84
+ JSON is authoritative. Never parse or manually edit Markdown to repair scenario state.
85
+
86
+ ## Human evidence boundary
87
+
88
+ Manual QA remains an explicit named human gate. Specialist assurance requires an accountable practitioner. Representative-user validation requires real representative participants. Persona simulation may improve the question set but may not complete any of those routes.
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ import { executeAfkRun } from './runtime/afk-conductor.mjs';
3
+
4
+ function option(name) {
5
+ const index = process.argv.indexOf(name);
6
+ return index < 0 ? '' : process.argv[index + 1] ?? '';
7
+ }
8
+
9
+ const projectRoot = option('--project');
10
+ const runId = option('--run');
11
+ if (!projectRoot || !runId) {
12
+ console.error('Usage: afk-worker --project PATH --run RUN_ID');
13
+ process.exitCode = 2;
14
+ } else {
15
+ await executeAfkRun(projectRoot, runId);
16
+ }