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,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute approved specs systematically following the AKILI-SPECS methodology with spec-to-code traceability.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Execute AKILI-SPECS Tasks
|
|
6
|
+
|
|
7
|
+
Execute implementation tasks from an approved AKILI-SPECS spec path using the AKILI **Leader → Implementer → Reviewer** multi-agent triad. Read `tasks.md`, choose the next eligible task, delegate implementation, audit the diff, retry on failure (max 3 attempts), update task status, and record the full audit trail in `execution.md`.
|
|
8
|
+
|
|
9
|
+
Execution should be incremental. Do not turn one approved task into a broader refactor unless the spec explicitly requires it or the user approves the scope change.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/akili-execute <spec-path>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Examples:**
|
|
18
|
+
|
|
19
|
+
- `/akili-execute loan`
|
|
20
|
+
- `/akili-execute enhancements/renewals`
|
|
21
|
+
|
|
22
|
+
## Arguments
|
|
23
|
+
|
|
24
|
+
- `$ARGUMENTS` — Relative path under `docs/specs/` that already contains `requirements.md`, `design.md`, and `tasks.md`.
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
Each successful task execution should produce:
|
|
29
|
+
|
|
30
|
+
- focused code or documentation changes within task scope
|
|
31
|
+
- updated task status in `tasks.md`
|
|
32
|
+
- an appended audit entry in `execution.md` covering every Implementer attempt and every Reviewer verdict
|
|
33
|
+
- verification evidence from the command or check listed in the task
|
|
34
|
+
- a Reviewer PASS verdict before the task is marked complete
|
|
35
|
+
|
|
36
|
+
Use `[~]` for a started but incomplete or blocked task, `[x]` for a completed task, and `[ ]` for pending work.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Multi-Agent Triad
|
|
41
|
+
|
|
42
|
+
In this command you act as the **Leader** (Orchestrator). You delegate concrete work to two subordinate agent roles defined in the project's `.agents/` directory:
|
|
43
|
+
|
|
44
|
+
- `.agents/leader.md` — orchestration rules and audit conventions (your own playbook).
|
|
45
|
+
- `.agents/implementer.md` — the persona used when delegating implementation.
|
|
46
|
+
- `.agents/reviewer.md` — the persona used when delegating spec-conformance audit.
|
|
47
|
+
|
|
48
|
+
If `.agents/` is missing, run `/akili-constitution` first to scaffold it. Do not invent personas inline — the constitution is the source of truth.
|
|
49
|
+
|
|
50
|
+
**Delegation mechanism by tool:**
|
|
51
|
+
|
|
52
|
+
- **Claude Code / OpenCode:** spawn a focused subagent (or sub-prompt context) seeded with the persona file plus the task/diff context.
|
|
53
|
+
- **Google Antigravity:** invoke `invoke_subagent` (or the equivalent workflow primitive) using prompts read from `.agents/`.
|
|
54
|
+
|
|
55
|
+
The Leader does not write production code itself unless the rework loop is exhausted and the user has explicitly approved a fallback.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Behavior
|
|
60
|
+
|
|
61
|
+
### Step 0: Load Context
|
|
62
|
+
|
|
63
|
+
**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.
|
|
64
|
+
|
|
65
|
+
1. Read the project constitutional docs (IN THIS ORDER):
|
|
66
|
+
- root `CLAUDE.md`
|
|
67
|
+
- `AGENTS.md`
|
|
68
|
+
- `docs/prd.md`
|
|
69
|
+
- `docs/ux-ui/design.md` (legacy fallback: `docs/system-design/design.md`)
|
|
70
|
+
- `docs/trd/trd.md` (legacy fallback: `docs/detailed-design/detailed-design.md`)
|
|
71
|
+
- `docs/specs/general-setup/`
|
|
72
|
+
- Package-level `CLAUDE.md` and `AGENTS.md` files if they exist
|
|
73
|
+
2. Read the AKILI-SPECS documents for the spec path:
|
|
74
|
+
- `docs/specs/$ARGUMENTS/requirements.md`
|
|
75
|
+
- `docs/specs/$ARGUMENTS/design.md`
|
|
76
|
+
- `docs/specs/$ARGUMENTS/tasks.md`
|
|
77
|
+
3. Read `docs/specs/$ARGUMENTS/execution.md` if it exists.
|
|
78
|
+
4. Read the agent personas:
|
|
79
|
+
- `.agents/leader.md`
|
|
80
|
+
- `.agents/implementer.md`
|
|
81
|
+
- `.agents/reviewer.md`
|
|
82
|
+
5. Identify current task state: `[x]`, `[~]`, `[ ]`.
|
|
83
|
+
|
|
84
|
+
### Step 1: Select Next Task(s)
|
|
85
|
+
|
|
86
|
+
1. Find the next executable task by document order where:
|
|
87
|
+
- status is `[ ]` or `[~]`
|
|
88
|
+
- all dependencies are `[x]`
|
|
89
|
+
2. If a task is `[~]`, resume it using `execution.md` context.
|
|
90
|
+
3. If no tasks are eligible, report completion or blocking state and stop.
|
|
91
|
+
4. **Parallel Execution:** If multiple tasks are eligible AND they are completely independent (e.g., they touch completely different domains or files), you MAY spawn multiple Implementers in parallel to execute them concurrently. Otherwise, prefer executing the first task by document order to avoid merge conflicts.
|
|
92
|
+
|
|
93
|
+
### Step 2: Execute Task via Rework Loop
|
|
94
|
+
|
|
95
|
+
The Leader executes each task through a bounded loop. The loop terminates on Reviewer `PASS`, on HALT after 3 failed attempts, or on a Pivot.
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
attempt = 1
|
|
99
|
+
feedback = none
|
|
100
|
+
loop:
|
|
101
|
+
spawn Implementer with task scope + design context + feedback (if any)
|
|
102
|
+
receive Implementer report (changes + verification evidence)
|
|
103
|
+
extract git diff
|
|
104
|
+
spawn Reviewer with diff + spec context
|
|
105
|
+
receive Reviewer verdict (PASS | FAIL)
|
|
106
|
+
if PASS:
|
|
107
|
+
finalize task (Step 3)
|
|
108
|
+
exit loop
|
|
109
|
+
else (FAIL):
|
|
110
|
+
append FAIL findings to execution.md
|
|
111
|
+
if attempt >= 3:
|
|
112
|
+
HALT, mark task [~], present audit trail (Step 4)
|
|
113
|
+
exit loop
|
|
114
|
+
feedback = Reviewer issues
|
|
115
|
+
attempt += 1
|
|
116
|
+
continue loop
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### 2.1 — Read Scope & Design (Leader)
|
|
120
|
+
|
|
121
|
+
- Re-read the specific design sections referenced by the task.
|
|
122
|
+
- Re-read the requirements and scenarios covered by the task.
|
|
123
|
+
- Identify the smallest safe change that satisfies the task.
|
|
124
|
+
- Identify the verification command listed in the task.
|
|
125
|
+
|
|
126
|
+
#### 2.2 — Spawn Implementer
|
|
127
|
+
|
|
128
|
+
Delegate to the Implementer with:
|
|
129
|
+
|
|
130
|
+
- the persona content from `.agents/implementer.md`
|
|
131
|
+
- the active task ID, title, and scope from `tasks.md`
|
|
132
|
+
- the relevant slices of `requirements.md`, `design.md`, and `trd.md`
|
|
133
|
+
- the project constitution references (`CLAUDE.md`, `AGENTS.md`, `docs/ux-ui/design.md`)
|
|
134
|
+
- the recommended skill list from the task (e.g. `ui-ux-pro-max`, `react-doctor`, `nestjs-expert`)
|
|
135
|
+
- any prior Reviewer feedback when this is a rework attempt
|
|
136
|
+
- the verification command to run before reporting completion
|
|
137
|
+
|
|
138
|
+
The Implementer must keep changes minimal and within task scope, follow the design spec exactly unless the spec is clearly incomplete or contradictory, and run the verification before reporting completion.
|
|
139
|
+
|
|
140
|
+
#### 2.3 — Spawn Reviewer
|
|
141
|
+
|
|
142
|
+
When the Implementer reports completion, the Leader:
|
|
143
|
+
|
|
144
|
+
1. Extracts the **git diff** of changes since the start of the attempt. To save tokens, the Reviewer MUST ONLY be given the diff, not the entire source files, unless absolutely necessary for context.
|
|
145
|
+
2. Spawns the Reviewer with:
|
|
146
|
+
- the persona content from `.agents/reviewer.md`
|
|
147
|
+
- the **git diff**
|
|
148
|
+
- the relevant slices of `requirements.md`, `design.md`, `trd.md`, and `docs/ux-ui/design.md`
|
|
149
|
+
- the Implementer's verification evidence
|
|
150
|
+
|
|
151
|
+
The Reviewer is read-only. It must conclude with either:
|
|
152
|
+
|
|
153
|
+
- **`STATUS: PASS`** + a 1–2 sentence summary
|
|
154
|
+
- **`STATUS: FAIL`** + a structured list of issues, each containing:
|
|
155
|
+
1. **Discovered Issue** — what is incorrect or missing
|
|
156
|
+
2. **Violated Rule** — the specific spec document and section violated
|
|
157
|
+
3. **Remediation Suggestion** — what the Implementer must change
|
|
158
|
+
- **`STATUS: FATAL_FAIL`** — Used ONLY if the Reviewer detects a critical architectural violation, a broken fundamental design token, or a completely unviable approach that cannot be fixed by simple iteration. This triggers an immediate abort of the rework loop (Fail-Fast) to save tokens.
|
|
159
|
+
|
|
160
|
+
#### 2.4 — Loop Guardrails
|
|
161
|
+
|
|
162
|
+
- **Maximum Retries:** A hard ceiling of **3 rework attempts** per task. This prevents infinite loops and token waste.
|
|
163
|
+
- **Fail-Fast (FATAL_FAIL):** If the Reviewer issues a `STATUS: FATAL_FAIL`, immediately HALT the loop, mark the task `[~]`, and trigger the Pivot Protocol. Do not consume remaining rework attempts.
|
|
164
|
+
- **Structured Feedback:** On `FAIL`, pass the full Reviewer report unchanged to the next Implementer spawn. Do not paraphrase.
|
|
165
|
+
- **Escalation on HALT:** After 3 failed attempts (or a FATAL_FAIL), mark the task `[~]`, log the full loop history in `execution.md`, and present the audit trail to the user for guidance.
|
|
166
|
+
- **Pivot Detection:** If either the Implementer or the Reviewer surfaces evidence that the spec itself is wrong or unviable (not merely the implementation), stop looping immediately and trigger the Pivot Protocol below — do not consume rework attempts on a broken spec.
|
|
167
|
+
|
|
168
|
+
### Step 3: Finalize on PASS
|
|
169
|
+
|
|
170
|
+
Only after a Reviewer `PASS`:
|
|
171
|
+
|
|
172
|
+
1. Update `tasks.md` from `[ ]` (or `[~]`) to `[x]`.
|
|
173
|
+
2. Append a structured entry to `execution.md` (see log format below) covering every attempt in this task's loop.
|
|
174
|
+
3. **Git Commit Staging:** Always follow the **AKILI Spec Reference** commit standard. Prefix the commit message with `[SPEC:<spec-path>]` (e.g. `git commit -m "[SPEC:changes/add-remember-me] implement secure cookie storage"`).
|
|
175
|
+
4. **Code Traceability:** Add file-level or block-level comment spec references (`// @akili-spec <spec-path>`) in critical or complex codebase additions to assist future audits.
|
|
176
|
+
5. **Constitution Impact Check:** If the task created a new module/package, moved a module boundary, or changed a module's public surface, append a `## Constitution Impact: <Task ID>` block to `execution.md` recording:
|
|
177
|
+
- which module was created or reshaped
|
|
178
|
+
- whether a child `CLAUDE.md`/`AGENTS.md` is needed for it (or an existing child guide became stale)
|
|
179
|
+
- which parent guide's `## Module Guides` index needs a new or updated reference
|
|
180
|
+
- that a CodeGraph re-index is pending
|
|
181
|
+
These notes are consumed by `/akili-archive` (Constitution & Graph Sync). If skipping the sync until archive would leave the root guides actively misleading (e.g. a new top-level package agents keep guessing about), update the affected guides immediately in the same task commit instead of deferring.
|
|
182
|
+
|
|
183
|
+
### Step 4: HALT on Rework Limit
|
|
184
|
+
|
|
185
|
+
If 3 attempts fail in a row (or a FATAL_FAIL occurs):
|
|
186
|
+
|
|
187
|
+
1. **Automatic Rollback:** Run `git restore .` and `git clean -fd` to revert the working tree to a clean state. Do not leave broken code for the user to clean up.
|
|
188
|
+
2. Mark the task `[~]` in `tasks.md`.
|
|
189
|
+
3. Append a final `## HALT: <Task ID>` block to `execution.md` containing:
|
|
190
|
+
- all three Reviewer `FAIL` reports
|
|
191
|
+
- all three Implementer summaries
|
|
192
|
+
- the verification output of the final attempt
|
|
193
|
+
- the Leader's hypothesis on the root cause (spec ambiguity, missing context, environmental issue, etc.)
|
|
194
|
+
3. Present the blocker to the user with a clear question — for example: *"The Reviewer rejected three attempts on the same `design token compliance` finding. The spec at `design.md#tokens` does not list a token for this surface. How would you like to proceed?"*
|
|
195
|
+
4. Do **not** advance to the next task automatically after a HALT.
|
|
196
|
+
|
|
197
|
+
### Step 5: Continue or Pause
|
|
198
|
+
|
|
199
|
+
After a task PASSes or HALTs, generate a short, easy-to-understand summary (summary facil de entender de lo que se hizo) of the task result, verification outcome, the Reviewer summary, and the next eligible task. Ask whether to continue, pause, or skip the next task.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Execution Log Format (`execution.md`)
|
|
204
|
+
|
|
205
|
+
The execution log is created on first run and appended to on subsequent runs. It is the canonical audit trail of the multi-agent loop.
|
|
206
|
+
|
|
207
|
+
Minimum sections:
|
|
208
|
+
|
|
209
|
+
1. Document Control
|
|
210
|
+
2. Task Execution History
|
|
211
|
+
3. Summary when all tasks are complete
|
|
212
|
+
|
|
213
|
+
Each task entry must record:
|
|
214
|
+
|
|
215
|
+
- final status (PASS / HALT / pivot)
|
|
216
|
+
- date
|
|
217
|
+
- task ID and title
|
|
218
|
+
- number of Implementer attempts run
|
|
219
|
+
- for each attempt: files changed, Implementer verification command + result, Reviewer verdict + summary or full FAIL findings
|
|
220
|
+
- requirements covered
|
|
221
|
+
- decisions made
|
|
222
|
+
- issues encountered
|
|
223
|
+
- final verification result
|
|
224
|
+
|
|
225
|
+
A minimal PASS-on-first-attempt entry can be compact; a HALT or rework entry must include the full attempt-by-attempt history.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Error Handling & Pivot Protocol
|
|
230
|
+
|
|
231
|
+
- If required AKILI-SPECS files are missing, stop and report what is missing.
|
|
232
|
+
- If `.agents/` is missing, stop and direct the user to run `/akili-constitution`.
|
|
233
|
+
- If the design is ambiguous, the Leader asks the user before spawning the Implementer — do not pass an ambiguous task into the loop.
|
|
234
|
+
- If verification fails inside the Implementer, the Implementer must fix it before reporting completion; if it cannot, it reports back the failure and the Leader treats that as an implicit FAIL.
|
|
235
|
+
- If a task is blocked, report the blocker and move to the next eligible task only if appropriate.
|
|
236
|
+
- **Pivot Protocol:** If Implementer or Reviewer discoveries reveal that the approved requirements or design are wrong or technically unviable:
|
|
237
|
+
1. Stop the rework loop. Mark the current task as `[~]` (blocked) — even if rework attempts remain.
|
|
238
|
+
2. Document the blocker, alternatives, and revised technical direction in `execution.md` inside a new `## Pivot Record: <Task ID>` section.
|
|
239
|
+
3. Modify the spec's `requirements.md`, `design.md`, and/or `tasks.md` to map out the updated plan.
|
|
240
|
+
4. Stop, explain the situation to the user, and obtain explicit review/approval on the pivot before resuming execution.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Propose new features or changes by initiating a new detailed technical spec process.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Propose AKILI-SPECS Change
|
|
6
|
+
|
|
7
|
+
Create a lightweight proposal for one bounded change before generating full AKILI-SPECS documents.
|
|
8
|
+
|
|
9
|
+
The proposal is the reviewable intent layer. It should help the user decide whether the change is worth specifying before time is spent on requirements, design, tasks, or implementation.
|
|
10
|
+
|
|
11
|
+
> **Recommended model tier:** T1 Architect (deep reasoning, architecture, trade-offs). Ensure you are using the strongest reasoning model available for this phase.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/akili-propose <change-name-or-spec-path>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Examples:**
|
|
20
|
+
|
|
21
|
+
- `/akili-propose add-remember-me`
|
|
22
|
+
- `/akili-propose bugfix/login-redirect`
|
|
23
|
+
- `/akili-propose enhancements/renewals`
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
|
|
27
|
+
- `$ARGUMENTS` - A change name or a relative path under `docs/specs/`.
|
|
28
|
+
|
|
29
|
+
Path resolution:
|
|
30
|
+
|
|
31
|
+
- If `$ARGUMENTS` contains `/`, treat it as the literal spec path.
|
|
32
|
+
- If `$ARGUMENTS` is a bare name, use `changes/$ARGUMENTS` as the spec path.
|
|
33
|
+
|
|
34
|
+
Examples:
|
|
35
|
+
|
|
36
|
+
| Input | Spec Path | Proposal Path |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `add-remember-me` | `changes/add-remember-me` | `docs/specs/changes/add-remember-me/proposal.md` |
|
|
39
|
+
| `bugfix/login-redirect` | `bugfix/login-redirect` | `docs/specs/bugfix/login-redirect/proposal.md` |
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
|
|
43
|
+
Create or update:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
docs/specs/$SPEC_PATH/proposal.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Do not create `requirements.md`, `design.md`, or `tasks.md` in this command unless the user explicitly asks. Those belong to `/akili-specify`.
|
|
50
|
+
|
|
51
|
+
## Behavior
|
|
52
|
+
|
|
53
|
+
### Step 0: Resolve Path And Load Context
|
|
54
|
+
|
|
55
|
+
**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.
|
|
56
|
+
|
|
57
|
+
1. Resolve `$SPEC_PATH` using the path rules above.
|
|
58
|
+
2. Create `docs/specs/$SPEC_PATH/` if it does not exist.
|
|
59
|
+
3. Read project-level context when available (IN THIS ORDER):
|
|
60
|
+
- root `CLAUDE.md`
|
|
61
|
+
- `AGENTS.md`
|
|
62
|
+
- `docs/prd.md`
|
|
63
|
+
- `docs/ux-ui/design.md` (legacy fallback: `docs/system-design/design.md`)
|
|
64
|
+
- `docs/trd/trd.md` (legacy fallback: `docs/detailed-design/detailed-design.md`)
|
|
65
|
+
- `docs/specs/general-setup/`
|
|
66
|
+
- package-level `CLAUDE.md` files
|
|
67
|
+
4. Read nearby or related specs under `docs/specs/`.
|
|
68
|
+
5. **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.
|
|
69
|
+
|
|
70
|
+
### Step 1: Clarify Intent, Sources & Scope Chunking
|
|
71
|
+
|
|
72
|
+
Before diving into the problem, ask the user about the source of the requirements and any visual designs:
|
|
73
|
+
|
|
74
|
+
1. **Requirement Source:** Ask if they have a **Jira ticket** (if they do, suggest using the **Jira MCP** to automatically extract the description, acceptance criteria, and comments created by the BA) or if they prefer to paste/write the context directly.
|
|
75
|
+
2. **Visual Designs / Mockups:** Ask if there is a **Figma link** or any visual mockup available. If they provide a Figma URL, suggest using the **Figma MCP** to extract the design details, components, and layout information.
|
|
76
|
+
|
|
77
|
+
Use `brainstorming` and, when helpful, `product-manager-toolkit` to clarify:
|
|
78
|
+
|
|
79
|
+
- problem being solved
|
|
80
|
+
- target users, actors, or systems
|
|
81
|
+
- current behavior
|
|
82
|
+
- desired behavior
|
|
83
|
+
- scope boundaries
|
|
84
|
+
- non-goals
|
|
85
|
+
- dependencies and constraints
|
|
86
|
+
- success criteria
|
|
87
|
+
|
|
88
|
+
**Scope Chunking:** If the user provides a very large or multi-faceted instruction (e.g., an entire epic or multiple distinct features), analyze whether the request should be split into multiple bounded proposals.
|
|
89
|
+
- If it should be split, propose breaking it down to the user.
|
|
90
|
+
- Upon agreement, create the respective folders for each bounded change under `docs/specs/` and generate a `proposal.md` for each.
|
|
91
|
+
|
|
92
|
+
Ask focused questions only when the proposal would otherwise depend on unstable assumptions.
|
|
93
|
+
|
|
94
|
+
### Step 2: Write `proposal.md`
|
|
95
|
+
|
|
96
|
+
Create a concise proposal with this structure:
|
|
97
|
+
|
|
98
|
+
1. Document Control
|
|
99
|
+
2. Intent
|
|
100
|
+
3. Problem / Current Behavior
|
|
101
|
+
4. Proposed Outcome
|
|
102
|
+
5. Scope
|
|
103
|
+
6. Non-Goals
|
|
104
|
+
7. Affected Users, Systems, And Specs
|
|
105
|
+
8. Requirement Delta Preview
|
|
106
|
+
9. Approach Options
|
|
107
|
+
10. Recommended Approach
|
|
108
|
+
11. Risks, Dependencies, And Open Questions
|
|
109
|
+
12. Success Criteria
|
|
110
|
+
13. Next Step
|
|
111
|
+
|
|
112
|
+
### Requirement Delta Preview
|
|
113
|
+
|
|
114
|
+
When the change affects existing behavior, include a lightweight preview using these sections where relevant:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## Requirement Delta Preview
|
|
118
|
+
|
|
119
|
+
### ADDED Requirements
|
|
120
|
+
|
|
121
|
+
- New behavior that does not exist today.
|
|
122
|
+
|
|
123
|
+
### MODIFIED Requirements
|
|
124
|
+
|
|
125
|
+
- Existing behavior that will change.
|
|
126
|
+
|
|
127
|
+
### REMOVED Requirements
|
|
128
|
+
|
|
129
|
+
- Existing behavior that will be deprecated or deleted.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This preview is not the final spec. `/akili-specify` converts approved intent into full requirements, scenarios, design, and tasks.
|
|
133
|
+
|
|
134
|
+
### Approach Options
|
|
135
|
+
|
|
136
|
+
For non-trivial work, include 2 or 3 options with trade-offs. Recommend one option and explain why it is the smallest safe path.
|
|
137
|
+
|
|
138
|
+
### Next Step
|
|
139
|
+
|
|
140
|
+
End the proposal with the exact next command:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
/akili-specify $SPEC_PATH
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Review Checklist
|
|
147
|
+
|
|
148
|
+
Before presenting the proposal, verify:
|
|
149
|
+
|
|
150
|
+
- [ ] The problem is clear.
|
|
151
|
+
- [ ] Scope and non-goals are explicit.
|
|
152
|
+
- [ ] The proposed outcome is behavior-focused.
|
|
153
|
+
- [ ] Affected specs or code areas are listed.
|
|
154
|
+
- [ ] Risks and open questions are visible.
|
|
155
|
+
- [ ] The next command uses the resolved spec path.
|
|
156
|
+
|
|
157
|
+
## Report To User
|
|
158
|
+
|
|
159
|
+
Generate a short, easy-to-understand summary (summary facil de entender de lo que se hizo) that reflects what was done. It must include:
|
|
160
|
+
|
|
161
|
+
1. proposal path
|
|
162
|
+
2. resolved spec path
|
|
163
|
+
3. recommended approach
|
|
164
|
+
4. main risks or open questions
|
|
165
|
+
5. next command to run after approval
|
|
166
|
+
|
|
167
|
+
Ask whether to approve the proposal, revise it, or stop.
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enhance pages and search engine optimization following SEO best practices.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# SEO Setup & Audit via Google Search Console
|
|
6
|
+
|
|
7
|
+
Provision Google Search Console access for a domain via a Google Cloud service account, then run a full SEO audit (index coverage, sitemaps, structured data, search analytics) and generate an audit report under the spec path. Produces `seo-setup-report.md` and `seo-audit-report.md`.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/akili-seo <site-domain>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Examples:**
|
|
16
|
+
|
|
17
|
+
- `/akili-seo calismiledesign.com`
|
|
18
|
+
- `/akili-seo seo/calismiledesign.com`
|
|
19
|
+
- `/akili-seo agrosmartco.com`
|
|
20
|
+
|
|
21
|
+
## Arguments
|
|
22
|
+
|
|
23
|
+
- `$ARGUMENTS` — Either a bare apex domain (e.g. `example.com`) or a relative path under `docs/specs/` (e.g. `seo/example.com`). When a bare domain is given, the spec path defaults to `docs/specs/seo/<domain>/`.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
The user must provide (or confirm) once per Google Cloud project:
|
|
28
|
+
|
|
29
|
+
1. A Google Cloud service account JSON key file, absolute path.
|
|
30
|
+
2. Three APIs enabled in that GCP project:
|
|
31
|
+
- **Site Verification API** (`siteverification.googleapis.com`)
|
|
32
|
+
- **Search Console API** (`searchconsole.googleapis.com`)
|
|
33
|
+
- **Web Search Indexing API** is **NOT required** — Google only honors it for `JobPosting` and `BroadcastEvent` schemas; do not push users to enable it for generic content sites.
|
|
34
|
+
3. DNS provider access for the target domain (to add a TXT record).
|
|
35
|
+
4. The GSC MCP server configured in `~/.claude.json` or project `.mcp.json` with:
|
|
36
|
+
```json
|
|
37
|
+
"gsc": {
|
|
38
|
+
"command": "npx",
|
|
39
|
+
"args": ["-y", "@mikusnuz/gsc-mcp"],
|
|
40
|
+
"env": {
|
|
41
|
+
"GSC_SERVICE_ACCOUNT_KEY_PATH": "<absolute path to JSON key>"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
If `GSC_SITE_URL` is set, prefer the `sc-domain:` form (e.g. `sc-domain:example.com`) over the URL-prefix form.
|
|
46
|
+
5. A local helper for the Site Verification API. The `gsc` MCP does **not** expose Site Verification endpoints (no `getToken`, no `verify`) — it only wraps the Search Console API. Use the bundled `scripts/gsc_verify.py` from `akili-specs` (depends on `google-auth` and `google-api-python-client`). Invoke it as:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
GSC_KEY_PATH=/abs/path/to/key.json python3 scripts/gsc_verify.py get <domain>
|
|
50
|
+
GSC_KEY_PATH=/abs/path/to/key.json python3 scripts/gsc_verify.py verify <domain>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If any prerequisite is missing, stop and report exactly what is missing and how to obtain it.
|
|
54
|
+
|
|
55
|
+
## Tool Inventory
|
|
56
|
+
|
|
57
|
+
| Phase | Endpoint | Source |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| 1.1 Get TXT token | `siteVerification.webResource.getToken` | Site Verification API (helper script) |
|
|
60
|
+
| 1.3 Verify ownership | `siteVerification.webResource.insert` | Site Verification API (helper script) |
|
|
61
|
+
| 1.4 Add property | `sites_add` | `gsc` MCP |
|
|
62
|
+
| 1.5 Confirm | `sites_list` | `gsc` MCP |
|
|
63
|
+
| 2.1 Sitemaps | `sitemaps_list`, `sitemaps_submit` | `gsc` MCP |
|
|
64
|
+
| 2.2 Index coverage | `url_inspection_inspect` | `gsc` MCP |
|
|
65
|
+
| 2.4 Analytics | `search_analytics_query` | `gsc` MCP |
|
|
66
|
+
| 2.5 Render | raw `curl -A Googlebot/2.1` | shell |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Behavior
|
|
71
|
+
|
|
72
|
+
### Phase 0: Setup
|
|
73
|
+
|
|
74
|
+
1. Resolve the spec path. If `$ARGUMENTS` is a bare domain, set `SPEC_PATH = seo/<domain>`. Otherwise treat `$ARGUMENTS` as the literal spec path.
|
|
75
|
+
2. Create directory `docs/specs/$SPEC_PATH/` if it does not exist.
|
|
76
|
+
3. Read the constitutional templates and project context as defined in `akili-specify`:
|
|
77
|
+
- `docs/specs/general-setup/`
|
|
78
|
+
- `docs/prd.md`
|
|
79
|
+
- `docs/ux-ui/design.md` (legacy: `docs/system-design/design.md` or `docs/system-design.md`)
|
|
80
|
+
- `docs/trd/trd.md` (legacy: `docs/detailed-design/detailed-design.md` or `docs/detailed-design.md`)
|
|
81
|
+
- Root `CLAUDE.md`
|
|
82
|
+
4. Confirm the GSC MCP is reachable. If not, stop and report.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### Phase 1: Verify & Add Property
|
|
87
|
+
|
|
88
|
+
**Role:** SEO Engineer — register the service account as a verified owner of the domain in Google Search Console.
|
|
89
|
+
|
|
90
|
+
#### Step 1.1 — Generate the DNS TXT token
|
|
91
|
+
|
|
92
|
+
Call the Site Verification API to obtain the verification token for `sc-domain:<domain>`. Present the user with the exact TXT record to add:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Type: TXT
|
|
96
|
+
Host: @ (root of <domain>)
|
|
97
|
+
Value: google-site-verification=<token>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Step 1.2 — Wait for DNS propagation
|
|
101
|
+
|
|
102
|
+
Ask the user to confirm the TXT record is live, then verify with a DNS lookup before proceeding. Do not loop silently — fail clearly if propagation has not happened after a reasonable check.
|
|
103
|
+
|
|
104
|
+
#### Step 1.3 — Verify ownership
|
|
105
|
+
|
|
106
|
+
Call the Site Verification API `verify` endpoint. On success, the service account becomes an owner of the property.
|
|
107
|
+
|
|
108
|
+
#### Step 1.4 — Add the property to Search Console
|
|
109
|
+
|
|
110
|
+
Verification alone does not add the property to Search Console for the service account. Explicitly call `sites_add` with `sc-domain:<domain>` so the property appears in `sites_list` with `permissionLevel: siteOwner`.
|
|
111
|
+
|
|
112
|
+
#### Step 1.5 — Write `seo-setup-report.md`
|
|
113
|
+
|
|
114
|
+
Produce `docs/specs/$SPEC_PATH/seo-setup-report.md` documenting:
|
|
115
|
+
|
|
116
|
+
1. Document Control (date, domain, service account email, GCP project)
|
|
117
|
+
2. Prerequisites checked
|
|
118
|
+
3. DNS TXT record value installed
|
|
119
|
+
4. Verification result
|
|
120
|
+
5. `sites_list` confirmation output
|
|
121
|
+
6. Notes / caveats
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
### Phase 2: Audit
|
|
126
|
+
|
|
127
|
+
**Role:** Technical SEO Auditor — measure the state of the domain in Google's index.
|
|
128
|
+
|
|
129
|
+
**Required skill:** load `seo-audit` before starting this phase and apply it throughout:
|
|
130
|
+
|
|
131
|
+
- Sequence and weight findings by its priority order: crawlability & indexation → technical foundations → on-page → content quality → authority.
|
|
132
|
+
- Record every finding with its structure: **Issue / Impact / Evidence / Fix / Priority**.
|
|
133
|
+
- Respect its schema-detection limitation: static fetches (`curl`, `web_fetch`) cannot see JS-injected JSON-LD. Validate structured data via `url_inspection_inspect.richResultsResult` or a rendering tool, never via static HTML alone.
|
|
134
|
+
- Apply its International SEO checklist (hreflang reciprocity, self-reference, `x-default`, cross-locale canonicals, locale sitemaps) whenever the site serves multiple languages or regions.
|
|
135
|
+
|
|
136
|
+
Use `systematic-debugging` when results are inconsistent with site reality.
|
|
137
|
+
|
|
138
|
+
Skill preference for any UX/UI recommendations:
|
|
139
|
+
|
|
140
|
+
- `ui-ux-pro-max` if available
|
|
141
|
+
- otherwise `frontend-design`
|
|
142
|
+
|
|
143
|
+
#### Step 2.1 — Sitemap audit
|
|
144
|
+
|
|
145
|
+
1. List submitted sitemaps via `sitemaps_list`.
|
|
146
|
+
2. If none submitted but `https://<domain>/sitemap.xml` or `/sitemap-index.xml` exists, propose submission with `sitemaps_submit` and ask before submitting.
|
|
147
|
+
3. Fetch each sitemap with `curl -sL` and enumerate URLs.
|
|
148
|
+
|
|
149
|
+
#### Step 2.2 — Index coverage
|
|
150
|
+
|
|
151
|
+
For every URL in the sitemap (cap at 25 for cost; sample evenly across locales and sections), call `url_inspection_inspect`. Bucket each URL into:
|
|
152
|
+
|
|
153
|
+
- `PASS` — Submitted and indexed
|
|
154
|
+
- `NEUTRAL` — Discovered – currently not indexed
|
|
155
|
+
- `NEUTRAL` — URL is unknown to Google
|
|
156
|
+
- `NEUTRAL` — Page with redirect
|
|
157
|
+
- `FAIL` — anything else (e.g. blocked, server error, soft 404)
|
|
158
|
+
|
|
159
|
+
Record `googleCanonical`, `userCanonical`, `pageFetchState`, `crawledAs`, `lastCrawlTime` for each.
|
|
160
|
+
|
|
161
|
+
#### Step 2.3 — Structured data audit
|
|
162
|
+
|
|
163
|
+
From `url_inspection_inspect.richResultsResult`, collect every rich-result item flagged with `WARNING` or `ERROR`. For each, fetch the page with a Googlebot user agent and extract the offending JSON-LD block so the report can show the exact bad value and the exact corrected value.
|
|
164
|
+
|
|
165
|
+
Common findings to surface:
|
|
166
|
+
|
|
167
|
+
- `VideoObject.uploadDate` missing time or timezone (use ISO 8601 `YYYY-MM-DDTHH:MM:SS±HH:MM`)
|
|
168
|
+
- `Product`, `Review`, `Organization` missing required fields
|
|
169
|
+
|
|
170
|
+
#### Step 2.4 — Search analytics
|
|
171
|
+
|
|
172
|
+
Call `search_analytics_query` for the last 28 days (or last 90 if available), grouped by:
|
|
173
|
+
|
|
174
|
+
- `query` (top 25)
|
|
175
|
+
- `page` (top 25)
|
|
176
|
+
- `country` (top 10)
|
|
177
|
+
- `device` (all)
|
|
178
|
+
|
|
179
|
+
If the property is newly verified and returns no rows, record that explicitly and note that data typically appears within 2–7 days.
|
|
180
|
+
|
|
181
|
+
#### Step 2.5 — Render audit
|
|
182
|
+
|
|
183
|
+
For 2–3 sampled pages, fetch them with `curl -sL -A "Googlebot/2.1"` and measure:
|
|
184
|
+
|
|
185
|
+
- HTML size in bytes
|
|
186
|
+
- Visible text length in characters and word count
|
|
187
|
+
- Whether the main content is present in server-rendered HTML (vs JS-only)
|
|
188
|
+
|
|
189
|
+
This separates "thin content" failures from "JS render" failures.
|
|
190
|
+
|
|
191
|
+
#### Step 2.6 — Internal linking quick check
|
|
192
|
+
|
|
193
|
+
Fetch the homepage and count anchor links to each sitemap URL. URLs with zero internal links from the homepage are flagged as orphan-like.
|
|
194
|
+
|
|
195
|
+
#### Step 2.7 — On-page audit (`seo-audit` framework)
|
|
196
|
+
|
|
197
|
+
For the pages sampled in Step 2.5, apply the on-page checklist from the `seo-audit` skill:
|
|
198
|
+
|
|
199
|
+
- Title tags: unique per page, ~50–60 characters, primary keyword near the beginning.
|
|
200
|
+
- Meta descriptions: unique per page, ~150–160 characters, clear value proposition.
|
|
201
|
+
- Heading structure: exactly one H1, no skipped levels, headings describe content.
|
|
202
|
+
- Image alt text present and descriptive; internal anchor text descriptive (no bare "click here").
|
|
203
|
+
- Canonical tags: self-referencing on unique pages, consistent protocol/host/trailing-slash.
|
|
204
|
+
- Multilingual sites: hreflang set includes a self-reference and reciprocal return links, `x-default` declared, each locale self-canonical (never cross-locale).
|
|
205
|
+
|
|
206
|
+
Record each failure as a finding using the skill's Issue / Impact / Evidence / Fix / Priority structure.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### Phase 3: Write `seo-audit-report.md`
|
|
211
|
+
|
|
212
|
+
Generate `docs/specs/$SPEC_PATH/seo-audit-report.md` using `docs/specs/general-setup/validation-report.md` as the format source where it fits.
|
|
213
|
+
|
|
214
|
+
Required sections:
|
|
215
|
+
|
|
216
|
+
1. Document Control
|
|
217
|
+
2. Executive Summary — one-paragraph verdict + 3–5 bullet headline findings.
|
|
218
|
+
3. Index Coverage Table — every audited URL with its bucket and last crawl time.
|
|
219
|
+
4. Sitemap Status
|
|
220
|
+
5. Structured Data Findings — exact broken JSON-LD blocks with corrected versions.
|
|
221
|
+
6. Search Analytics Summary — top queries / pages / devices / countries, or an explicit "no data yet" note.
|
|
222
|
+
7. Render Audit
|
|
223
|
+
8. Internal Linking Findings
|
|
224
|
+
9. On-Page SEO Findings — Step 2.7 results, each in the `seo-audit` Issue / Impact / Evidence / Fix / Priority format.
|
|
225
|
+
10. Remediation Plan — prioritized (High / Medium / Low) actionable items, each scoped enough that an implementer can execute it without further discovery.
|
|
226
|
+
11. Re-audit Schedule — when to run `/akili-seo <domain>` again.
|
|
227
|
+
|
|
228
|
+
The report title must be `# SEO Audit Report — <domain>`.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### Phase 4: Generate a Fix Prompt
|
|
233
|
+
|
|
234
|
+
Append to the audit report a section titled `## Implementation Prompt` containing a fenced, copy-paste prompt that can be handed to Claude Code (or any engineer) inside the site's codebase to fix every High-severity finding. The prompt must:
|
|
235
|
+
|
|
236
|
+
- Reference each finding by ID from the remediation plan.
|
|
237
|
+
- Include exact JSON-LD before/after snippets where structured data is broken.
|
|
238
|
+
- Include exact URL pairs for hreflang corrections.
|
|
239
|
+
- End with "Show me a diff of every change before applying. Do not deploy until I approve."
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### Phase 5: Present & Approve
|
|
244
|
+
|
|
245
|
+
Present a short summary of:
|
|
246
|
+
|
|
247
|
+
- Setup status (Phase 1 outcome).
|
|
248
|
+
- Audit headline findings and counts per bucket.
|
|
249
|
+
- The number of High / Medium / Low remediation items.
|
|
250
|
+
- Paths to the two generated reports.
|
|
251
|
+
|
|
252
|
+
Ask the user whether to also run the same flow against any other properties under the same service account.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Verification Checklist
|
|
257
|
+
|
|
258
|
+
After the command completes, verify:
|
|
259
|
+
|
|
260
|
+
- [ ] `docs/specs/$SPEC_PATH/seo-setup-report.md` exists and references the actual TXT token used.
|
|
261
|
+
- [ ] `docs/specs/$SPEC_PATH/seo-audit-report.md` exists with all required sections.
|
|
262
|
+
- [ ] `sites_list` shows the property with `permissionLevel: siteOwner`.
|
|
263
|
+
- [ ] Every URL in the sitemap is either audited or explicitly excluded with a reason.
|
|
264
|
+
- [ ] Every structured-data warning is reproduced with the exact bad value and the exact fix.
|
|
265
|
+
- [ ] On-page findings from Step 2.7 use the `seo-audit` Issue / Impact / Evidence / Fix / Priority format.
|
|
266
|
+
- [ ] The implementation prompt is self-contained and would not require this conversation to execute.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Error Handling
|
|
271
|
+
|
|
272
|
+
- If the Site Verification API returns `failedVerification`, do not retry blindly — surface the underlying reason (TXT not visible, wrong record, DNSSEC lag) and stop.
|
|
273
|
+
- If `sites_add` fails with 403, the service account is not yet a verified owner — return to Phase 1.
|
|
274
|
+
- If `sites_list` returns empty after a successful `sites_add`, the MCP cached an old session — instruct the user to restart Claude Code or the `gsc` MCP and retry.
|
|
275
|
+
- If `search_analytics_query` returns no rows for a newly verified property, this is expected. Do not mark as failure.
|
|
276
|
+
- If the Indexing API is suggested as a fix, decline it for non-`JobPosting`/`BroadcastEvent` content and explain why.
|
|
277
|
+
- If a skill is unavailable, fall back to the next documented skill and note it in the report.
|