@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,381 @@
1
+ # Repository Source Map guide
2
+
3
+ The Repository Source Map is EWAI's project-local inventory and analysis layer. It records every regular file found in the configured repositories, gives each file an explicit analysis outcome and depth, and uses deeper Tree-sitter evidence where a supported grammar is registered.
4
+
5
+ The Source Map evolves the existing Repository Index; it does not replace it. Search, dependency graphs, standards coverage, Blast Radius, and the dashboard all consume the same rebuildable SQLite projection.
6
+
7
+ > The Source Map is advisory repository evidence. A fresh map is not complete understanding, security certification, product acceptance, or release approval. Dynamic behaviour, external systems, generated assets, runtime configuration, and undocumented human processes can remain outside its evidence.
8
+
9
+
10
+ <!-- editorial: contents -->
11
+ ## On this page
12
+
13
+ - [Start with a question about a change](#start-with-a-question-about-a-change)
14
+ - [What gets mapped](#what-gets-mapped)
15
+ - [Understand outcomes and depths](#understand-outcomes-and-depths)
16
+ - [Core analysers and file coverage](#core-analysers-and-file-coverage)
17
+ - [Refresh and inspect the Source Map](#refresh-and-inspect-the-source-map)
18
+ - [Add a project profile](#add-a-project-profile)
19
+ - [Add profiles through packs](#add-profiles-through-packs)
20
+ - [Configure repository topologies](#configure-repository-topologies)
21
+ - [Profile contract and safety limits](#profile-contract-and-safety-limits)
22
+ - [Personas in discovery and impact work](#personas-in-discovery-and-impact-work)
23
+ - [Relationship to Blast Radius](#relationship-to-blast-radius)
24
+ - [Power Platform and Salesforce exports](#power-platform-and-salesforce-exports)
25
+ - [Troubleshooting](#troubleshooting)
26
+ - [Operational checklist](#operational-checklist)
27
+ - [Related guides](#related-guides)
28
+ - [Current contract sources](#current-contract-sources)
29
+
30
+ ## Start with a question about a change
31
+
32
+ For example: “Where does the application check export permissions?” Ask EWAI to inspect the relevant source and its callers. For direct inspection:
33
+
34
+ ```bash
35
+ ewai index freshness --project . --json
36
+ ewai index refresh --project . --json
37
+ ewai index search "export" --project . --json
38
+ ```
39
+
40
+ Choose a returned file or symbol, inspect its graph through the [commands below](#refresh-and-inspect-the-source-map), then read the source. Check coverage before claiming you've found every caller. No search result may mean unsupported analysis, different naming or genuinely absent code.
41
+
42
+ ## What gets mapped
43
+
44
+ EWAI walks every configured repository and inventories each regular file except:
45
+
46
+ - symbolic links;
47
+ - unreadable directories;
48
+ - the configured canonical `SPECS` tree, which is indexed separately by the Mind Palace and delivery projections;
49
+ - generated or dependency directories that EWAI excludes by name, including `.git`, `.nuxt`, `.output`, `.ewai-pipeline`, `.phpunit.cache`, `.vite`, `build`, `coverage`, `dist`, `node_modules`, `storage`, and `vendor`.
50
+
51
+ An uncommon file type is not silently discarded. The core fallback profile records it as inventory-only evidence. Technology, stack, organisation, and project profiles can opt matching files into a registered deeper analyser.
52
+
53
+ Keeping canonical SPECS out of the Source Map prevents a normal evidence write from making implementation evidence stale. It does not hide project knowledge: the Mind Palace, intent, standards, and delivery projections remain its authoritative readers.
54
+
55
+ ## Understand outcomes and depths
56
+
57
+ Every file has one outcome:
58
+
59
+ | Outcome | Meaning |
60
+ | --- | --- |
61
+ | `analysed` | The selected registered analyser completed. |
62
+ | `inventory_only` | EWAI recorded bounded file metadata but did not interpret content. |
63
+ | `skipped_sensitive` | The filename is credential-shaped, so EWAI did not open it. |
64
+ | `skipped_oversized` | The file exceeded the selected profile's size ceiling, so EWAI did not open it. |
65
+ | `analysis_failed` | EWAI retained the file in coverage but its bounded analyser could not complete. |
66
+
67
+ Analysis depth is separate:
68
+
69
+ | Depth | Current meaning |
70
+ | --- | --- |
71
+ | `deep` | A registered deep analyser extracts syntax or declared metadata symbols and relationships. Tree-sitter handles supported source code; reviewed platform analyzers handle finite metadata catalogues. |
72
+ | `shallow` | EWAI records structural keys or content-shape summary data, not scalar values. |
73
+ | `inventory` | EWAI records file classification and bounded metadata only. |
74
+
75
+ Deep means deeper structural evidence, not semantic completeness. Shallow structured analysis stores key paths rather than configuration values. Sensitive and oversized files receive metadata-derived fingerprints; EWAI does not hash their content.
76
+
77
+ ## Core analysers and file coverage
78
+
79
+ Profiles may select only these registered analysers:
80
+
81
+ | Analyser | Intended evidence |
82
+ | --- | --- |
83
+ | `tree-sitter` | Syntax-aware PHP, JavaScript, JSX, TypeScript, TSX, and Vue analysis. |
84
+ | `power-platform-metadata` | Allowlisted solution, component, canvas and declared dependency facts from supported already-extracted Power Platform source. |
85
+ | `salesforce-metadata` | Allowlisted package, component, object, field, flow and permission facts from supported Salesforce source. |
86
+ | `structured-keys` | JSON/JSONC, YAML, TOML, XML/SVG, INI/properties, and safe environment-template key shapes. |
87
+ | `text-summary` | Documentation and common source/configuration text shapes such as line counts. |
88
+ | `inventory-only` | File presence, classification, size, profile, and outcome. |
89
+
90
+ Core profiles cover common source, structured, documentation, build, query, shell, styling, and configuration file extensions. Unknown and binary files remain visible through inventory-only profiles. Packs should add a profile when the file's role or framework context matters, not merely to make the count look deeper.
91
+
92
+ ## Refresh and inspect the Source Map
93
+
94
+ Refresh before substantive repository, Blast Radius, or standards claims:
95
+
96
+ ```bash
97
+ ewai index freshness --project . --json
98
+ ewai index refresh --project . --json
99
+ ewai index coverage --project . --json
100
+ ```
101
+
102
+ Inspect the effective profile catalogue:
103
+
104
+ ```bash
105
+ ewai index profiles --project . --json
106
+ ewai index profiles --source organisation --limit 50 --project . --json
107
+ ewai index profiles --analyser tree-sitter --project . --json
108
+ ```
109
+
110
+ Inspect safe file projections:
111
+
112
+ ```bash
113
+ ewai index files --outcome analysis_failed --project . --json
114
+ ewai index files --outcome skipped_sensitive --project . --json
115
+ ewai index files --classification framework-routing --project . --json
116
+ ewai index files --profile project:api-contracts --project . --json
117
+ ewai index files --repository api --query contracts --limit 50 --project . --json
118
+ ```
119
+
120
+ The profile projection includes a `matchCount`; zero means the profile was active in the completed catalogue but selected no files. The file projection returns repository name, repository-relative path, parser state, counts, classification, profile, analyser, depth, and outcome. It does not expose repository roots, file content, stored analysis metadata, or fingerprints. Filters and result limits are bounded consistently for CLI and MCP callers.
121
+
122
+ The equivalent read-only MCP tools are:
123
+
124
+ - `ewai_source_map_coverage`;
125
+ - `ewai_source_map_profiles`;
126
+ - `ewai_source_map_files`.
127
+
128
+ The dashboard's **Impact** tab shows coverage, effective profile provenance, a bounded sample needing attention, and the personas actively engaged for the selected work item.
129
+
130
+ ## Add a project profile
131
+
132
+ Add project-specific rules under `source_map.profiles` in `SPECS/pipeline.yaml`:
133
+
134
+ ```yaml
135
+ source_map:
136
+ profiles:
137
+ - id: api-contracts
138
+ patterns:
139
+ - contracts/**/*.json
140
+ analyser: structured-keys
141
+ classification: api-contract
142
+ repositories:
143
+ - backend
144
+ priority: 100
145
+ max_bytes: 500000
146
+ ```
147
+
148
+ `repositories` may contain a configured repository name or role. Omit it when the profile should apply to every configured repository.
149
+
150
+ After changing profiles, refresh the map. The effective profile catalogue has a deterministic digest; changing a profile, pack version, or active pack makes the previous map stale.
151
+
152
+ ## Add profiles through packs
153
+
154
+ Technology, stack, and Organisation Blueprint Packs use the same declarative `source_map` shape:
155
+
156
+ ```yaml
157
+ schema: ewai.pack/v1
158
+ id: org.northstar.engineering
159
+ name: Northstar engineering
160
+ description: Reviewed organisation repository conventions.
161
+ version: 1.2.0
162
+ type: organisation
163
+ requires: []
164
+ blueprint:
165
+ publisher:
166
+ id: northstar
167
+ name: Northstar Digital
168
+ compatibility:
169
+ ewai: 0.x
170
+ modules:
171
+ - id: repository-conventions
172
+ name: Repository conventions
173
+ description: Classify organisation policy files for repository analysis.
174
+ required: true
175
+ source_map:
176
+ profiles:
177
+ - id: decision-policies
178
+ patterns:
179
+ - policies/**/*.yaml
180
+ analyser: structured-keys
181
+ classification: organisation-policy
182
+ priority: 90
183
+ ```
184
+
185
+ The example is a complete organisation manifest. `source_map` belongs to the pack, not an individual module. Profiles take effect when the pack is selected in the project configuration; installing a folder alone doesn't activate it.
186
+
187
+ The Blueprint parser validates profile fields and types, registered analysers, safe patterns and size limits. It rejects executable fields and duplicate profile IDs. Changing a profile changes the pack digest and the effective profile catalogue, so refresh the index after an approved change.
188
+
189
+ Non-core profile IDs are namespaced when resolved:
190
+
191
+ - project profile `api-contracts` becomes `project:api-contracts`;
192
+ - pack profile `decision-policies` becomes `org.northstar.engineering:decision-policies`.
193
+
194
+ The effective catalogue includes configured packs and their dependencies. Profile selection is deterministic:
195
+
196
+ 1. project;
197
+ 2. organisation;
198
+ 3. stack;
199
+ 4. technology;
200
+ 5. core.
201
+
202
+ Within the same source level, higher `priority` wins, then profile ID provides a stable tie-break. Core safety treatment for sensitive filenames cannot be overridden.
203
+
204
+ ## Configure repository topologies
205
+
206
+ Source Map profiles use the same `repositories` topology as indexing, starter materialisation, and Blast Radius.
207
+
208
+ ### Single repository
209
+
210
+ ```yaml
211
+ repositories:
212
+ - name: application
213
+ path: .
214
+ role: application
215
+ source_map:
216
+ profiles:
217
+ - id: application-contracts
218
+ patterns: [contracts/**/*.json]
219
+ analyser: structured-keys
220
+ classification: api-contract
221
+ repositories: [application]
222
+ ```
223
+
224
+ ### Monorepo
225
+
226
+ ```yaml
227
+ repositories:
228
+ - name: product
229
+ path: .
230
+ role: workspace
231
+ source_map:
232
+ profiles:
233
+ - id: frontend-pages
234
+ patterns: [apps/web/pages/**/*.vue]
235
+ analyser: tree-sitter
236
+ classification: user-interface
237
+ repositories: [product]
238
+ - id: backend-routes
239
+ patterns: [apps/api/routes/**/*.php]
240
+ analyser: tree-sitter
241
+ classification: framework-routing
242
+ repositories: [product]
243
+ ```
244
+
245
+ Patterns are relative to the configured repository root. In a monorepo, include the application subfolder in the pattern.
246
+
247
+ ### Folder containing repository subfolders
248
+
249
+ ```yaml
250
+ repositories:
251
+ - name: web-app
252
+ path: clients/web
253
+ role: frontend
254
+ - name: api-app
255
+ path: services/api
256
+ role: backend
257
+ source_map:
258
+ profiles:
259
+ - id: frontend-pages
260
+ patterns: [pages/**/*.vue, app/pages/**/*.vue]
261
+ analyser: tree-sitter
262
+ classification: user-interface
263
+ repositories: [frontend]
264
+ - id: backend-routes
265
+ patterns: [routes/**/*.php]
266
+ analyser: tree-sitter
267
+ classification: framework-routing
268
+ repositories: [backend]
269
+ ```
270
+
271
+ Here each pattern is relative to its repository subfolder. Repository selectors may use `web-app`/`api-app` names or `frontend`/`backend` roles.
272
+
273
+ ## Profile contract and safety limits
274
+
275
+ A profile supports only:
276
+
277
+ - `id`;
278
+ - one or more safe relative `patterns` using `*`, `**`, and `?`;
279
+ - one registered `analyser`;
280
+ - a lower-kebab-case `classification`;
281
+ - optional integer `priority` from `-10000` to `10000`;
282
+ - optional repository name/role selectors;
283
+ - optional `max_bytes` from 1 to 900,000.
284
+
285
+ Absolute, negated, traversal, backslash, brace, bracket, and parenthesised patterns are rejected. Profiles cannot contain shell commands, module paths, executable hooks, credentials, or network configuration. The 900,000-byte ceiling is global; a profile may lower it but cannot raise it.
286
+
287
+ Use profiles to select an existing safe analysis behaviour. If a new analyser is needed, it requires a reviewed EWAI implementation change with its own tests and safety model.
288
+
289
+ ## Personas in discovery and impact work
290
+
291
+ Personas do not change which bytes are indexed. They challenge how the resulting evidence is interpreted.
292
+
293
+ Attach relevant lenses to the intent during Discovery, including:
294
+
295
+ - core personas;
296
+ - installed premium personas;
297
+ - reusable personal personas;
298
+ - project-local personas, including approved Blueprint-derived personas.
299
+
300
+ The dashboard identifies every active persona by name, tier, role, depth, and engagement reason. An attached premium or local reference remains visible as unavailable if its library content cannot currently be resolved. This avoids silently dropping a perspective.
301
+
302
+ Persona conclusions remain advisory. Real stakeholders and accountable specialists provide acceptance, assurance, and approval.
303
+
304
+ ## Relationship to Blast Radius
305
+
306
+ The Source Map is the evidence base. Blast Radius resolves supplied paths or symbols and traverses supported relationships from that evidence.
307
+
308
+ Blast Radius reports partial coverage when the map includes inventory-only, shallow, sensitive, oversized, failed, or explicitly partial platform evidence, when a target is unresolved or ambiguous, or when traversal reaches its bound. A small graph under partial coverage is uncertainty, not proof of low impact.
309
+
310
+ See [Blast Radius and Impact Routing](blast-radius-and-impact-routing-guide.md) for the review-routing workflow.
311
+
312
+ ## Power Platform and Salesforce exports
313
+
314
+ The installed `ewai.technology.power-platform` and
315
+ `ewai.technology.salesforce` packs add finite semantic profiles for supported
316
+ already-extracted source layouts. Their symbols and relationships use the same
317
+ Source Map and graph as Tree-sitter evidence. Unsupported families remain
318
+ generic, inventory, failed or explicitly partial evidence rather than being
319
+ silently discarded.
320
+
321
+ EWAI does not extract ZIP or `.msapp` archives, run vendor CLIs, connect to a
322
+ tenant or org, import, deploy, or retain arbitrary configuration values. See the
323
+ [Power Platform and Salesforce export analysis guide](platform-export-analysis-guide.md)
324
+ for supported layouts, topology examples, redaction rules and troubleshooting.
325
+
326
+ ## Troubleshooting
327
+
328
+ ### The map is stale after no source-code change
329
+
330
+ Profile catalogue changes also invalidate freshness. Inspect `ewai index freshness`; if the reason is `profile-catalogue-changed`, review the current packs and profiles, then refresh.
331
+
332
+ ### A file is inventory-only
333
+
334
+ Inspect its selected profile. The outcome is expected for unknown or binary content. Add a safe profile only if a registered analyser matches the format and the classification provides useful project context.
335
+
336
+ ### A structured file failed
337
+
338
+ Filter `--outcome analysis_failed`. Confirm the document is valid for its extension. Failure remains visible in Source Map coverage and limits downstream claims.
339
+
340
+ ### A sensitive file was skipped
341
+
342
+ That is the intended safety behaviour. Do not rename or copy credentials to force analysis. Use a value-free `.env.example`, `.env.sample`, or `.env.template` when configuration-key evidence is genuinely needed.
343
+
344
+ ### The wrong profile won
345
+
346
+ Inspect `ewai index profiles`, the repository name/role selector, source provenance, and priority. Prefer a narrower pattern to a high global priority. Refresh after correction.
347
+
348
+ ## Operational checklist
349
+
350
+ - [ ] Every repository root is explicit and correct.
351
+ - [ ] Source Map profiles are declarative and use registered analysers only.
352
+ - [ ] Organisation and project classifications have named owners.
353
+ - [ ] Repository selectors match configured names or roles.
354
+ - [ ] Sensitive, oversized, inventory-only, and failed counts were reviewed.
355
+ - [ ] Relevant premium and project-local personas are visibly engaged.
356
+ - [ ] Partial coverage is carried into Blast Radius, planning, and QA decisions.
357
+ - [ ] Human reviewers understand that the Source Map is evidence, not approval.
358
+
359
+ ## Related guides
360
+
361
+ - [Existing-project onboarding](existing-project-onboarding-guide.md)
362
+ - [Blast Radius and Impact Routing](blast-radius-and-impact-routing-guide.md)
363
+ - [Designing Organisation Blueprint Packs](designing-organisation-blueprint-packs.md)
364
+ - [Governed Starter-Project Materialisation](governed-starter-project-materialisation-guide.md)
365
+ - [Working with personas](working-with-personas.md)
366
+ - [CLI and configuration reference](reference/cli-and-configuration.md)
367
+ - [Troubleshooting and recovery](operations/troubleshooting-and-recovery.md)
368
+
369
+ ## Current contract sources
370
+
371
+ - `src/repository-source-map.mjs`
372
+ - `src/platform-metadata-analysis.mjs`
373
+ - `src/power-platform-source-map.mjs`
374
+ - `src/salesforce-source-map.mjs`
375
+ - `src/runtime/repository-index.mjs`
376
+ - `src/runtime/impact-analysis.mjs`
377
+ - `config/project.schema.json`
378
+ - `config/pack.schema.json`
379
+ - `tests/repository-index.test.mjs`
380
+ - `tests/repository-index-profiles.test.mjs`
381
+ - `tests/repository-source-map-cli.test.mjs`
@@ -0,0 +1,292 @@
1
+ # Reproducible Archaeology and Discovery Depth
2
+
3
+ EWAI can make the depth of Archaeology and Discovery explicit, proportionate, and repeatable. It does this without treating a long backlog as evidence of depth and without depending on identical prose from different model sessions.
4
+
5
+ The capability is local and optional. It does not send feedback to a hosted service, execute production code, enforce runtime policy, install premium personas, or grant Build, Manual QA, deployment, or release approval.
6
+
7
+
8
+ <!-- editorial: contents -->
9
+ ## On this page
10
+
11
+ - [Decide how far to investigate](#decide-how-far-to-investigate)
12
+ - [What it produces](#what-it-produces)
13
+ - [How consistency is achieved](#how-consistency-is-achieved)
14
+ - [The seven dimensions](#the-seven-dimensions)
15
+ - [Before you begin](#before-you-begin)
16
+ - [Use it in Guided Setup](#use-it-in-guided-setup)
17
+ - [Use it from the CLI](#use-it-from-the-cli)
18
+ - [Use it from an agent or integration](#use-it-from-an-agent-or-integration)
19
+ - [How personas work](#how-personas-work)
20
+ - [Stable gaps and grouping](#stable-gaps-and-grouping)
21
+ - [Understanding comparisons](#understanding-comparisons)
22
+ - [Protect engineering performance while reducing tokens](#protect-engineering-performance-while-reducing-tokens)
23
+ - [Failure and recovery](#failure-and-recovery)
24
+ - [Boundaries](#boundaries)
25
+ - [Related guides](#related-guides)
26
+
27
+ ## Decide how far to investigate
28
+
29
+ Start with the intended change and its consequences. A small interface adjustment and a migration of sensitive data need different investigation. EWAI recommends depth independently for architecture, data, security, product, delivery, governance and operations; you review those choices rather than accepting a single overall score.
30
+
31
+ Preparation gives you recommendations, supporting evidence, gaps and a review route. Resolve material questions with their owners, or retain them explicitly. A lower depth needs a reason; a deeper recommendation doesn't claim the investigation has already been done.
32
+
33
+ ## What it produces
34
+
35
+ A prepared workspace contains:
36
+
37
+ - independent recommendations for architecture, data, security, product, delivery, governance, and operations;
38
+ - the evidence drivers and coverage behind each recommendation;
39
+ - explicit inventory-only, sensitive, oversized, failed, and excluded surfaces;
40
+ - deterministic stable gap identifiers;
41
+ - adaptive questions for missing or contradictory owner evidence;
42
+ - the core, project, personal, and optional installed premium personas active for each concern;
43
+ - a proposed grouping strategy that remains separate from gap identity.
44
+
45
+ A named review records:
46
+
47
+ - the selected depth for every dimension;
48
+ - rationale when the owner reduces a recommendation;
49
+ - an explicit group and disposition for every gap;
50
+ - the exact preparation digest, Source Map run, evidence, provider capability, and persona set reviewed;
51
+ - an immutable run ID and content digest under `SPECS/3.Evidence/discovery-depth/runs/`.
52
+
53
+ A comparison explains changes in causal order: inputs, evidence, personas, selected depth, coverage, stable gaps, and grouping.
54
+
55
+ ## How consistency is achieved
56
+
57
+ EWAI does not ask a model to reproduce the same narrative. It makes the inputs,
58
+ decisions, and material findings reviewable as structured evidence instead.
59
+
60
+ ```mermaid
61
+ flowchart LR
62
+ source["Fresh Source Map"] --> ledger["Bounded evidence ledger"]
63
+ owner["Owner declarations"] --> ledger
64
+ ledger --> depth["Seven-dimension depth calculation"]
65
+ depth --> personas["Concern-specific persona ensemble"]
66
+ personas --> gaps["Stable gap identities"]
67
+ gaps --> review["Named human review"]
68
+ review --> run["Immutable reviewed run"]
69
+ run --> compare["Causal comparison"]
70
+ ```
71
+
72
+ | Control | Contribution to consistency |
73
+ | --- | --- |
74
+ | Fresh Source Map | Binds repository observations to one known analysis run and keeps failed, excluded, sensitive, oversized, and inventory-only surfaces visible. |
75
+ | Bounded owner evidence | Records authority, answer codes, reason codes, and digests without copying free-text source material into the preparation. |
76
+ | Seven independent dimensions | Prevents repository size or backlog length from acting as a crude proxy for depth. |
77
+ | Explicit persona ensemble | Records which core, project, personal, or installed premium perspectives influenced each concern and why. |
78
+ | Stable gap identity | Derives each ID from the dimension, condition, state codes, and evidence references rather than generated wording. |
79
+ | Named review | Requires a human to select depth, justify reductions, and assign every gap without transferring approval authority to a persona or model. |
80
+ | Fingerprinted run | Binds the reviewed result to its inputs, evidence, personas, depth, coverage, gaps, and grouping. |
81
+ | Causal comparison | Separates explained input, evidence, persona, depth, coverage, gap, and grouping changes from unexplained variance. |
82
+
83
+ Two runs can therefore use different sentences and still be reproducible when
84
+ their material evidence, depth, and stable gaps agree. Conversely, matching prose
85
+ does not make two runs reproducible when one omitted a failed analysis surface or
86
+ used different owner evidence without recording the cause.
87
+
88
+ See the [worked example](examples/reproducible-archaeology-depth-example.md) for
89
+ an end-to-end illustration and use the
90
+ [operator and Manual QA checklist](quality/reproducible-archaeology-depth-review-checklist.md)
91
+ when assessing a real project.
92
+
93
+ ## The seven dimensions
94
+
95
+ | Dimension | Typical evidence and questions |
96
+ |---|---|
97
+ | Architecture | Repository topology, component boundaries, dependencies, integrations, and conflicting implementation patterns |
98
+ | Data | Data models, classification, retention, movement, residency, ownership, and sensitive-file exclusions |
99
+ | Security | Trust boundaries, identities, exposure, authorization, threats, and owner-confirmed security constraints |
100
+ | Product | Intended users, outcomes, journeys, exceptions, acceptance, and differences between live behaviour and owner intent |
101
+ | Delivery | Test evidence, release route, standards, quality gates, technical debt, and retained Source Map analysis failures |
102
+ | Governance | Applicable policy, accountable decisions, assurance ownership, exceptions, and review obligations |
103
+ | Operations | Hosting, environments, observability, recovery, continuity, support, and named operational ownership |
104
+
105
+ Each dimension is selected independently as `bounded`, `standard`, or `deep`. A large repository may need deep architecture analysis but bounded product discovery for a narrowly scoped internal utility. A small service handling sensitive data may need deep data and security analysis even when its architecture is simple.
106
+
107
+ ## Before you begin
108
+
109
+ 1. Initialise EWAI and confirm `.ewai-pipeline/project.json` points to the intended project and SPECS root.
110
+ 2. Complete the human project briefing. Repository code can establish observable behaviour, not why the project should exist.
111
+ 3. Register and review relevant imported evidence where applicable.
112
+ 4. Refresh the Repository Source Map:
113
+
114
+ ```bash
115
+ ewai index refresh --project /path/to/project --json
116
+ ```
117
+
118
+ 5. Confirm that failures, inventory-only files, sensitive files, oversized files, and exclusions are visible. Do not silently remove them to improve the coverage status.
119
+
120
+ ## Use it in Guided Setup
121
+
122
+ Open the local dashboard and choose **Guided Setup**. The **Evidence depth** panel appears inside the existing Discovery workspace; it is not a separate product or primary navigation area.
123
+
124
+ 1. Select **Prepare evidence depth**.
125
+ 2. Review the seven-row ledger. Each row shows coverage, recommendation, owner selection, and the personas active for that concern.
126
+ 3. Review the stable gaps separately from the adaptive questions.
127
+ 4. Enter the named reviewer.
128
+ 5. Select a depth for every dimension. Add rationale if reducing a recommendation.
129
+ 6. Give every gap a group and disposition.
130
+ 7. Select **Record named review**.
131
+ 8. When at least two runs exist, select the runs and compare them.
132
+
133
+ Answered Guided Setup fields are projected as `declared` owner evidence for browser preparation. EWAI hashes their normalized values and records bounded question and revision codes; the answer text itself is not copied into the evidence-depth preparation or reviewed run. Re-prepare after materially changing Discovery answers so the named review binds to the current declarations.
134
+
135
+ The current UI uses EWAI's default fallback visual system unless the project applies an approved Design System Pack. The panel labels that condition; the fallback is not organisation-approved.
136
+
137
+ ## Use it from the CLI
138
+
139
+ Inspect the current status:
140
+
141
+ ```bash
142
+ ewai archaeology depth-status --project /path/to/project --json
143
+ ```
144
+
145
+ Prepare from repository evidence only:
146
+
147
+ ```bash
148
+ ewai archaeology depth-prepare \
149
+ --focus "security recovery and product outcomes" \
150
+ --project /path/to/project \
151
+ --json
152
+ ```
153
+
154
+ To add owner evidence, create a project-relative JSON file. The example below is illustrative: `sha256:security-boundary-review` is an accepted symbolic evidence identifier, not a calculated SHA-256 checksum and not proof that a file was verified. Use identifiers tied to the evidence actually reviewed by your owner.
155
+
156
+ ```json
157
+ {
158
+ "focus": "security recovery and product outcomes",
159
+ "ownerEvidence": [
160
+ {
161
+ "id": "owner:security-boundary",
162
+ "dimension": "security",
163
+ "authority": "confirmed",
164
+ "evidenceDigest": "sha256:security-boundary-review",
165
+ "answerCode": "internal-users-only",
166
+ "reasonCode": "named-owner-review",
167
+ "contradiction": "none"
168
+ }
169
+ ]
170
+ }
171
+ ```
172
+
173
+ Then run:
174
+
175
+ ```bash
176
+ ewai archaeology depth-prepare \
177
+ --input evidence-depth-input.json \
178
+ --project /path/to/project \
179
+ --json
180
+ ```
181
+
182
+ Owner evidence uses bounded codes and digests. Do not place free-text answers, source bodies, secrets, absolute paths, or managed persona content in this file.
183
+
184
+ Create a review JSON from the returned preparation. It must name a reviewer, bind to the exact preparation digest, cover all seven dimensions exactly once, and assign every gap exactly once. Record it with:
185
+
186
+ ```bash
187
+ ewai archaeology depth-record \
188
+ --input evidence-depth-review.json \
189
+ --project /path/to/project \
190
+ --json
191
+ ```
192
+
193
+ Compare two stored runs:
194
+
195
+ ```bash
196
+ ewai archaeology depth-compare LEFT_RUN_ID RIGHT_RUN_ID \
197
+ --project /path/to/project \
198
+ --json
199
+ ```
200
+
201
+ Comparison reads the exact stored runs. It does not rescan the repository.
202
+
203
+ ## Use it from an agent or integration
204
+
205
+ The MCP server exposes:
206
+
207
+ - `ewai_evidence_depth_status`
208
+ - `ewai_evidence_depth_prepare`
209
+ - `ewai_evidence_depth_record`
210
+ - `ewai_evidence_depth_compare`
211
+
212
+ `status` and `compare` are read-only. `prepare` writes a disposable runtime preparation, while `record` creates immutable project evidence. All tools use the project root bound when the MCP server starts; caller-supplied project roots are not accepted.
213
+
214
+ Use `$ewai-evidence-depth` for the complete agent workflow and input contract. `$ewai-archaeology` and `$ewai-project-discovery` route into it when an agreed, repeatable investigation boundary is needed.
215
+
216
+ ## How personas work
217
+
218
+ EWAI chooses a small ensemble for the concern currently being examined:
219
+
220
+ - **core personas** provide portable Archaeology, curation, engineering, and operational lenses;
221
+ - **project personas** represent local roles and working conventions;
222
+ - **personal personas** can contribute an explicitly installed individual lens;
223
+ - **premium personas** add specialist challenge when the managed library is already installed and relevant.
224
+
225
+ The UI shows the persona name, tier, reason for engagement, and dimension. The ensemble changes as the dimension changes. EWAI does not load the whole catalogue merely because it is available.
226
+
227
+ The standard model and core/project workflow remain complete without premium personas. This feature never downloads or synchronises premium content automatically. Personas cannot confirm owner evidence, select depth, group gaps, or approve delivery.
228
+
229
+ ## Stable gaps and grouping
230
+
231
+ A gap identity comes from its dimension, condition, current-state code, intended-state code, and evidence references. That identity remains stable when the same structured gap is found again.
232
+
233
+ Grouping is a later human decision. The same security gap can be grouped under an assurance intent, a product outcome, or a platform boundary without changing the gap itself. This distinction lets teams compare whether evidence changed or only their work-organisation choice changed.
234
+
235
+ ## Understanding comparisons
236
+
237
+ | Comparison field | A material change usually means |
238
+ |---|---|
239
+ | Inputs | Project, Source Map, contract, pack, provider capability, or exclusions changed |
240
+ | Evidence | The governed repository or owner evidence set changed |
241
+ | Personas | A different identity or tier was actively engaged |
242
+ | Depth | A recommendation or named owner selection changed |
243
+ | Coverage | Required, supported, excluded, or failed coverage changed |
244
+ | Gaps | The deterministic set or reviewed gap state changed |
245
+ | Grouping | The explicit grouping strategy or assignment changed |
246
+
247
+ Wording or ordering differences do not change run identity when the structured evidence is the same. A grouping-only change is explainable. A coverage or gap change without a material upstream explanation is reported as unexplained variance and the comparison is not reproducible.
248
+
249
+ ## Protect engineering performance while reducing tokens
250
+
251
+ This capability uses Source Map counts, profiles, bounded evidence identifiers, fingerprints, and immutable reviewed runs. It does not copy repository bodies into the depth ledger or rerun analysis for comparisons.
252
+
253
+ When optimising context or token demand, compare a known-good reviewed run with the new route. The optimisation is acceptable only if the same material surfaces, standards, constraints, gaps, failure paths, and test obligations remain discoverable. Faster or cheaper output is not an improvement when engineering coverage falls.
254
+
255
+ Use [Context management and token efficiency](context-management-and-token-efficiency.md) for context-pack design and benchmark guidance, and [Repository Source Map](repository-source-map-guide.md) for coverage mechanics.
256
+
257
+ ## Failure and recovery
258
+
259
+ | Status or error | What to do |
260
+ |---|---|
261
+ | `source-map-missing` | Refresh the Source Map |
262
+ | `source-map-stale` | Refresh it and prepare again; do not reuse the stale recommendation |
263
+ | `not-prepared` | Prepare after reviewing the available evidence inputs |
264
+ | Newer preparation or stale digest | Reload status and repeat the named review against the current digest |
265
+ | Reduced depth needs rationale | Record substantive accountable rationale or restore the recommendation |
266
+ | Gap is unassigned | Choose an explicit group and disposition |
267
+ | Unexplained comparison variance | Restore the missing evidence context or retain the run as non-reproducible |
268
+
269
+ Never recover by silently dropping a failed, excluded, contradictory, or unknown surface.
270
+
271
+ ## Boundaries
272
+
273
+ - This is investigation evidence, not a quality score.
274
+ - It does not guarantee complete Archaeology or Discovery; the selected boundary and coverage ledger remain accountable.
275
+ - It does not make persona output stakeholder research.
276
+ - It does not certify security, compliance, accessibility, or production readiness.
277
+ - It does not replace the canonical Build, standards, test, Manual QA, deployment, or release gates.
278
+ - Feedback remains local. This feature doesn't upload it to a hosted feedback service.
279
+
280
+ ## Related guides
281
+
282
+ - [Worked example: reproducible Archaeology and Discovery depth](examples/reproducible-archaeology-depth-example.md)
283
+ - [Operator and Manual QA checklist](quality/reproducible-archaeology-depth-review-checklist.md)
284
+ - [Repository Source Map](repository-source-map-guide.md)
285
+ - [Guided Discovery facilitator guide](guided-discovery-facilitator-guide.md)
286
+ - [Context management and token efficiency](context-management-and-token-efficiency.md)
287
+
288
+ ## If preparation reports too many personas
289
+
290
+ `Evidence depth: personas exceeds 8 entries` means this release assembled more persona identities across the seven dimensions than its input contract accepts. Preparation hasn't succeeded. This can occur with a larger available catalogue; it isn't proof that your source evidence or licence is invalid.
291
+
292
+ Keep your project and persona files unchanged and report the error with the release version and a safe description of the operation. Don't delete personas, edit the generated preparation or claim the depth review completed. The selection/validation mismatch needs a harness correction; changing your requirements isn't the remedy.