atris 2.3.4 → 2.3.7

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.
@@ -0,0 +1,716 @@
1
+ # atris.md — A new system for an AI agent team
2
+
3
+ > **Drop this markdown file anywhere. Scaffold and operate an AI agent team.**
4
+
5
+ This spec defines how to transform any system (codebase, product, sales process, research) into a self-documenting, AI-navigable workspace. Standard structure: `atris/` folder with MAP.md, team/, and TODO.md.
6
+
7
+ **Workflow:** Daily logs → Navigator plans → Executor builds → Validator reviews.
8
+
9
+ ---
10
+
11
+ ## Phase 1: Generate MAP.md (Universal Navigation)
12
+
13
+ **Goal:** Create a single-source-of-truth navigation guide that agents reference for all system/architecture questions.
14
+
15
+ **Why This Matters:**
16
+ - Agents waste time re-learning system structure on each task
17
+ - MAP.md eliminates friction—one grep-friendly index that's always accurate
18
+ - All agents reference the same truth, preventing contradictory guidance
19
+ - Works for ANY domain: code, product, sales, research, operations
20
+
21
+ **Agent Instructions:**
22
+
23
+ 1. **Scan the project root** (ignore: `node_modules/`, `.git/`, `dist/`, `build/`, `.DS_Store`, `*.log`)
24
+
25
+ 2. **For each major directory** (depth 1-2 levels), extract:
26
+ - Purpose (1 sentence: why does this directory exist?)
27
+ - Key files with line-count ranges (e.g., `auth.ts: 200 lines`)
28
+ - Search accelerators (ripgrep patterns for fast navigation)
29
+
30
+ 3. **Create `/atris/MAP.md`** with ONLY these sections (no extras):
31
+ - **Quick Reference Index** (top) — Grep-friendly shortcuts (e.g., `CHAT:BACKEND -> rg -n "def quick_chat" backend/`)
32
+ - **By-Feature** — Chat, files, auth, billing, etc. (answer: "where is feature X?")
33
+ - **By-Concern** — State management, API layer, UI system, etc. (answer: "where is concern Y?")
34
+ - **Critical Files** — Files >10KB or >100 lines of logic = high-impact (mark as ⭐)
35
+ - **Entry Points** — 3-5 entry points clearly marked (landing page, dashboard, API routes, etc.)
36
+
37
+ 4. **DO NOT include this:**
38
+ - COMPLEX Architecture Flows unless specified (keep it simple to understand)
39
+ - TODOs/Improvements (those go in TODO.md)
40
+ - Project stats (unnecessary metadata)
41
+
42
+ 5. **Quality Checklist Before Outputting:**
43
+ - [ ] Does every major file/component have a one-liner explaining its purpose?
44
+ - [ ] Can a new person answer "where is X?" in <30 seconds using this map?
45
+
46
+ 6. **Output:** `/atris/MAP.md` (target: 300-500 lines for large systems; scale to project size)
47
+
48
+ 7. **After MAP.md generation:** Append lightweight project context to agent templates
49
+ - Add `## Project Context` section to each agent (navigator, executor, validator)
50
+ - Include: framework, 3-5 key directories, 3-5 search accelerators
51
+ - Keep it minimal (5-10 lines max per agent) - avoid bloat
52
+ - Format:
53
+ ```markdown
54
+ ---
55
+ ## Project Context (Auto-generated from MAP.md)
56
+ - **Framework:** Next.js 14
57
+ - **Key dirs:** app/, components/, lib/
58
+ - **Search patterns:**
59
+ - Components: `rg "export default" components/`
60
+ - API routes: `rg "export async function" app/api/`
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Phase 2: Foundational Agent Templates
66
+
67
+ Atris ships with pre-built agent templates in `/atris/team/` (copied during `atris init`). These templates provide battle-tested specs that work out of the box. Each agent has explicit guardrails.
68
+
69
+ **Templates included:**
70
+
71
+ ### Agent 1: **navigator.md** (in `/atris/team/`)
72
+
73
+ - **Role:** System Navigator & Architecture Expert
74
+ - **Activation Prompt:**
75
+ ```
76
+ You are the system navigator. Your sole job is answering "where is X?" with precision.
77
+
78
+ Rules:
79
+ 1. ALWAYS start with: "According to MAP.md, [item] is located in..."
80
+ 2. ALWAYS cite file:line or component references (e.g., `app/auth/middleware.ts:15-45`)
81
+ 3. Explain flows end-to-end (frontend → backend → database, or research → analysis → writeup)
82
+ 4. Identify coupling points and structure violations
83
+ 5. Guide people to the right location in <5 clicks
84
+
85
+ DO NOT:
86
+ - Execute changes or modifications without explicit approval
87
+ - Make architecture/structure decisions without approval
88
+ - Assume locations; always reference MAP.md
89
+ ```
90
+
91
+ - **Knowledge Base:** MAP.md, architecture docs, specs, design docs
92
+ - **Success Metric:** Every question answered with exact references, zero guesses
93
+
94
+ ### Agent 2: **executor.md** (in `/atris/team/`)
95
+
96
+ - **Role:** Context-Aware Task Executor
97
+ - **Activation Prompt:**
98
+ ```
99
+ You are the task executor. When given a task, extract exact context and execute step-by-step.
100
+
101
+ Rules:
102
+ 1. Read MAP.md first; extract file:line references for all related files
103
+ 2. Identify ALL files that will be touched (use ripgrep patterns from MAP)
104
+ 3. Map dependencies and risk zones
105
+ 4. Create a concise 4-5 sentence execution plan with:
106
+ - File paths
107
+ - Line numbers for modifications
108
+ - Exact description of changes
109
+ 5. Execute step-by-step, validating at each stage
110
+
111
+ Format: "Task: [name] | Files: [path:line] | Changes: [exact description]"
112
+
113
+ DO NOT:
114
+ - Skip validation steps
115
+ - Modify files outside the planned scope
116
+ - Ignore type errors or test failures
117
+ ```
118
+
119
+ - **Knowledge Base:** MAP.md, TODO.md (generated), test suite, type definitions
120
+ - **Success Metric:** Tasks completed 95% first-try with zero regressions
121
+
122
+ ### Agent 3: **validator.md** (in `/atris/team/`)
123
+
124
+ - **Role:** Quality Gatekeeper
125
+ - **Activation Prompt:**
126
+ ```
127
+ You are the validator. After ANY change, verify safety and accuracy.
128
+
129
+ Rules:
130
+ 1. Run type-check, lint, tests automatically
131
+ 2. Verify all file references in MAP.md still exist and are accurate
132
+ 3. Update MAP.md if architecture changed
133
+ 4. Check for breaking changes or coupling violations
134
+ 5. Report: "✓ Safe to merge" or "⚠ Risks: [list]"
135
+
136
+ ALWAYS cite MAP.md and explain why changes are safe/risky.
137
+
138
+ DO NOT:
139
+ - Approve changes without running tests
140
+ - Allow breaking changes silently
141
+ - Update MAP.md without explaining what changed
142
+ ```
143
+
144
+ - **Knowledge Base:** MAP.md, test suite, type definitions, architecture principles
145
+ - **Success Metric:** Zero undetected breaking changes reach production
146
+
147
+ ---
148
+
149
+ ## Phase 3: Task Context System (TODO.md in `/atris/`, formerly `TODO.md`)
150
+
151
+ **Goal:** Automatic task extraction with exact file/component context, so agents never guess.
152
+
153
+ **Generated File Format:**
154
+
155
+ ```markdown
156
+ # Task Contexts — Auto-extracted from MAP.md
157
+
158
+ ## Task Template
159
+ - **Task ID:** T-[AUTO]
160
+ - **Name:** [Feature/Fix Name]
161
+ - **Complexity:** [Trivial|Simple|Moderate|Complex|Epic]
162
+ - Trivial: Single-line fix, typo, comment
163
+ - Simple: 1-2 files, <50 lines, no cross-module deps
164
+ - Moderate: 3-5 files, <200 lines, some deps
165
+ - Complex: 5+ files, >200 lines, multiple systems
166
+ - Epic: Architectural change, multi-system refactor
167
+ - **Scope:**
168
+ - Files touched: [count]
169
+ - Lines affected: ~[estimate]
170
+ - Dependencies: [count of related files/modules]
171
+ - **Context Files:** [file:line_start-line_end] (from MAP critical files)
172
+ - **Execution Plan:**
173
+ 1. [Step 1 with file:line reference]
174
+ 2. [Step 2 with file:line reference]
175
+ 3. [Step 3 with file:line reference]
176
+ - **Success Criteria:** [Measurable, testable]
177
+ - **Dependencies:** [Task IDs or external dependencies]
178
+ - **Risk Level:** [Low/Medium/High]
179
+ - Blast radius: [how many systems/endpoints affected]
180
+ - Test coverage: [existing tests? new tests needed?]
181
+ - Rollback: [Easy|Moderate|Difficult]
182
+
183
+ ## Example Task (Auto-Generated)
184
+ - **Task ID:** T-001
185
+ - **Name:** Add authentication to file upload
186
+ - **Complexity:** Simple
187
+ - **Scope:**
188
+ - Files touched: 3
189
+ - Lines affected: ~20
190
+ - Dependencies: 1 (auth middleware)
191
+ - **Context Files:**
192
+ - `app/api/files/upload/route.ts:1-50` (handler)
193
+ - `app/auth/middleware.ts:15-45` (auth check)
194
+ - `types/auth.ts:8-20` (auth types)
195
+ - **Execution Plan:**
196
+ 1. Add `verifySession()` call to upload handler (line 20)
197
+ 2. Return 401 if no session (add lines 21-23)
198
+ 3. Add auth test to `__tests__/upload.test.ts:112-125`
199
+ 4. Run `npm run test` and verify all pass
200
+ - **Success Criteria:** Upload rejects unauthenticated requests; all tests pass; MAP.md updated
201
+ - **Dependencies:** None
202
+ - **Risk Level:** Low
203
+ - Blast radius: Single endpoint (upload only)
204
+ - Test coverage: Existing auth tests; new upload auth test needed
205
+ - Rollback: Easy (single handler change, no DB migration)
206
+ ```
207
+
208
+ **Agent Instructions:**
209
+
210
+ 1. After MAP.md is generated, scan for:
211
+ - Incomplete work (TODOs, FIXMEs, gaps marked with line numbers)
212
+ - High-risk areas (>500 lines, multiple dependencies, touching shared state)
213
+ - Cross-component dependencies that could break easily
214
+
215
+ 2. Auto-generate 5-10 canonical tasks with exact file:line or component references
216
+ - Include both quick wins (low-risk) and strategic work (high-impact)
217
+ - Map all dependencies explicitly
218
+
219
+ 3. Output: `/atris/TODO.md` (maintains and evolves as system changes)
220
+
221
+ 4. On each MAP.md update, regenerate TODO.md to reflect new state
222
+
223
+ ---
224
+
225
+ ## Phase 4: Activation & Handoff
226
+
227
+ **After `atris init`, your workspace contains:**
228
+
229
+ - ✅ `atris.md` (this spec)
230
+ - ✅ `PERSONA.md` (agent communication style)
231
+ - ✅ `GETTING_STARTED.md` (user guide)
232
+ - ✅ `team/navigator.md` (pre-built template)
233
+ - ✅ `team/executor.md` (pre-built template)
234
+ - ✅ `team/validator.md` (pre-built template)
235
+ - ⏳ `MAP.md` (AI agent generates from codebase)
236
+ - ⏳ `TODO.md` (AI agent generates from MAP)
237
+
238
+ **Agent Enhancement:**
239
+ After MAP.md generation, agents receive project context injection (framework, key dirs, search patterns). This keeps base templates clean while adding project-specific accelerators.
240
+
241
+ **Agent Behavior Activates Automatically:**
242
+
243
+ | Trigger | Agent | Action |
244
+ |---------|-------|--------|
245
+ | "Where is X?" | navigator | Answers with MAP.md:line reference + project patterns |
246
+ | "Do task Y" | executor | Extracts context, plans execution, cites file:line |
247
+ | After change | validator | Checks validity, updates docs, blocks unsafe changes |
248
+ | New agent joins | navigator | Reads MAP.md, immediately productive (no ramp-up) |
249
+
250
+ **Validation Checklist:**
251
+
252
+ - [ ] All three agents can read and cite MAP.md
253
+ - [ ] navigator answers 5 test questions with exact references
254
+ - [ ] executor completes a sample task without regressions
255
+ - [ ] validator successfully detects and blocks a breaking change
256
+ - [ ] MAP.md is accurate and stays in sync with the system, especially after changes. agents will change.
257
+
258
+ ---
259
+
260
+ ## Phase 5: Daily Workflow
261
+
262
+ **How the System Operates Day-to-Day:**
263
+
264
+ 1. **Brain Dump** — Run `atris log`, type thoughts into `## Inbox` section (unfiltered, no structure required)
265
+
266
+ 2. **Navigator Reviews** — Processes inbox entries, identifies patterns, creates tasks in TODO.md with MAP.md context
267
+
268
+ 3. **Executor Builds** — Takes task → ASCII visualization → get approval → build step-by-step → validate alignment
269
+
270
+ 4. **Validator Reviews** — Ultrathinks (3x) → tests → auto-fixes bugs → cleans up (deletes completed tasks, target: 0) → updates MAP.md → moves log to Completed ✅ → extracts lessons
271
+
272
+ **Daily Goal:** Inbox zero. All thoughts processed, tasks executed, docs updated.
273
+
274
+ ---
275
+
276
+ ## Phase 5.1: Journal Protocol v1.0
277
+
278
+ **The Atris Journal is a standardized markdown format that enables:**
279
+ - **Human → Agent coordination** (brain dumps → structured tasks)
280
+ - **Multi-agent coordination** (agents communicate via journal sections)
281
+ - **Markdown → UI rendering** (structured data for kanban, charts, progress bars)
282
+ - **Self-evolution** (journal tracks issues, system fixes itself)
283
+
284
+ **Same markdown = CLI readable + UI renderable + agent parsable.**
285
+
286
+ ---
287
+
288
+ ### Section Semantics
289
+
290
+ **Structured Sections** (parsable for UI rendering):
291
+ - **`## Inbox`** — Unfiltered thoughts, ideas, issues. Navigator processes these.
292
+ - **`## Backlog`** — Tasks extracted from Inbox, not yet started.
293
+ - **`## In Progress 🔄`** — Tasks currently being worked on (with `**Claimed by:**` metadata).
294
+ - **`## Completed ✅`** — Finished work with timestamps and learnings.
295
+
296
+ **Free-Form Sections** (rich text editors):
297
+ - **`## Notes`** — Session notes, meeting notes, context.
298
+ - **`## Lessons Learned`** — Patterns, insights, reusable knowledge.
299
+
300
+ **Metadata Sections**:
301
+ - **`## Timestamps`** — Activity log (optional, for analytics).
302
+
303
+ ---
304
+
305
+ ### Format Rules (Regex-Friendly)
306
+
307
+ **Structured Items** (enables UI parsing):
308
+
309
+ **Inbox Items:**
310
+ ```
311
+ - **I{n}:** Description
312
+ ```
313
+ - Pattern: `/^- \*\*I(\d+):\*\*\s*(.+)$/`
314
+ - Example: `- **I1:** Add auth to upload endpoint`
315
+ - UI: Renders as cards in inbox view
316
+
317
+ **Completed Items:**
318
+ ```
319
+ - **C{n}:** Description
320
+ ```
321
+ - Pattern: `/^- \*\*C(\d+):\*\*\s*(.+)$/`
322
+ - Example: `- **C1:** Fixed bidirectional journal sync`
323
+ - UI: Renders in timeline/chart view
324
+
325
+ **Tasks:**
326
+ ```
327
+ - **T{n}:** Description
328
+ ```
329
+ - Pattern: `/^- \*\*T(\d+):\*\*\s*(.+)$/`
330
+ - Example: `- **T1:** Add Journal Protocol to atris.md`
331
+ - UI: Renders in kanban board (Backlog → In Progress → Completed)
332
+
333
+ **Status Metadata:**
334
+ ```
335
+ **Claimed by:** [Agent/Name] at [Timestamp]
336
+ **Status:** [Status text]
337
+ ```
338
+ - Pattern: `/\*\*Claimed by:\*\* (.+)/`
339
+ - UI: Renders as progress bars, ownership indicators
340
+
341
+ **Free-Form Sections:**
342
+ - No format rules required. Use standard markdown (headings, lists, code blocks, etc.).
343
+ - UI: Renders in rich text editor with full markdown support.
344
+
345
+ ---
346
+
347
+ ### Markdown → UI Mapping
348
+
349
+ **Structured sections → UI components:**
350
+ - **Inbox** → Card grid (each `I{n}` item = card)
351
+ - **Backlog** → Kanban column (each `T{n}` item = card)
352
+ - **In Progress** → Kanban column + progress indicators (`**Claimed by:**` → avatar/badge)
353
+ - **Completed** → Timeline view (each `C{n}` item = timeline entry)
354
+
355
+ **Free-form sections → Rich editors:**
356
+ - **Notes** → Markdown editor (WYSIWYG or source)
357
+ - **Lessons Learned** → Markdown editor with syntax highlighting
358
+
359
+ **Metadata → UI widgets:**
360
+ - `**Claimed by:**` → User avatar + name badge
361
+ - `**Status:**` → Progress bar or status pill
362
+
363
+ **Same file works for:**
364
+ - CLI: `grep`, `cat`, standard text tools
365
+ - Web: Parsed into React components
366
+ - Mobile: Native UI with swipe gestures
367
+ - Agent: Parse via regex, coordinate via section writes
368
+
369
+ ---
370
+
371
+ ### Agent Coordination Guidelines
372
+
373
+ **Multi-agent write behavior:**
374
+
375
+ **Navigator Agent:**
376
+ - Reads: `## Inbox` section
377
+ - Writes: `## Backlog` section (creates tasks from inbox items)
378
+ - Writes: `## Notes` section (planning notes, ASCII diagrams)
379
+
380
+ **Executor Agent:**
381
+ - Reads: `## Backlog` section
382
+ - Writes: `## In Progress 🔄` section (claims task with `**Claimed by:**`)
383
+ - Writes: `## Completed ✅` section (when done, with timestamps)
384
+ - Writes: `## Notes` section (execution notes, debugging notes)
385
+
386
+ **Validator Agent:**
387
+ - Reads: `## Completed ✅` section
388
+ - Writes: `## Lessons Learned` section (extracts patterns)
389
+ - Writes: `## Notes` section (validation results, test outcomes)
390
+
391
+ **Launcher Agent:**
392
+ - Reads: `## Completed ✅` section
393
+ - Writes: `## Notes` section (launch summary, learnings)
394
+ - Moves: Inbox items to Completed (closes the loop)
395
+
396
+ **Conflict Resolution:**
397
+ - If multiple agents write to same section simultaneously, use section-level merge (append, don't overwrite).
398
+ - If same item ID used (`I1`, `C1`, `T1`), prefer most recent write (timestamp-based).
399
+
400
+ ---
401
+
402
+ ### Bloat Prevention (Pareto Principle)
403
+
404
+ **Daily Rotation:**
405
+ - Each day = new journal file: `logs/YYYY/YYYY-MM-DD.md`
406
+ - Previous days archived automatically (no manual cleanup needed)
407
+ - Keeps individual files lean (~500-1,500 lines max)
408
+
409
+ **Structured Updates:**
410
+ - Follow PERSONA.md rule: "3-4 sentences max" for agent-written content
411
+ - Use structured formats (`I{n}`, `C{n}`, `T{n}`) instead of verbose logs
412
+ - Free-form sections (Notes, Lessons) can be longer, but avoid repetition
413
+
414
+ **Rejection Criteria:**
415
+ - Validator rejects verbose agent updates: "Rewrite as summary"
416
+ - Avoid: "Agent wrote 500 lines of debug logs to Notes section"
417
+ - Prefer: "**C1:** Fixed sync bug - origin-aware dedupe (3-4 sentence summary)"
418
+
419
+ **Result:**
420
+ - Journal stays human-readable
421
+ - Parse time remains fast (< 100ms for 1,500 lines)
422
+ - UI rendering stays performant
423
+ - Self-evolution works (journal tracks issues → system fixes → journal stays lean)
424
+
425
+ ---
426
+
427
+ ### Example Journal Entry
428
+
429
+ ```markdown
430
+ # Log — 2025-11-05
431
+
432
+ ## Completed ✅
433
+
434
+ - **C1:** Fixed bidirectional journal sync
435
+ - Problem: Web edits didn't sync to CLI
436
+ - Solution: Added auto-pull when web is newer + local unchanged
437
+ - Impact: Users can edit on web (mobile) and changes sync automatically
438
+
439
+ ## In Progress 🔄
440
+
441
+ - **T1:** Add Journal Protocol to atris.md
442
+ **Claimed by:** Executor at 2025-11-05 18:30
443
+ **Status:** Writing protocol section
444
+
445
+ ## Backlog
446
+
447
+ - **T2:** Update package.json version
448
+ - **T3:** Test protocol spec with fresh init
449
+
450
+ ## Notes
451
+
452
+ ### Launch — Bidirectional Sync — 2025-11-05 10:30
453
+
454
+ **What shipped:**
455
+ Enhanced sync logic with auto-pull and conflict resolution.
456
+
457
+ ## Inbox
458
+
459
+ (Inbox zero achieved)
460
+ ```
461
+
462
+ **This format enables:**
463
+ - CLI: `grep "I1"` finds inbox items
464
+ - Web: Parses `I{n}` → renders as cards
465
+ - Agent: Reads Inbox → writes Backlog → coordinates via sections
466
+
467
+ ---
468
+
469
+ ## Phase 5.2: atrisDev Protocol (Universal Workflow)
470
+
471
+ **The atrisDev Protocol** is a universal workflow that any coding agent can follow to produce high-quality output. When agents follow this protocol, they build features systematically with human approval gates and proper documentation, using small, low-risk changes that compound over time.
472
+
473
+ **This protocol works with ANY agent:** Claude Code, Cursor, Windsurf, GitHub Copilot, or any LLM-based coding assistant.
474
+
475
+ ---
476
+
477
+ ### How to Use atrisDev
478
+
479
+ **Step 1: Load Context**
480
+
481
+ Run `atris` in your terminal. It outputs a prompt containing:
482
+ - Active work in progress
483
+ - Inbox ideas waiting to be built
484
+ - Recent completions
485
+ - The atrisDev workflow steps
486
+
487
+ **Step 2: Copy the Prompt**
488
+
489
+ Copy the entire output and paste it to your coding agent along with your task description.
490
+
491
+ **Step 3: Agent Follows the Protocol**
492
+
493
+ The agent executes this workflow:
494
+
495
+ ---
496
+
497
+ ### atrisDev Workflow Steps
498
+
499
+ **0. (Optional) Explore the Idea**
500
+
501
+ If requirements are unclear, use `atris brainstorm` (or a structured conversation) to explore the problem and possible approaches *before* committing to any plan:
502
+
503
+ - Clarify the problem, constraints, and “what good looks like”.
504
+ - Decide whether this should become a feature folder (`atris/features/[name]/`) or a small, direct TODO.
505
+ - Capture the refined idea into `atris/features/[name]/idea.md` once it is clear enough.
506
+
507
+ **1. Show atris Visualization**
508
+
509
+ Before writing any code, the agent creates a visual diagram showing:
510
+ - Architecture/data flow
511
+ - Key components and their interactions
512
+ - Database schema (if applicable)
513
+ - User experience flow (if applicable)
514
+
515
+ **Example:**
516
+ ```
517
+ ┌─────────────┐
518
+ │ Browser │
519
+ └──────┬──────┘
520
+ │ POST /api/features
521
+
522
+ ┌─────────────────┐ ┌──────────────┐
523
+ │ API Handler │─────▶│ Database │
524
+ │ - Validate │ │ - features │
525
+ │ - Transform │◀─────│ - users │
526
+ └─────────────────┘ └──────────────┘
527
+
528
+
529
+ ┌─────────────────┐
530
+ │ Response JSON │
531
+ └─────────────────┘
532
+ ```
533
+
534
+ **2. Wait for Approval**
535
+
536
+ Agent **MUST NOT** proceed until the human confirms the plan is correct.
537
+
538
+ **3. Create idea.md**
539
+
540
+ Path: `atris/features/[feature-name]/idea.md`
541
+
542
+ Contents:
543
+ - **Problem Statement** — What are we solving?
544
+ - **Solution Design** — How will we solve it?
545
+ - **ASCII Diagrams** — Visual representation
546
+ - **Success Criteria** — How do we know it works?
547
+
548
+ **4. Create build.md**
549
+
550
+ Path: `atris/features/[feature-name]/build.md`
551
+
552
+ Contents:
553
+ - **Step-by-step Implementation Plan** — Ordered list of tasks
554
+ - **Files to Change** — Exact file paths and what changes
555
+ - **Testing Strategy** — How to verify each step
556
+
557
+ **5. Execute Step by Step**
558
+
559
+ - Build one step at a time
560
+ - After each step, check alignment with the plan
561
+ - If something doesn't match, stop and adjust
562
+ - Never batch multiple steps without validation
563
+
564
+ **6. Review & Validate**
565
+
566
+ - Run all tests
567
+ - Verify success criteria from idea.md
568
+ - Update `atris/features/README.md` with new feature entry
569
+ - Add completion to journal: `## Completed ✅`
570
+
571
+ ---
572
+
573
+ ### Why This Works
574
+
575
+ **Benefits of atrisDev Protocol:**
576
+ - **Approval gates prevent wasted work** — Human confirms plan before execution
577
+ - **Documentation is automatic** — idea.md and build.md created as byproducts
578
+ - **Visual thinking reduces miscommunication** — ASCII diagrams force clarity
579
+ - **Step-by-step execution prevents sprawl** — Each step validated before next
580
+ - **Works with any agent** — Protocol is agent-agnostic
581
+ - **Spreads naturally** — Once installed, `atris` becomes the entry point for all dev work
582
+
583
+ **Adoption path:**
584
+ 1. Dev installs `atris`: `npm install -g atris`
585
+ 2. Initializes project: `atris init`
586
+ 3. Runs `atris` to get the protocol prompt
587
+ 4. Copies prompt to their preferred agent
588
+ 5. Agent follows atrisDev workflow → high-quality output
589
+ 6. Dev shares results → others adopt atris
590
+
591
+ **The vision:** Every developer running `atris` gets a structured, high-quality workflow regardless of which coding agent they use. The protocol becomes the standard.
592
+
593
+ ---
594
+
595
+ ## Phase 5.3: Claude Code Integration
596
+
597
+ Auto-inject Atris context into Claude Code sessions via skills and commands.
598
+
599
+ ### Slash Command Setup
600
+
601
+ Create `.claude/commands/atris.md`:
602
+
603
+ ```markdown
604
+ ---
605
+ description: Activate Atris context - loads TODO.md, journal, and persona
606
+ allowed-tools: Read, Bash, Glob, Grep
607
+ ---
608
+
609
+ # Atris Activate
610
+
611
+ Load these files:
612
+ 1. @atris/PERSONA.md (communication style)
613
+ 2. @atris/TODO.md (current tasks)
614
+ 3. @atris/MAP.md (navigation)
615
+
616
+ Workflow: plan → do → review
617
+ Rules: 3-4 sentences max, ASCII visuals, check MAP.md first
618
+ ```
619
+
620
+ ### Skill Setup
621
+
622
+ Create `.claude/skills/atris/SKILL.md`:
623
+
624
+ ```markdown
625
+ ---
626
+ name: atris
627
+ description: Atris workspace navigation. Use when user mentions atris, TODO, tasks, MAP.md, or asks "where is X?"
628
+ allowed-tools: Read, Bash, Glob, Grep, Write, Edit
629
+ ---
630
+
631
+ # Atris Skill
632
+
633
+ Detect: Project has `atris/` folder with MAP.md, TODO.md, PERSONA.md
634
+
635
+ Workflow: Navigator (plan) → Executor (build) → Validator (verify)
636
+
637
+ Key behaviors:
638
+ - Read PERSONA.md first (3-4 sentences, ASCII visuals)
639
+ - Check MAP.md for file:line refs
640
+ - Update TODO.md (claim tasks, delete when done)
641
+ ```
642
+
643
+ ### Checklist
644
+
645
+ - [ ] Create `.claude/commands/` directory
646
+ - [ ] Create `.claude/skills/atris/` directory
647
+ - [ ] Add `atris.md` command file
648
+ - [ ] Add `SKILL.md` skill file
649
+ - [ ] Test with `/atris` in Claude Code
650
+ - [ ] Verify skill triggers on "atris" or "tasks" mentions
651
+
652
+ ---
653
+
654
+ ## Phase 6: Future Roadmap (Vision)
655
+
656
+ **See [`Atris_NOTES.md`](./ATRIS_NOTES.md) for full roadmap. Preview:**
657
+
658
+ - **Phase 5a: Sync** — Local + cloud markdown sync, enabling offline editing and asynchronous agent work
659
+ - **Phase 5b: Sessions** — Step-by-step markdown workflows with `!status`, `!result` tags for interactive collaboration
660
+ - **Phase 5c: Crew Orchestration** — Multi-agent coordination (codebase expert → executor → validator) from markdown config
661
+
662
+ ---
663
+
664
+ ## Why This Works
665
+
666
+ 1. **MAP = Single Source of Truth** — All agents reference one navigation guide; no contradictions
667
+ 2. **Exact File:Line Context** — No guessing; every answer is pinpoint accurate
668
+ 3. **Self-Validating** — @validator_AGENT keeps MAP and artifacts fresh automatically
669
+ 4. **Scalable to Any Codebase** — Works for monorepos, microservices, solo projects, legacy systems
670
+ 5. **Agent Handoff** — New agent joins, reads MAP, immediately productive (no ramp-up time)
671
+ 6. **Offline + Async Ready** — Markdown files work offline; sync on schedule (future Phase 5a)
672
+
673
+ ---
674
+
675
+ ## Implementation Checklist
676
+
677
+ - [ ] **Install:** `npm install -g atris` (instant)
678
+ - [ ] **Init:** `atris init` - creates atris/ with templates (instant)
679
+ - [ ] **Phase 1:** AI agent generates MAP.md from codebase (5 min)
680
+ - [ ] **Phase 3:** AI agent generates TODO.md from MAP (2 min)
681
+ - [ ] **Validate:** Test navigator/executor/validator workflows (1 min)
682
+ - [ ] **Ongoing:** Run `atris update` to get template updates
683
+
684
+ **Total time to full instrumentation: ~8 minutes**
685
+
686
+ ---
687
+
688
+ ## Quick Start
689
+
690
+ ```bash
691
+ # Install globally
692
+ npm install -g atris
693
+
694
+ # Initialize in your project
695
+ cd /path/to/your/project
696
+ atris init
697
+
698
+ # Hand atris/atris.md to your AI agent with this prompt:
699
+ # "Read atris/atris.md. Execute Phase 1-4 to scaffold this system."
700
+
701
+ # Agent generates MAP.md, team/, and TODO.md in atris/
702
+ # Your system is now fully instrumented for AI collaboration
703
+
704
+ # Keep atris.md updated
705
+ atris update
706
+ ```
707
+
708
+ ---
709
+
710
+ **Status:** Production ready. Run `atris init` in any project to get:
711
+ 1. Pre-built agent templates (navigator, executor, validator)
712
+ 2. AI generates MAP.md from your codebase in <5 minutes
713
+ 3. AI generates TODO.md with exact file:line context
714
+ 4. Full workflow: activate → plan → build → validate
715
+
716
+ *Install once. Init anywhere. AI agents have instant context. Codebase becomes fully instrumented for AI collaboration.*