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,10 @@
|
|
|
1
|
+
<svg width="640" height="180" viewBox="0 0 640 180" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="640" height="180" rx="24" fill="#0F172A"/>
|
|
3
|
+
<path d="M88 118L118 58L144 88L172 54L206 118H88Z" fill="#F59E0B"/>
|
|
4
|
+
<path d="M132 88L152 108L172 88" stroke="#0F172A" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<circle cx="138" cy="92" r="4" fill="#0F172A"/>
|
|
6
|
+
<circle cx="166" cy="92" r="4" fill="#0F172A"/>
|
|
7
|
+
<text x="220" y="121" fill="#E5E7EB" font-family="Inter, Arial, sans-serif" font-size="104" font-weight="700" letter-spacing="2">SD</text>
|
|
8
|
+
<text x="387" y="121" fill="#38BDF8" font-family="Inter, Arial, sans-serif" font-size="104" font-weight="700" letter-spacing="2">D</text>
|
|
9
|
+
<text x="219" y="42" fill="#94A3B8" font-family="Inter, Arial, sans-serif" font-size="16" letter-spacing="3.2">JC METHODOLOGY</text>
|
|
10
|
+
</svg>
|
|
Binary file
|
package/bin/akili.js
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const { parseArgs } = require("util");
|
|
7
|
+
|
|
8
|
+
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
9
|
+
const SOURCE_CLAUDE = path.join(PACKAGE_ROOT, ".claude");
|
|
10
|
+
const SOURCE_COMMANDS = path.join(SOURCE_CLAUDE, "commands");
|
|
11
|
+
const SOURCE_SKILLS = path.join(SOURCE_CLAUDE, "skills");
|
|
12
|
+
const SOURCE_TEMPLATES = path.join(SOURCE_CLAUDE, "templates");
|
|
13
|
+
const AGENT_TEMPLATES = ["leader.md", "implementer.md", "reviewer.md"];
|
|
14
|
+
const RESOURCE_SCRIPTS = ["gsc_verify.py", "parse_tests.js"];
|
|
15
|
+
const SOURCE_SCRIPTS = path.join(PACKAGE_ROOT, "scripts");
|
|
16
|
+
const SOURCE_MCP_EXAMPLE = path.join(PACKAGE_ROOT, ".mcp.json.example");
|
|
17
|
+
const BANNER = ` █████╗ ██╗ ██╗██╗██╗ ██╗
|
|
18
|
+
██╔══██╗██║ ██╔╝██║██║ ██║
|
|
19
|
+
███████║█████╔╝ ██║██║ ██║
|
|
20
|
+
██╔══██║██╔═██╗ ██║██║ ██║
|
|
21
|
+
██║ ██║██║ ██╗██║███████╗██║
|
|
22
|
+
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝╚═╝`;
|
|
23
|
+
|
|
24
|
+
// ANSI Colors
|
|
25
|
+
const colors = {
|
|
26
|
+
reset: "\x1b[0m",
|
|
27
|
+
green: "\x1b[32m",
|
|
28
|
+
red: "\x1b[31m",
|
|
29
|
+
yellow: "\x1b[33m",
|
|
30
|
+
cyan: "\x1b[36m",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function formatPath(p) {
|
|
34
|
+
// Normalize paths for display to prefer forward slashes, even on Windows, for consistency in docs/CLI
|
|
35
|
+
return p.split(path.sep).join("/");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Default paths per OS
|
|
39
|
+
const defaultPaths = {
|
|
40
|
+
claude: path.join(os.homedir(), ".claude"),
|
|
41
|
+
opencode: path.join(os.homedir(), ".config", "opencode"),
|
|
42
|
+
antigravity: path.join(os.homedir(), ".gemini"),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Tool Registry defining target directories mapping per tool
|
|
46
|
+
const TOOL_REGISTRY = {
|
|
47
|
+
claude: (rootPath) => ({
|
|
48
|
+
commands: [path.join(rootPath, "commands")],
|
|
49
|
+
skills: path.join(rootPath, "skills"),
|
|
50
|
+
resources: path.join(rootPath, "akili"),
|
|
51
|
+
}),
|
|
52
|
+
opencode: (rootPath) => ({
|
|
53
|
+
commands: [path.join(rootPath, "commands")],
|
|
54
|
+
skills: path.join(rootPath, "skills"),
|
|
55
|
+
resources: path.join(rootPath, "akili"),
|
|
56
|
+
}),
|
|
57
|
+
antigravity: (rootPath) => ({
|
|
58
|
+
commands: [
|
|
59
|
+
path.join(rootPath, "antigravity", "global_workflows"),
|
|
60
|
+
path.join(rootPath, "antigravity-cli", "global_workflows"),
|
|
61
|
+
path.join(rootPath, "antigravity-cli", "workflows"),
|
|
62
|
+
],
|
|
63
|
+
skills: path.join(rootPath, "config", "skills"),
|
|
64
|
+
resources: path.join(rootPath, "config", "akili"),
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
function printHelp() {
|
|
69
|
+
console.log(`AKILI-SPECS Methodology CLI
|
|
70
|
+
|
|
71
|
+
Usage:
|
|
72
|
+
akili <command> [options]
|
|
73
|
+
|
|
74
|
+
Commands:
|
|
75
|
+
install Install commands, skills, and helper resources
|
|
76
|
+
update Reinstall commands, skills, and helper resources
|
|
77
|
+
doctor Check whether expected files are installed
|
|
78
|
+
list List packaged commands, skills, and helper resources
|
|
79
|
+
help Show this help
|
|
80
|
+
|
|
81
|
+
Options:
|
|
82
|
+
--tool <name> Install target: claude, opencode, antigravity, both, or all. Default: claude
|
|
83
|
+
--target <path> Target config directory for selected single tool
|
|
84
|
+
--claude-target Claude config directory. Default: ~/.claude
|
|
85
|
+
--opencode-target OpenCode config directory. Default: ~/.config/opencode
|
|
86
|
+
--antigravity-target Antigravity config directory. Default: ~/.gemini
|
|
87
|
+
--force Overwrite existing files
|
|
88
|
+
--dry-run Show what would happen without writing files
|
|
89
|
+
--commands-only Install or check only commands
|
|
90
|
+
--skills-only Install or check only skills
|
|
91
|
+
--fix Automatically fix missing files during doctor command
|
|
92
|
+
--local, -l Install locally to the current project instead of globally
|
|
93
|
+
|
|
94
|
+
Examples:
|
|
95
|
+
akili init
|
|
96
|
+
akili install
|
|
97
|
+
akili install --local
|
|
98
|
+
akili install --tool opencode
|
|
99
|
+
akili install --tool both --dry-run
|
|
100
|
+
akili install --tool claude --target ./.claude
|
|
101
|
+
akili update --tool both --force
|
|
102
|
+
akili doctor --tool all --fix
|
|
103
|
+
akili list
|
|
104
|
+
`);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function printBanner() {
|
|
108
|
+
console.log(colors.cyan + BANNER + colors.reset);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function fail(message) {
|
|
112
|
+
console.error(`${colors.red}ERROR: ${message}${colors.reset}`);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function resolveUserPath(input) {
|
|
117
|
+
// Works for both ~/path (Unix) and ~\\path (Windows)
|
|
118
|
+
return path.resolve(input.replace(/^~(?=$|\/|\\)/, os.homedir()));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function getArgs() {
|
|
122
|
+
const options = {
|
|
123
|
+
tool: { type: "string", default: "claude" },
|
|
124
|
+
target: { type: "string" },
|
|
125
|
+
"claude-target": { type: "string", default: defaultPaths.claude },
|
|
126
|
+
"opencode-target": { type: "string", default: defaultPaths.opencode },
|
|
127
|
+
"antigravity-target": { type: "string", default: defaultPaths.antigravity },
|
|
128
|
+
force: { type: "boolean", default: false },
|
|
129
|
+
"dry-run": { type: "boolean", default: false },
|
|
130
|
+
"commands-only": { type: "boolean", default: false },
|
|
131
|
+
"skills-only": { type: "boolean", default: false },
|
|
132
|
+
fix: { type: "boolean", default: false },
|
|
133
|
+
local: { type: "boolean", short: "l", default: false },
|
|
134
|
+
help: { type: "boolean", short: "h", default: false },
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
try {
|
|
138
|
+
const { values, positionals } = parseArgs({
|
|
139
|
+
options,
|
|
140
|
+
strict: true,
|
|
141
|
+
allowPositionals: true,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
let command = positionals[0] || "help";
|
|
145
|
+
if (values.help) command = "help";
|
|
146
|
+
|
|
147
|
+
if (values["commands-only"] && values["skills-only"]) {
|
|
148
|
+
fail("Use only one of --commands-only or --skills-only");
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (!["claude", "opencode", "antigravity", "both", "all"].includes(values.tool)) {
|
|
152
|
+
fail("--tool must be one of: claude, opencode, antigravity, both, all");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (values.target && (values.tool === "both" || values.tool === "all")) {
|
|
156
|
+
fail("--target can only be used with a single tool target.");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Resolve paths
|
|
160
|
+
const baseClaude = values.local ? path.join(process.cwd(), ".claude") : defaultPaths.claude;
|
|
161
|
+
const baseOpencode = values.local ? path.join(process.cwd(), ".config", "opencode") : defaultPaths.opencode;
|
|
162
|
+
const baseAntigravity = values.local ? path.join(process.cwd(), ".gemini") : defaultPaths.antigravity;
|
|
163
|
+
|
|
164
|
+
const args = {
|
|
165
|
+
command,
|
|
166
|
+
tool: values.tool,
|
|
167
|
+
force: values.force,
|
|
168
|
+
dryRun: values["dry-run"],
|
|
169
|
+
commandsOnly: values["commands-only"],
|
|
170
|
+
skillsOnly: values["skills-only"],
|
|
171
|
+
fix: values.fix,
|
|
172
|
+
local: values.local,
|
|
173
|
+
claudeTarget: resolveUserPath(values.target && values.tool === "claude" ? values.target : (values["claude-target"] !== defaultPaths.claude ? values["claude-target"] : baseClaude)),
|
|
174
|
+
opencodeTarget: resolveUserPath(values.target && values.tool === "opencode" ? values.target : (values["opencode-target"] !== defaultPaths.opencode ? values["opencode-target"] : baseOpencode)),
|
|
175
|
+
antigravityTarget: resolveUserPath(values.target && values.tool === "antigravity" ? values.target : (values["antigravity-target"] !== defaultPaths.antigravity ? values["antigravity-target"] : baseAntigravity)),
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
return args;
|
|
179
|
+
} catch (err) {
|
|
180
|
+
fail(err.message);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function ensureDirectory(dir, dryRun) {
|
|
185
|
+
if (fs.existsSync(dir)) return;
|
|
186
|
+
if (dryRun) {
|
|
187
|
+
console.log(` ${colors.yellow}would create dir${colors.reset} ${dir}`);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function listEntries(dir, filter) {
|
|
194
|
+
if (!fs.existsSync(dir)) return [];
|
|
195
|
+
return fs
|
|
196
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
197
|
+
.filter(filter)
|
|
198
|
+
.map((entry) => entry.name)
|
|
199
|
+
.sort((a, b) => a.localeCompare(b));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function listCommands() {
|
|
203
|
+
return listEntries(SOURCE_COMMANDS, (entry) => entry.isFile() && entry.name.endsWith(".md"));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function listSkills() {
|
|
207
|
+
return listEntries(SOURCE_SKILLS, (entry) => entry.isDirectory());
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function selectedTools(args) {
|
|
211
|
+
if (args.tool === "both") return ["claude", "opencode"];
|
|
212
|
+
if (args.tool === "all") return ["claude", "opencode", "antigravity"];
|
|
213
|
+
return [args.tool];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function shouldInclude(type, args) {
|
|
217
|
+
if (args.commandsOnly) return type === "commands";
|
|
218
|
+
if (args.skillsOnly) return type === "skills";
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function copySingleFile(sourcePath, targetPath, args) {
|
|
223
|
+
ensureDirectory(path.dirname(targetPath), args.dryRun);
|
|
224
|
+
|
|
225
|
+
if (fs.existsSync(targetPath) && !args.force) {
|
|
226
|
+
console.log(` ${colors.yellow}skip existing${colors.reset} ${targetPath}`);
|
|
227
|
+
return { installed: 0, skipped: 1 };
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const action = fs.existsSync(targetPath) ? "overwrite" : "install";
|
|
231
|
+
console.log(` ${colors.green}${args.dryRun ? "would " : ""}${action}${colors.reset} ${targetPath}`);
|
|
232
|
+
|
|
233
|
+
if (!args.dryRun) {
|
|
234
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return { installed: 1, skipped: 0 };
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function copyDirectoryContents(sourceDir, targetDir, args) {
|
|
241
|
+
ensureDirectory(targetDir, args.dryRun);
|
|
242
|
+
|
|
243
|
+
const entries = fs.readdirSync(sourceDir, { withFileTypes: true });
|
|
244
|
+
let installed = 0;
|
|
245
|
+
let skipped = 0;
|
|
246
|
+
|
|
247
|
+
for (const entry of entries) {
|
|
248
|
+
const sourcePath = path.join(sourceDir, entry.name);
|
|
249
|
+
const targetPath = path.join(targetDir, entry.name);
|
|
250
|
+
|
|
251
|
+
if (fs.existsSync(targetPath) && !args.force) {
|
|
252
|
+
console.log(` ${colors.yellow}skip existing${colors.reset} ${targetPath}`);
|
|
253
|
+
skipped += 1;
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const action = fs.existsSync(targetPath) ? "overwrite" : "install";
|
|
258
|
+
console.log(` ${colors.green}${args.dryRun ? "would " : ""}${action}${colors.reset} ${targetPath}`);
|
|
259
|
+
|
|
260
|
+
if (!args.dryRun) {
|
|
261
|
+
fs.cpSync(sourcePath, targetPath, {
|
|
262
|
+
recursive: true,
|
|
263
|
+
force: true,
|
|
264
|
+
errorOnExist: false,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
installed += 1;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return { installed, skipped };
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function getToolRegistryInfo(tool, args) {
|
|
274
|
+
const rootPath =
|
|
275
|
+
tool === "claude"
|
|
276
|
+
? args.claudeTarget
|
|
277
|
+
: tool === "opencode"
|
|
278
|
+
? args.opencodeTarget
|
|
279
|
+
: args.antigravityTarget;
|
|
280
|
+
return { rootPath, paths: TOOL_REGISTRY[tool](rootPath) };
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function installTool(tool, args) {
|
|
284
|
+
const { rootPath, paths } = getToolRegistryInfo(tool, args);
|
|
285
|
+
|
|
286
|
+
let installed = 0;
|
|
287
|
+
let skipped = 0;
|
|
288
|
+
|
|
289
|
+
console.log(`\n${colors.cyan}${tool.toUpperCase()} target: ${rootPath}${colors.reset}`);
|
|
290
|
+
|
|
291
|
+
if (shouldInclude("commands", args)) {
|
|
292
|
+
for (const targetCommands of paths.commands) {
|
|
293
|
+
const result = copyDirectoryContents(SOURCE_COMMANDS, targetCommands, args);
|
|
294
|
+
installed += result.installed;
|
|
295
|
+
skipped += result.skipped;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (shouldInclude("skills", args)) {
|
|
300
|
+
const result = copyDirectoryContents(SOURCE_SKILLS, paths.skills, args);
|
|
301
|
+
installed += result.installed;
|
|
302
|
+
skipped += result.skipped;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (shouldInclude("resources", args)) {
|
|
306
|
+
for (const scriptName of RESOURCE_SCRIPTS) {
|
|
307
|
+
const result = copySingleFile(
|
|
308
|
+
path.join(SOURCE_SCRIPTS, scriptName),
|
|
309
|
+
path.join(paths.resources, "scripts", scriptName),
|
|
310
|
+
args
|
|
311
|
+
);
|
|
312
|
+
installed += result.installed;
|
|
313
|
+
skipped += result.skipped;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
for (const templateName of AGENT_TEMPLATES) {
|
|
317
|
+
const result = copySingleFile(
|
|
318
|
+
path.join(SOURCE_TEMPLATES, templateName),
|
|
319
|
+
path.join(paths.resources, "templates", templateName),
|
|
320
|
+
args
|
|
321
|
+
);
|
|
322
|
+
installed += result.installed;
|
|
323
|
+
skipped += result.skipped;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const mcpResult = copySingleFile(
|
|
327
|
+
SOURCE_MCP_EXAMPLE,
|
|
328
|
+
path.join(paths.resources, ".mcp.json.example"),
|
|
329
|
+
args
|
|
330
|
+
);
|
|
331
|
+
installed += mcpResult.installed;
|
|
332
|
+
skipped += mcpResult.skipped;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return { installed, skipped };
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function runInstall(args) {
|
|
339
|
+
let installed = 0;
|
|
340
|
+
let skipped = 0;
|
|
341
|
+
|
|
342
|
+
for (const tool of selectedTools(args)) {
|
|
343
|
+
const result = installTool(tool, args);
|
|
344
|
+
installed += result.installed;
|
|
345
|
+
skipped += result.skipped;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
console.log(`\nDone. Installed: ${installed} | Skipped: ${skipped}`);
|
|
349
|
+
if (skipped > 0 && !args.force) {
|
|
350
|
+
console.log(`Use ${colors.yellow}--force${colors.reset} to overwrite existing files.`);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (selectedTools(args).includes("opencode") && !args.dryRun) {
|
|
354
|
+
console.log(`Restart ${colors.cyan}OpenCode${colors.reset} for installed commands and skills to be loaded.`);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function runList() {
|
|
359
|
+
const commands = listCommands();
|
|
360
|
+
const skills = listSkills();
|
|
361
|
+
console.log(`\n${colors.cyan}Commands:${colors.reset}`);
|
|
362
|
+
commands.forEach((name) => console.log(` ${name.replace(/\.md$/, "")}`));
|
|
363
|
+
|
|
364
|
+
console.log(`\n${colors.cyan}Skills:${colors.reset}`);
|
|
365
|
+
skills.forEach((name) => console.log(` ${name}`));
|
|
366
|
+
|
|
367
|
+
console.log(`\n${colors.cyan}Resources:${colors.reset}`);
|
|
368
|
+
RESOURCE_SCRIPTS.forEach((name) => console.log(` ${formatPath(path.join("scripts", name))}`));
|
|
369
|
+
AGENT_TEMPLATES.forEach((name) => console.log(` ${formatPath(path.join("templates", name))}`));
|
|
370
|
+
console.log(" .mcp.json.example");
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function hasInstalledCommand(targetCommandsList, name) {
|
|
374
|
+
for (const targetCommands of targetCommandsList) {
|
|
375
|
+
if (fs.existsSync(path.join(targetCommands, name))) {
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
function doctorTool(tool, args) {
|
|
383
|
+
const { rootPath, paths } = getToolRegistryInfo(tool, args);
|
|
384
|
+
let missing = 0;
|
|
385
|
+
let fixed = 0;
|
|
386
|
+
|
|
387
|
+
console.log(`\n${colors.cyan}Checking ${tool.toUpperCase()}: ${rootPath}${colors.reset}`);
|
|
388
|
+
|
|
389
|
+
if (shouldInclude("commands", args)) {
|
|
390
|
+
console.log(`\n${colors.yellow}Commands:${colors.reset}`);
|
|
391
|
+
for (const command of listCommands()) {
|
|
392
|
+
const ok = hasInstalledCommand(paths.commands, command);
|
|
393
|
+
if (ok) {
|
|
394
|
+
console.log(` ${colors.green}OK${colors.reset} ${command}`);
|
|
395
|
+
} else {
|
|
396
|
+
if (args.fix) {
|
|
397
|
+
const targetPath = path.join(paths.commands[0], command);
|
|
398
|
+
copySingleFile(path.join(SOURCE_COMMANDS, command), targetPath, { force: true, dryRun: false });
|
|
399
|
+
console.log(` ${colors.cyan}FIXED${colors.reset} ${command}`);
|
|
400
|
+
fixed += 1;
|
|
401
|
+
} else {
|
|
402
|
+
console.log(` ${colors.red}MISSING${colors.reset} ${command}`);
|
|
403
|
+
missing += 1;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (shouldInclude("skills", args)) {
|
|
410
|
+
console.log(`\n${colors.yellow}Skills:${colors.reset}`);
|
|
411
|
+
for (const skill of listSkills()) {
|
|
412
|
+
const ok = fs.existsSync(path.join(paths.skills, skill, "SKILL.md"));
|
|
413
|
+
if (ok) {
|
|
414
|
+
console.log(` ${colors.green}OK${colors.reset} ${skill}`);
|
|
415
|
+
} else {
|
|
416
|
+
if (args.fix) {
|
|
417
|
+
copyDirectoryContents(path.join(SOURCE_SKILLS, skill), path.join(paths.skills, skill), { force: true, dryRun: false });
|
|
418
|
+
console.log(` ${colors.cyan}FIXED${colors.reset} ${skill}`);
|
|
419
|
+
fixed += 1;
|
|
420
|
+
} else {
|
|
421
|
+
console.log(` ${colors.red}MISSING${colors.reset} ${skill}`);
|
|
422
|
+
missing += 1;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (shouldInclude("resources", args)) {
|
|
429
|
+
console.log(`\n${colors.yellow}Resources:${colors.reset}`);
|
|
430
|
+
const resourceChecks = [
|
|
431
|
+
{ src: path.join(SOURCE_SCRIPTS, "gsc_verify.py"), dest: path.join(paths.resources, "scripts", "gsc_verify.py") },
|
|
432
|
+
{ src: path.join(SOURCE_SCRIPTS, "parse_tests.js"), dest: path.join(paths.resources, "scripts", "parse_tests.js") },
|
|
433
|
+
{ src: SOURCE_MCP_EXAMPLE, dest: path.join(paths.resources, ".mcp.json.example") },
|
|
434
|
+
...AGENT_TEMPLATES.map((name) => ({
|
|
435
|
+
src: path.join(SOURCE_TEMPLATES, name),
|
|
436
|
+
dest: path.join(paths.resources, "templates", name),
|
|
437
|
+
})),
|
|
438
|
+
];
|
|
439
|
+
|
|
440
|
+
for (const check of resourceChecks) {
|
|
441
|
+
const ok = fs.existsSync(check.dest);
|
|
442
|
+
if (ok) {
|
|
443
|
+
console.log(` ${colors.green}OK${colors.reset} ${check.dest}`);
|
|
444
|
+
} else {
|
|
445
|
+
if (args.fix) {
|
|
446
|
+
copySingleFile(check.src, check.dest, { force: true, dryRun: false });
|
|
447
|
+
console.log(` ${colors.cyan}FIXED${colors.reset} ${check.dest}`);
|
|
448
|
+
fixed += 1;
|
|
449
|
+
} else {
|
|
450
|
+
console.log(` ${colors.red}MISSING${colors.reset} ${check.dest}`);
|
|
451
|
+
missing += 1;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
return { missing, fixed };
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function runDoctor(args) {
|
|
461
|
+
let missingTotal = 0;
|
|
462
|
+
let fixedTotal = 0;
|
|
463
|
+
|
|
464
|
+
for (const tool of selectedTools(args)) {
|
|
465
|
+
const { missing, fixed } = doctorTool(tool, args);
|
|
466
|
+
missingTotal += missing;
|
|
467
|
+
fixedTotal += fixed;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
console.log(`\nDone. Missing: ${missingTotal} | Fixed: ${fixedTotal}`);
|
|
471
|
+
if (missingTotal > 0) {
|
|
472
|
+
console.log(`Run ${colors.cyan}akili doctor --fix${colors.reset} to auto-repair missing files.`);
|
|
473
|
+
process.exitCode = 1;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const readline = require("readline/promises");
|
|
478
|
+
|
|
479
|
+
async function runInteractiveInit() {
|
|
480
|
+
const rl = readline.createInterface({
|
|
481
|
+
input: process.stdin,
|
|
482
|
+
output: process.stdout,
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
console.log(`\n${colors.cyan}Welcome to the AKILI-SPECS Setup!${colors.reset}`);
|
|
486
|
+
console.log("Let's configure your AI-assisted development environment.\n");
|
|
487
|
+
|
|
488
|
+
const toolAnswer = await rl.question(
|
|
489
|
+
`Which tool do you want to install AKILI-SPECS for?\n` +
|
|
490
|
+
` 1) Claude Code\n` +
|
|
491
|
+
` 2) OpenCode\n` +
|
|
492
|
+
` 3) Google Antigravity\n` +
|
|
493
|
+
` 4) Both (Claude Code + OpenCode)\n` +
|
|
494
|
+
` 5) All three\n` +
|
|
495
|
+
`${colors.cyan}>${colors.reset} `
|
|
496
|
+
);
|
|
497
|
+
|
|
498
|
+
let tool = "claude";
|
|
499
|
+
if (toolAnswer.trim() === "2") tool = "opencode";
|
|
500
|
+
else if (toolAnswer.trim() === "3") tool = "antigravity";
|
|
501
|
+
else if (toolAnswer.trim() === "4") tool = "both";
|
|
502
|
+
else if (toolAnswer.trim() === "5") tool = "all";
|
|
503
|
+
|
|
504
|
+
console.log("");
|
|
505
|
+
const scopeAnswer = await rl.question(
|
|
506
|
+
`Do you want to install it globally or locally for this specific project?\n` +
|
|
507
|
+
` 1) Globally (available in all your projects)\n` +
|
|
508
|
+
` 2) Locally (only for this project workspace)\n` +
|
|
509
|
+
`${colors.cyan}>${colors.reset} `
|
|
510
|
+
);
|
|
511
|
+
|
|
512
|
+
const isLocal = scopeAnswer.trim() === "2";
|
|
513
|
+
rl.close();
|
|
514
|
+
|
|
515
|
+
const args = {
|
|
516
|
+
command: "install",
|
|
517
|
+
tool: tool,
|
|
518
|
+
force: false,
|
|
519
|
+
dryRun: false,
|
|
520
|
+
commandsOnly: false,
|
|
521
|
+
skillsOnly: false,
|
|
522
|
+
fix: false,
|
|
523
|
+
local: isLocal,
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
if (isLocal) {
|
|
527
|
+
const cwd = process.cwd();
|
|
528
|
+
args.claudeTarget = path.join(cwd, ".claude");
|
|
529
|
+
args.opencodeTarget = path.join(cwd, ".config", "opencode");
|
|
530
|
+
args.antigravityTarget = path.join(cwd, ".gemini");
|
|
531
|
+
console.log(`\n${colors.yellow}Setting up local project installation...${colors.reset}`);
|
|
532
|
+
} else {
|
|
533
|
+
args.claudeTarget = defaultPaths.claude;
|
|
534
|
+
args.opencodeTarget = defaultPaths.opencode;
|
|
535
|
+
args.antigravityTarget = defaultPaths.antigravity;
|
|
536
|
+
console.log(`\n${colors.yellow}Setting up global installation...${colors.reset}`);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
runInstall(args);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
async function main() {
|
|
543
|
+
const args = getArgs();
|
|
544
|
+
|
|
545
|
+
if (args.command !== "help" && args.command !== "list" && args.command !== "init") {
|
|
546
|
+
printBanner();
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if (process.argv.length === 2 || args.command === "init") {
|
|
550
|
+
printBanner();
|
|
551
|
+
await runInteractiveInit();
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
switch (args.command) {
|
|
556
|
+
case "install":
|
|
557
|
+
case "update":
|
|
558
|
+
runInstall(args);
|
|
559
|
+
break;
|
|
560
|
+
case "doctor":
|
|
561
|
+
runDoctor(args);
|
|
562
|
+
break;
|
|
563
|
+
case "list":
|
|
564
|
+
runList();
|
|
565
|
+
break;
|
|
566
|
+
case "help":
|
|
567
|
+
printHelp();
|
|
568
|
+
break;
|
|
569
|
+
default:
|
|
570
|
+
fail(`Unknown command: ${args.command}`);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
main();
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# AKILI Documentation
|
|
2
|
+
|
|
3
|
+
AKILI is the documented form of the AKILI-SPECS methodology: a constitution-first, spec-driven workflow for Claude Code and OpenCode.
|
|
4
|
+
|
|
5
|
+
Use this documentation when you want the human-facing reference. The installable source prompts and skills remain under `.claude/commands/` and `.claude/skills/`.
|
|
6
|
+
|
|
7
|
+
## Start Here
|
|
8
|
+
|
|
9
|
+
- [Flow](flow.md) - end-to-end methodology lifecycle from constitution to archive
|
|
10
|
+
- [Model Routing](model-routing.md) - capability-tier model selection per AKILI-SPECS phase for Claude Code and OpenCode
|
|
11
|
+
- [CLI](cli.md) - `akili` terminal reference for install, update, list, and doctor
|
|
12
|
+
- [Commands](commands/README.md) - slash command reference
|
|
13
|
+
- [Skills](skills/README.md) - packaged skill inventory and usage guidance
|
|
14
|
+
- [OpenSpec comparison](openspec-comparison.md) - what AKILI borrows from OpenSpec and where it differs
|
|
15
|
+
- [Release checklist](release-checklist.md) - controlled npm release process
|
|
16
|
+
|
|
17
|
+
## Quick Flow
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
/akili-constitution
|
|
21
|
+
/akili-propose <change-name-or-spec-path>
|
|
22
|
+
/akili-specify <spec-path>
|
|
23
|
+
/akili-execute <spec-path>
|
|
24
|
+
/akili-test <spec-path>
|
|
25
|
+
/akili-validate <spec-path>
|
|
26
|
+
/akili-archive <spec-path>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use `/akili-seo <site-domain>` independently when you need Google Search Console setup and SEO audit reports.
|
|
30
|
+
|
|
31
|
+
## Documentation Map
|
|
32
|
+
|
|
33
|
+
| Topic | File | Use When |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Flow | [flow.md](flow.md) | You need the lifecycle, artifacts, review gates, and project modes |
|
|
36
|
+
| Model Routing | [model-routing.md](model-routing.md) | You need to choose which model runs each AKILI-SPECS phase across Claude Code and OpenCode |
|
|
37
|
+
| CLI | [cli.md](cli.md) | You need install/update/list/doctor options or install paths |
|
|
38
|
+
| Commands | [commands/README.md](commands/README.md) | You need command purpose, inputs, outputs, and sequencing |
|
|
39
|
+
| Skills | [skills/README.md](skills/README.md) | You need to know which packaged skill supports which work |
|
|
40
|
+
| OpenSpec comparison | [openspec-comparison.md](openspec-comparison.md) | You want to understand the relationship to OpenSpec patterns |
|
|
41
|
+
|
|
42
|
+
## Source Of Truth
|
|
43
|
+
|
|
44
|
+
- Command implementation prompts: `.claude/commands/*.md`
|
|
45
|
+
- Skill implementation prompts: `.claude/skills/*/SKILL.md`
|
|
46
|
+
- Multi-agent harness templates: `.claude/templates/{leader,implementer,reviewer}.md` (deployed into each project's `.agents/` by `/akili-constitution`)
|
|
47
|
+
- CLI implementation: `bin/akili.js`
|
|
48
|
+
- Release automation: `scripts/release.js` and `scripts/release-status.js`
|