@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.
- package/Docs/README.md +50 -0
- package/Docs/adoption/consultancy-and-multi-project-rollout.md +135 -0
- package/Docs/adoption/non-technical-team-guide.md +126 -0
- package/Docs/archaeology-technology-and-hosting-discovery.md +212 -0
- package/Docs/blast-radius-and-impact-routing-guide.md +325 -0
- package/Docs/blueprints/internal-blueprint-catalogue.md +146 -0
- package/Docs/blueprints/maintaining-organisation-blueprints.md +154 -0
- package/Docs/blueprints/validation-and-troubleshooting.md +168 -0
- package/Docs/cli-reference.md +113 -0
- package/Docs/completed-phase-evidence-amendments.md +74 -0
- package/Docs/consultancy-network-rollout-control-plane-guide.md +202 -0
- package/Docs/context-aware-delivery-companion-guide.md +198 -0
- package/Docs/context-aware-delivery-companion-user-guide.md +184 -0
- package/Docs/context-management-and-token-efficiency.md +113 -0
- package/Docs/design-systems/design-system-implementation-guide.md +85 -0
- package/Docs/design-systems/design-system-pack-authoring-guide.md +95 -0
- package/Docs/design-systems/design-system-review-guide.md +51 -0
- package/Docs/design-systems/design-system-user-guide.md +96 -0
- package/Docs/design-systems/product-owner-guide.md +49 -0
- package/Docs/designing-organisation-blueprint-packs.md +384 -0
- package/Docs/developer-delivery-guide.md +224 -0
- package/Docs/error-reporting-guide.md +110 -0
- package/Docs/error-reporting-provider-guide.md +49 -0
- package/Docs/examples/error-report-adapter.md +70 -0
- package/Docs/examples/meeting-review.md +76 -0
- package/Docs/examples/minimal-design-system.md +67 -0
- package/Docs/examples/prototype-review-inputs.md +175 -0
- package/Docs/examples/reproducible-archaeology-depth-example.md +144 -0
- package/Docs/examples/test-scenario-input.md +68 -0
- package/Docs/examples/worked-examples.md +147 -0
- package/Docs/existing-project-onboarding-guide.md +214 -0
- package/Docs/explanation/core-concepts.md +26 -0
- package/Docs/explanation/delivery-workflow.md +48 -0
- package/Docs/governance/governance-team-guide.md +139 -0
- package/Docs/governed-starter-project-materialisation-guide.md +284 -0
- package/Docs/guide-catalogue.md +117 -0
- package/Docs/guided-discovery-facilitator-guide.md +172 -0
- package/Docs/guided-intent-workspace-guide.md +109 -0
- package/Docs/guided-phase-evidence-drafting-guide.md +119 -0
- package/Docs/human-approval-and-assurance-guide.md +146 -0
- package/Docs/knowledge-proposals-implementer-guide.md +106 -0
- package/Docs/knowledge-proposals-user-guide.md +247 -0
- package/Docs/maintainers/context-benchmarks.md +29 -0
- package/Docs/maintainers/contributing.md +58 -0
- package/Docs/maintainers/evidence-depth-acceptance.md +72 -0
- package/Docs/maintainers/verification-walkthroughs.md +104 -0
- package/Docs/meeting-evidence-implementer-guide.md +132 -0
- package/Docs/meeting-evidence-user-guide.md +200 -0
- package/Docs/operations/dashboard-and-delivery-state.md +153 -0
- package/Docs/operations/dashboard-configuration.md +87 -0
- package/Docs/operations/installation-updating-and-entitlements.md +135 -0
- package/Docs/operations/premium-personas-setup.md +76 -0
- package/Docs/operations/troubleshooting-and-recovery.md +205 -0
- package/Docs/organisation-rollout-guide.md +142 -0
- package/Docs/persona-entitlement-provider-guide.md +199 -0
- package/Docs/persona-guided-prototype-iteration.md +129 -0
- package/Docs/personas/organisation-specific-personas.md +103 -0
- package/Docs/personas/persona-authoring-cookbook.md +176 -0
- package/Docs/personas/persona-engagement-ui.md +133 -0
- package/Docs/personas/persona-governance.md +118 -0
- package/Docs/platform-export-analysis-guide.md +336 -0
- package/Docs/policies/governance-owner-guide.md +36 -0
- package/Docs/policies/implementation-guide.md +42 -0
- package/Docs/policies/organisation-policy-design-gates.md +58 -0
- package/Docs/policies/policy-pack-authoring-guide.md +108 -0
- package/Docs/policies/product-owner-guide.md +43 -0
- package/Docs/policies/technical-owner-guide.md +37 -0
- package/Docs/product-owner-guide.md +327 -0
- package/Docs/project-portfolio-orchestration-guide.md +199 -0
- package/Docs/quality/manual-qa-and-acceptance.md +162 -0
- package/Docs/quality/persona-driven-test-scenarios.md +172 -0
- package/Docs/quality/reproducible-archaeology-depth-review-checklist.md +89 -0
- package/Docs/reference/capabilities-and-project-layout.md +678 -0
- package/Docs/reference/cli-and-configuration.md +398 -0
- package/Docs/reference/contributions-api.md +23 -0
- package/Docs/reference/security-adapter-authoring.md +81 -0
- package/Docs/reference/starter-adapter-authoring.md +74 -0
- package/Docs/repository-source-map-guide.md +381 -0
- package/Docs/reproducible-archaeology-and-discovery-depth.md +292 -0
- package/Docs/screen-prototype-creation-guide.md +324 -0
- package/Docs/security-validation-guide.md +353 -0
- package/Docs/solution-readiness-review-guide.md +123 -0
- package/Docs/standards/project-standards-authoring.md +157 -0
- package/Docs/team-hub-guide.md +162 -0
- package/Docs/team-hub-resource-registry-guide.md +167 -0
- package/Docs/tutorials/first-delivery.md +83 -0
- package/Docs/tutorials/first-session.md +62 -0
- package/Docs/using-lifecycle-hooks.md +381 -0
- package/Docs/working-with-personas.md +274 -0
- package/LICENSE +165 -0
- package/README.md +96 -0
- package/agents-src/claude/ewai-security-reviewer.md +15 -0
- package/bin/ewai +5 -0
- package/config/archaeology-record-families.yaml +59 -0
- package/config/delivery-artifacts.yaml +121 -0
- package/config/delivery-stages.yaml +77 -0
- package/config/design-system.schema.json +46 -0
- package/config/error-reporting.schema.json +79 -0
- package/config/evidence-depth.schema.json +53 -0
- package/config/intent.schema.json +90 -0
- package/config/knowledge-proposals-proposal.schema.json +34 -0
- package/config/lifecycle-event.schema.json +68 -0
- package/config/lifecycle-handler.schema.json +45 -0
- package/config/lifecycle-hook-ack.schema.json +19 -0
- package/config/meeting-evidence-candidate.schema.json +102 -0
- package/config/organisation-policy.schema.json +137 -0
- package/config/pack.schema.json +250 -0
- package/config/persona-pack.schema.json +21 -0
- package/config/persona.schema.json +17 -0
- package/config/policy-evaluation.schema.json +77 -0
- package/config/policy-facts.schema.json +140 -0
- package/config/portfolio.schema.json +68 -0
- package/config/project.schema.json +313 -0
- package/config/prototype-iteration.schema.json +128 -0
- package/config/rollout.schema.json +87 -0
- package/config/security-adapter.schema.json +31 -0
- package/config/security-scan-request.schema.json +64 -0
- package/config/security-scan-response.schema.json +52 -0
- package/config/security-validation-policy.schema.json +74 -0
- package/config/starter-source-acknowledgement.schema.json +13 -0
- package/config/starter-source-adapter.schema.json +38 -0
- package/config/starter-source-request.schema.json +61 -0
- package/package.json +77 -0
- package/packs/core/pack.yaml +7 -0
- package/packs/design-systems/default/experience-promise.md +9 -0
- package/packs/design-systems/default/intentional-review.md +10 -0
- package/packs/design-systems/default/interaction-and-entry.md +9 -0
- package/packs/design-systems/default/meaningful-content-and-states.md +9 -0
- package/packs/design-systems/default/pack.yaml +44 -0
- package/packs/design-systems/default/principles.md +10 -0
- package/packs/personas/core/pack.yaml +7 -0
- package/packs/personas/core/personas/archaeologist.md +37 -0
- package/packs/personas/core/personas/end-user.md +17 -0
- package/packs/personas/core/personas/maintainer.md +17 -0
- package/packs/personas/core/personas/operator.md +17 -0
- package/packs/personas/core/personas/specs-knowledge-curator.md +35 -0
- package/packs/technologies/laravel/pack.yaml +30 -0
- package/packs/technologies/laravel-nuxt/pack.yaml +30 -0
- package/packs/technologies/nuxt/pack.yaml +30 -0
- package/packs/technologies/power-platform/pack.yaml +31 -0
- package/packs/technologies/salesforce/pack.yaml +25 -0
- package/public/app.js +4896 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/backstory-icon.png +0 -0
- package/public/dashboard-navigation.js +98 -0
- package/public/favicon-16.png +0 -0
- package/public/favicon-32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +789 -0
- package/public/styles.css +2693 -0
- package/public/team-hub/app.js +202 -0
- package/public/team-hub/index.html +79 -0
- package/public/team-hub/styles.css +90 -0
- package/scripts/publication-check.mjs +140 -0
- package/scripts/setup.mjs +21 -0
- package/skills-src/ewai-archaeology/SKILL.md +334 -0
- package/skills-src/ewai-archaeology/agents/openai.yaml +4 -0
- package/skills-src/ewai-archaeology/references/archaeology-contract.md +201 -0
- package/skills-src/ewai-archaeology/references/lifecycle-reconstruction.md +177 -0
- package/skills-src/ewai-archaeology/references/maximum-detail-reconstruction.md +97 -0
- package/skills-src/ewai-archaeology/references/model-routing.md +26 -0
- package/skills-src/ewai-architecture/SKILL.md +108 -0
- package/skills-src/ewai-architecture/agents/openai.yaml +4 -0
- package/skills-src/ewai-architecture/references/architecture-contract.md +176 -0
- package/skills-src/ewai-context/SKILL.md +68 -0
- package/skills-src/ewai-context/agents/openai.yaml +4 -0
- package/skills-src/ewai-context-import/SKILL.md +118 -0
- package/skills-src/ewai-context-import/agents/openai.yaml +4 -0
- package/skills-src/ewai-context-import/references/context-import-contract.md +106 -0
- package/skills-src/ewai-dashboard-configuration/SKILL.md +20 -0
- package/skills-src/ewai-deliver/SKILL.md +122 -0
- package/skills-src/ewai-deliver/references/delivery-evidence.md +92 -0
- package/skills-src/ewai-deliver/references/phase-routing.md +31 -0
- package/skills-src/ewai-design-system-apply/SKILL.md +27 -0
- package/skills-src/ewai-design-system-apply/agents/openai.yaml +4 -0
- package/skills-src/ewai-design-system-apply/references/application-contract.md +36 -0
- package/skills-src/ewai-design-system-author/SKILL.md +28 -0
- package/skills-src/ewai-design-system-author/agents/openai.yaml +4 -0
- package/skills-src/ewai-design-system-author/references/authoring-contract.md +38 -0
- package/skills-src/ewai-design-system-review/SKILL.md +26 -0
- package/skills-src/ewai-design-system-review/agents/openai.yaml +4 -0
- package/skills-src/ewai-design-system-review/references/review-contract.md +40 -0
- package/skills-src/ewai-error-reporting/SKILL.md +46 -0
- package/skills-src/ewai-error-reporting/agents/openai.yaml +4 -0
- package/skills-src/ewai-error-reporting/references/provider-contract.md +74 -0
- package/skills-src/ewai-evidence-depth/SKILL.md +72 -0
- package/skills-src/ewai-evidence-depth/agents/openai.yaml +4 -0
- package/skills-src/ewai-evidence-depth/references/evidence-depth-contract.md +127 -0
- package/skills-src/ewai-intent/SKILL.md +68 -0
- package/skills-src/ewai-intent/agents/openai.yaml +4 -0
- package/skills-src/ewai-intent/references/intent-contract.md +42 -0
- package/skills-src/ewai-knowledge-proposals/SKILL.md +105 -0
- package/skills-src/ewai-knowledge-proposals/agents/openai.yaml +4 -0
- package/skills-src/ewai-knowledge-proposals/references/proposal-contract.md +59 -0
- package/skills-src/ewai-meeting-evidence/SKILL.md +106 -0
- package/skills-src/ewai-meeting-evidence/agents/openai.yaml +4 -0
- package/skills-src/ewai-meeting-evidence/references/candidate-contract.md +64 -0
- package/skills-src/ewai-organisation-policy/SKILL.md +62 -0
- package/skills-src/ewai-organisation-policy/agents/openai.yaml +4 -0
- package/skills-src/ewai-organisation-policy/references/policy-contract.md +94 -0
- package/skills-src/ewai-palace-housekeeping/SKILL.md +55 -0
- package/skills-src/ewai-palace-housekeeping/agents/openai.yaml +4 -0
- package/skills-src/ewai-persona-entitlement/SKILL.md +60 -0
- package/skills-src/ewai-persona-entitlement/agents/openai.yaml +4 -0
- package/skills-src/ewai-phase-evidence/SKILL.md +79 -0
- package/skills-src/ewai-phase-evidence/agents/openai.yaml +4 -0
- package/skills-src/ewai-pipeline/SKILL.md +130 -0
- package/skills-src/ewai-pipeline/agents/openai.yaml +4 -0
- package/skills-src/ewai-pipeline/references/cli.md +86 -0
- package/skills-src/ewai-pipeline/references/specs-contract.md +16 -0
- package/skills-src/ewai-portfolio/SKILL.md +70 -0
- package/skills-src/ewai-portfolio/agents/openai.yaml +4 -0
- package/skills-src/ewai-portfolio/references/portfolio-contract.md +67 -0
- package/skills-src/ewai-project-discovery/SKILL.md +95 -0
- package/skills-src/ewai-project-discovery/agents/openai.yaml +4 -0
- package/skills-src/ewai-project-discovery/references/discovery-contract.md +34 -0
- package/skills-src/ewai-prototype-iteration/SKILL.md +30 -0
- package/skills-src/ewai-prototype-iteration/agents/openai.yaml +4 -0
- package/skills-src/ewai-prototype-iteration/references/review-contract.md +49 -0
- package/skills-src/ewai-retro/SKILL.md +48 -0
- package/skills-src/ewai-retro/agents/openai.yaml +4 -0
- package/skills-src/ewai-retro/references/asset-routing.md +14 -0
- package/skills-src/ewai-rollout/SKILL.md +74 -0
- package/skills-src/ewai-rollout/agents/openai.yaml +4 -0
- package/skills-src/ewai-rollout/references/rollout-contract.md +74 -0
- package/skills-src/ewai-shape-intents/SKILL.md +84 -0
- package/skills-src/ewai-shape-intents/agents/openai.yaml +4 -0
- package/skills-src/ewai-shape-intents/references/intent-mapping-contract.md +109 -0
- package/skills-src/ewai-solution-readiness/SKILL.md +55 -0
- package/skills-src/ewai-solution-readiness/agents/openai.yaml +4 -0
- package/skills-src/ewai-standards-check/SKILL.md +93 -0
- package/skills-src/ewai-standards-check/agents/openai.yaml +4 -0
- package/skills-src/ewai-standards-check/references/report-contract.md +116 -0
- package/skills-src/ewai-test-scenarios/SKILL.md +94 -0
- package/skills-src/ewai-test-scenarios/agents/openai.yaml +4 -0
- package/skills-src/ewai-test-scenarios/references/scenario-contract.md +88 -0
- package/src/afk-worker.mjs +16 -0
- package/src/archaeology.mjs +1333 -0
- package/src/checkin.mjs +261 -0
- package/src/cli.mjs +2427 -0
- package/src/companion-guidance.mjs +257 -0
- package/src/companion-opening.mjs +62 -0
- package/src/companion.mjs +256 -0
- package/src/context.mjs +210 -0
- package/src/dashboard-preferences.mjs +80 -0
- package/src/delivery-artifacts.mjs +204 -0
- package/src/delivery-documents.mjs +248 -0
- package/src/delivery-gates.mjs +317 -0
- package/src/delivery.mjs +1433 -0
- package/src/design-system-application.mjs +291 -0
- package/src/design-system-authoring.mjs +101 -0
- package/src/design-systems.mjs +466 -0
- package/src/discovery.mjs +1314 -0
- package/src/error-reporting.mjs +323 -0
- package/src/evidence-depth.mjs +543 -0
- package/src/execution-state.mjs +243 -0
- package/src/install.mjs +166 -0
- package/src/intent-dependencies.mjs +117 -0
- package/src/intent-maps.mjs +402 -0
- package/src/intents.mjs +747 -0
- package/src/knowledge-proposals.mjs +717 -0
- package/src/launcher.mjs +51 -0
- package/src/meeting-evidence.mjs +703 -0
- package/src/network-rollout.mjs +386 -0
- package/src/organisation-blueprints.mjs +438 -0
- package/src/organisation-policies.mjs +448 -0
- package/src/packs.mjs +44 -0
- package/src/paths.mjs +62 -0
- package/src/persona-entitlements.mjs +438 -0
- package/src/persona-licence-config.mjs +98 -0
- package/src/persona-website-provider.mjs +134 -0
- package/src/persona-zip.mjs +87 -0
- package/src/personas.mjs +159 -0
- package/src/platform-metadata-analysis.mjs +314 -0
- package/src/policy-design-gates.mjs +623 -0
- package/src/policy-gate-integration.mjs +318 -0
- package/src/portfolio.mjs +509 -0
- package/src/power-platform-source-map.mjs +190 -0
- package/src/project.mjs +449 -0
- package/src/prototype-iterations.mjs +730 -0
- package/src/repository-source-map.mjs +603 -0
- package/src/runtime/afk-conductor.mjs +973 -0
- package/src/runtime/context-assembly.mjs +457 -0
- package/src/runtime/context-benchmarks.mjs +115 -0
- package/src/runtime/dashboard-actions.mjs +109 -0
- package/src/runtime/dashboard-handoffs.mjs +149 -0
- package/src/runtime/dashboard-server.mjs +1272 -0
- package/src/runtime/dashboard.mjs +197 -0
- package/src/runtime/database.mjs +789 -0
- package/src/runtime/error-reporting.mjs +581 -0
- package/src/runtime/evidence-depth-workspace.mjs +412 -0
- package/src/runtime/execution-leases.mjs +299 -0
- package/src/runtime/guided-discovery.mjs +350 -0
- package/src/runtime/guided-intents.mjs +517 -0
- package/src/runtime/impact-analysis.mjs +535 -0
- package/src/runtime/intents.mjs +222 -0
- package/src/runtime/knowledge.mjs +86 -0
- package/src/runtime/lifecycle-hooks.mjs +1239 -0
- package/src/runtime/mcp-config.mjs +110 -0
- package/src/runtime/mcp-server.mjs +1885 -0
- package/src/runtime/palace.mjs +362 -0
- package/src/runtime/paths.mjs +58 -0
- package/src/runtime/persona-engagement.mjs +255 -0
- package/src/runtime/phase-contributions.mjs +594 -0
- package/src/runtime/policy-workspace.mjs +170 -0
- package/src/runtime/prototype-iterations.mjs +235 -0
- package/src/runtime/provider-adapters.mjs +163 -0
- package/src/runtime/repository-index.mjs +838 -0
- package/src/runtime/runs.mjs +185 -0
- package/src/runtime/security-validation.mjs +1230 -0
- package/src/runtime/starter-materialisation.mjs +1155 -0
- package/src/runtime/team-hub-client.mjs +479 -0
- package/src/runtime/team-hub-database.mjs +288 -0
- package/src/runtime/team-hub-server.mjs +191 -0
- package/src/runtime/team-hub.mjs +110 -0
- package/src/runtime/tree-sitter-index.mjs +390 -0
- package/src/runtime/version.mjs +1 -0
- package/src/runtime/work.mjs +633 -0
- package/src/salesforce-source-map.mjs +212 -0
- package/src/security-validation-config.mjs +224 -0
- package/src/solution-readiness.mjs +620 -0
- package/src/starter-materialisation-contract.mjs +407 -0
- package/src/task-graph.mjs +544 -0
- package/src/team-hub-resources.mjs +239 -0
- package/src/team-hub.mjs +242 -0
- package/src/test-scenarios.mjs +622 -0
- package/src/validation-config.mjs +289 -0
- package/templates/SPECS/1.Scope/personas/registry.yaml +12 -0
- package/templates/SPECS/5.Strategy/patterns/context-packet.md +119 -0
- package/templates/SPECS/6.Build/_tracker-template.md +16 -0
- package/templates/SPECS/pipeline.yaml +62 -0
- package/templates/discovery-answers.yaml +86 -0
- package/templates/intent-body.md +21 -0
- package/tests/fixtures/context-benchmarks.json +9 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
# Using EWAI lifecycle hooks
|
|
2
|
+
|
|
3
|
+
Lifecycle hooks let an organisation-owned executable receive selected EWAI milestones after EWAI has recorded them. They are a provider-neutral handoff boundary, not built-in deployment, ticketing, messaging, security-scanning, or certification connectors.
|
|
4
|
+
|
|
5
|
+
The rule to remember is:
|
|
6
|
+
|
|
7
|
+
> EWAI records the milestone first. Handlers are notified afterwards.
|
|
8
|
+
|
|
9
|
+
A handler can acknowledge or reject an event, but it cannot approve, veto, complete, fail, or alter Discovery, an Intent, a delivery phase, Build approval, Manual QA, release readiness, or any canonical `SPECS/` evidence.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<!-- editorial: contents -->
|
|
13
|
+
## On this page
|
|
14
|
+
|
|
15
|
+
- [Who this guide is for](#who-this-guide-is-for)
|
|
16
|
+
- [The lifecycle event catalogue](#the-lifecycle-event-catalogue)
|
|
17
|
+
- [1. Build a handler package](#1-build-a-handler-package)
|
|
18
|
+
- [2. Validate before registration](#2-validate-before-registration)
|
|
19
|
+
- [3. Register the reviewed package](#3-register-the-reviewed-package)
|
|
20
|
+
- [4. Enable an explicit subscription](#4-enable-an-explicit-subscription)
|
|
21
|
+
- [5. Understand the event envelope](#5-understand-the-event-envelope)
|
|
22
|
+
- [6. Return a bounded acknowledgement](#6-return-a-bounded-acknowledgement)
|
|
23
|
+
- [7. Make downstream work idempotent](#7-make-downstream-work-idempotent)
|
|
24
|
+
- [8. Inspect delivery](#8-inspect-delivery)
|
|
25
|
+
- [9. Retry a terminal delivery](#9-retry-a-terminal-delivery)
|
|
26
|
+
- [10. Disable future delivery](#10-disable-future-delivery)
|
|
27
|
+
- [Status and diagnostic reference](#status-and-diagnostic-reference)
|
|
28
|
+
- [Retention and recovery](#retention-and-recovery)
|
|
29
|
+
- [Security and governance checklist](#security-and-governance-checklist)
|
|
30
|
+
- [Deliberate V1 exclusions](#deliberate-v1-exclusions)
|
|
31
|
+
- [Contract references](#contract-references)
|
|
32
|
+
|
|
33
|
+
## Who this guide is for
|
|
34
|
+
|
|
35
|
+
- An organisation operator who validates, registers, subscribes, inspects, retries, or disables handlers.
|
|
36
|
+
- A handler author implementing the local process that receives EWAI events.
|
|
37
|
+
- A governance or security reviewer assessing the executable boundary, permissions, payload, and operational ownership.
|
|
38
|
+
|
|
39
|
+
Handler installation and subscription are trusted terminal operations. The dashboard deliberately cannot accept executable paths, commands, endpoints, or credentials.
|
|
40
|
+
|
|
41
|
+
To inspect hooks in the dashboard, enable **Hooks** in **Configuration** and save. This only shows the view: registering a handler and subscribing to events remain separate actions. See [dashboard configuration](operations/dashboard-configuration.md).
|
|
42
|
+
|
|
43
|
+
The dispatcher runs with the local dashboard. If the dashboard isn't running, queued deliveries wait. `ewai checkin` starts or reuses it; inspecting a registration alone doesn't dispatch events. Check the delivery status after an event rather than assuming the downstream handler ran.
|
|
44
|
+
|
|
45
|
+
## The lifecycle event catalogue
|
|
46
|
+
|
|
47
|
+
EWAI supports these 15 lifecycle events:
|
|
48
|
+
|
|
49
|
+
| Event | Meaning |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `ewai.project.discovery.completed` | Reviewed project Discovery was committed. |
|
|
52
|
+
| `ewai.project.starter.materialised` | An approved starter was added and its evidence saved. |
|
|
53
|
+
| `ewai.meeting-evidence.promoted` | Reviewed meeting evidence was approved and saved. |
|
|
54
|
+
| `ewai.knowledge-proposals.materialised` | Reviewed proposals were added to project knowledge and the result saved. |
|
|
55
|
+
| `ewai.intent.created` | Intent Markdown and structured state were created. |
|
|
56
|
+
| `ewai.policy.facts.confirmed` | Policy facts were confirmed and saved. |
|
|
57
|
+
| `ewai.policy.evaluation.recorded` | A policy evaluation was saved. |
|
|
58
|
+
| `ewai.policy.review.recorded` | A policy review was saved. |
|
|
59
|
+
| `ewai.policy.exception.recorded` | A policy exception was saved. |
|
|
60
|
+
| `ewai.delivery.phase.entered` | A guarded delivery phase entered its running state. |
|
|
61
|
+
| `ewai.delivery.phase.completed` | A phase completed with passing gate evidence. |
|
|
62
|
+
| `ewai.delivery.build.approved` | Named human Build approval was recorded. |
|
|
63
|
+
| `ewai.delivery.manual-qa.approved` | Named human Manual QA approval was recorded. |
|
|
64
|
+
| `ewai.delivery.completed` | The Delivery phase completed and handed off to Manual QA. |
|
|
65
|
+
| `ewai.delivery.release-ready` | Delivery is complete and all required human gates are approved. |
|
|
66
|
+
|
|
67
|
+
Run `ewai hook catalogue --project PATH --json` to inspect the installed catalogue. `release-ready` is derived from canonical EWAI state; it is never a handler decision.
|
|
68
|
+
|
|
69
|
+
## 1. Build a handler package
|
|
70
|
+
|
|
71
|
+
A package is a local folder containing:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
release-observer/
|
|
75
|
+
├── lifecycle-handler.json
|
|
76
|
+
└── handler
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The entrypoint can use any language that the local machine can execute directly. EWAI starts the exact registered file with no arguments and `shell: false`, writes one JSON event to standard input, and expects one JSON acknowledgement on standard output.
|
|
80
|
+
|
|
81
|
+
For example, a minimal Node.js entrypoint is:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
#!/usr/bin/env node
|
|
85
|
+
|
|
86
|
+
let input = '';
|
|
87
|
+
process.stdin.setEncoding('utf8');
|
|
88
|
+
process.stdin.on('data', (chunk) => { input += chunk; });
|
|
89
|
+
process.stdin.on('end', async () => {
|
|
90
|
+
const event = JSON.parse(input);
|
|
91
|
+
|
|
92
|
+
// Perform the organisation-owned, idempotent handoff here.
|
|
93
|
+
// Use event.idempotencyKey when recording or calling the downstream system.
|
|
94
|
+
|
|
95
|
+
process.stdout.write(JSON.stringify({
|
|
96
|
+
schema: 'ewai.lifecycle-hook-ack/v1',
|
|
97
|
+
status: 'accepted',
|
|
98
|
+
code: 'recorded',
|
|
99
|
+
message: `Recorded ${event.name}`
|
|
100
|
+
}));
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Make the entrypoint executable:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
chmod +x release-observer/handler
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Compute its SHA-256 digest. On macOS:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
shasum -a 256 release-observer/handler
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Put the digest and executable filename into `lifecycle-handler.json`:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"schema": "ewai.lifecycle-handler/v1",
|
|
121
|
+
"id": "org.example.release-observer",
|
|
122
|
+
"name": "Release observer",
|
|
123
|
+
"publisher": {
|
|
124
|
+
"id": "org.example",
|
|
125
|
+
"name": "Example Organisation"
|
|
126
|
+
},
|
|
127
|
+
"version": "1.0.0",
|
|
128
|
+
"compatibility": {
|
|
129
|
+
"protocols": ["1"],
|
|
130
|
+
"eventSchemas": ["1"]
|
|
131
|
+
},
|
|
132
|
+
"entrypoint": "handler",
|
|
133
|
+
"digest": "sha256:REPLACE_WITH_THE_ENTRYPOINT_SHA256",
|
|
134
|
+
"events": [
|
|
135
|
+
"ewai.delivery.build.approved",
|
|
136
|
+
"ewai.delivery.manual-qa.approved",
|
|
137
|
+
"ewai.delivery.release-ready"
|
|
138
|
+
],
|
|
139
|
+
"limits": {
|
|
140
|
+
"timeoutMs": 5000,
|
|
141
|
+
"maxOutputBytes": 16384
|
|
142
|
+
},
|
|
143
|
+
"description": "Records approved delivery milestones in an organisation-owned system."
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The root, manifest, and entrypoint must be regular files or directories rather than symbolic links. The entrypoint must remain inside the package root. After registration, changing the manifest or implementation makes queued delivery incompatible. Restore the registered bytes, or review the replacement as a new handler identity and subscription before disabling the old subscription. V1 does not update a registered package in place.
|
|
148
|
+
|
|
149
|
+
## 2. Validate before registration
|
|
150
|
+
|
|
151
|
+
Validation is read-only:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
ewai hook validate ./release-observer --project . --json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
It checks the bounded root, manifest shape, stable identities, semantic version, protocol/event compatibility, supported event patterns, entrypoint, executable permission, and digest. The safe result exposes calculated digests but not the trusted absolute path.
|
|
158
|
+
|
|
159
|
+
Validation does not register or enable anything.
|
|
160
|
+
|
|
161
|
+
## 3. Register the reviewed package
|
|
162
|
+
|
|
163
|
+
Registration requires explicit confirmation:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
ewai hook register ./release-observer --project . --yes --json
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Registration pins the reviewed package identity, publisher, versions, root, entrypoint, manifest digest, and combined package digest in the project-local runtime. It still does not subscribe the project to events.
|
|
170
|
+
|
|
171
|
+
Treat registration as executable installation. Review the source, dependency chain, operating-system account, filesystem and network permissions, credential source, downstream permissions, logging policy, and incident owner before confirming it.
|
|
172
|
+
|
|
173
|
+
## 4. Enable an explicit subscription
|
|
174
|
+
|
|
175
|
+
Subscribe the registered handler only to the events it needs:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
ewai hook subscribe org.example.release-observer \
|
|
179
|
+
--events ewai.delivery.build.approved,ewai.delivery.manual-qa.approved,ewai.delivery.release-ready \
|
|
180
|
+
--project . \
|
|
181
|
+
--yes \
|
|
182
|
+
--json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
An event wildcard such as `ewai.delivery.*` is allowed only when it matches the installed catalogue and the handler manifest declares support for every matching event.
|
|
186
|
+
|
|
187
|
+
New matching events are queued after subscription. Reconciliation can record canonical milestones that are not yet in the hook ledger, but enabling a subscription is not a promise to replay every event previously recorded for another subscription.
|
|
188
|
+
|
|
189
|
+
## 5. Understand the event envelope
|
|
190
|
+
|
|
191
|
+
The handler receives an `ewai.lifecycle-event/v1` object:
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"schema": "ewai.lifecycle-event/v1",
|
|
196
|
+
"id": "bb48c5a4-0562-49ad-b09e-d1d36e99f807",
|
|
197
|
+
"name": "ewai.delivery.build.approved",
|
|
198
|
+
"occurredAt": "2026-08-20T09:53:57.169Z",
|
|
199
|
+
"project": {
|
|
200
|
+
"id": "project-52b901fef1364c71",
|
|
201
|
+
"name": "Example Product"
|
|
202
|
+
},
|
|
203
|
+
"scope": {
|
|
204
|
+
"intent": "platform/safe-delivery",
|
|
205
|
+
"delivery": "safe-delivery"
|
|
206
|
+
},
|
|
207
|
+
"facts": {
|
|
208
|
+
"status": "approved",
|
|
209
|
+
"decision": "approved"
|
|
210
|
+
},
|
|
211
|
+
"source": {
|
|
212
|
+
"key": "delivery:safe-delivery:build.approved:2026-08-20T09:53:57.169Z",
|
|
213
|
+
"revision": "2026-08-20T09:53:57.171Z"
|
|
214
|
+
},
|
|
215
|
+
"evidence": [
|
|
216
|
+
"SPECS/6.Build/safe-delivery/gates/build/build-approval.json"
|
|
217
|
+
],
|
|
218
|
+
"personas": [
|
|
219
|
+
{
|
|
220
|
+
"id": "project.release-owner",
|
|
221
|
+
"name": "Release Owner",
|
|
222
|
+
"tier": "project",
|
|
223
|
+
"reason": "Engaged as accountable for this lifecycle moment."
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"stream": {
|
|
227
|
+
"id": "delivery:safe-delivery",
|
|
228
|
+
"sequence": 8
|
|
229
|
+
},
|
|
230
|
+
"idempotencyKey": "ewai-4e1f9c9b9d5882a1b9a764d38eb267dc77b301c3"
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
The payload contains allowlisted semantic facts and project-relative evidence references, not evidence bodies. Persona context contains only ID, name, tier, and engagement reason. Premium and project personas are provenance and advisory context, not authority; proprietary persona bodies are never included.
|
|
235
|
+
|
|
236
|
+
Prompts, transcript answers, credentials, commands, executable paths, raw evidence, cookies, authorisation values, and raw handler output are excluded.
|
|
237
|
+
|
|
238
|
+
## 6. Return a bounded acknowledgement
|
|
239
|
+
|
|
240
|
+
An accepted acknowledgement is:
|
|
241
|
+
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"schema": "ewai.lifecycle-hook-ack/v1",
|
|
245
|
+
"status": "accepted",
|
|
246
|
+
"code": "recorded",
|
|
247
|
+
"message": "The organisation ledger recorded the event.",
|
|
248
|
+
"metadata": {
|
|
249
|
+
"duplicate": false
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
To refuse the event deliberately:
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"schema": "ewai.lifecycle-hook-ack/v1",
|
|
259
|
+
"status": "rejected",
|
|
260
|
+
"code": "policy-review",
|
|
261
|
+
"message": "Organisation review is required before this handoff can continue."
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Only the bounded status, code, message, scalar metadata, duration, and attempt timestamps are retained. Standard output is parsed and then discarded; standard error is counted against the output limit and discarded. Never depend on EWAI as the handler’s log store.
|
|
266
|
+
|
|
267
|
+
## 7. Make downstream work idempotent
|
|
268
|
+
|
|
269
|
+
Delivery is at least once. A handler can receive the same event more than once after timeout, process interruption, automatic retry, or an explicit manual retry.
|
|
270
|
+
|
|
271
|
+
- Use `idempotencyKey` as the unique key for the downstream operation.
|
|
272
|
+
- Return `accepted` when the same operation was already completed safely.
|
|
273
|
+
- Do not generate a new external action merely because the attempt number changed.
|
|
274
|
+
- Do not use an acknowledgement to imply an external deployment, notification, scan, or workflow succeeded unless the handler genuinely verified that outcome.
|
|
275
|
+
|
|
276
|
+
The event ID and idempotency key stay stable across all attempts. Retry appends an attempt; it never reruns the EWAI source operation.
|
|
277
|
+
|
|
278
|
+
## 8. Inspect delivery
|
|
279
|
+
|
|
280
|
+
Use the CLI:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
ewai hook list --project . --json
|
|
284
|
+
ewai hook deliveries --project . --json
|
|
285
|
+
ewai hook deliveries --status exhausted --project . --json
|
|
286
|
+
ewai hook deliveries --event ewai.delivery.release-ready --project . --json
|
|
287
|
+
ewai hook deliveries --handler org.example.release-observer --project . --json
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Or open the project dashboard and choose **Hooks**. The workspace reads left to right as **Milestone → Handler → Delivery** and shows:
|
|
291
|
+
|
|
292
|
+
- verified registered handlers and enabled or disabled subscriptions;
|
|
293
|
+
- delivery status, attempt count, next eligibility, and sanitised diagnostic;
|
|
294
|
+
- stable event, stream, handler, package, and idempotency identities;
|
|
295
|
+
- safe scope and evidence references;
|
|
296
|
+
- the core, premium, personal, and project personas recorded as active for that event;
|
|
297
|
+
- a clear reminder that handler status does not change the EWAI milestone.
|
|
298
|
+
|
|
299
|
+
`Delivered` means the handler returned a valid accepted acknowledgement. It does not certify what happened in a downstream system.
|
|
300
|
+
|
|
301
|
+
## 9. Retry a terminal delivery
|
|
302
|
+
|
|
303
|
+
Automatic delivery makes three attempts in total: immediately, after one second, and after a further five seconds. A deliberate rejection or package incompatibility stops automatic delivery immediately. Other repeated failures become `exhausted`.
|
|
304
|
+
|
|
305
|
+
After diagnosing the handler, retry an `exhausted`, `rejected`, or `incompatible` delivery:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
ewai hook retry DELIVERY_ID --project . --yes --json
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
The dashboard exposes the same action with a confirmation. A manual retry uses the same event and idempotency key and appends a manual attempt.
|
|
312
|
+
|
|
313
|
+
## 10. Disable future delivery
|
|
314
|
+
|
|
315
|
+
Disable an enabled project subscription:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
ewai hook disable SUBSCRIPTION_ID --project . --yes --json
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Disabling stops future matching deliveries and resolves outstanding non-running deliveries as disabled. Historical events and attempts remain visible. It does not remove the handler package, change its files, or alter canonical project state.
|
|
322
|
+
|
|
323
|
+
## Status and diagnostic reference
|
|
324
|
+
|
|
325
|
+
| Status | Meaning | Typical action |
|
|
326
|
+
| --- | --- | --- |
|
|
327
|
+
| `queued` | Eligible for its first or manual attempt. | Allow the dashboard dispatcher to run. |
|
|
328
|
+
| `retrying` | An automatic retry is scheduled. | Inspect the safe diagnostic and wait for eligibility. |
|
|
329
|
+
| `delivering` | The exact local executable is currently running. | Do not start a duplicate operation manually. |
|
|
330
|
+
| `succeeded` | A valid `accepted` acknowledgement was received. | Verify downstream truth in the owning system where appropriate. |
|
|
331
|
+
| `exhausted` | Automatic or manual delivery failed without acceptance. | Diagnose, then use explicit retry. |
|
|
332
|
+
| `rejected` | The handler deliberately returned `rejected`. | Resolve its stated policy or business reason, then retry if appropriate. |
|
|
333
|
+
| `incompatible` | Registered package identity or bytes no longer match. | Review the local package rather than bypassing the check. |
|
|
334
|
+
| `disabled` | The subscription was disabled. | Re-enable only through a reviewed explicit subscription action. |
|
|
335
|
+
|
|
336
|
+
Common safe codes include `handler-timeout`, `handler-output-too-large`, `handler-exit`, `handler-signal`, `handler-ack-invalid`, `handler-incompatible`, `worker-interrupted`, and `subscription-disabled`.
|
|
337
|
+
|
|
338
|
+
## Retention and recovery
|
|
339
|
+
|
|
340
|
+
- Successful and explicitly resolved deliveries have a 30-day runtime retention window.
|
|
341
|
+
- Unresolved failures remain until they are retried successfully or disabled, then remain for 30 more days.
|
|
342
|
+
- A `delivering` claim older than 60 seconds is recovered after restart as `worker-interrupted`. An automatic claim consumes one bounded attempt and resumes only when its budget remains. An interrupted manual claim returns to `exhausted` and requires a new explicit retry.
|
|
343
|
+
- Runtime hook data lives in the rebuildable project-local SQLite projection under `.ewai-pipeline/`; it is not canonical `SPECS/` truth.
|
|
344
|
+
- Cleanup never deletes canonical delivery evidence.
|
|
345
|
+
|
|
346
|
+
If the dashboard is not running, queued delivery waits. `ewai checkin` starts or reuses the local dashboard; opening the Hooks workspace also reconciles canonical milestones with the hook ledger.
|
|
347
|
+
|
|
348
|
+
## Security and governance checklist
|
|
349
|
+
|
|
350
|
+
Before production use, confirm:
|
|
351
|
+
|
|
352
|
+
1. The publisher, source, dependencies, entrypoint digest, and declared event set were reviewed.
|
|
353
|
+
2. The operating-system account has only the filesystem, network, and downstream permissions it needs.
|
|
354
|
+
3. Credentials come from the organisation’s protected runtime mechanism, never from the manifest, project content, browser, event, acknowledgement, or command arguments.
|
|
355
|
+
4. Downstream operations enforce their own authorisation and use the EWAI idempotency key.
|
|
356
|
+
5. Handler logs apply the organisation’s data classification and retention policy.
|
|
357
|
+
6. Ownership, monitoring, incident response, package updates, revocation, and disaster recovery are explicit.
|
|
358
|
+
7. People understand that handler success is not EWAI approval or external certification.
|
|
359
|
+
|
|
360
|
+
## Deliberate V1 exclusions
|
|
361
|
+
|
|
362
|
+
EWAI does not provide:
|
|
363
|
+
|
|
364
|
+
- production connectors for deployment platforms, ticketing tools, messaging services, security products, or cloud providers;
|
|
365
|
+
- browser-based handler installation, update, executable configuration, endpoint configuration, or credential entry;
|
|
366
|
+
- remote webhook hosting or webhook-signing infrastructure;
|
|
367
|
+
- pre-transition or veto hooks;
|
|
368
|
+
- handler-driven Build, Manual QA, phase, release, or compliance approval;
|
|
369
|
+
- deployment execution, release certification, or downstream outcome verification;
|
|
370
|
+
|
|
371
|
+
Organisations can implement their own connector behaviour behind a reviewed handler. That code, its permissions, and its operational consequences remain organisation-owned.
|
|
372
|
+
|
|
373
|
+
## Contract references
|
|
374
|
+
|
|
375
|
+
- `config/lifecycle-handler.schema.json`
|
|
376
|
+
- `config/lifecycle-event.schema.json`
|
|
377
|
+
- `config/lifecycle-hook-ack.schema.json`
|
|
378
|
+
- `SPECS/4.Constraints/standards/lifecycle-hook-safety.md`
|
|
379
|
+
- `src/runtime/lifecycle-hooks.mjs`
|
|
380
|
+
- `tests/lifecycle-hooks.test.mjs`
|
|
381
|
+
- `tests/lifecycle-hook-emissions.test.mjs`
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Working with personas
|
|
2
|
+
|
|
3
|
+
Personas give EWAI deliberate perspectives to apply during Discovery and delivery. They help expose blind spots, ask better questions, and translate consequences for different people.
|
|
4
|
+
|
|
5
|
+
A persona is an advisory lens. It is not a real stakeholder, a source of factual evidence, an approval, or a grant of authority.
|
|
6
|
+
|
|
7
|
+
For example, an export may look straightforward until an operator asks how a failed download is retried and a privacy lens asks which fields should be excluded. Those perspectives change the questions you put to the owner and the tests you plan. They don't decide the permission rules or claim real users approved them.
|
|
8
|
+
|
|
9
|
+
## Choose the right persona source
|
|
10
|
+
|
|
11
|
+
| Type | Owned by | Lives in | Best for | How it enters a project |
|
|
12
|
+
| --- | --- | --- | --- | --- |
|
|
13
|
+
| Core | EWAI maintainers | Bundled framework persona pack | General engineering and delivery disciplines | Available with EWAI. |
|
|
14
|
+
| Premium | Managed persona-pack publisher | Local entitled pack cache under `~/.ewai/packs/…/premium-personas/` | Broader specialist perspectives maintained outside the public repository | Explicit entitlement check and user-approved sync. |
|
|
15
|
+
| Personal | One practitioner | `~/.ewai/personas/` | A reusable working lens across several projects | Create once; the local catalogue can select it when relevant. |
|
|
16
|
+
| Project | The project or team | Configured `SPECS/1.Scope/personas/project/` | Product, domain, organisation, or user knowledge that belongs with this project | Create in the project and version it with SPECS. |
|
|
17
|
+
| Blueprint-derived project | Organisation pack publisher, then the approving project | Starts in an Organisation Blueprint Pack; materialises into the project-persona directory | A reviewed organisation perspective that should become project-owned truth | Previewed with the blueprint and created only after named Discovery approval. |
|
|
18
|
+
|
|
19
|
+
Use the narrowest ownership that is true. If a perspective only makes sense for one product, it is a project persona—not a personal global default. If a team has developed a perspective beyond the managed premium version, create a project persona that states the project-specific stance rather than editing managed files.
|
|
20
|
+
|
|
21
|
+
## Inspect the available catalogue
|
|
22
|
+
|
|
23
|
+
List personas available to the current environment:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ewai persona list --project .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Narrow the list by a word found in the persona's metadata, tags, capabilities, or path:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
ewai persona list --project . --query security
|
|
33
|
+
ewai persona list --project . --query finance
|
|
34
|
+
ewai persona list --project . --query accessibility
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
For a compact machine-oriented view, use:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
ewai persona index --project . --query architecture
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The index exposes public metadata such as ID, name, description, category, tier, tags, capabilities, and local path. It does not make the persona an authority over project decisions.
|
|
44
|
+
|
|
45
|
+
## Create a personal persona
|
|
46
|
+
|
|
47
|
+
Use a personal persona for a lens you own and expect to reuse:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
ewai persona create security-reviewer \
|
|
51
|
+
--name "Security Reviewer" \
|
|
52
|
+
--category engineering
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Locate the personal library with:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ewai persona path --scope personal
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The default root is `~/.ewai/personas/`.
|
|
62
|
+
|
|
63
|
+
## Create a project persona
|
|
64
|
+
|
|
65
|
+
Use a project persona for product-specific stakeholders, domain roles, organisation conventions, or locally agreed decision lenses:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
ewai persona create finance-controller \
|
|
69
|
+
--scope project \
|
|
70
|
+
--project . \
|
|
71
|
+
--name "Finance Controller" \
|
|
72
|
+
--category finance
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Locate the configured project library with:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
ewai persona path --scope project --project .
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The default contract location is the configured SPECS root beneath `1.Scope/personas/project/`. Do not assume the SPECS root is literally `./SPECS`; `.ewai-pipeline/project.json` identifies it for the current project.
|
|
82
|
+
|
|
83
|
+
The create command refuses to overwrite an existing persona unless `--force` is supplied. Review the existing project truth before using that replacement option.
|
|
84
|
+
|
|
85
|
+
## Shape a useful persona
|
|
86
|
+
|
|
87
|
+
The generator creates portable metadata and four body sections. A project persona can look like this:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
---
|
|
91
|
+
schema: ewai.persona/v1
|
|
92
|
+
id: project.finance-controller
|
|
93
|
+
name: Finance Controller
|
|
94
|
+
version: 0.1.0
|
|
95
|
+
description: Tests product decisions against financial control, auditability, and month-end operations.
|
|
96
|
+
category: finance
|
|
97
|
+
pack: ewai.personas.project
|
|
98
|
+
tier: project
|
|
99
|
+
tags:
|
|
100
|
+
- finance
|
|
101
|
+
- audit
|
|
102
|
+
- reporting
|
|
103
|
+
capabilities:
|
|
104
|
+
- control-design
|
|
105
|
+
- financial-reporting
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
# Finance Controller
|
|
109
|
+
|
|
110
|
+
## Mission
|
|
111
|
+
|
|
112
|
+
Make financial consequences and control obligations visible before delivery choices become expensive to reverse.
|
|
113
|
+
|
|
114
|
+
## Operating stance
|
|
115
|
+
|
|
116
|
+
- Trace every material figure to an accountable source.
|
|
117
|
+
- Prefer explicit controls and reconciliation evidence over confident narrative.
|
|
118
|
+
- State which conclusion is evidence and which is a working assumption.
|
|
119
|
+
|
|
120
|
+
## Questions to keep asking
|
|
121
|
+
|
|
122
|
+
- Who owns this control in normal operation?
|
|
123
|
+
- What happens at month end, year end, or during an audit?
|
|
124
|
+
- Can a user explain and reproduce this figure?
|
|
125
|
+
|
|
126
|
+
## Boundaries
|
|
127
|
+
|
|
128
|
+
- This persona advises; the real Finance Controller and Product Owner remain accountable.
|
|
129
|
+
- Real stakeholder evidence takes priority over simulated feedback.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Metadata that improves engagement
|
|
133
|
+
|
|
134
|
+
Discovery matches each section's perspective signals against the persona's ID, name, category, description, tags, and capabilities. Make those fields specific enough to be discoverable:
|
|
135
|
+
|
|
136
|
+
- Write a description around the decisions and risks the persona examines.
|
|
137
|
+
- Use stable, plain-language tags such as `accessibility`, `privacy`, `finance`, `operations`, or `api`.
|
|
138
|
+
- Use capabilities for concrete work such as `threat-modelling`, `control-design`, or `user-research`.
|
|
139
|
+
- Avoid stuffing every possible keyword into one persona. A persona that matches everything adds little discrimination.
|
|
140
|
+
|
|
141
|
+
The body should say what the persona is trying to protect, how it reasons, what evidence it expects, the questions it keeps asking, and where its authority stops.
|
|
142
|
+
|
|
143
|
+
## Use premium personas safely
|
|
144
|
+
|
|
145
|
+
For first-time setup, [enter your licence and install the pack](operations/premium-personas-setup.md). Setup installs immediately; later updates require your consent.
|
|
146
|
+
|
|
147
|
+
A status check doesn't download content, but it can enforce confirmed team expiry by removing an unchanged managed pack. Individual expiry keeps installed personas; your personal and project libraries aren't touched. Read the current state when needed:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
ewai persona premium status --project . --json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The normal EWAI check-in and explicit status command report three separate facts:
|
|
154
|
+
|
|
155
|
+
1. whether premium access is available;
|
|
156
|
+
2. whether the managed premium library is installed;
|
|
157
|
+
3. whether an installed library is verified against its validated content and external receipt.
|
|
158
|
+
|
|
159
|
+
Remote freshness is a further fact: a verified local library can remain installed while network access is unknown. Entitlement, installed state, verified state, and active persona engagement are not interchangeable.
|
|
160
|
+
|
|
161
|
+
Check-in does not download premium content. If it offers an install or update, decide explicitly whether this project environment should receive it. Only after that decision run:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
ewai persona premium sync --project . --yes
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The `--yes` flag is an intentional consent boundary. Do not hide this command in unattended setup or run it merely because access exists.
|
|
168
|
+
|
|
169
|
+
The sync process protects the managed cache and uses a fresh staged candidate:
|
|
170
|
+
|
|
171
|
+
- it checks licence access with the configured website;
|
|
172
|
+
- it verifies the downloaded ZIP against the advertised checksum and size;
|
|
173
|
+
- it refuses to replace locally edited managed files;
|
|
174
|
+
- it validates the manifest, safe paths, allowed text/data files, file count and bounded size;
|
|
175
|
+
- it records a deterministic content digest in a receipt outside the pack;
|
|
176
|
+
- it atomically promotes valid content and restores the prior pack if promotion fails.
|
|
177
|
+
|
|
178
|
+
Do not edit premium definitions in place, copy them into public project history, or present them as project-owned evidence. If the project needs a durable local variation, author a new project persona that states what changed and why.
|
|
179
|
+
|
|
180
|
+
The public persona schema uses its published ownership tiers. Guided Discovery presents personas loaded from the managed premium library with the user-facing tier `premium`. Do not hand-author a project file with `tier: premium`; use the supported sync path and preserve managed provenance.
|
|
181
|
+
|
|
182
|
+
## Use blueprint-derived personas
|
|
183
|
+
|
|
184
|
+
An [Organisation Blueprint Pack](designing-organisation-blueprint-packs.md) may contain persona templates. Selection does not immediately add them to the active ensemble.
|
|
185
|
+
|
|
186
|
+
During Review, EWAI shows the persona consequences alongside the selected standards and boilerplate receipts. After named approval it materialises each template as a project persona with:
|
|
187
|
+
|
|
188
|
+
- an ID in the form `project.<publisher>.<persona>`;
|
|
189
|
+
- `tier: project`;
|
|
190
|
+
- the source pack, version, digest, approver, and approval time;
|
|
191
|
+
- project-owned Markdown under `SPECS/1.Scope/personas/project/`.
|
|
192
|
+
|
|
193
|
+
From that point, the definition is a project-owned asset and can be improved through the project's normal reviewed change process. Its responses remain advisory; they aren't evidence from a real stakeholder.
|
|
194
|
+
|
|
195
|
+
## How Discovery engages personas
|
|
196
|
+
|
|
197
|
+
Discovery does not permanently activate every installed persona. For the current section it:
|
|
198
|
+
|
|
199
|
+
1. compares the section's perspective signals with persona metadata;
|
|
200
|
+
2. adds smaller relevance signals from existing answers;
|
|
201
|
+
3. ranks candidates by match strength, then by tier and stable name/ID ordering;
|
|
202
|
+
4. deliberately tries to include a relevant project persona and a relevant premium persona;
|
|
203
|
+
5. fills the remaining places with the strongest relevant candidates, up to four.
|
|
204
|
+
|
|
205
|
+
The tier tie-break order is project, premium, personal, then core. Relevance comes first: a high-tier persona with no match is not engaged.
|
|
206
|
+
|
|
207
|
+
### What you'll see in Discovery
|
|
208
|
+
|
|
209
|
+
At every Discovery section, EWAI shows the current personas. For each one you'll see:
|
|
210
|
+
|
|
211
|
+
- **name** — who the lens represents;
|
|
212
|
+
- **tier** — where it came from;
|
|
213
|
+
- **engagement reason** — why it is relevant to this section;
|
|
214
|
+
- **matched concerns** — the perspective signals that caused the match, when useful.
|
|
215
|
+
|
|
216
|
+
The active list can change as the participant moves between sections or adds answers. That is expected: personas are being swapped in and out to fit the work at hand.
|
|
217
|
+
|
|
218
|
+
Use this display to understand and challenge the selection. If a critical perspective is absent, ask EWAI to reconsider the focus. If the catalogue lacks the necessary project-specific perspective, you can review and improve its metadata or create a project persona; bring in real stakeholders wherever their evidence is needed. The [UI integration guide](personas/persona-engagement-ui.md) describes the presentation requirements for interface authors.
|
|
219
|
+
|
|
220
|
+
## Use personas in a working session
|
|
221
|
+
|
|
222
|
+
1. State the real decision and the real people affected.
|
|
223
|
+
2. Check the active persona names, tiers, and reasons before answering the section.
|
|
224
|
+
3. Invite the persona questions that expose a distinct risk, user need, or operational consequence.
|
|
225
|
+
4. Label what comes from real evidence and what is a persona-generated hypothesis.
|
|
226
|
+
5. Ask EWAI for a missing perspective. It handles contextual selection; you decide whether a new or improved project persona is needed and review its definition.
|
|
227
|
+
6. Record the accountable human decision in project-owned SPECS.
|
|
228
|
+
|
|
229
|
+
Personas should broaden the conversation, then get out of the way of evidence and ownership.
|
|
230
|
+
|
|
231
|
+
## About overlays
|
|
232
|
+
|
|
233
|
+
The project contract reserves a persona `overlays` area for future composition patterns. The current persona resolver does not automatically merge those files into active personas.
|
|
234
|
+
|
|
235
|
+
For behaviour you need today, put the complete reviewed persona in the project-persona directory. Do not rely on an overlay file being discovered or composed automatically.
|
|
236
|
+
|
|
237
|
+
## Maintain and review personas
|
|
238
|
+
|
|
239
|
+
- Keep IDs stable; change names and descriptions deliberately.
|
|
240
|
+
- Increase the version when the perspective or evidence standard changes.
|
|
241
|
+
- Review project personas with the real roles they represent whenever practical.
|
|
242
|
+
- Remove obsolete keywords rather than allowing stale personas to keep matching.
|
|
243
|
+
- Check version control for unexplained changes to project personas.
|
|
244
|
+
- Re-run `ewai persona list --project . --query <term>` after changes.
|
|
245
|
+
- Confirm in Guided Setup that the expected names, tiers, and engagement reasons appear in the relevant sections.
|
|
246
|
+
- Never interpret a persona response as approval.
|
|
247
|
+
|
|
248
|
+
## Troubleshooting
|
|
249
|
+
|
|
250
|
+
| Symptom | Likely cause | Recovery |
|
|
251
|
+
| --- | --- | --- |
|
|
252
|
+
| Persona is missing from the catalogue | Wrong scope/root, invalid Markdown metadata, or project path not supplied | Run `persona path`, inspect the file, and list again with `--project .`. |
|
|
253
|
+
| Persona never becomes active | Its metadata does not match the section's signals or current answers | Make description, tags, and capabilities more specific to the intended decisions. |
|
|
254
|
+
| Too many generic personas appear | Broad or duplicated keywords produce similar relevance scores | Narrow their missions and metadata; keep one accountable lens per distinct concern. |
|
|
255
|
+
| Premium library is absent | Access may be unavailable or sync has not been explicitly approved | Read check-in status and choose whether to install it through [premium setup](operations/premium-personas-setup.md). |
|
|
256
|
+
| Premium update is refused | Managed files were edited, the installed pack belongs to another seat, or archive validation failed | Preserve edits and read the specific error. Don't force replacement. Use the [setup and recovery guide](operations/premium-personas-setup.md). |
|
|
257
|
+
| Overlay has no effect | Automatic overlay composition is not current behaviour | Move the complete reviewed perspective into a project persona. |
|
|
258
|
+
|
|
259
|
+
## Related guides
|
|
260
|
+
|
|
261
|
+
- [Designing Organisation Blueprint Packs](designing-organisation-blueprint-packs.md)
|
|
262
|
+
- [Persona entitlement and pack providers](persona-entitlement-provider-guide.md)
|
|
263
|
+
- [Product Owner guide](product-owner-guide.md)
|
|
264
|
+
- [All EWAI guides](README.md)
|
|
265
|
+
|
|
266
|
+
## Contract sources
|
|
267
|
+
|
|
268
|
+
- `src/personas.mjs` — personal/project roots, creation template, parsing, listing, and indexing
|
|
269
|
+
- `config/persona.schema.json` — public metadata contract
|
|
270
|
+
- `src/checkin.mjs` — safe check-in and CLI entitlement adapters
|
|
271
|
+
- `src/persona-entitlements.mjs` — provider access, pack validation, receipts, atomic promotion, and recovery
|
|
272
|
+
- `src/runtime/dashboard-server.mjs` — core, premium, personal, and project catalogue assembly
|
|
273
|
+
- `src/runtime/guided-discovery.mjs` — contextual matching, tier tie-breaks, maximum ensemble, and engagement reasons
|
|
274
|
+
- `src/discovery.mjs` — blueprint persona materialisation and provenance
|