kratos-framework 1.27.55

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/README.md ADDED
@@ -0,0 +1,487 @@
1
+ # KRATOS — Generative Agile Intelligence Architecture
2
+
3
+ [![Framework](https://img.shields.io/badge/framework-v1.27.4-blue)]()
4
+ [![License](https://img.shields.io/badge/license-AGPL--3.0-green)]()
5
+ [![Agents](https://img.shields.io/badge/agents-15-purple)]()
6
+ [![Workflows](https://img.shields.io/badge/workflows-64-orange)]()
7
+
8
+ AI agent framework for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [GitHub Copilot](https://github.com/features/copilot) that orchestrates software product development through **15 specialized agents**, **64 workflows**, and **8 shared skills** — from initial research all the way to deployment.
9
+
10
+ KRATOS is a fork of the original GAIA framework. Upstream attribution: https://github.com/jlouage/Gaia-framework
11
+
12
+ > **KRATOS is the lightweight edition of GAIA.** It ships with 15 agents optimized for fast, low-token-cost development workflows. If you need the full 25-agent experience — including a dedicated Technical Writer (Iris), Data Engineer (Milo), Performance Specialist (Juno), and 6 individual Creative agents — use the [GAIA framework](https://github.com/jlouage/Gaia-framework), the parent project this was forked from.
13
+
14
+ ### Why KRATOS?
15
+
16
+ Using Claude Code or GitHub Copilot alone, you prompt an AI assistant. With KRATOS, you manage a **team of AI specialists** that follow a proven product lifecycle:
17
+
18
+ - **Structured lifecycle** — 5 phases from analysis to deployment, with quality gates that enforce standards at every transition
19
+ - **15 specialized agents** — each with a persona, domain expertise, and persistent memory that improves over time
20
+ - **Built-in quality gates** — 17 enforced gates that HALT workflows when standards aren't met (not advisory — hard stops)
21
+ - **6-gate review process** — every story passes code review, QA, security, test automation, test review, and performance review before completion
22
+ - **Checkpoint/resume** — long-running workflows survive context loss with sha256-verified checkpoints
23
+ - **Brownfield support** — onboard existing codebases with automated discovery, documentation generation, and gap analysis
24
+
25
+ ---
26
+
27
+ ## Prerequisites
28
+
29
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (requires Anthropic account)
30
+ - Node.js 18+
31
+ - Git
32
+
33
+ ## Editor Support
34
+
35
+ - Claude Code: full support, including `/kratos-*` slash commands and model-specific routing.
36
+ - GitHub Copilot: supported through repository instructions in `.github/copilot-instructions.md`. Copilot does not use Claude slash-command frontmatter, so use the documented KRATOS workflows and file conventions rather than expecting slash-command model routing.
37
+
38
+ ---
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ # Install KRATOS into your project
44
+ npx kratos-framework init ~/my-project
45
+
46
+ # Open in Claude Code
47
+ cd ~/my-project && claude
48
+
49
+ # Generate pre-resolved configs (one-time setup)
50
+ /kratos-build-configs
51
+ ```
52
+
53
+ Then try your first workflow:
54
+
55
+ ```bash
56
+ # Describe a small feature and get a tech spec in 30 seconds
57
+ /kratos-quick-spec
58
+
59
+ # Implement it immediately
60
+ /kratos-quick-dev
61
+ ```
62
+
63
+ Or launch the orchestrator to explore all capabilities:
64
+
65
+ ```bash
66
+ /kratos
67
+ ```
68
+
69
+ ### 5 essential commands
70
+
71
+ | Command | What it does |
72
+ |---------|-------------|
73
+ | `/kratos` | Launch the orchestrator — shows categories and routes you |
74
+ | `/kratos-dev-story` | Implement a user story end-to-end |
75
+ | `/kratos-quick-spec` | Create a rapid tech spec for small changes |
76
+ | `/kratos-quick-dev` | Implement a quick spec |
77
+ | `/kratos-help` | Context-sensitive help for wherever you are |
78
+
79
+ ---
80
+
81
+ ## Installation
82
+
83
+ ### Using npx (recommended)
84
+
85
+ ```bash
86
+ npx kratos-framework init .
87
+ ```
88
+
89
+ ```bash
90
+ # Install into a specific directory
91
+ npx kratos-framework init ~/my-new-project
92
+
93
+ # Skip interactive prompts
94
+ npx kratos-framework init --yes ~/my-project
95
+ ```
96
+
97
+ ### Using the shell script
98
+
99
+ ```bash
100
+ git clone https://github.com/your-account/Kratos-framework.git
101
+ bash Kratos-framework/kratos-install.sh init ~/my-project
102
+ ```
103
+
104
+ Replace `your-account` with your fork owner, or use `KRATOS_REPO_URL` with the published package.
105
+
106
+ ### Installing from your fork or private mirror
107
+
108
+ ```bash
109
+ KRATOS_REPO_URL=https://github.com/your-account/Kratos-framework.git npx kratos-framework init .
110
+ ```
111
+
112
+ ```bash
113
+ bash kratos-install.sh init --minimal .
114
+ ```
115
+
116
+ ### What the installer does
117
+
118
+ 1. Copies the `_kratos/` framework into your project
119
+ 2. Creates `docs/` artifact directories (planning, implementation, test, creative)
120
+ 3. Creates memory sidecar directories
121
+ 4. Prompts for project name and user name → writes to `global.yaml`
122
+ 5. Copies `CLAUDE.md` to your project root
123
+ 6. Installs 104 slash commands to `.claude/commands/`
124
+ 7. Appends KRATOS entries to `.gitignore`
125
+ 8. Supports a `--minimal` profile that installs only the core engine, quick-flow workflows, and senior developer entrypoints
126
+
127
+ ### Updating
128
+
129
+ ```bash
130
+ npx kratos-framework update .
131
+ ```
132
+
133
+ Update refreshes all framework files while preserving your configuration, agent memory, and `CLAUDE.md`. Changed files are backed up to `_kratos/_backups/{timestamp}/`.
134
+
135
+ ### Validating
136
+
137
+ ```bash
138
+ npx kratos-framework validate . # 32 integrity checks
139
+ npx kratos-framework status . # version, module list, command count
140
+ ```
141
+
142
+ ---
143
+
144
+ ## How It Works
145
+
146
+ ### 5-phase product lifecycle
147
+
148
+ ```
149
+ Phase 1: Analysis → Phase 2: Planning → Phase 3: Solutioning → Phase 4: Implementation → Phase 5: Deployment
150
+ (Elena) (Derek/Christy) (Theo/Zara/Soren) (Nate/Dev Agents) (Soren)
151
+ ```
152
+
153
+ Every phase has **quality gates** — enforced checks that halt the workflow if prerequisites aren't met. You can't create an architecture without a reviewed PRD. You can't start a sprint without a readiness check. You can't deploy without passing all reviews.
154
+
155
+ ### Entry points
156
+
157
+ | Path | Command | When to use |
158
+ |------|---------|-------------|
159
+ | New project | Start at Phase 1 | Greenfield — building from scratch |
160
+ | Existing project | `/kratos-brownfield` | Brownfield — onboarding existing codebase |
161
+ | Small change | `/kratos-quick-spec` | Under 5 files, under 1 day |
162
+ | Resume | `/kratos-resume` | Continue after context loss |
163
+
164
+ ### Model assignment
165
+
166
+ Each command declares which Claude model to use. **Opus** handles deep reasoning, architectural decisions, and complex analysis (27 commands). **Sonnet** handles structured generation, template-following, and status reporting (77 commands). Claude Code applies the model at slash-command invocation time, so `/kratos` and the agent menus hand you the exact slash command to run for the selected workflow.
167
+
168
+ ### Execution modes
169
+
170
+ Workflows support three modes: **normal** (pauses for confirmation at each checkpoint), **YOLO** (auto-proceeds without pausing), and **planning** (presents a structured execution plan for approval before any steps run). You can switch between normal and YOLO mid-workflow.
171
+
172
+ ---
173
+
174
+ ## Agents
175
+
176
+ Every agent has a name, persona, and specialization. Activate any agent directly with `/kratos-agent-{name}` or let the orchestrator route you.
177
+
178
+ ### Lifecycle Agents
179
+
180
+ | Agent | Name | Specialization | Command |
181
+ |-------|------|---------------|---------|
182
+ | Orchestrator | Kratos | Routes requests, manages resources | `/kratos` |
183
+ | Business Analyst | Elena | Market research, domain analysis, product briefs | `/kratos-agent-analyst` |
184
+ | Product Manager | Derek | PRDs, requirements, stakeholder alignment | `/kratos-agent-pm` |
185
+ | UX Designer | Christy | User research, interaction design, UI patterns | `/kratos-agent-ux-designer` |
186
+ | System Architect | Theo | Architecture design, technical decisions, readiness | `/kratos-agent-architect` |
187
+ | Scrum Master | Nate | Sprint planning, story prep, agile ceremonies | `/kratos-agent-sm` |
188
+ | QA Engineer | Vera | Test automation, API testing, E2E testing, performance review | `/kratos-agent-qa` |
189
+ | Security Expert | Zara | Threat modeling, OWASP reviews, compliance | `/kratos-agent-security` |
190
+ | DevOps Engineer | Soren | Infrastructure, deployment, rollback planning | `/kratos-agent-devops` |
191
+
192
+ ### Developer Agents
193
+
194
+ All developer agents extend a shared base with common delivery rules. KRATOS now uses role-based senior developers instead of language-specific personas.
195
+
196
+ | Agent | Name | Focus | Command |
197
+ |-------|------|-------|---------|
198
+ | Senior Frontend Developer | Avery | UI architecture, accessibility, client-side performance | `/kratos-agent-senior-frontend` |
199
+ | Senior Backend Developer | Rowan | APIs, services, persistence, reliability | `/kratos-agent-senior-backend` |
200
+ | Senior Fullstack Developer | Jordan | Cross-cutting implementation and end-to-end delivery | `/kratos-agent-senior-fullstack` |
201
+
202
+ ### Creative Agents
203
+
204
+ Six creative specializations are consolidated into two context-efficient composite agents. Each agent uses sectioned loading — only the relevant section is loaded per workflow invocation.
205
+
206
+ | Agent | Names | Specialization | Command |
207
+ |-------|-------|---------------|---------|
208
+ | Creative Ideation | Rex / Nova / Lyra | Brainstorming, problem-solving, design thinking | `/kratos-agent-brainstorming`, `/kratos-problem-solving`, `/kratos-design-thinking` |
209
+ | Creative Communications | Orion / Elara / Vermeer | Innovation strategy, storytelling, presentations | `/kratos-agent-innovation`, `/kratos-storytelling`, `/kratos-slide-deck` |
210
+
211
+ > For dedicated single-persona creative agents (Rex, Nova, Lyra, Orion, Elara, Vermeer as separate files), see [GAIA](https://github.com/jlouage/Gaia-framework).
212
+
213
+ ### Testing Agent
214
+
215
+ | Agent | Name | Specialization | Command |
216
+ |-------|------|---------------|---------|
217
+ | Test Architect | Sable | Test architecture, risk-based testing, quality gates | `/kratos-agent-test-architect` |
218
+
219
+ ---
220
+
221
+ ## Workflows
222
+
223
+ Workflows are structured multi-step processes. Each has a `workflow.yaml` config, `instructions.xml` with step-by-step guidance, and a `checklist.md` for quality gates.
224
+
225
+ ### Phase 1: Analysis
226
+
227
+ | Command | Workflow | Agent | Model | Output |
228
+ |---------|----------|-------|-------|--------|
229
+ | `/kratos-brainstorm` | Brainstorm Project | Elena | Sonnet | `docs/planning-artifacts/` |
230
+ | `/kratos-market-research` | Market Research | Elena | Sonnet | `docs/planning-artifacts/` |
231
+ | `/kratos-domain-research` | Domain Research | Elena | Sonnet | `docs/planning-artifacts/` |
232
+ | `/kratos-tech-research` | Technical Research | Elena | Sonnet | `docs/planning-artifacts/` |
233
+ | `/kratos-product-brief` | Create Product Brief | Elena | Sonnet | `docs/planning-artifacts/` |
234
+
235
+ ### Phase 2: Planning
236
+
237
+ | Command | Workflow | Agent | Model | Output |
238
+ |---------|----------|-------|-------|--------|
239
+ | `/kratos-create-prd` | Create PRD | Derek | Opus | `docs/planning-artifacts/` |
240
+ | `/kratos-validate-prd` | Validate PRD | Derek | Sonnet | `docs/planning-artifacts/` |
241
+ | `/kratos-edit-prd` | Edit PRD | Derek | Opus | `docs/planning-artifacts/` |
242
+ | `/kratos-create-ux` | Create UX Design | Christy | Opus | `docs/planning-artifacts/` |
243
+
244
+ ### Phase 3: Solutioning
245
+
246
+ | Command | Workflow | Agent | Model | Output |
247
+ |---------|----------|-------|-------|--------|
248
+ | `/kratos-create-arch` | Create Architecture | Theo | Opus | `docs/planning-artifacts/` |
249
+ | `/kratos-create-epics` | Create Epics & Stories | Derek | Opus | `docs/planning-artifacts/` |
250
+ | `/kratos-readiness-check` | Implementation Readiness | Theo | Opus | `docs/planning-artifacts/` |
251
+ | `/kratos-threat-model` | Security Threat Model | Zara | Opus | `docs/planning-artifacts/` |
252
+ | `/kratos-infra-design` | Infrastructure Design | Soren | Opus | `docs/planning-artifacts/` |
253
+
254
+ ### Phase 4: Implementation
255
+
256
+ | Command | Workflow | Agent | Model | Output |
257
+ |---------|----------|-------|-------|--------|
258
+ | `/kratos-sprint-plan` | Sprint Planning | Nate | Sonnet | `docs/implementation-artifacts/` |
259
+ | `/kratos-sprint-status` | Sprint Status | Nate | Sonnet | `docs/implementation-artifacts/` |
260
+ | `/kratos-epic-status` | Epic Status | Nate | Sonnet | `docs/implementation-artifacts/` |
261
+ | `/kratos-create-story` | Create Story | Derek | Sonnet | `docs/implementation-artifacts/` |
262
+ | `/kratos-validate-story` | Validate Story | Derek | Sonnet | `docs/implementation-artifacts/` |
263
+ | `/kratos-fix-story` | Fix Story | Nate | Sonnet | `docs/implementation-artifacts/` |
264
+ | `/kratos-dev-story` | Dev Story | Stack dev | Opus | `docs/implementation-artifacts/` |
265
+ | `/kratos-code-review` | Code Review | Stack dev | Opus | `docs/implementation-artifacts/` |
266
+ | `/kratos-qa-tests` | QA Generate Tests | Vera | Opus | `docs/implementation-artifacts/` |
267
+ | `/kratos-security-review` | Security Review | Zara | Opus | `docs/implementation-artifacts/` |
268
+ | `/kratos-triage-findings` | Triage Findings | Nate | Sonnet | `docs/implementation-artifacts/` |
269
+ | `/kratos-tech-debt-review` | Tech Debt Review | Nate | Sonnet | `docs/implementation-artifacts/` |
270
+ | `/kratos-change-request` | Change Request | Derek | Opus | `docs/planning-artifacts/` |
271
+ | `/kratos-add-stories` | Add Stories | Derek | Sonnet | `docs/planning-artifacts/` |
272
+ | `/kratos-correct-course` | Correct Course | Nate | Sonnet | `docs/implementation-artifacts/` |
273
+ | `/kratos-retro` | Retrospective | Nate | Sonnet | `docs/implementation-artifacts/` |
274
+
275
+ ### Phase 5: Deployment
276
+
277
+ | Command | Workflow | Agent | Model | Output |
278
+ |---------|----------|-------|-------|--------|
279
+ | `/kratos-release-plan` | Release Plan | Soren | Sonnet | `docs/implementation-artifacts/` |
280
+ | `/kratos-deploy-checklist` | Deployment Checklist | Soren | Sonnet | `docs/implementation-artifacts/` |
281
+ | `/kratos-post-deploy` | Post-Deploy Verify | Soren | Sonnet | `docs/implementation-artifacts/` |
282
+ | `/kratos-rollback-plan` | Rollback Plan | Soren | Sonnet | `docs/implementation-artifacts/` |
283
+
284
+ ### Quick Flow
285
+
286
+ | Command | Workflow | Model | Description |
287
+ |---------|----------|-------|-------------|
288
+ | `/kratos-quick-spec` | Quick Spec | Sonnet | Rapid tech spec — skip full PRD |
289
+ | `/kratos-quick-dev` | Quick Dev | Sonnet | Implement a quick spec immediately |
290
+
291
+ ### Creative Workflows
292
+
293
+ | Command | Workflow | Agent | Model | Output |
294
+ |---------|----------|-------|-------|--------|
295
+ | `/kratos-creative-sprint` | Creative Sprint | Multi-agent | Opus | `docs/creative-artifacts/` |
296
+ | `/kratos-design-thinking` | Design Thinking | Lyra | Opus | `docs/creative-artifacts/` |
297
+ | `/kratos-innovation` | Innovation Strategy | Orion | Opus | `docs/creative-artifacts/` |
298
+ | `/kratos-problem-solving` | Problem Solving | Nova | Opus | `docs/creative-artifacts/` |
299
+ | `/kratos-storytelling` | Storytelling | Elara | Sonnet | `docs/creative-artifacts/` |
300
+ | `/kratos-slide-deck` | Slide Deck | Vermeer | Sonnet | `docs/creative-artifacts/` |
301
+ | `/kratos-pitch-deck` | Pitch Deck | Vermeer | Sonnet | `docs/creative-artifacts/` |
302
+
303
+ ### Testing Workflows
304
+
305
+ Testing workflows are **integrated into the main lifecycle** — they are not optional standalone tools.
306
+
307
+ | Command | Workflow | Agent | Model | Output |
308
+ |---------|----------|-------|-------|--------|
309
+ | `/kratos-test-design` | Test Design | Sable | Opus | `docs/test-artifacts/` |
310
+ | `/kratos-test-framework` | Test Framework | Sable | Sonnet | `docs/test-artifacts/` |
311
+ | `/kratos-atdd` | ATDD | Sable | Sonnet | `docs/test-artifacts/` |
312
+ | `/kratos-test-automate` | Test Automation | Sable | Sonnet | `docs/test-artifacts/` |
313
+ | `/kratos-test-review` | Test Review | Sable | Sonnet | `docs/test-artifacts/` |
314
+ | `/kratos-ci-setup` | CI Setup | Sable | Sonnet | `docs/test-artifacts/` |
315
+ | `/kratos-nfr` | NFR Assessment | Sable | Opus | `docs/test-artifacts/` |
316
+ | `/kratos-trace` | Traceability Matrix | Sable | Sonnet | `docs/test-artifacts/` |
317
+ | `/kratos-a11y-testing` | Accessibility Testing | Sable | Sonnet | `docs/test-artifacts/` |
318
+ | `/kratos-perf-testing` | Performance Testing | Sable | Sonnet | `docs/test-artifacts/` |
319
+ | `/kratos-mobile-testing` | Mobile Testing | Sable | Sonnet | `docs/test-artifacts/` |
320
+ | `/kratos-teach-testing` | Teach Me Testing | Sable | Sonnet | `docs/test-artifacts/` |
321
+
322
+ ### Anytime Workflows
323
+
324
+ | Command | Workflow | Model | Description |
325
+ |---------|----------|-------|-------------|
326
+ | `/kratos-brownfield` | Brownfield Onboarding | Opus | 6-step orchestration with subagents for existing projects |
327
+ | `/kratos-document-project` | Document Project | Sonnet | Document a project for AI context |
328
+ | `/kratos-project-context` | Generate Project Context | Sonnet | Generate context for AI consumption |
329
+ | `/kratos-performance-review` | Performance Review | Opus | Analyze performance bottlenecks |
330
+ | `/kratos-brainstorming` | Brainstorming | Sonnet | Facilitated brainstorming session |
331
+ | `/kratos-party` | Party Mode | Sonnet | Multi-agent group discussion |
332
+ | `/kratos-advanced-elicitation` | Advanced Elicitation | Opus | Deep requirements elicitation |
333
+ | `/kratos-memory-hygiene` | Memory Hygiene | Sonnet | Detect stale decisions in agent memory |
334
+
335
+ ### Review & Utility Tasks
336
+
337
+ | Command | Task | Model | Description |
338
+ |---------|------|-------|-------------|
339
+ | `/kratos-adversarial` | Adversarial Review | Opus | Cynical critical review from 10 perspectives — finds weaknesses |
340
+ | `/kratos-edge-cases` | Edge Case Hunter | Opus | Identify edge cases and boundary conditions |
341
+ | `/kratos-review-security` | Security Review | Opus | OWASP-focused security review |
342
+ | `/kratos-review-api` | API Design Review | Opus | Review REST API against standards |
343
+ | `/kratos-review-deps` | Dependency Audit | Sonnet | Scan dependencies for vulnerabilities |
344
+ | `/kratos-review-a11y` | Accessibility Review | Sonnet | WCAG 2.1 compliance review |
345
+ | `/kratos-review-perf` | Performance Review | Opus | Code-level performance review |
346
+ | `/kratos-editorial-prose` | Editorial Prose | Sonnet | Clinical copy-editing review |
347
+ | `/kratos-editorial-structure` | Editorial Structure | Sonnet | Structural editing review |
348
+ | `/kratos-summarize` | Summarize Document | Sonnet | Generate executive summary |
349
+ | `/kratos-index-docs` | Index Docs | Sonnet | Generate document index for a folder |
350
+ | `/kratos-shard-doc` | Shard Document | Sonnet | Split large docs into sections |
351
+ | `/kratos-merge-docs` | Merge Documents | Sonnet | Merge multiple markdown files |
352
+ | `/kratos-changelog` | Generate Changelog | Sonnet | Changelog from git history |
353
+
354
+ ### Framework Utilities
355
+
356
+ | Command | Task | Model | Description |
357
+ |---------|------|-------|-------------|
358
+ | `/kratos-build-configs` | Build Configs | Sonnet | Regenerate pre-resolved config files |
359
+ | `/kratos-validate-framework` | Validate Framework | Sonnet | Self-validation and consistency check |
360
+ | `/kratos-resume` | Resume | Sonnet | Resume from last checkpoint after context loss |
361
+ | `/kratos-run-all-reviews` | Run All Reviews | Sonnet | Execute all 6 review gate checks sequentially |
362
+
363
+ ---
364
+
365
+ ## Typical Workflow
366
+
367
+ ### Greenfield — new project from idea to deployment
368
+
369
+ ```
370
+ # Phase 1: Analysis
371
+ /kratos-brainstorm → brainstorm the idea
372
+ /kratos-product-brief → create a product brief
373
+
374
+ # Phase 2: Planning
375
+ /kratos-create-prd → write the PRD
376
+ /kratos-create-ux → design the UX
377
+
378
+ # Phase 3: Solutioning
379
+ /kratos-create-arch → design the architecture
380
+ /kratos-test-design → create test plan
381
+ /kratos-create-epics → break into epics and stories
382
+ /kratos-trace → generate traceability matrix
383
+ /kratos-ci-setup → scaffold CI pipeline
384
+ /kratos-readiness-check → verify everything is ready
385
+
386
+ # Phase 4: Implementation (repeat per sprint)
387
+ /kratos-sprint-plan → plan the sprint
388
+ /kratos-dev-story → implement stories
389
+ /kratos-run-all-reviews → run all 6 review gates
390
+ /kratos-retro → sprint retrospective
391
+
392
+ # Phase 5: Deployment
393
+ /kratos-deploy-checklist → pre-deploy verification
394
+ /kratos-post-deploy → post-deploy health check
395
+ ```
396
+
397
+ For **brownfield projects** (existing codebases), start with `/kratos-brownfield` — a 6-step orchestration that scans your codebase, generates documentation (APIs, UX, events, dependencies, NFR baselines), creates a gap-focused PRD, and maps the architecture. Then continue from Phase 3 above.
398
+
399
+ ---
400
+
401
+ ## Architecture
402
+
403
+ ```
404
+ _kratos/
405
+ ├── _config/ # Global config, manifests
406
+ │ ├── global.yaml # Project settings — single source of truth
407
+ │ └── manifest.yaml # Module versions
408
+ ├── _memory/ # Persistent agent memory + checkpoints
409
+ │ ├── checkpoints/ # Workflow progress snapshots (sha256-verified)
410
+ │ └── *-sidecar/ # Per-agent persistent memory (9 sidecars)
411
+ ├── core/ # Execution engine, protocols, shared tasks
412
+ │ └── engine/ # workflow.xml (7-step flow), task-runner.xml
413
+ ├── lifecycle/ # 5 phases: analysis → deployment
414
+ │ ├── agents/ # 9 lifecycle agents
415
+ │ ├── workflows/ # 36 workflows across 5 phases
416
+ │ └── templates/ # 18 document templates
417
+ ├── dev/ # Developer tooling
418
+ │ ├── agents/ # 3 senior developers + base
419
+ │ ├── skills/ # 8 shared skills (sectioned loading)
420
+ │ └── knowledge/ # Stack-specific patterns
421
+ ├── creative/ # 2 composite creative agents + 7 workflows
422
+ └── testing/ # Test Architect + 12 testing workflows
423
+ ```
424
+
425
+ ### At a glance
426
+
427
+ | Component | Count |
428
+ |-----------|-------|
429
+ | Agents | 15 with distinct personas (25 in [GAIA](https://github.com/jlouage/Gaia-framework)) |
430
+ | Workflows | 64 across 5 lifecycle phases |
431
+ | Standalone tasks | 15 (reviews, audits, utilities) |
432
+ | Slash commands | 104 |
433
+ | Shared skills | 8 with 47 loadable sections |
434
+ | Knowledge fragments | 45 |
435
+ | Document templates | 18 |
436
+ | Quality gates | 17 (enforced, not advisory) |
437
+
438
+ ---
439
+
440
+ ## Configuration
441
+
442
+ The single source of truth is `_kratos/_config/global.yaml`:
443
+
444
+ ```yaml
445
+ framework_name: "KRATOS"
446
+ framework_version: "1.27.4"
447
+ user_name: "your-name"
448
+ project_name: "your-project"
449
+ ```
450
+
451
+ After changing `global.yaml`, run `/kratos-build-configs` to regenerate pre-resolved configs. Each module has a `.resolved/` directory that eliminates runtime config resolution overhead.
452
+
453
+ ---
454
+
455
+ ## Checkpoint & Resume
456
+
457
+ Long-running workflows save checkpoints to `_kratos/_memory/checkpoints/` with sha256 checksums of all files touched. If your session is interrupted, run `/kratos-resume` — it validates file integrity before resuming from the last completed step.
458
+
459
+ ---
460
+
461
+ ## Agent Memory
462
+
463
+ Each agent has a persistent memory sidecar (`_kratos/_memory/*-sidecar/`) that stores decisions, patterns, and context across sessions. Agents become more effective the more you use them. Run `/kratos-memory-hygiene` periodically to detect stale or contradicted decisions.
464
+
465
+ ---
466
+
467
+ ## Limitations
468
+
469
+ - **Single-user only** — KRATOS uses markdown files for state management (stories, sprint status, architecture docs). Multiple team members editing the same project will run into file conflicts.
470
+ - **Claude Code required** — KRATOS is built specifically for Claude Code and cannot run on other AI coding assistants.
471
+ - **Context budget** — Complex workflows can consume significant context. The framework enforces a 40K token budget per activation with just-in-time loading to manage this, but very large projects may hit limits.
472
+
473
+ ---
474
+
475
+ ## Contributing
476
+
477
+ Contributions are welcome. Please open an issue to discuss your idea before submitting a PR.
478
+
479
+ By contributing, you agree that your contributions will be licensed under the same AGPL-3.0 license and that you grant the project maintainers the right to relicense your contributions under a commercial license (CLA).
480
+
481
+ ---
482
+
483
+ ## License
484
+
485
+ [AGPL-3.0](LICENSE)
486
+
487
+ The open-source framework is licensed under the GNU Affero General Public License v3.0.
@@ -0,0 +1,190 @@
1
+ #!/usr/bin/env node
2
+
3
+ // ─────────────────────────────────────────────────────────────────────────────
4
+ // Kratos Framework — npm CLI wrapper
5
+ // Clones the KRATOS repo, delegates to kratos-install.sh, and cleans up.
6
+ // ─────────────────────────────────────────────────────────────────────────────
7
+
8
+ const { execSync, execFileSync } = require("child_process");
9
+ const { mkdtempSync, rmSync, existsSync } = require("fs");
10
+ const { join } = require("path");
11
+ const { tmpdir } = require("os");
12
+
13
+ const pkg = require("../package.json");
14
+
15
+ const DEFAULT_REPO_URL = pkg.repository?.url || "https://github.com/jlouage/Kratos-framework.git";
16
+ const REPO_URL = process.env.KRATOS_REPO_URL || DEFAULT_REPO_URL;
17
+ const SCRIPT_NAME = "kratos-install.sh";
18
+ const IS_WINDOWS = process.platform === "win32";
19
+
20
+ let tempDir = null;
21
+
22
+ // ─── Helpers ────────────────────────────────────────────────────────────────
23
+
24
+ function findBash() {
25
+ if (!IS_WINDOWS) return "bash";
26
+
27
+ // Try bash in PATH first (WSL, Git Bash in PATH, etc.)
28
+ try {
29
+ execSync("bash --version", { stdio: "ignore" });
30
+ return "bash";
31
+ } catch {}
32
+
33
+ // Try Git for Windows default locations
34
+ const gitBashPaths = [
35
+ join(process.env.ProgramFiles || "C:\\Program Files", "Git", "bin", "bash.exe"),
36
+ join(process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)", "Git", "bin", "bash.exe"),
37
+ join(process.env.LOCALAPPDATA || "", "Programs", "Git", "bin", "bash.exe"),
38
+ ];
39
+
40
+ for (const p of gitBashPaths) {
41
+ if (existsSync(p)) return p;
42
+ }
43
+
44
+ return null;
45
+ }
46
+
47
+ function fail(message) {
48
+ console.error(`\x1b[31m✖\x1b[0m ${message}`);
49
+ process.exit(1);
50
+ }
51
+
52
+ function info(message) {
53
+ console.log(`\x1b[34mℹ\x1b[0m ${message}`);
54
+ }
55
+
56
+ function cleanup() {
57
+ if (tempDir && existsSync(tempDir)) {
58
+ try {
59
+ rmSync(tempDir, { recursive: true, force: true });
60
+ } catch {
61
+ // Best-effort cleanup
62
+ }
63
+ }
64
+ }
65
+
66
+ function ensureGit() {
67
+ try {
68
+ execSync("git --version", { stdio: "ignore" });
69
+ } catch {
70
+ fail(
71
+ "git is required but was not found.\n" +
72
+ " Install git: https://git-scm.com/downloads"
73
+ );
74
+ }
75
+ }
76
+
77
+ function showUsage() {
78
+ console.log(`
79
+ \x1b[1mKratos Framework — npm installer\x1b[0m
80
+
81
+ Usage: npx kratos-framework <command> [options] [target]
82
+
83
+ Commands:
84
+ init Install KRATOS into a project
85
+ update Update framework files (preserves config and memory)
86
+ validate Check installation integrity
87
+ status Show installation info
88
+
89
+ Options:
90
+ --yes Skip confirmation prompts
91
+ --minimal Install the lightweight profile (core, quick flow, senior dev agents)
92
+ --dry-run Show what would be done without making changes
93
+ --verbose Show detailed progress
94
+ --help Show this help message
95
+
96
+ Environment:
97
+ KRATOS_REPO_URL Override the Git clone source for your fork or private mirror
98
+
99
+ Examples:
100
+ npx kratos-framework init .
101
+ npx kratos-framework init ~/my-new-project
102
+ npx kratos-framework update .
103
+ npx kratos-framework validate .
104
+ npx kratos-framework status .
105
+ npx kratos-framework init --yes ~/my-project
106
+ `);
107
+ }
108
+
109
+ // ─── Main ───────────────────────────────────────────────────────────────────
110
+
111
+ function main() {
112
+ const args = process.argv.slice(2);
113
+
114
+ // Handle help / no args
115
+ if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
116
+ showUsage();
117
+ process.exit(0);
118
+ }
119
+
120
+ if (args.includes("--version") || args.includes("-v")) {
121
+ console.log(`kratos-framework v${pkg.version}`);
122
+ process.exit(0);
123
+ }
124
+
125
+ // Validate command
126
+ const command = args[0];
127
+ const validCommands = ["init", "update", "validate", "status"];
128
+ if (!validCommands.includes(command)) {
129
+ fail(`Unknown command: ${command}\n Run 'npx kratos-framework --help' for usage.`);
130
+ }
131
+
132
+ // Ensure git is available
133
+ ensureGit();
134
+
135
+ // Clone the repo to a temp directory
136
+ tempDir = mkdtempSync(join(tmpdir(), "kratos-framework-"));
137
+
138
+ // Register cleanup for all exit scenarios
139
+ process.on("exit", cleanup);
140
+ process.on("SIGINT", () => { cleanup(); process.exit(130); });
141
+ process.on("SIGTERM", () => { cleanup(); process.exit(143); });
142
+
143
+ info("Cloning KRATOS framework from GitHub...");
144
+
145
+ try {
146
+ execSync(`git clone --depth 1 ${REPO_URL} "${tempDir}"`, {
147
+ stdio: ["ignore", "ignore", "pipe"],
148
+ });
149
+ } catch (err) {
150
+ fail(
151
+ `Failed to clone from ${REPO_URL}\n` +
152
+ ` ${err.stderr ? err.stderr.toString().trim() : "Check your network connection."}`
153
+ );
154
+ }
155
+
156
+ // Locate the installer script
157
+ const scriptPath = join(tempDir, SCRIPT_NAME);
158
+ if (!existsSync(scriptPath)) {
159
+ fail(`Installer script not found in cloned repo: ${SCRIPT_NAME}`);
160
+ }
161
+
162
+ // Build the shell command: inject --source pointing to the temp clone
163
+ // so the shell script doesn't need to clone again
164
+ const passthrough = args.slice(0);
165
+ // Insert --source right after the command
166
+ passthrough.splice(1, 0, "--source", tempDir);
167
+
168
+ // Locate bash (critical for Windows support)
169
+ const bashPath = findBash();
170
+ if (!bashPath) {
171
+ fail(
172
+ "bash is required but was not found.\n" +
173
+ " On Windows, install Git for Windows (https://git-scm.com/downloads/win)\n" +
174
+ " which includes bash. Then re-run this command."
175
+ );
176
+ }
177
+
178
+ info("Running installer...\n");
179
+
180
+ try {
181
+ execFileSync(bashPath, [scriptPath, ...passthrough], {
182
+ stdio: "inherit",
183
+ env: { ...process.env, KRATOS_SOURCE: tempDir },
184
+ });
185
+ } catch (err) {
186
+ process.exit(err.status || 1);
187
+ }
188
+ }
189
+
190
+ main();