arcane-cli 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +253 -0
  3. package/dist/assets/.arcane/agents/agent-policies-template.md +414 -0
  4. package/dist/assets/.arcane/governance/agent-approved-paths.md +60 -0
  5. package/dist/assets/.arcane/governance/agent-policies.md +414 -0
  6. package/dist/assets/.arcane/governance/agent-work-queue-model.md +61 -0
  7. package/dist/assets/.arcane/governance/authentication-strategy.md +220 -0
  8. package/dist/assets/.arcane/governance/cicd-standards.md +227 -0
  9. package/dist/assets/.arcane/governance/decision-documentation-standard.md +335 -0
  10. package/dist/assets/.arcane/governance/development-methodology.md +384 -0
  11. package/dist/assets/.arcane/governance/git-conventions.md +759 -0
  12. package/dist/assets/.arcane/governance/hardening-checklist.md +117 -0
  13. package/dist/assets/.arcane/governance/naming-conventions.md +142 -0
  14. package/dist/assets/.arcane/governance/new-business-setup.md +182 -0
  15. package/dist/assets/.arcane/governance/poc-management-pattern.md +190 -0
  16. package/dist/assets/.arcane/governance/portable-bootstrap.md +101 -0
  17. package/dist/assets/.arcane/governance/product-excellence-standards.md +211 -0
  18. package/dist/assets/.arcane/governance/rca-process-standard.md +157 -0
  19. package/dist/assets/.arcane/governance/spell-authoring-standards.md +129 -0
  20. package/dist/assets/.arcane/governance/testing-standards.md +158 -0
  21. package/dist/assets/.arcane/governance/threat-model.md +104 -0
  22. package/dist/assets/.arcane/governance/universal-agent-rules.md +108 -0
  23. package/dist/assets/.arcane/image-prompts/adelaide-image-prompt.md +140 -0
  24. package/dist/assets/.arcane/image-prompts/alexander-image-prompt.md +138 -0
  25. package/dist/assets/.arcane/image-prompts/bess-image-prompt.md +139 -0
  26. package/dist/assets/.arcane/image-prompts/circe-image-prompt.md +143 -0
  27. package/dist/assets/.arcane/image-prompts/custodio-image-prompt.md +140 -0
  28. package/dist/assets/.arcane/image-prompts/iris-image-prompt.md +139 -0
  29. package/dist/assets/.arcane/image-prompts/kellar-image-prompt.md +141 -0
  30. package/dist/assets/.arcane/image-prompts/lafayette-image-prompt.md +140 -0
  31. package/dist/assets/.arcane/image-prompts/lince-image-prompt.md +142 -0
  32. package/dist/assets/.arcane/image-prompts/mercurio-image-prompt.md +140 -0
  33. package/dist/assets/.arcane/image-prompts/merlin-image-prompt.md +139 -0
  34. package/dist/assets/.arcane/image-prompts/prospero-image-prompt.md +141 -0
  35. package/dist/assets/.arcane/templates/venture-template/overview.md +66 -0
  36. package/dist/assets/.claude/commands/spell-address-review.md +9 -0
  37. package/dist/assets/.claude/commands/spell-arcane-version.md +9 -0
  38. package/dist/assets/.claude/commands/spell-architect.md +9 -0
  39. package/dist/assets/.claude/commands/spell-bootstrap-business.md +9 -0
  40. package/dist/assets/.claude/commands/spell-brainstorm.md +9 -0
  41. package/dist/assets/.claude/commands/spell-bug.md +9 -0
  42. package/dist/assets/.claude/commands/spell-bump.md +9 -0
  43. package/dist/assets/.claude/commands/spell-check-drift.md +9 -0
  44. package/dist/assets/.claude/commands/spell-close-session.md +9 -0
  45. package/dist/assets/.claude/commands/spell-commit-work.md +9 -0
  46. package/dist/assets/.claude/commands/spell-create-pull-request.md +9 -0
  47. package/dist/assets/.claude/commands/spell-document.md +9 -0
  48. package/dist/assets/.claude/commands/spell-dotnet-expert.md +9 -0
  49. package/dist/assets/.claude/commands/spell-eas-ios-deploy.md +9 -0
  50. package/dist/assets/.claude/commands/spell-enchant.md +9 -0
  51. package/dist/assets/.claude/commands/spell-explain-concept.md +9 -0
  52. package/dist/assets/.claude/commands/spell-feedback.md +9 -0
  53. package/dist/assets/.claude/commands/spell-full-cycle.md +9 -0
  54. package/dist/assets/.claude/commands/spell-generate-bot-icons.md +9 -0
  55. package/dist/assets/.claude/commands/spell-implement.md +9 -0
  56. package/dist/assets/.claude/commands/spell-open-session.md +9 -0
  57. package/dist/assets/.claude/commands/spell-plan.md +9 -0
  58. package/dist/assets/.claude/commands/spell-present-arcane.md +9 -0
  59. package/dist/assets/.claude/commands/spell-product-review.md +9 -0
  60. package/dist/assets/.claude/commands/spell-review-batch.md +9 -0
  61. package/dist/assets/.claude/commands/spell-review.md +9 -0
  62. package/dist/assets/.claude/commands/spell-save-idea.md +9 -0
  63. package/dist/assets/.claude/commands/spell-scope.md +9 -0
  64. package/dist/assets/.claude/commands/spell-security-review.md +9 -0
  65. package/dist/assets/.claude/commands/spell-ship.md +9 -0
  66. package/dist/assets/.claude/commands/spell-status.md +9 -0
  67. package/dist/assets/.claude/commands/spell-suggest-feature.md +9 -0
  68. package/dist/assets/.claude/commands/spell-test.md +9 -0
  69. package/dist/assets/.claude/commands/spell-todo.md +9 -0
  70. package/dist/assets/.github/agents/adelaide.agent.md +44 -0
  71. package/dist/assets/.github/agents/alexander.agent.md +43 -0
  72. package/dist/assets/.github/agents/bess.agent.md +42 -0
  73. package/dist/assets/.github/agents/circe.agent.md +43 -0
  74. package/dist/assets/.github/agents/custodio.agent.md +44 -0
  75. package/dist/assets/.github/agents/iris.agent.md +43 -0
  76. package/dist/assets/.github/agents/kellar.agent.md +43 -0
  77. package/dist/assets/.github/agents/lafayette.agent.md +42 -0
  78. package/dist/assets/.github/agents/lince.agent.md +43 -0
  79. package/dist/assets/.github/agents/mercurio.agent.md +43 -0
  80. package/dist/assets/.github/agents/merlin.agent.md +44 -0
  81. package/dist/assets/.github/agents/prospero.agent.md +43 -0
  82. package/dist/assets/.github/instructions/agent-output.instructions.md +48 -0
  83. package/dist/assets/.github/prompts/spell-address-review.prompt.md +114 -0
  84. package/dist/assets/.github/prompts/spell-arcane-version.prompt.md +82 -0
  85. package/dist/assets/.github/prompts/spell-architect.prompt.md +116 -0
  86. package/dist/assets/.github/prompts/spell-bootstrap-business.prompt.md +73 -0
  87. package/dist/assets/.github/prompts/spell-brainstorm.prompt.md +124 -0
  88. package/dist/assets/.github/prompts/spell-bug.prompt.md +109 -0
  89. package/dist/assets/.github/prompts/spell-bump.prompt.md +73 -0
  90. package/dist/assets/.github/prompts/spell-check-drift.prompt.md +97 -0
  91. package/dist/assets/.github/prompts/spell-close-session.prompt.md +189 -0
  92. package/dist/assets/.github/prompts/spell-commit-work.prompt.md +211 -0
  93. package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +170 -0
  94. package/dist/assets/.github/prompts/spell-document.prompt.md +83 -0
  95. package/dist/assets/.github/prompts/spell-dotnet-expert.prompt.md +117 -0
  96. package/dist/assets/.github/prompts/spell-eas-ios-deploy.prompt.md +183 -0
  97. package/dist/assets/.github/prompts/spell-enchant.prompt.md +385 -0
  98. package/dist/assets/.github/prompts/spell-explain-concept.prompt.md +69 -0
  99. package/dist/assets/.github/prompts/spell-feedback.prompt.md +113 -0
  100. package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +201 -0
  101. package/dist/assets/.github/prompts/spell-generate-bot-icons.prompt.md +84 -0
  102. package/dist/assets/.github/prompts/spell-implement.prompt.md +101 -0
  103. package/dist/assets/.github/prompts/spell-open-session.prompt.md +116 -0
  104. package/dist/assets/.github/prompts/spell-plan.prompt.md +145 -0
  105. package/dist/assets/.github/prompts/spell-present-arcane.prompt.md +188 -0
  106. package/dist/assets/.github/prompts/spell-product-review.prompt.md +97 -0
  107. package/dist/assets/.github/prompts/spell-review-batch.prompt.md +94 -0
  108. package/dist/assets/.github/prompts/spell-review.prompt.md +131 -0
  109. package/dist/assets/.github/prompts/spell-save-idea.prompt.md +83 -0
  110. package/dist/assets/.github/prompts/spell-scope.prompt.md +263 -0
  111. package/dist/assets/.github/prompts/spell-security-review.prompt.md +129 -0
  112. package/dist/assets/.github/prompts/spell-ship.prompt.md +104 -0
  113. package/dist/assets/.github/prompts/spell-status.prompt.md +85 -0
  114. package/dist/assets/.github/prompts/spell-suggest-feature.prompt.md +110 -0
  115. package/dist/assets/.github/prompts/spell-test.prompt.md +87 -0
  116. package/dist/assets/.github/prompts/spell-todo.prompt.md +126 -0
  117. package/dist/assets/DECISIONS.md +19 -0
  118. package/dist/assets/TODO.md +7 -0
  119. package/dist/assets/agents/architecture-lead.yaml +61 -0
  120. package/dist/assets/agents/collaborator.yaml +59 -0
  121. package/dist/assets/agents/devops.yaml +60 -0
  122. package/dist/assets/agents/frontend-dev.yaml +60 -0
  123. package/dist/assets/agents/fullstack-dev.yaml +59 -0
  124. package/dist/assets/agents/marketing-strategist.yaml +60 -0
  125. package/dist/assets/agents/mobile-dev.yaml +59 -0
  126. package/dist/assets/agents/operations-comms.yaml +58 -0
  127. package/dist/assets/agents/orchestrator.yaml +60 -0
  128. package/dist/assets/agents/qa-lead.yaml +60 -0
  129. package/dist/assets/agents/research-analyst.yaml +59 -0
  130. package/dist/assets/agents/security-ops.yaml +61 -0
  131. package/dist/assets/ai-context/system-prompt-context.md +32 -0
  132. package/dist/assets/journal/.gitkeep +0 -0
  133. package/dist/index.d.ts +12 -0
  134. package/dist/index.js +2313 -0
  135. package/dist/index.js.map +1 -0
  136. package/package.json +72 -0
@@ -0,0 +1,101 @@
1
+ ---
2
+ title: Portable Bootstrap — Quick Context for Ad-Hoc AI Clients
3
+ audience: ai
4
+ status: active
5
+ tags: [ai-context, bootstrap, multi-client, portable]
6
+ ---
7
+
8
+ # Portable Bootstrap
9
+
10
+ Paste this entire file into any AI client (Claude web, ChatGPT, etc.) to give it working context for this project. For full detail, read the linked files in the repo.
11
+
12
+ ---
13
+
14
+ ## Project
15
+
16
+ **Arcane** — Operational documentation for running AI-automated businesses under {LLC_NAME} (owner: {OPERATOR_NAME}). Uses an agent runtime to automate operations across one or more ventures.
17
+
18
+ **This is a documentation-only repository.** No build commands, test suites, or deployable code. Do not add automation without being asked.
19
+
20
+ ## Environment
21
+
22
+ - **Primary machine:** the host where the agent runtime executes.
23
+ - **Disk encryption:** full-disk encryption active on machines holding credentials or working copies.
24
+ - **Agent runtime:** one or more agents configured. Runtime gateway bound to loopback, token auth via SecretRef, exposed remotely only through an authenticated tunnel if needed.
25
+ - **User:** a dedicated non-root user.
26
+
27
+ ## Non-Negotiable Rules
28
+
29
+ 1. **Never access an encrypted or cross-OS volume you are not authorized to touch.** This rule stands as defense-in-depth regardless of encryption status.
30
+ 2. **No root commands** unless explicitly scoped and justified.
31
+ 3. **No secrets on the command line.** Use env vars and `read -s`.
32
+ 4. **Update `last_updated` frontmatter** when editing any document.
33
+ 5. **Log significant decisions** in DECISIONS.md as ADRs.
34
+ 6. **Production system** — no shortcuts, no "fix it later."
35
+ 7. **Conventional Commits** format: `type(scope): description`.
36
+ 8. **Never auto-commit** during interactive sessions — present for approval first.
37
+ 9. **Recommendation guardrails:** Flag actionable recommendations. Verify information. Present free alternatives. Confirm >$50 items.
38
+
39
+ ## Key Files
40
+
41
+ | Need | File |
42
+ | ------------------ | ------------------------------------- |
43
+ | Full rules | `governance/universal-agent-rules.md` |
44
+ | Project overview | `project.md` |
45
+ | Decisions log | `DECISIONS.md` |
46
+ | Agent policies | `agents/agent-policies.md` |
47
+ | Git conventions | `governance/git-conventions.md` |
48
+ | AI context summary | `ai-context/system-prompt-context.md` |
49
+
50
+ ## Documentation Format
51
+
52
+ Every doc uses YAML frontmatter: `title`, `audience` (human/ai/both), `last_updated`, `status` (draft/active/deprecated), `tags`. Use wiki-links (`[[filename]]`) for cross-references.
53
+
54
+ ## Naming Tiers
55
+
56
+ | Tier | Style | Examples |
57
+ | --------- | --------------- | ----------------------------------------- |
58
+ | Machines | Iconic names | Atlas, Voyager |
59
+ | AI Agents | Persona + role | Merlin — CTO, {AGENT_NAME} — Product Ops |
60
+ | Systems | Functional slug | `inventory-api`, `orders-worker` |
61
+
62
+ ## Version Control Host
63
+
64
+ Use your chosen host's project organization ({ADO_ORG}). Apply a consistent project/repo naming convention. One project per business + one shared docs/ops project.
65
+
66
+ ## Spell Commands (Development Methodology)
67
+
68
+ Development follows the **Spell Loop** — structured planning phases feeding an autonomous implementation loop, delivered through the spell system. All workflows go through this flow.
69
+
70
+ **Available spells** (invoke by typing the command name in your message):
71
+
72
+ ### Core Loop: Plan → Architect → Implement → Test → Review → Ship
73
+
74
+ - `spell-plan` — Plan a feature (output: PRD.md)
75
+ - `spell-architect` — Design the solution (output: architecture.md + stories.json)
76
+ - `spell-implement` — Write code per story
77
+ - `spell-test` — Run QA and verify
78
+ - `spell-review` — Adversarial code review
79
+ - `spell-ship` — Merge and deploy
80
+
81
+ ### Session Management
82
+
83
+ - `spell-open-session` — Rebuild context after reset; read core docs, identify unfinished work, prioritize
84
+ - `spell-close-session` — End-of-session cleanup: stage changes, curate screenshots, propose commits, journal
85
+
86
+ ### Operational
87
+
88
+ - `spell-commit-work` — Standard Git workflow: stage → message → approve → execute
89
+ - `spell-todo` — Review TODO.md, prioritize, move resolved items to canonical docs
90
+ - `spell-check-drift` — Find stale assumptions in docs vs. reality
91
+ - `spell-bootstrap-business` — Initialize a new business: folder, template docs, project setup
92
+
93
+ ### Specialized
94
+
95
+ - `spell-security-review` — Audit for security gaps, credential exposure, threat coverage
96
+ - `spell-product-review` — Evaluate business readiness: market fit, automation scope, blockers
97
+ - `spell-dotnet-expert` — .NET/Blazor deep-dive
98
+ - `spell-explain-concept` — Break down complex architecture concepts
99
+ - `spell-generate-bot-icons` — Create agent personas and icons
100
+
101
+ Full reference: See `governance/development-methodology.md` in the repo.
@@ -0,0 +1,211 @@
1
+ ---
2
+ title: Product Excellence Standards
3
+ audience: both
4
+ last_updated: YYYY-MM-DD
5
+ status: active
6
+ tags:
7
+ [quality, ux, accessibility, performance, security, spell-enchant, ADR-052]
8
+ ---
9
+
10
+ # Product Excellence Standards
11
+
12
+ ## Purpose
13
+
14
+ Define what "the best version of an app" means across every dimension — UX, accessibility, performance, security, and polish. This document provides the **PRD Quality Scorecard** that [[.github/prompts/spell-enchant.prompt|spell-enchant]] evaluates against when enchanting a PRD from functional to exceptional.
15
+
16
+ ## Quality Dimensions
17
+
18
+ ### 1. Requirements Completeness
19
+
20
+ | Criterion | Description |
21
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
22
+ | **Testable acceptance criteria** | Every requirement has ≥1 acceptance criterion that can be verified by an automated test or a concrete manual check |
23
+ | **Priority classification** | All requirements classified as Must Have / Should Have / Won't Have |
24
+ | **Scope boundary** | "Won't Have" section explicitly excludes items to prevent scope creep |
25
+ | **Dependency identification** | External services, APIs, and decisions the feature depends on are listed |
26
+ | **Open questions documented** | Unresolved items are captured — not ignored or assumed |
27
+
28
+ ### 2. User Experience (UX)
29
+
30
+ | Criterion | Description |
31
+ | ---------------------- | --------------------------------------------------------------------------------------------------- |
32
+ | **Full user journey** | Every user-facing feature defines: happy path, error states, edge cases, empty states |
33
+ | **Loading states** | Users see meaningful feedback during async operations (skeleton screens, spinners, progress bars) |
34
+ | **Error recovery** | Errors include actionable messages — users know what went wrong and what to do next |
35
+ | **Empty states** | First-use and zero-data states guide users toward the next action rather than showing blank screens |
36
+ | **Success feedback** | Completions are acknowledged (toast, animation, redirect) — users know their action worked |
37
+ | **Onboarding flow** | New users have a clear path from zero to first value delivered |
38
+ | **Consistency** | UI patterns, terminology, and behavior are consistent across features |
39
+ | **Micro-interactions** | Transitions, hover effects, and subtle animations provide polish without slowing users down |
40
+
41
+ ### 3. Accessibility (WCAG 2.1 AA Baseline)
42
+
43
+ | Criterion | Description |
44
+ | ------------------------- | ---------------------------------------------------------------------------------- |
45
+ | **Keyboard navigation** | All interactive elements reachable and operable via keyboard alone |
46
+ | **Screen reader support** | Semantic HTML, ARIA labels, live regions for dynamic content |
47
+ | **Color contrast** | Text meets 4.5:1 ratio (normal text) or 3:1 (large text) against background |
48
+ | **Focus indicators** | Visible focus ring on all interactive elements |
49
+ | **Alternative text** | All images, icons, and media have descriptive alt text or are marked decorative |
50
+ | **Form labels** | All form inputs have associated labels; error messages are programmatically linked |
51
+ | **Motion sensitivity** | Animations respect `prefers-reduced-motion`; no content-critical motion |
52
+ | **Text resizing** | UI remains usable at 200% zoom |
53
+
54
+ ### 4. Performance
55
+
56
+ | Criterion | Description |
57
+ | ------------------------------------------------- | -------------------------------------------------------------------------- |
58
+ | **Largest Contentful Paint** | Web: < 2.5s; Mobile: < 3.5s |
59
+ | **First Input Delay / Interaction to Next Paint** | Web: < 100ms; Mobile: < 200ms |
60
+ | **Cumulative Layout Shift** | < 0.1 (no unexpected visual shifts during load) |
61
+ | **API response time** | p95 < 500ms for user-facing endpoints; p95 < 2s for batch/report endpoints |
62
+ | **Bundle size** | Web: initial JS bundle < 200KB gzipped; lazy-load non-critical modules |
63
+ | **Offline / degraded** | Define behavior when network is slow or unavailable (if applicable) |
64
+ | **Concurrent users** | Target number documented; load testing plan defined for > 100 concurrent |
65
+
66
+ ### 5. Security (Beyond OWASP Baseline)
67
+
68
+ | Criterion | Description |
69
+ | -------------------------- | ------------------------------------------------------------------------------- |
70
+ | **Data classification** | Each data field classified: Public / Internal / Confidential / Restricted |
71
+ | **Auth flows specified** | Authentication and authorization model defined — no "we'll add auth later" |
72
+ | **Input validation depth** | Server-side validation for all user inputs; client-side validation for UX only |
73
+ | **Audit trail** | State-changing actions produce audit log entries (who, what, when) |
74
+ | **Rate limiting** | API endpoints have rate limits to prevent abuse |
75
+ | **Session management** | Session timeout, renewal, and revocation policies defined |
76
+ | **Secret handling** | No hardcoded secrets; all credentials via environment variables or secret store |
77
+ | **Dependency scanning** | Third-party packages audited for known vulnerabilities |
78
+
79
+ ### 6. Responsive Design
80
+
81
+ | Criterion | Description |
82
+ | ------------------------- | --------------------------------------------------------------------- |
83
+ | **Breakpoints defined** | Mobile (< 768px), Tablet (768–1024px), Desktop (> 1024px) |
84
+ | **Touch targets** | Interactive elements ≥ 44×44px on mobile |
85
+ | **Layout adaptation** | Content reflows appropriately — no horizontal scrolling on mobile |
86
+ | **Navigation adaptation** | Desktop nav collapses to mobile pattern (hamburger, bottom nav, etc.) |
87
+
88
+ ### 7. Competitive Differentiation
89
+
90
+ | Criterion | Description |
91
+ | ------------------------- | -------------------------------------------------------------------------- |
92
+ | **Alternative analysis** | Top 3 alternatives identified; what they do well and where they fall short |
93
+ | **Unique value** | At least one feature or quality that sets this app apart from alternatives |
94
+ | **Table-stakes coverage** | Features that users expect as standard for this category are all present |
95
+ | **Experience premium** | At least one UX element that makes users think "this is well-made" |
96
+
97
+ ---
98
+
99
+ ## Quality Profiles
100
+
101
+ Not every product needs Gold in every dimension. Quality profiles set the **target** per dimension based on the product type. The target determines what counts as Must-Add (current → target gap), Should-Add (one tier above target), and Could-Add (aspirational). Gold remains the ceiling shown in the scorecard for all profiles — profiles control what you're _aiming_ for.
102
+
103
+ ### Profile Definitions
104
+
105
+ | Profile | When to Use |
106
+ | ------------------- | --------------------------------------------------------------------- |
107
+ | **Internal Tool** | Dashboards, CLIs, admin panels, single-user tools, dev utilities |
108
+ | **Public MVP** | First public launch, market validation, early adopters, beta products |
109
+ | **Production SaaS** | Revenue-generating, public-facing, scaled, established products |
110
+ | **Custom** | User picks target tier per dimension manually |
111
+
112
+ ### Target Matrices
113
+
114
+ #### Internal Tool
115
+
116
+ | Dimension | Target | Rationale |
117
+ | ------------- | ------ | ------------------------------------------------------------------ |
118
+ | Requirements | Silver | Clear specs prevent rework even for internal tools |
119
+ | UX | Silver | Operator efficiency matters, but polish is secondary |
120
+ | Accessibility | Bronze | Single known user; invest only if the user has accessibility needs |
121
+ | Performance | Silver | Performance issues waste the operator's time |
122
+ | Security | Gold | Internal tools often handle secrets, tokens, and admin access |
123
+ | Responsive | Bronze | Desktop-only is usually correct for internal tools |
124
+ | Competitive | Bronze | No market competition — it's built for you |
125
+
126
+ #### Public MVP
127
+
128
+ | Dimension | Target | Rationale |
129
+ | ------------- | ------ | -------------------------------------------------------------------- |
130
+ | Requirements | Silver | Must be clear enough for a small team to ship confidently |
131
+ | UX | Gold | First impressions determine adoption; UX is the product at MVP stage |
132
+ | Accessibility | Silver | Legal compliance + wider user reach from day one |
133
+ | Performance | Silver | Must feel fast; fine-tune later with real usage data |
134
+ | Security | Gold | No second chances on security with real user data |
135
+ | Responsive | Silver | Users expect mobile access; at least don't break |
136
+ | Competitive | Silver | Must articulate why users should choose this over alternatives |
137
+
138
+ #### Production SaaS
139
+
140
+ | Dimension | Target | Rationale |
141
+ | ------------- | ------ | -------------------------------------------------------- |
142
+ | Requirements | Gold | Revenue depends on reliability; every edge case matters |
143
+ | UX | Gold | Users paying money expect best-in-class experience |
144
+ | Accessibility | Gold | Legal requirement (ADA/EAA); brand reputation; wider TAM |
145
+ | Performance | Gold | Performance is a feature; slowness causes churn |
146
+ | Security | Gold | Breach = business-ending event at scale |
147
+ | Responsive | Gold | Multi-device is table-stakes for SaaS |
148
+ | Competitive | Gold | Must defend market position with clear differentiation |
149
+
150
+ ### Default Profile
151
+
152
+ If the user does not specify a profile, **Public MVP** is the default. Rationale: it provides the strongest quality-to-scope ratio — Gold where it matters most (UX, Security) without over-engineering internal or infrastructure dimensions.
153
+
154
+ ### How Profiles Drive Enhancement Tiers
155
+
156
+ | Enhancement Tier | Rule |
157
+ | ---------------- | -------------------------------------------------------------------------- |
158
+ | **Must-Add** | Current score is below the profile's target for that dimension |
159
+ | **Should-Add** | Current score matches the target; enhancement would lift to one tier above |
160
+ | **Could-Add** | Current score already meets or exceeds target; enhancement is aspirational |
161
+ | **Won't-Add** | Explicitly excluded regardless of profile |
162
+
163
+ **Override:** Security and Accessibility gaps are always at least Should-Add regardless of profile. A Bronze Security score is always Must-Add.
164
+
165
+ ---
166
+
167
+ ## PRD Quality Scorecard
168
+
169
+ Score each dimension on a three-tier rubric:
170
+
171
+ | Level | Name | Meaning |
172
+ | ---------- | ----------- | ----------------------------------------------------------------------------------------- |
173
+ | **Bronze** | Functional | Meets minimum requirements — works but lacks polish, accessibility, and proactive quality |
174
+ | **Silver** | Polished | Good coverage across all dimensions — professional, accessible, performant |
175
+ | **Gold** | Exceptional | Best-in-class for this app category — delightful UX, proactive security, competitive edge |
176
+
177
+ ### Scoring Criteria Per Dimension
178
+
179
+ | Dimension | Bronze | Silver | Gold |
180
+ | ----------------- | --------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------- |
181
+ | **Requirements** | Has acceptance criteria | Priority classified, scope bounded, deps listed | Open questions documented, traceability matrix ready |
182
+ | **UX** | Happy path defined | Error + empty states covered, loading feedback | Full journey with micro-interactions, onboarding, consistency review |
183
+ | **Accessibility** | Basic semantic HTML | WCAG 2.1 AA compliance stated | Keyboard nav, screen reader, color contrast, motion sensitivity all specified |
184
+ | **Performance** | No targets stated | Core Web Vitals targets defined | Load budgets, lazy loading strategy, offline behavior specified |
185
+ | **Security** | OWASP baseline | Data classification + auth flows specified | Audit trail, rate limiting, session management, dependency scanning all defined |
186
+ | **Responsive** | "Mobile friendly" mentioned | Breakpoints and layout adaptation defined | Touch targets, nav adaptation, and responsive images specified |
187
+ | **Competitive** | No analysis | Top 3 alternatives listed | Unique value articulated, table-stakes confirmed, experience premium identified |
188
+
189
+ ### Overall Score
190
+
191
+ - **Bronze overall**: Any dimension scores Bronze
192
+ - **Silver overall**: All dimensions score Silver or above
193
+ - **Gold overall**: All dimensions score Gold
194
+
195
+ ---
196
+
197
+ ## How This Is Used
198
+
199
+ 1. **`spell-enchant`** asks the user to select a quality profile, scores the incoming PRD against this scorecard, and produces enhancement suggestions to reach the profile's targets per dimension.
200
+ 2. **`spell-scope`** performs a quick scorecard check during PRD intake and recommends `spell-enchant` if any dimension scores below the profile's target.
201
+ 3. **`spell-plan`** outputs a PRD that starts at Bronze or Silver — `spell-enchant` is the path to the profile's targets.
202
+ 4. **`spell-review`** can reference these standards when evaluating whether shipped code meets the quality bar.
203
+ 5. **Quality Profiles** control what "good enough" means — Internal Tool, Public MVP (default), Production SaaS, or Custom.
204
+
205
+ ## Related
206
+
207
+ - [[DECISIONS#ADR-052|ADR-052 — Product Excellence Standards and spell-enchant]]
208
+ - [[governance/testing-standards|Testing Standards]] — Coverage thresholds and framework selection
209
+ - [[governance/cicd-standards|CI/CD Standards]] — Pipeline quality gates
210
+ - [[security/threat-model|Threat Model]] — Active security concerns
211
+ - [[governance/development-methodology|Development Methodology]] — Spell Loop flow
@@ -0,0 +1,157 @@
1
+ ---
2
+ title: Root Cause Analysis (RCA) Process Standard
3
+ audience: both
4
+ last_updated: YYYY-MM-DD
5
+ status: active
6
+ distributable: true
7
+ tags: [governance, rca, process, incident, corrective-actions]
8
+ ---
9
+
10
+ # Root Cause Analysis (RCA) Process Standard
11
+
12
+ When a significant decision is reversed, a naming collision is discovered, or a multi-file correction is needed, something went wrong upstream. This document defines the process for tracing root causes and preventing recurrence.
13
+
14
+ ## Related ADRs
15
+
16
+ - [[DECISIONS#ADR-068|ADR-068: Establish RCA Process Standard]]
17
+
18
+ ## When to Trigger an RCA
19
+
20
+ An RCA is **required** when any of these occur:
21
+
22
+ | Trigger | Example |
23
+ |---------|---------|
24
+ | **Decision reversed or superseded within 30 days** | ADR accepted, then rolled back because the premise was wrong |
25
+ | **Naming collision discovered** | Two entities share a name, causing ambiguity in docs or code |
26
+ | **Multi-file correction needed** | A change required updating >5 files to fix a single conceptual error |
27
+ | **Implicit decision detected** | A drift check or session applied a change that had no governing ADR |
28
+ | **Integration failure from doc mismatch** | A playbook or script failed because docs disagreed with reality |
29
+
30
+ An RCA is **recommended** (but optional) for:
31
+ - Repeated confusion in sessions about the same topic
32
+ - A TODO item that was deferred and caused downstream problems
33
+ - Any incident where the operator says "how did we end up here?"
34
+
35
+ ## RCA Template
36
+
37
+ Every RCA follows this structure. Artifacts are stored in `governance/rcas/` with the filename `RCA-NNN-short-slug.md` (sequential numbering, matching the related ADR when applicable).
38
+
39
+ ```markdown
40
+ ---
41
+ title: "RCA-NNN: Short Description"
42
+ audience: both
43
+ last_updated: YYYY-MM-DD
44
+ status: active
45
+ tags: [rca, relevant-tags]
46
+ ---
47
+
48
+ # RCA-NNN: Short Description
49
+
50
+ ## Incident Summary
51
+
52
+ One paragraph: what went wrong, when it was discovered, and what the impact was.
53
+
54
+ ## Timeline
55
+
56
+ Chronological sequence of decisions and events that led to the incident.
57
+ Include ADR numbers, journal dates, and session references.
58
+
59
+ | Date | Event | Reference |
60
+ |------|-------|-----------|
61
+ | YYYY-MM-DD | Description | [[DECISIONS#ADR-NNN\|ADR-NNN]] |
62
+
63
+ ## Five Whys
64
+
65
+ 1. **Why [symptom]?** — Because [proximate cause].
66
+ 2. **Why [proximate cause]?** — Because [deeper cause].
67
+ 3. **Why [deeper cause]?** — Because [process gap].
68
+ 4. **Why [process gap]?** — Because [missing safeguard].
69
+ 5. **Why [missing safeguard]?** — Because [root cause].
70
+
71
+ ## Root Causes
72
+
73
+ | # | Root Cause | Type |
74
+ |---|-----------|------|
75
+ | RC-1 | Description | Decision gap / Process gap / Review gap / Communication gap |
76
+
77
+ ## Corrective Actions
78
+
79
+ Actions taken to fix the immediate problem.
80
+
81
+ | # | Action | Status | Reference |
82
+ |---|--------|--------|-----------|
83
+ | CA-1 | Description | Done / Planned | Link to commit or doc |
84
+
85
+ ## Preventive Actions
86
+
87
+ Process changes to prevent recurrence. These should modify governance docs, templates, or prompts.
88
+
89
+ | # | Action | Target Doc | Status |
90
+ |---|--------|-----------|--------|
91
+ | PA-1 | Description | [[path/to/doc]] | Done / Planned |
92
+
93
+ ## Lessons Learned
94
+
95
+ Bullet points — what the team now knows that it didn't before.
96
+ ```
97
+
98
+ ## Process Steps
99
+
100
+ ### 1. Initiate
101
+
102
+ When a trigger condition is met:
103
+ - Create the RCA artifact file in `governance/rcas/`
104
+ - Fill in the Incident Summary and Timeline sections
105
+ - Record the ADR that establishes the RCA (if applicable)
106
+
107
+ ### 2. Analyze
108
+
109
+ - Walk the Five Whys from symptom to root cause
110
+ - Categorize each root cause by type:
111
+ - **Decision gap** — a decision was needed but not made, or was made with incomplete scope
112
+ - **Process gap** — the process allowed an action that should have been guarded
113
+ - **Review gap** — a review step existed but missed the issue
114
+ - **Communication gap** — information existed but wasn't discoverable or linked
115
+
116
+ ### 3. Define Actions
117
+
118
+ - **Corrective actions** fix the immediate problem (e.g., rename the files, revert the change)
119
+ - **Preventive actions** change the process so the problem can't recur (e.g., add a checklist item, amend a template, update a prompt)
120
+ - Every preventive action must reference the specific governance doc, template, or prompt it modifies
121
+
122
+ ### 4. Implement and Verify
123
+
124
+ - Implement preventive actions in the same branch as the RCA artifact (when possible)
125
+ - Verify: can the original root cause still produce the same problem? If yes, the preventive action is insufficient.
126
+
127
+ ### 5. Close
128
+
129
+ - Set RCA status to `active` (RCAs remain active as reference — they are not "resolved" and deleted)
130
+ - Link the RCA from the related ADR using a "Deep dive" wiki-link
131
+ - Record a note in the session journal
132
+
133
+ ## Severity Levels
134
+
135
+ RCAs do not have formal severity levels. The trigger conditions above determine whether an RCA is required or recommended. All RCAs follow the same template regardless of impact.
136
+
137
+ ## Ownership
138
+
139
+ - In interactive sessions: the human operator and AI agent collaborate on the RCA
140
+ - For autonomous agent work: the agent flags the trigger condition and drafts the RCA for human review
141
+ - RCAs are never auto-committed — they require human approval (same rule as all interactive commits per [[governance/git-conventions|Git Conventions]])
142
+
143
+ ## Artifact Location
144
+
145
+ ```
146
+ governance/
147
+ rcas/
148
+ RCA-001-naming-collision.md
149
+ RCA-002-...
150
+ ```
151
+
152
+ **Why `governance/rcas/`?** RCAs are governance artifacts (process improvement), not journals (session logs) or decisions (ADRs). They complement ADRs by explaining *how a decision failed* rather than *what was decided*.
153
+
154
+ ## Maintenance
155
+
156
+ - Review RCA preventive actions quarterly during `spell-check-drift` runs
157
+ - If a preventive action proves ineffective (same class of problem recurs), update the RCA with a "Recurrence" section and strengthen the preventive action
@@ -0,0 +1,129 @@
1
+ ---
2
+ title: Spell Authoring Standards
3
+ audience: contributor
4
+ last_updated: YYYY-MM-DD
5
+ status: active
6
+ tags: [spell, authoring, quality, governance, ARC-014]
7
+ ---
8
+
9
+ # Spell Authoring Standards
10
+
11
+ ## Purpose
12
+
13
+ Define what a **high-quality Arcane spell** looks like, so spell prompts can be authored and audited
14
+ against a consistent bar. This is the spell-prompt analogue of [[product-excellence-standards]] (which
15
+ grades PRDs, not prompts). It is an **authoring-time standard** — a checklist for contributors writing
16
+ or reviewing spells. It is **not** meant to be read at runtime by the spells it grades.
17
+
18
+ See [ARC-014](../../../DECISIONS.md#arc-014) for the decision that established this standard.
19
+
20
+ ## The Spell Quality Rubric
21
+
22
+ Eight dimensions. Each is scored **Bronze (1) / Silver (2) / Gold (3)**. A spell's **overall score is
23
+ its weakest dimension** (same weakest-link rule as the PRD scorecard) — a Gold workflow with a Bronze
24
+ safety rail is a Bronze spell.
25
+
26
+ Two dimensions are **hard gates**: **D2 Distributability** and **D7 Safety** must be **≥ Silver** for a
27
+ spell to ship, regardless of overall target.
28
+
29
+ ### D1 — Front-matter & invocation contract
30
+
31
+ | Tier | Bar |
32
+ | --- | --- |
33
+ | Bronze | Front-matter complete: `name`, `description`, `argument-hint`, `agent`. |
34
+ | Silver | + an accurate **Executive Summary** stating purpose, when to use it, and what it produces. |
35
+ | Gold | + explicitly disambiguates itself from sibling spells a user might confuse it with. |
36
+
37
+ ### D2 — Distributability / no org-coupling **(HARD GATE ≥ Silver)**
38
+
39
+ | Tier | Bar |
40
+ | --- | --- |
41
+ | Bronze | No real organization, person, venture, or machine names. Org-specific values use `{UPPER_SNAKE}` placeholders. |
42
+ | Silver | + every placeholder has an inline resolution note: *"resolve from `.arcane.json` / frontmatter; ask if unset."* |
43
+ | Gold | + no hard assumption of a specific tracker, agent roster, or directory layout — the spell works in a vanilla consuming repo with no Arcane context files present. |
44
+
45
+ > A **Bronze on D2 is OSS-blocking** and must be fixed before release. See **Distributability conventions** below.
46
+
47
+ ### D3 — Context-file robustness
48
+
49
+ | Tier | Bar |
50
+ | --- | --- |
51
+ | Bronze | Context files the spell reads are listed. |
52
+ | Silver | + each optional file has a fallback: *"if missing, proceed with X."* |
53
+ | Gold | + the spell degrades gracefully end-to-end when **no** context files exist. |
54
+
55
+ ### D4 — Workflow completeness
56
+
57
+ | Tier | Bar |
58
+ | --- | --- |
59
+ | Bronze | The happy path is fully specified with clear, ordered steps. |
60
+ | Silver | + edge and failure cases handled: missing/invalid input, a required tool unavailable, an empty result. |
61
+ | Gold | + re-run safety (idempotency) and recovery from partial failure. |
62
+
63
+ ### D5 — Output & acceptance spec
64
+
65
+ | Tier | Bar |
66
+ | --- | --- |
67
+ | Bronze | The output is named. |
68
+ | Silver | + the output's structure or a template is given. |
69
+ | Gold | + a user-verifiable **acceptance checklist** — how to know the spell did its job. |
70
+
71
+ ### D6 — Cross-references
72
+
73
+ | Tier | Bar |
74
+ | --- | --- |
75
+ | Bronze | Related spells are mentioned. |
76
+ | Silver | + correct hand-off direction (consumes-from X, feeds-into Y). |
77
+ | Gold | + bidirectional and consistent with the flow in [[development-methodology]]. |
78
+
79
+ ### D7 — Input validation & safety rails **(HARD GATE ≥ Silver)**
80
+
81
+ | Tier | Bar |
82
+ | --- | --- |
83
+ | Bronze | A `Rules` section exists. |
84
+ | Silver | + required arguments are validated or requested; the spell refuses to proceed on clearly invalid input. |
85
+ | Gold | + every destructive or outward-facing action (delete, force-push, publish, external post) is explicitly gated behind confirmation. |
86
+
87
+ ### D8 — Conciseness & non-duplication
88
+
89
+ | Tier | Bar |
90
+ | --- | --- |
91
+ | Bronze | No dead or contradictory text. |
92
+ | Silver | + shared logic is **referenced**, not copy-pasted (e.g. point to a governance doc rather than inlining it). |
93
+ | Gold | + tight and single-responsibility — the spell does one job well. |
94
+
95
+ ## Scoring & target
96
+
97
+ - **Overall = lowest dimension score.**
98
+ - **Hard gates:** D2 and D7 must each be **≥ Silver**.
99
+ - **Authoring target:** every shipped spell reaches **Silver overall, Gold on D2.** Gold-everywhere is
100
+ aspirational, not required — chasing it on a mature spell usually adds bloat, not value. A short spell
101
+ that meets every gate at Silver is **done**; do not pad it.
102
+
103
+ ## Distributability conventions (D2)
104
+
105
+ Arcane spells ship to other repositories and, eventually, open source. Keep them portable:
106
+
107
+ - **Never hard-code** an org name, person, venture, product, or machine name. Use a documented
108
+ `{UPPER_SNAKE}` placeholder: `{ADO_ORG}`, `{ADO_PROJECT}`, `{BUSINESS_NAME}`, `{OPERATOR_NAME}`.
109
+ - **Resolution rule:** a placeholder resolves from `.arcane.json` or the feature/PRD frontmatter; if it
110
+ is unset, the spell **asks** rather than assuming a default.
111
+ - **Roster by reference, not by name:** when a spell needs the concept of an agent role, reference
112
+ [[agent-policies]] / [[naming-conventions]] as context (with a fallback) instead of naming personas
113
+ inline.
114
+ - **Trackers are optional:** never assume Azure DevOps (or any single provider). Respect
115
+ `tracking_mode` (internal/external) and detect the provider; the shared rules live in
116
+ [[development-methodology]] — point to them rather than re-inlining ADO logic.
117
+
118
+ > **Maintainer-internal exemption.** A few spells operate *on the Arcane framework itself*
119
+ > (e.g. `spell-bump`, `spell-arcane-version`) and legitimately reference repo internals like
120
+ > `registry.ts`, `src/assets/`, or the `arcane-cli` package name. Such
121
+ > **framework-self-referential** references do **not** count as a D2 violation. The exemption covers
122
+ > only the framework's own internals — never a consuming org's venture, person, machine, or tracker names.
123
+
124
+ ## How to audit a spell
125
+
126
+ For each dimension, score Bronze/Silver/Gold with one line of evidence. Record the overall (weakest)
127
+ score and flag any D2/D7 below Silver as **must-fix**. When elevating, prefer **additive** changes
128
+ (add a fallback, an edge case, an acceptance line, a cross-reference); preserve the spell's intent and
129
+ working prose, and treat any change to *behavior* (not just coverage) as requiring explicit sign-off.