akili-specs 2.1.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.
- package/.claude/commands/akili-archive.md +145 -0
- package/.claude/commands/akili-audit.md +97 -0
- package/.claude/commands/akili-constitution.md +413 -0
- package/.claude/commands/akili-execute.md +240 -0
- package/.claude/commands/akili-propose.md +167 -0
- package/.claude/commands/akili-seo.md +277 -0
- package/.claude/commands/akili-specify.md +320 -0
- package/.claude/commands/akili-test.md +141 -0
- package/.claude/commands/akili-validate.md +176 -0
- package/.claude/skills/angular-developer/SKILL.md +130 -0
- package/.claude/skills/angular-developer/references/angular-animations.md +160 -0
- package/.claude/skills/angular-developer/references/angular-aria.md +410 -0
- package/.claude/skills/angular-developer/references/cli.md +86 -0
- package/.claude/skills/angular-developer/references/component-harnesses.md +59 -0
- package/.claude/skills/angular-developer/references/component-styling.md +91 -0
- package/.claude/skills/angular-developer/references/components.md +117 -0
- package/.claude/skills/angular-developer/references/creating-services.md +97 -0
- package/.claude/skills/angular-developer/references/data-resolvers.md +69 -0
- package/.claude/skills/angular-developer/references/define-routes.md +67 -0
- package/.claude/skills/angular-developer/references/defining-providers.md +72 -0
- package/.claude/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/.claude/skills/angular-developer/references/e2e-testing.md +66 -0
- package/.claude/skills/angular-developer/references/effects.md +83 -0
- package/.claude/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/.claude/skills/angular-developer/references/host-elements.md +80 -0
- package/.claude/skills/angular-developer/references/injection-context.md +63 -0
- package/.claude/skills/angular-developer/references/inputs.md +101 -0
- package/.claude/skills/angular-developer/references/linked-signal.md +59 -0
- package/.claude/skills/angular-developer/references/loading-strategies.md +61 -0
- package/.claude/skills/angular-developer/references/mcp.md +106 -0
- package/.claude/skills/angular-developer/references/migrations.md +30 -0
- package/.claude/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/.claude/skills/angular-developer/references/outputs.md +86 -0
- package/.claude/skills/angular-developer/references/reactive-forms.md +122 -0
- package/.claude/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/.claude/skills/angular-developer/references/resource.md +74 -0
- package/.claude/skills/angular-developer/references/route-animations.md +56 -0
- package/.claude/skills/angular-developer/references/route-guards.md +52 -0
- package/.claude/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/.claude/skills/angular-developer/references/router-testing.md +87 -0
- package/.claude/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/.claude/skills/angular-developer/references/signal-forms.md +897 -0
- package/.claude/skills/angular-developer/references/signals-overview.md +94 -0
- package/.claude/skills/angular-developer/references/tailwind-css.md +69 -0
- package/.claude/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/.claude/skills/angular-developer/references/testing-fundamentals.md +66 -0
- package/.claude/skills/api-design-principles/SKILL.md +528 -0
- package/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
- package/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
- package/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
- package/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
- package/.claude/skills/aws-serverless/SKILL.md +323 -0
- package/.claude/skills/brainstorming/SKILL.md +96 -0
- package/.claude/skills/error-handling-patterns/SKILL.md +641 -0
- package/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/.claude/skills/frontend-design/SKILL.md +272 -0
- package/.claude/skills/gsap-core/SKILL.md +254 -0
- package/.claude/skills/gsap-frameworks/SKILL.md +153 -0
- package/.claude/skills/gsap-performance/SKILL.md +79 -0
- package/.claude/skills/gsap-plugins/SKILL.md +426 -0
- package/.claude/skills/gsap-react/SKILL.md +136 -0
- package/.claude/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/.claude/skills/gsap-timeline/SKILL.md +107 -0
- package/.claude/skills/gsap-utils/SKILL.md +284 -0
- package/.claude/skills/judgment-day/SKILL.md +52 -0
- package/.claude/skills/nestjs-expert/SKILL.md +552 -0
- package/.claude/skills/product-manager-toolkit/SKILL.md +351 -0
- package/.claude/skills/product-manager-toolkit/references/prd_templates.md +317 -0
- package/.claude/skills/product-manager-toolkit/scripts/customer_interview_analyzer.py +441 -0
- package/.claude/skills/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
- package/.claude/skills/react-doctor/AGENTS.md +15 -0
- package/.claude/skills/react-doctor/SKILL.md +19 -0
- package/.claude/skills/seo-audit/SKILL.md +497 -0
- package/.claude/skills/seo-audit/evals/evals.json +136 -0
- package/.claude/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/.claude/skills/seo-audit/references/international-seo.md +230 -0
- package/.claude/skills/shadcn-ui/SKILL.md +1677 -0
- package/.claude/skills/shadcn-ui/references/learn.md +145 -0
- package/.claude/skills/shadcn-ui/references/official-ui-reference.md +1725 -0
- package/.claude/skills/shadcn-ui/references/reference.md +586 -0
- package/.claude/skills/shadcn-ui/references/ui-reference.md +1578 -0
- package/.claude/skills/stitch-design/README.md +50 -0
- package/.claude/skills/stitch-design/SKILL.md +84 -0
- package/.claude/skills/stitch-design/examples/DESIGN.md +22 -0
- package/.claude/skills/stitch-design/examples/enhanced-prompt.md +28 -0
- package/.claude/skills/stitch-design/references/design-mappings.md +45 -0
- package/.claude/skills/stitch-design/references/prompt-keywords.md +114 -0
- package/.claude/skills/stitch-design/references/tool-schemas.md +76 -0
- package/.claude/skills/stitch-design/workflows/edit-design.md +44 -0
- package/.claude/skills/stitch-design/workflows/generate-design-md.md +63 -0
- package/.claude/skills/stitch-design/workflows/text-to-design.md +47 -0
- package/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/.claude/skills/systematic-debugging/SKILL.md +296 -0
- package/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
- package/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/.claude/skills/systematic-debugging/test-academic.md +14 -0
- package/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/.claude/skills/tailwind-design-system/SKILL.md +874 -0
- package/.claude/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.claude/skills/vercel-react-best-practices/AGENTS.md +2934 -0
- package/.claude/skills/vercel-react-best-practices/SKILL.md +136 -0
- package/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/.claude/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/.claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/.claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/.claude/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/.claude/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/.claude/templates/implementer.md +36 -0
- package/.claude/templates/leader.md +77 -0
- package/.claude/templates/reviewer.md +53 -0
- package/.mcp.json.example +12 -0
- package/CHANGELOG.md +243 -0
- package/LICENSE +21 -0
- package/README.md +795 -0
- package/assets/jc-fox-mark.svg +10 -0
- package/assets/jc-methodology-badge.png +0 -0
- package/bin/akili.js +574 -0
- package/docs/README.md +48 -0
- package/docs/cli.md +187 -0
- package/docs/commands/README.md +43 -0
- package/docs/commands/akili-archive.md +65 -0
- package/docs/commands/akili-constitution.md +91 -0
- package/docs/commands/akili-execute.md +93 -0
- package/docs/commands/akili-propose.md +65 -0
- package/docs/commands/akili-seo.md +75 -0
- package/docs/commands/akili-specify.md +69 -0
- package/docs/commands/akili-test.md +65 -0
- package/docs/commands/akili-validate.md +64 -0
- package/docs/flow.md +255 -0
- package/docs/model-routing.md +133 -0
- package/docs/openspec-comparison.md +42 -0
- package/docs/plans/2026-05-26-multi-agent-sdd-orchestration-design.md +105 -0
- package/docs/release-checklist.md +91 -0
- package/docs/skills/README.md +42 -0
- package/docs/skills/angular-developer.md +23 -0
- package/docs/skills/api-design-principles.md +22 -0
- package/docs/skills/aws-serverless.md +22 -0
- package/docs/skills/brainstorming.md +21 -0
- package/docs/skills/error-handling-patterns.md +22 -0
- package/docs/skills/frontend-design.md +23 -0
- package/docs/skills/gsap-core.md +21 -0
- package/docs/skills/gsap-frameworks.md +20 -0
- package/docs/skills/gsap-performance.md +21 -0
- package/docs/skills/gsap-plugins.md +20 -0
- package/docs/skills/gsap-react.md +22 -0
- package/docs/skills/gsap-scrolltrigger.md +21 -0
- package/docs/skills/gsap-timeline.md +20 -0
- package/docs/skills/gsap-utils.md +21 -0
- package/docs/skills/nestjs-expert.md +23 -0
- package/docs/skills/product-manager-toolkit.md +22 -0
- package/docs/skills/react-doctor.md +27 -0
- package/docs/skills/seo-audit.md +27 -0
- package/docs/skills/shadcn-ui.md +22 -0
- package/docs/skills/stitch-design.md +21 -0
- package/docs/skills/systematic-debugging.md +27 -0
- package/docs/skills/tailwind-design-system.md +23 -0
- package/docs/skills/ui-ux-pro-max.md +25 -0
- package/docs/skills/vercel-react-best-practices.md +22 -0
- package/package.json +50 -0
- package/scripts/gsc_verify.py +162 -0
- package/scripts/parse_tests.js +112 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Draft detailed requirements, UI/UX designs, and technical tasks for a proposed feature.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Generate AKILI-SPECS for Module
|
|
6
|
+
|
|
7
|
+
Generate a clear Spec-Driven Development document set for one bounded module, feature, bugfix, or enhancement inside `docs/specs/`.
|
|
8
|
+
|
|
9
|
+
The goal is not to create long documents. The goal is to make the intended behavior, design choices, implementation tasks, and verification path easy to review before code is written.
|
|
10
|
+
|
|
11
|
+
If `proposal.md` already exists for the same spec path, treat it as the approved intent and convert it into full requirements, design, and tasks. If no proposal exists, create the spec directly from the user's request and repository context.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/akili-specify <spec-path>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Examples:**
|
|
20
|
+
|
|
21
|
+
- `/akili-specify loan`
|
|
22
|
+
- `/akili-specify enhancements/renewals`
|
|
23
|
+
- `/akili-specify admin/user-management`
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
|
|
27
|
+
- `$ARGUMENTS` — Relative path under `docs/specs/` where the spec should live. It may be a flat module name or a nested taxonomy path.
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
Create or update these files under `docs/specs/$ARGUMENTS/`:
|
|
32
|
+
|
|
33
|
+
- `proposal.md` — optional prior intent document created by `/akili-propose`
|
|
34
|
+
- `requirements.md` — what behavior must exist and why it matters
|
|
35
|
+
- `design.md` — how the behavior will be implemented within the current architecture
|
|
36
|
+
- `tasks.md` — small executable tasks linked to requirements and design sections
|
|
37
|
+
|
|
38
|
+
Use the lightest useful depth:
|
|
39
|
+
|
|
40
|
+
| Depth | Use For | Documentation Style |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Lite | Small bugfixes, copy updates, narrow UI tweaks | Extreme brevity: 1-2 bullet points for requirements, skip architectural boilerplate, 1 strictly focused task. Output tokens must be minimized. |
|
|
43
|
+
| Standard | Normal features and enhancements | Full requirements, scenarios, design decisions, task breakdown |
|
|
44
|
+
| Full | Risky, cross-cutting, API, data, auth, or migration work | Include alternatives, rollout, risks, observability, rollback |
|
|
45
|
+
|
|
46
|
+
Lite mode still requires testable requirements, scenarios, and done criteria.
|
|
47
|
+
|
|
48
|
+
## Behavior
|
|
49
|
+
|
|
50
|
+
### Step 0: Setup
|
|
51
|
+
|
|
52
|
+
**Token Optimization (Prompt Caching):** To maximize prompt caching, always read the constitutional baseline documents FIRST and in the exact same order across all sessions before reading task-specific files.
|
|
53
|
+
|
|
54
|
+
1. Create directory `docs/specs/$ARGUMENTS/` if it does not exist.
|
|
55
|
+
2. Read project-level reference context (IN THIS ORDER):
|
|
56
|
+
- Root `CLAUDE.md`
|
|
57
|
+
- `AGENTS.md`
|
|
58
|
+
- `docs/prd.md`
|
|
59
|
+
- `docs/ux-ui/design.md` (legacy fallback: `docs/system-design/design.md`)
|
|
60
|
+
- `docs/trd/trd.md` (legacy fallback: `docs/detailed-design/detailed-design.md`)
|
|
61
|
+
- The constitutional templates in `docs/specs/general-setup/` (`requirements.md`, `design.md`, `task.md`)
|
|
62
|
+
- Package-level `CLAUDE.md` files if they exist
|
|
63
|
+
3. Read `docs/specs/$ARGUMENTS/proposal.md` if it exists.
|
|
64
|
+
4. Read nearby or dependent specs under `docs/specs/` that overlap with the requested path.
|
|
65
|
+
5. Respect the repository's current package layout and naming conventions instead of assuming a fixed stack.
|
|
66
|
+
6. **CodeGraph over full reads:** If `.codegraph/` exists, use `codegraph_search` and `codegraph_context` to inspect relevant code paths instead of reading full source files or using generic `grep`/`glob`. This drastically reduces input tokens.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### Phase 1: Requirements (`requirements.md`)
|
|
71
|
+
|
|
72
|
+
**Role:** Product Owner — define what is being built and why.
|
|
73
|
+
|
|
74
|
+
#### Step 1.1 — Explore & Scope Chunking
|
|
75
|
+
|
|
76
|
+
Use `brainstorming` and, when helpful, `product-manager-toolkit` to clarify:
|
|
77
|
+
|
|
78
|
+
- user problem and target actors
|
|
79
|
+
- scope boundaries and dependencies
|
|
80
|
+
- primary flows and feature areas
|
|
81
|
+
- success metrics and constraints
|
|
82
|
+
|
|
83
|
+
**Scope Chunking:** If the user provides a very large instruction or epic, evaluate if it is too massive for a single spec.
|
|
84
|
+
- If it spans multiple distinct modules or features, propose splitting the spec into multiple separate specs.
|
|
85
|
+
- If the user agrees, create the separate folders under `docs/specs/` and draft a `proposal.md` or jump straight to the split documents (`requirements.md`, `design.md`, `tasks.md`) for each chunk.
|
|
86
|
+
|
|
87
|
+
#### Step 1.2 — Write
|
|
88
|
+
|
|
89
|
+
Generate `requirements.md` using `docs/specs/general-setup/requirements.md` as the format source.
|
|
90
|
+
|
|
91
|
+
Minimum content:
|
|
92
|
+
|
|
93
|
+
1. Document Control
|
|
94
|
+
2. Executive Summary
|
|
95
|
+
3. Glossary
|
|
96
|
+
4. System Context & Scope
|
|
97
|
+
5. Stakeholders / Personas
|
|
98
|
+
6. Functional Requirements
|
|
99
|
+
7. Non-Functional Requirements
|
|
100
|
+
8. Requirement ID Index
|
|
101
|
+
|
|
102
|
+
Guidelines:
|
|
103
|
+
|
|
104
|
+
- follow the repo's established requirement ID pattern from `general-setup`
|
|
105
|
+
- align with `docs/prd.md`
|
|
106
|
+
- align with `proposal.md` when present
|
|
107
|
+
- reference existing specs when this work extends another feature
|
|
108
|
+
- use measurable, testable language
|
|
109
|
+
- separate goals from requirements
|
|
110
|
+
- write behavior contracts, not implementation plans
|
|
111
|
+
- **Design Impact:** IF the proposal includes Figma or visual design context, ensure UI states (loading, error, empty, success) and responsive behaviors are captured as explicit requirements.
|
|
112
|
+
- include concrete scenarios for key requirements using `GIVEN`, `WHEN`, `THEN`, and optional `AND`
|
|
113
|
+
- make requirement strength explicit with `SHALL`, `MUST`, `SHOULD`, or `MAY` where useful
|
|
114
|
+
|
|
115
|
+
Recommended requirement shape:
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
### Requirement: Short Behavior Name
|
|
119
|
+
|
|
120
|
+
The system SHALL provide the observable behavior.
|
|
121
|
+
|
|
122
|
+
#### Scenario: Main case
|
|
123
|
+
|
|
124
|
+
- GIVEN the relevant starting state
|
|
125
|
+
- WHEN the triggering action happens
|
|
126
|
+
- THEN the expected outcome occurs
|
|
127
|
+
- AND any required side effect is visible
|
|
128
|
+
- BUT it must NOT [explicit constraint or negative path]
|
|
129
|
+
- AND IT MUST [explicit validation or boundary condition]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Avoid putting internal class names, library choices, or step-by-step implementation details in requirements. Those belong in `design.md` or `tasks.md`.
|
|
133
|
+
|
|
134
|
+
If `proposal.md` includes a Requirement Delta Preview, convert it into full requirements:
|
|
135
|
+
|
|
136
|
+
- `ADDED` items become new requirements and scenarios
|
|
137
|
+
- `MODIFIED` items become updated behavior descriptions with before/after context
|
|
138
|
+
- `REMOVED` items become explicit deprecation or removal requirements with migration notes when relevant
|
|
139
|
+
|
|
140
|
+
#### Step 1.3 — Present & Approve
|
|
141
|
+
|
|
142
|
+
Present a clear summary of the generated requirements on the screen (including the main scenarios, rules, and any explicit negative constraints) so the user can review what was done before deciding.
|
|
143
|
+
|
|
144
|
+
Then explicitly ask the user how to proceed, providing these options:
|
|
145
|
+
|
|
146
|
+
1. **Continue** (Proceed to Phase 2: `design.md`)
|
|
147
|
+
2. **Adjust** (Refine or change the requirements)
|
|
148
|
+
3. **Stop** (Pause the specification process here)
|
|
149
|
+
4. **Type something** (Provide custom instructions or feedback)
|
|
150
|
+
|
|
151
|
+
Wait for the user's response before moving on.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### Phase 2: Design (`design.md`)
|
|
156
|
+
|
|
157
|
+
**Role:** System Architect — define how the feature will be built.
|
|
158
|
+
|
|
159
|
+
#### Step 2.1 — Explore
|
|
160
|
+
|
|
161
|
+
Use `brainstorming` to explore trade-offs before writing.
|
|
162
|
+
|
|
163
|
+
If the work includes meaningful UI/UX impact, use this skill preference:
|
|
164
|
+
|
|
165
|
+
- `ui-ux-pro-max` if available
|
|
166
|
+
- otherwise `frontend-design` + `stitch-design`
|
|
167
|
+
|
|
168
|
+
Use additional technical skills as needed:
|
|
169
|
+
|
|
170
|
+
- `nestjs-expert`
|
|
171
|
+
- `api-design-principles`
|
|
172
|
+
- `shadcn-ui`
|
|
173
|
+
- `tailwind-design-system`
|
|
174
|
+
- `vercel-react-best-practices`
|
|
175
|
+
- `error-handling-patterns`
|
|
176
|
+
- `aws-serverless`
|
|
177
|
+
|
|
178
|
+
#### Step 2.2 — Write
|
|
179
|
+
|
|
180
|
+
Generate `design.md` using `docs/specs/general-setup/design.md` as the format source.
|
|
181
|
+
|
|
182
|
+
Minimum content:
|
|
183
|
+
|
|
184
|
+
1. Document Control
|
|
185
|
+
2. Executive Summary
|
|
186
|
+
3. Architecture Overview
|
|
187
|
+
4. Extended Directory Structure
|
|
188
|
+
5. Data Model
|
|
189
|
+
6. API Design
|
|
190
|
+
7. Backend Module Design
|
|
191
|
+
8. Frontend / UX Component Architecture
|
|
192
|
+
9. Shared Contracts or Package Extensions
|
|
193
|
+
10. Design Decisions
|
|
194
|
+
|
|
195
|
+
Guidelines:
|
|
196
|
+
|
|
197
|
+
- extend existing architecture rather than replacing it
|
|
198
|
+
- use current repo paths and package names
|
|
199
|
+
- include UI/UX decisions when the feature affects screens, flows, or components
|
|
200
|
+
- **Design Impact:** IF the proposal includes Figma or visual design context, break down the visual design into a clear Frontend Component Architecture (e.g., atomic components) and define the necessary Design Tokens (colors, typography).
|
|
201
|
+
- tie design sections back to requirements explicitly
|
|
202
|
+
- record meaningful trade-offs and rejected alternatives for non-trivial decisions
|
|
203
|
+
- call out data, API, security, error-handling, observability, and rollback concerns when relevant
|
|
204
|
+
- keep design decisions practical enough that an implementer can act without re-discovery
|
|
205
|
+
- **Code Suppression:** DO NOT generate code snippets or implementation examples in `design.md`. Design decisions must remain conceptual to conserve output tokens. The actual code will be written during execution.
|
|
206
|
+
|
|
207
|
+
#### Step 2.3 — Present & Approve
|
|
208
|
+
|
|
209
|
+
Present a clear summary of the generated design on the screen (including the architecture, data models, API endpoints, and main design decisions) so the user can review what was done before deciding.
|
|
210
|
+
|
|
211
|
+
Then explicitly ask the user how to proceed, providing these options:
|
|
212
|
+
|
|
213
|
+
1. **Review Design** (Use the `judgment-day` skill to review the design before moving on)
|
|
214
|
+
2. **Continue** (Proceed to Phase 3: `tasks.md`)
|
|
215
|
+
3. **Adjust** (Refine or change the design)
|
|
216
|
+
4. **Stop** (Pause the specification process here)
|
|
217
|
+
5. **Type something** (Provide custom instructions or feedback)
|
|
218
|
+
|
|
219
|
+
If the user selects **Review Design** and the `judgment-day` judges detect issues that need correction, present the following options to handle the findings:
|
|
220
|
+
|
|
221
|
+
1. **Fix and Re-judge** (Apply fixes for the findings and run the judgment again)
|
|
222
|
+
2. **Fix only** (Apply fixes but do not run the judgment again)
|
|
223
|
+
3. **Continue** (Accept the design as-is and proceed to Phase 3: `tasks.md`)
|
|
224
|
+
4. **Stop** (Pause the specification process here)
|
|
225
|
+
5. **Type something** (Provide custom instructions or feedback)
|
|
226
|
+
|
|
227
|
+
Wait for the user's response before moving on.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
### Phase 3: Tasks (`tasks.md`)
|
|
232
|
+
|
|
233
|
+
**Role:** Tech Lead — define the implementation plan.
|
|
234
|
+
|
|
235
|
+
#### Step 3.1 — Explore
|
|
236
|
+
|
|
237
|
+
Use `brainstorming` to determine sequencing, dependencies, parallelization, and test strategy.
|
|
238
|
+
|
|
239
|
+
#### Step 3.2 — Write
|
|
240
|
+
|
|
241
|
+
Generate `tasks.md` using `docs/specs/general-setup/task.md` as the format source.
|
|
242
|
+
|
|
243
|
+
Each task should include:
|
|
244
|
+
|
|
245
|
+
- status
|
|
246
|
+
- size
|
|
247
|
+
- dependencies
|
|
248
|
+
- requirements covered
|
|
249
|
+
- design references
|
|
250
|
+
- scope
|
|
251
|
+
- tests
|
|
252
|
+
- done criteria
|
|
253
|
+
- relevant skills
|
|
254
|
+
|
|
255
|
+
Skill inventory should use real, available skills only.
|
|
256
|
+
|
|
257
|
+
Task quality rules:
|
|
258
|
+
|
|
259
|
+
- one task should be small enough to complete and verify in one focused session
|
|
260
|
+
- every task must reference the requirements it satisfies
|
|
261
|
+
- every task must include a concrete verification command or manual check
|
|
262
|
+
- tasks should explicitly address the negative constraints (`BUT it must NOT`) and strict validations (`AND IT MUST`) defined in their respective requirement scenarios
|
|
263
|
+
- **Design Impact:** IF the proposal includes Figma or visual design context, ensure frontend tasks are atomic, focusing on specific UI components, layouts, styling, and states extracted from the design.
|
|
264
|
+
- tasks should avoid broad instructions like "implement feature" without scoped subtasks
|
|
265
|
+
- tasks may be grouped by phase, but dependencies must remain explicit
|
|
266
|
+
|
|
267
|
+
Preferred UI/UX skill rule:
|
|
268
|
+
|
|
269
|
+
- use `ui-ux-pro-max` when available for UI-heavy tasks
|
|
270
|
+
- otherwise use `frontend-design` and/or `stitch-design`
|
|
271
|
+
|
|
272
|
+
#### Step 3.3 — Present & Approve
|
|
273
|
+
|
|
274
|
+
Present a clear summary of the generated tasks on the screen, including:
|
|
275
|
+
- A high-level list of the tasks to be implemented so the user understands the plan without reading the full document.
|
|
276
|
+
- An **Estimated Lines of Code (LOC)** output for the entire spec.
|
|
277
|
+
- A **PR Strategy Recommendation**: If the estimate exceeds ~400 LOC or the task graph is highly complex, recommend splitting the implementation into multiple Pull Requests and suggest logical boundaries (e.g., "PR 1: Backend/API, PR 2: Frontend UI").
|
|
278
|
+
|
|
279
|
+
Then explicitly ask the user how to proceed, providing these options:
|
|
280
|
+
|
|
281
|
+
1. **Continue** (Proceed to the final Verification Checklist)
|
|
282
|
+
2. **Adjust** (Refine or change the tasks or PR strategy)
|
|
283
|
+
3. **Stop** (Pause the specification process here)
|
|
284
|
+
4. **Type something** (Provide custom instructions or feedback)
|
|
285
|
+
|
|
286
|
+
Wait for the user's response before moving on.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Verification Checklist
|
|
291
|
+
|
|
292
|
+
After all three documents are approved, verify:
|
|
293
|
+
|
|
294
|
+
- [ ] All 3 files exist with non-empty content
|
|
295
|
+
- [ ] All documents follow `docs/specs/general-setup/` conventions
|
|
296
|
+
- [ ] The chosen depth is appropriate for the risk and size of the work
|
|
297
|
+
- [ ] Requirements describe observable behavior, not implementation details
|
|
298
|
+
- [ ] Key requirements include Given/When/Then scenarios with strict `BUT` and `AND IT MUST` rules where applicable
|
|
299
|
+
- [ ] Every requirement appears in at least one task
|
|
300
|
+
- [ ] Every task references requirements and design sections
|
|
301
|
+
- [ ] Every task has clear done criteria and verification guidance that accounts for the negative scenarios
|
|
302
|
+
- [ ] The task dependency graph has no circular dependencies
|
|
303
|
+
- [ ] The spec path matches the repo's chosen taxonomy under `docs/specs/`
|
|
304
|
+
- [ ] Only real, available skills are referenced in tasks
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Review Handoff
|
|
309
|
+
|
|
310
|
+
When the spec is ready, generate a short, easy-to-understand summary (summary facil de entender de lo que se hizo) that reflects what was done. It must include:
|
|
311
|
+
|
|
312
|
+
1. Spec path and chosen depth: Lite, Standard, or Full
|
|
313
|
+
2. Problem being solved
|
|
314
|
+
3. Requirements and key scenarios
|
|
315
|
+
4. Important design decisions and risks
|
|
316
|
+
5. Task count, estimated LOC, and recommended PR strategy (single vs. multiple PRs)
|
|
317
|
+
6. Recommended first task
|
|
318
|
+
7. Open questions or assumptions that still need user confirmation
|
|
319
|
+
|
|
320
|
+
If a proposal existed, mention whether the generated spec stayed aligned with it or changed based on implementation discovery.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Write and execute comprehensive automated unit/integration tests for the implemented feature.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Test AKILI-SPECS Implementation
|
|
6
|
+
|
|
7
|
+
Run automated and, when needed, manual tests against a spec path's implementation. Produce `test-report.md` with results, requirement coverage, scenario traceability, and failures.
|
|
8
|
+
|
|
9
|
+
Testing should prove the behavior promised in `requirements.md`, not only increase test count.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/akili-test <spec-path>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Examples:**
|
|
18
|
+
|
|
19
|
+
- `/akili-test loan`
|
|
20
|
+
- `/akili-test enhancements/renewals`
|
|
21
|
+
|
|
22
|
+
## Arguments
|
|
23
|
+
|
|
24
|
+
- `$ARGUMENTS` — Relative path under `docs/specs/` that contains `requirements.md`, `design.md`, and `tasks.md`.
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
Create or update `docs/specs/$ARGUMENTS/test-report.md` with:
|
|
29
|
+
|
|
30
|
+
- commands run and their results
|
|
31
|
+
- requirement-to-test matrix
|
|
32
|
+
- scenario coverage status
|
|
33
|
+
- failures and remediation steps
|
|
34
|
+
- accepted gaps with reasons when full automation is not practical
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Behavior
|
|
39
|
+
|
|
40
|
+
### Phase 0: Load Context
|
|
41
|
+
|
|
42
|
+
**Token Optimization (Prompt Caching):** To maximize prompt caching, always read the constitutional baseline documents FIRST and in the exact same order across all sessions before reading task-specific files.
|
|
43
|
+
|
|
44
|
+
1. Read project-level context (IN THIS ORDER):
|
|
45
|
+
- root `CLAUDE.md`
|
|
46
|
+
- `AGENTS.md`
|
|
47
|
+
- `docs/prd.md`
|
|
48
|
+
- `docs/ux-ui/design.md` (legacy fallback: `docs/system-design/design.md`)
|
|
49
|
+
- `docs/trd/trd.md` (legacy fallback: `docs/detailed-design/detailed-design.md`)
|
|
50
|
+
- Package-level `CLAUDE.md` and `AGENTS.md` files if they exist
|
|
51
|
+
2. Read spec context:
|
|
52
|
+
- `docs/specs/$ARGUMENTS/requirements.md`
|
|
53
|
+
- `docs/specs/$ARGUMENTS/design.md`
|
|
54
|
+
- `docs/specs/$ARGUMENTS/tasks.md`
|
|
55
|
+
3. Identify backend, frontend, and end-to-end scope from the design and tasks.
|
|
56
|
+
4. Extract key requirements, Given/When/Then scenarios, negative constraints (`BUT it must NOT`), and strict validations (`AND IT MUST`) from `requirements.md`.
|
|
57
|
+
|
|
58
|
+
### Phase 1: Unit Tests
|
|
59
|
+
|
|
60
|
+
- Create or improve backend unit tests where needed.
|
|
61
|
+
- Create or improve frontend unit tests where needed.
|
|
62
|
+
- Explicitly test negative constraints (`BUT it must NOT`) and strict boundary validations (`AND IT MUST`).
|
|
63
|
+
- Map tests back to requirements and scenarios.
|
|
64
|
+
- Prefer focused tests that prove one behavior clearly over broad tests with unclear intent.
|
|
65
|
+
|
|
66
|
+
Use skills as needed:
|
|
67
|
+
|
|
68
|
+
- `nestjs-expert`
|
|
69
|
+
- `systematic-debugging`
|
|
70
|
+
- `vercel-react-best-practices`
|
|
71
|
+
- `react-doctor`
|
|
72
|
+
|
|
73
|
+
### Phase 2: Integration Tests
|
|
74
|
+
|
|
75
|
+
- Create or improve API integration tests where relevant.
|
|
76
|
+
- Validate auth, request/response shape, and major flows.
|
|
77
|
+
- Cover cross-module behavior that cannot be proven by unit tests alone.
|
|
78
|
+
|
|
79
|
+
### Phase 3: End-to-End Tests
|
|
80
|
+
|
|
81
|
+
- Create or improve E2E tests for user-visible workflows.
|
|
82
|
+
- If the work is UI-heavy, prefer `ui-ux-pro-max` when available.
|
|
83
|
+
- Otherwise use `frontend-design` and the UX/UI design doc as the UX reference.
|
|
84
|
+
- Use E2E tests for critical user journeys, not every small component state.
|
|
85
|
+
|
|
86
|
+
### Phase 4: Coverage & Traceability
|
|
87
|
+
|
|
88
|
+
Create a requirement-to-test matrix so every key requirement has test evidence or an explicit gap. Ensure negative constraints and strict validations are mapped.
|
|
89
|
+
|
|
90
|
+
Recommended matrix columns:
|
|
91
|
+
|
|
92
|
+
| Requirement | Scenario | Test Type | Test File or Command | Result | Gap or Notes |
|
|
93
|
+
|---|---|---|---|---|---|
|
|
94
|
+
|
|
95
|
+
### Phase 5: Generate Test Report
|
|
96
|
+
|
|
97
|
+
Create `docs/specs/$ARGUMENTS/test-report.md`.
|
|
98
|
+
|
|
99
|
+
**Automated Test Parsing Option:** If the repository uses standard testing frameworks (like Jest or Vitest) and has a AKILI test parsing helper installed (e.g. `akili/scripts/parse_tests.js`), you may run the tests outputting to JSON (e.g. `jest --json --outputFile=jest-results.json` or `vitest --reporter=json --outputFile=test-results.json`) and run:
|
|
100
|
+
`node <path-to-akili>/scripts/parse_tests.js jest-results.json`
|
|
101
|
+
to automatically scaffold the results matrix directly into the test report sections.
|
|
102
|
+
|
|
103
|
+
The report must include:
|
|
104
|
+
|
|
105
|
+
1. Document Control
|
|
106
|
+
2. Summary
|
|
107
|
+
3. Backend Unit Tests
|
|
108
|
+
4. Frontend Unit Tests
|
|
109
|
+
5. Integration Tests
|
|
110
|
+
6. E2E Tests
|
|
111
|
+
7. Coverage & Traceability
|
|
112
|
+
8. Remediation
|
|
113
|
+
9. Accepted Gaps, if any
|
|
114
|
+
|
|
115
|
+
### Phase 6: Report to User
|
|
116
|
+
|
|
117
|
+
Generate a short, easy-to-understand summary (summary facil de entender de lo que se hizo) of the overall test status, test counts, requirement coverage, scenario gaps, and top failures. If failures exist, ask whether to fix failures, add missing tests, fix all, or keep only the report.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## UX Testing Guidance
|
|
122
|
+
|
|
123
|
+
When a spec includes meaningful UI/UX behavior, verify more than raw functionality:
|
|
124
|
+
|
|
125
|
+
- flow clarity
|
|
126
|
+
- responsive behavior
|
|
127
|
+
- state transitions
|
|
128
|
+
- accessibility basics
|
|
129
|
+
- visual consistency with `docs/ux-ui/design.md`
|
|
130
|
+
|
|
131
|
+
If `ui-ux-pro-max` is unavailable, use `frontend-design` plus the UX/UI design document as the fallback reference.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Testing Rules
|
|
136
|
+
|
|
137
|
+
- Do not mark a requirement covered just because related code exists.
|
|
138
|
+
- Do not hide missing coverage; record it as an explicit gap with remediation.
|
|
139
|
+
- Prefer repository-specific test commands over hardcoded framework assumptions.
|
|
140
|
+
- If a test is flaky, record the flake and avoid treating it as passing evidence until stabilized.
|
|
141
|
+
- If no automated test is practical, document the manual verification steps and why automation was deferred.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validate that the implemented feature strictly matches all requirements, design tokens, and user flows.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Validate AKILI-SPECS Implementation
|
|
6
|
+
|
|
7
|
+
Validate that a spec path's implementation matches its AKILI-SPECS documents. Produce `validation-report.md` with pass, warning, fail, and remediation details.
|
|
8
|
+
|
|
9
|
+
Validation is the final conformance audit. It checks whether the implementation still matches the approved requirements, scenarios, design decisions, tasks, tests, and constitutional baseline.
|
|
10
|
+
|
|
11
|
+
> **Recommended model tier:** T3 Auditor (deep independent review). Ensure you are using a strong reasoning model that differs from the one used during implementation.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/akili-validate <spec-path>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Examples:**
|
|
20
|
+
|
|
21
|
+
- `/akili-validate loan`
|
|
22
|
+
- `/akili-validate enhancements/renewals`
|
|
23
|
+
|
|
24
|
+
## Arguments
|
|
25
|
+
|
|
26
|
+
- `$ARGUMENTS` — Relative path under `docs/specs/` containing `requirements.md`, `design.md`, `tasks.md`, and optionally `execution.md`.
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
Create or update `docs/specs/$ARGUMENTS/validation-report.md`.
|
|
31
|
+
|
|
32
|
+
Validation should produce a clear recommendation for whether the spec can be archived with `/akili-archive $ARGUMENTS`.
|
|
33
|
+
|
|
34
|
+
Use these result levels consistently:
|
|
35
|
+
|
|
36
|
+
| Result | Meaning |
|
|
37
|
+
|---|---|
|
|
38
|
+
| PASS | The implementation satisfies the requirement, task, or check with evidence |
|
|
39
|
+
| WARN | The implementation is acceptable but has risk, missing evidence, or minor drift |
|
|
40
|
+
| FAIL | The implementation does not satisfy the requirement, task, or check |
|
|
41
|
+
| BLOCKED | Validation could not complete because required context, tooling, or access is missing |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Behavior
|
|
46
|
+
|
|
47
|
+
### Phase 0: Load Context
|
|
48
|
+
|
|
49
|
+
**Token Optimization (Prompt Caching):** To maximize prompt caching, always read the constitutional baseline documents FIRST and in the exact same order across all sessions before reading task-specific files.
|
|
50
|
+
|
|
51
|
+
1. Read constitutional context (IN THIS ORDER):
|
|
52
|
+
- root `CLAUDE.md`
|
|
53
|
+
- `AGENTS.md`
|
|
54
|
+
- `docs/prd.md`
|
|
55
|
+
- `docs/ux-ui/design.md` (legacy fallback: `docs/system-design/design.md`)
|
|
56
|
+
- `docs/trd/trd.md` (legacy fallback: `docs/detailed-design/detailed-design.md`)
|
|
57
|
+
- `docs/specs/general-setup/`
|
|
58
|
+
- package-level `CLAUDE.md` files if they exist
|
|
59
|
+
2. Read spec context:
|
|
60
|
+
- `docs/specs/$ARGUMENTS/proposal.md` if present
|
|
61
|
+
- `docs/specs/$ARGUMENTS/requirements.md`
|
|
62
|
+
- `docs/specs/$ARGUMENTS/design.md`
|
|
63
|
+
- `docs/specs/$ARGUMENTS/tasks.md`
|
|
64
|
+
- `docs/specs/$ARGUMENTS/execution.md` if present
|
|
65
|
+
|
|
66
|
+
### Phase 1: Task Completion Check
|
|
67
|
+
|
|
68
|
+
Verify task status coverage and report PASS, WARN, or FAIL per task.
|
|
69
|
+
|
|
70
|
+
Check that completed tasks include execution notes and verification evidence.
|
|
71
|
+
|
|
72
|
+
### Phase 2: File Existence Check
|
|
73
|
+
|
|
74
|
+
Parse the design file tree and verify expected new, modified, and deleted files.
|
|
75
|
+
|
|
76
|
+
### Phase 3: Build Integrity
|
|
77
|
+
|
|
78
|
+
Run the project's relevant build, type-check, and lint commands.
|
|
79
|
+
|
|
80
|
+
Prefer the commands defined by the repo rather than assuming a fixed stack.
|
|
81
|
+
|
|
82
|
+
If no command exists, record the gap and recommend the smallest useful command to add.
|
|
83
|
+
|
|
84
|
+
### Phase 4: Requirement Coverage Verification
|
|
85
|
+
|
|
86
|
+
For every requirement in `requirements.md`, verify:
|
|
87
|
+
|
|
88
|
+
1. it appears in at least one task
|
|
89
|
+
2. mapped tasks are complete when full implementation is claimed
|
|
90
|
+
3. code evidence exists
|
|
91
|
+
4. key scenarios have automated or documented manual test evidence
|
|
92
|
+
5. negative constraints (`BUT it must NOT`) and strict validations (`AND IT MUST`) have been explicitly implemented and verified
|
|
93
|
+
6. behavior matches the requirement intent, not only the task wording
|
|
94
|
+
|
|
95
|
+
### Phase 5: Quality Audit
|
|
96
|
+
|
|
97
|
+
Use skills as needed:
|
|
98
|
+
|
|
99
|
+
- `nestjs-expert`
|
|
100
|
+
- `react-doctor`
|
|
101
|
+
- `api-design-principles`
|
|
102
|
+
- `tailwind-design-system`
|
|
103
|
+
- `frontend-design`
|
|
104
|
+
- `ui-ux-pro-max` if available for UX/UI-heavy validation
|
|
105
|
+
- `systematic-debugging` when failures or inconsistencies appear
|
|
106
|
+
|
|
107
|
+
Check for:
|
|
108
|
+
|
|
109
|
+
- architecture compliance
|
|
110
|
+
- API quality
|
|
111
|
+
- frontend quality
|
|
112
|
+
- design-system compliance
|
|
113
|
+
- UX consistency with the UX/UI design document
|
|
114
|
+
- error handling and observability where relevant
|
|
115
|
+
- accessibility and responsive behavior for UI work
|
|
116
|
+
- security and authorization boundaries for protected flows
|
|
117
|
+
|
|
118
|
+
### Phase 6: Design Conformance
|
|
119
|
+
|
|
120
|
+
Compare the implementation against the module design and the constitutional docs where relevant.
|
|
121
|
+
|
|
122
|
+
If the implementation intentionally differs from the design, verify that the design or execution notes explain the change. Otherwise mark the drift as WARN or FAIL depending on risk.
|
|
123
|
+
|
|
124
|
+
If `proposal.md` exists, also verify that final behavior remains aligned with the approved intent, scope, non-goals, and success criteria.
|
|
125
|
+
|
|
126
|
+
### Phase 7: Generate Validation Report
|
|
127
|
+
|
|
128
|
+
Create `docs/specs/$ARGUMENTS/validation-report.md`.
|
|
129
|
+
|
|
130
|
+
The report must include:
|
|
131
|
+
|
|
132
|
+
1. Document Control
|
|
133
|
+
2. Summary
|
|
134
|
+
3. Task Completion
|
|
135
|
+
4. File Existence
|
|
136
|
+
5. Build Integrity
|
|
137
|
+
6. Requirement Coverage
|
|
138
|
+
7. Linting & Code Quality
|
|
139
|
+
8. Design Conformance
|
|
140
|
+
9. Test Evidence Summary
|
|
141
|
+
10. Remediation
|
|
142
|
+
11. Archive Readiness Recommendation
|
|
143
|
+
|
|
144
|
+
The report title must be `# Validation Report — {Spec Name}`.
|
|
145
|
+
|
|
146
|
+
### Phase 8: Report to User
|
|
147
|
+
|
|
148
|
+
Generate a short, easy-to-understand summary (summary facil de entender de lo que se hizo) of the overall status, key findings, remediation count, and archive readiness. If issues exist, ask whether to fix all, fix critical only, or keep only the report. If the work is archive-ready, show the exact next command:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
/akili-archive $ARGUMENTS
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Error Handling
|
|
157
|
+
|
|
158
|
+
- If AKILI-SPECS documents are missing, report the missing files and stop.
|
|
159
|
+
- If build fails, continue other checks when possible.
|
|
160
|
+
- If a skill is unavailable, fall back to the next documented skill and note it in the report.
|
|
161
|
+
- If no tasks are complete, still allow partial validation but make the incompleteness explicit.
|
|
162
|
+
- If implementation evidence is inconclusive, mark WARN or BLOCKED instead of guessing.
|
|
163
|
+
- If validation finds spec drift, recommend whether to update the spec, update implementation, or split follow-up work.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Archive Readiness Guidance
|
|
168
|
+
|
|
169
|
+
The work is ready to consider complete when:
|
|
170
|
+
|
|
171
|
+
- all required tasks are `[x]`
|
|
172
|
+
- no FAIL findings remain unresolved
|
|
173
|
+
- WARN findings are accepted or have follow-up tasks
|
|
174
|
+
- tests cover the key requirements and scenarios
|
|
175
|
+
- implementation drift is reflected in the AKILI-SPECS docs or execution notes
|
|
176
|
+
- the user has reviewed the validation summary
|