atris 1.8.1 → 1.8.2
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/atris.md +118 -0
- package/bin/atris.js +139 -72
- package/package.json +1 -1
package/atris.md
CHANGED
|
@@ -466,6 +466,124 @@ Enhanced sync logic with auto-pull and conflict resolution.
|
|
|
466
466
|
|
|
467
467
|
---
|
|
468
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.
|
|
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
|
+
**1. Show the Crosshair (ASCII Visualization)**
|
|
500
|
+
|
|
501
|
+
Before writing any code, the agent creates an ASCII diagram showing:
|
|
502
|
+
- Architecture/data flow
|
|
503
|
+
- Key components and their interactions
|
|
504
|
+
- Database schema (if applicable)
|
|
505
|
+
- User experience flow (if applicable)
|
|
506
|
+
|
|
507
|
+
**Example:**
|
|
508
|
+
```
|
|
509
|
+
┌─────────────┐
|
|
510
|
+
│ Browser │
|
|
511
|
+
└──────┬──────┘
|
|
512
|
+
│ POST /api/features
|
|
513
|
+
▼
|
|
514
|
+
┌─────────────────┐ ┌──────────────┐
|
|
515
|
+
│ API Handler │─────▶│ Database │
|
|
516
|
+
│ - Validate │ │ - features │
|
|
517
|
+
│ - Transform │◀─────│ - users │
|
|
518
|
+
└─────────────────┘ └──────────────┘
|
|
519
|
+
│
|
|
520
|
+
▼
|
|
521
|
+
┌─────────────────┐
|
|
522
|
+
│ Response JSON │
|
|
523
|
+
└─────────────────┘
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
**2. Wait for Approval**
|
|
527
|
+
|
|
528
|
+
Agent **MUST NOT** proceed until the human confirms the plan is correct.
|
|
529
|
+
|
|
530
|
+
**3. Create idea.md**
|
|
531
|
+
|
|
532
|
+
Path: `docs/features/[feature-name]/idea.md`
|
|
533
|
+
|
|
534
|
+
Contents:
|
|
535
|
+
- **Problem Statement** — What are we solving?
|
|
536
|
+
- **Solution Design** — How will we solve it?
|
|
537
|
+
- **ASCII Diagrams** — Visual representation
|
|
538
|
+
- **Success Criteria** — How do we know it works?
|
|
539
|
+
|
|
540
|
+
**4. Create build.md**
|
|
541
|
+
|
|
542
|
+
Path: `docs/features/[feature-name]/build.md`
|
|
543
|
+
|
|
544
|
+
Contents:
|
|
545
|
+
- **Step-by-step Implementation Plan** — Ordered list of tasks
|
|
546
|
+
- **Files to Change** — Exact file paths and what changes
|
|
547
|
+
- **Testing Strategy** — How to verify each step
|
|
548
|
+
|
|
549
|
+
**5. Execute Step by Step**
|
|
550
|
+
|
|
551
|
+
- Build one step at a time
|
|
552
|
+
- After each step, check alignment with the plan
|
|
553
|
+
- If something doesn't match, stop and adjust
|
|
554
|
+
- Never batch multiple steps without validation
|
|
555
|
+
|
|
556
|
+
**6. Review & Validate**
|
|
557
|
+
|
|
558
|
+
- Run all tests
|
|
559
|
+
- Verify success criteria from idea.md
|
|
560
|
+
- Update `docs/features/README.md` with new feature entry
|
|
561
|
+
- Add completion to journal: `## Completed ✅`
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
### Why This Works
|
|
566
|
+
|
|
567
|
+
**Benefits of atrisDev Protocol:**
|
|
568
|
+
- **Approval gates prevent wasted work** — Human confirms plan before execution
|
|
569
|
+
- **Documentation is automatic** — idea.md and build.md created as byproducts
|
|
570
|
+
- **Visual thinking reduces miscommunication** — ASCII diagrams force clarity
|
|
571
|
+
- **Step-by-step execution prevents sprawl** — Each step validated before next
|
|
572
|
+
- **Works with any agent** — Protocol is agent-agnostic
|
|
573
|
+
- **Spreads naturally** — Once installed, `atris` becomes the entry point for all dev work
|
|
574
|
+
|
|
575
|
+
**Adoption path:**
|
|
576
|
+
1. Dev installs `atris`: `npm install -g atris`
|
|
577
|
+
2. Initializes project: `atris init`
|
|
578
|
+
3. Runs `atris` to get the protocol prompt
|
|
579
|
+
4. Copies prompt to their preferred agent
|
|
580
|
+
5. Agent follows atrisDev workflow → high-quality output
|
|
581
|
+
6. Dev shares results → others adopt atris
|
|
582
|
+
|
|
583
|
+
**The vision:** Every developer running `atris` gets a structured, high-quality workflow regardless of which coding agent they use. The protocol becomes the standard.
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
469
587
|
## Phase 6: Future Roadmap (Vision)
|
|
470
588
|
|
|
471
589
|
**See [`ATRIS_NOTES.md`](./ATRIS_NOTES.md) for full roadmap. Preview:**
|
package/bin/atris.js
CHANGED
|
@@ -115,79 +115,16 @@ function showHelp() {
|
|
|
115
115
|
console.log(' help - Show this help message');
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
// Smart default: if no command,
|
|
118
|
+
// Smart default: if no command, load context and enter brainstorm/planning mode
|
|
119
119
|
if (!command) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (state.state === 'fresh') {
|
|
129
|
-
console.log('🚀 Welcome to ATRIS\n');
|
|
130
|
-
console.log('Your workspace is ready. Time to get started.\n');
|
|
131
|
-
console.log('Next steps:');
|
|
132
|
-
console.log(' 1. atris log Add your first idea');
|
|
133
|
-
console.log(' 2. atris brainstorm Shape it with AI\n');
|
|
134
|
-
console.log('Or: atris help See all commands\n');
|
|
135
|
-
} else if (state.state === 'in-progress') {
|
|
136
|
-
console.log('📍 In Progress\n');
|
|
137
|
-
console.log(`Feature: ${state.feature}`);
|
|
138
|
-
console.log('Status: In Progress\n');
|
|
139
|
-
console.log('What next?');
|
|
140
|
-
console.log(` → atris do ${state.feature} Continue building`);
|
|
141
|
-
console.log(' → atris log Add thoughts');
|
|
142
|
-
console.log(' → atris plan Change direction\n');
|
|
143
|
-
} else if (state.state === 'inbox') {
|
|
144
|
-
console.log('📥 You Have Ideas Waiting\n');
|
|
145
|
-
console.log(`${state.count} item${state.count > 1 ? 's' : ''} in Inbox:`);
|
|
146
|
-
state.items.forEach((item, i) => {
|
|
147
|
-
const preview = item.length > 50 ? item.substring(0, 47) + '...' : item;
|
|
148
|
-
console.log(` ${i + 1}. ${preview}`);
|
|
149
|
-
});
|
|
150
|
-
console.log('\nWhat next?');
|
|
151
|
-
console.log(' → atris plan Break one down into tasks');
|
|
152
|
-
console.log(' → atris do Jump straight to building\n');
|
|
153
|
-
} else if (state.state === 'blocked') {
|
|
154
|
-
console.log('⚠️ You\'re Blocked\n');
|
|
155
|
-
console.log(`${state.reason}\n`);
|
|
156
|
-
console.log('Next:');
|
|
157
|
-
console.log(' → atris log Document the blocker');
|
|
158
|
-
console.log(' → atris status See details\n');
|
|
159
|
-
} else {
|
|
160
|
-
// ready state
|
|
161
|
-
console.log('✓ Ready to Work\n');
|
|
162
|
-
console.log('What do you want to do?');
|
|
163
|
-
console.log(' → atris log Add an idea');
|
|
164
|
-
console.log(' → atris plan Pick work from MAP');
|
|
165
|
-
console.log(' → atris do Continue recent work\n');
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Show context if available
|
|
169
|
-
if (context.inProgressFeatures.length > 0) {
|
|
170
|
-
console.log('⚡ Active work:');
|
|
171
|
-
context.inProgressFeatures.forEach(feature => {
|
|
172
|
-
console.log(` • ${feature}`);
|
|
173
|
-
});
|
|
174
|
-
console.log('');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (context.hasInbox && context.inboxItems.length > 0) {
|
|
178
|
-
console.log(`📥 Inbox (${context.inboxItems.length}):`);
|
|
179
|
-
context.inboxItems.forEach(item => {
|
|
180
|
-
const preview = item.length > 50 ? item.substring(0, 47) + '...' : item;
|
|
181
|
-
console.log(` • ${preview}`);
|
|
182
|
-
});
|
|
183
|
-
console.log('');
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
} catch (error) {
|
|
187
|
-
console.error('Error detecting workspace state:', error.message);
|
|
188
|
-
showHelp();
|
|
189
|
-
}
|
|
190
|
-
process.exit(0);
|
|
120
|
+
atrisDevEntry()
|
|
121
|
+
.then(() => process.exit(0))
|
|
122
|
+
.catch((error) => {
|
|
123
|
+
console.error(`✗ Error: ${error.message || error}`);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
});
|
|
126
|
+
// Early return to prevent further execution
|
|
127
|
+
return;
|
|
191
128
|
}
|
|
192
129
|
|
|
193
130
|
if (command === 'help' || command === '--help' || command === '-h') {
|
|
@@ -3167,6 +3104,136 @@ function recordBrainstormSession(
|
|
|
3167
3104
|
fs.writeFileSync(logFile, content);
|
|
3168
3105
|
}
|
|
3169
3106
|
|
|
3107
|
+
async function atrisDevEntry() {
|
|
3108
|
+
// Load workspace context and present planning-ready state
|
|
3109
|
+
const targetDir = path.join(process.cwd(), 'atris');
|
|
3110
|
+
|
|
3111
|
+
// Check if ATRIS is initialized
|
|
3112
|
+
if (!fs.existsSync(targetDir)) {
|
|
3113
|
+
console.log('');
|
|
3114
|
+
console.log('🚀 Welcome to ATRIS\n');
|
|
3115
|
+
console.log('Not initialized yet. Let\'s get started:\n');
|
|
3116
|
+
console.log(' → atris init Set up your workspace');
|
|
3117
|
+
console.log(' → atris help See all commands\n');
|
|
3118
|
+
return;
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
ensureLogDirectory();
|
|
3122
|
+
const { logFile, dateFormatted } = getLogPath();
|
|
3123
|
+
if (!fs.existsSync(logFile)) {
|
|
3124
|
+
createLogFile(logFile, dateFormatted);
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
// Load context
|
|
3128
|
+
const workspaceDir = process.cwd();
|
|
3129
|
+
const state = detectWorkspaceState(workspaceDir);
|
|
3130
|
+
const context = loadContext(workspaceDir);
|
|
3131
|
+
|
|
3132
|
+
console.log('');
|
|
3133
|
+
console.log('┌─────────────────────────────────────────────────────────────┐');
|
|
3134
|
+
console.log('│ atrisDev — Context Loaded, Ready to Plan │');
|
|
3135
|
+
console.log('└─────────────────────────────────────────────────────────────┘');
|
|
3136
|
+
console.log('');
|
|
3137
|
+
console.log(`📅 ${dateFormatted}`);
|
|
3138
|
+
console.log('');
|
|
3139
|
+
|
|
3140
|
+
// Show active work if any
|
|
3141
|
+
if (context.inProgressFeatures.length > 0) {
|
|
3142
|
+
console.log('⚡ Active Work:');
|
|
3143
|
+
context.inProgressFeatures.forEach(feature => {
|
|
3144
|
+
console.log(` • ${feature}`);
|
|
3145
|
+
});
|
|
3146
|
+
console.log('');
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
// Show inbox items or cold start message
|
|
3150
|
+
if (context.hasInbox && context.inboxItems.length > 0) {
|
|
3151
|
+
console.log(`📥 Inbox (${context.inboxItems.length} idea${context.inboxItems.length > 1 ? 's' : ''}):`);
|
|
3152
|
+
context.inboxItems.slice(0, 5).forEach((item, i) => {
|
|
3153
|
+
const preview = item.length > 60 ? item.substring(0, 57) + '...' : item;
|
|
3154
|
+
console.log(` ${i + 1}. ${preview}`);
|
|
3155
|
+
});
|
|
3156
|
+
if (context.inboxItems.length > 5) {
|
|
3157
|
+
console.log(` ... and ${context.inboxItems.length - 5} more`);
|
|
3158
|
+
}
|
|
3159
|
+
console.log('');
|
|
3160
|
+
} else {
|
|
3161
|
+
console.log('💭 Fresh slate — ready to build something new\n');
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
3165
|
+
console.log('💬 atrisDev Protocol — Ready to build');
|
|
3166
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
3167
|
+
console.log('');
|
|
3168
|
+
|
|
3169
|
+
// Show context only if there's something to show
|
|
3170
|
+
let hasContext = false;
|
|
3171
|
+
|
|
3172
|
+
if (context.inProgressFeatures.length > 0) {
|
|
3173
|
+
hasContext = true;
|
|
3174
|
+
console.log('⚡ Active Work:');
|
|
3175
|
+
context.inProgressFeatures.forEach(feature => {
|
|
3176
|
+
console.log(` • ${feature}`);
|
|
3177
|
+
});
|
|
3178
|
+
console.log('');
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
if (context.hasInbox && context.inboxItems.length > 0) {
|
|
3182
|
+
hasContext = true;
|
|
3183
|
+
console.log('📥 Inbox Ideas:');
|
|
3184
|
+
context.inboxItems.slice(0, 5).forEach((item, i) => {
|
|
3185
|
+
const preview = item.length > 60 ? item.substring(0, 57) + '...' : item;
|
|
3186
|
+
console.log(` ${i + 1}. ${preview}`);
|
|
3187
|
+
});
|
|
3188
|
+
if (context.inboxItems.length > 5) {
|
|
3189
|
+
console.log(` ... and ${context.inboxItems.length - 5} more`);
|
|
3190
|
+
}
|
|
3191
|
+
console.log('');
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
const logContent = fs.existsSync(logFile) ? fs.readFileSync(logFile, 'utf8') : '';
|
|
3195
|
+
const completedMatch = logContent.match(/## Completed ✅\n([\s\S]*?)(?=\n##|$)/);
|
|
3196
|
+
if (completedMatch && completedMatch[1].trim()) {
|
|
3197
|
+
const completedItems = completedMatch[1].trim().split('\n')
|
|
3198
|
+
.filter(line => line.match(/^- \*\*C\d+:/))
|
|
3199
|
+
.slice(-3);
|
|
3200
|
+
if (completedItems.length > 0) {
|
|
3201
|
+
hasContext = true;
|
|
3202
|
+
console.log('✅ Recent Completions:');
|
|
3203
|
+
completedItems.forEach(item => {
|
|
3204
|
+
const match = item.match(/^- \*\*C\d+:\s*(.+)\*\*/);
|
|
3205
|
+
if (match) {
|
|
3206
|
+
const text = match[1].length > 60 ? match[1].substring(0, 57) + '...' : match[1];
|
|
3207
|
+
console.log(` • ${text}`);
|
|
3208
|
+
}
|
|
3209
|
+
});
|
|
3210
|
+
console.log('');
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3214
|
+
if (!hasContext) {
|
|
3215
|
+
console.log('💭 Fresh slate — ready to build something new');
|
|
3216
|
+
console.log('');
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
console.log('─────────────────────────────────────────────────────────────');
|
|
3220
|
+
console.log('Next: Describe what you want to build');
|
|
3221
|
+
console.log('─────────────────────────────────────────────────────────────');
|
|
3222
|
+
console.log('');
|
|
3223
|
+
console.log('The atrisDev workflow will automatically:');
|
|
3224
|
+
console.log(' 1. Show ASCII visualization (the crosshair)');
|
|
3225
|
+
console.log(' 2. Wait for your approval');
|
|
3226
|
+
console.log(' 3. Create docs/features/[name]/idea.md + build.md');
|
|
3227
|
+
console.log(' 4. Execute step by step');
|
|
3228
|
+
console.log(' 5. Review and update docs');
|
|
3229
|
+
console.log('');
|
|
3230
|
+
console.log('📖 Full protocol: See atris.md Phase 5.2');
|
|
3231
|
+
console.log('🤖 Auto-loaded: atris/CLAUDE.md tells agents to follow atrisDev');
|
|
3232
|
+
console.log('');
|
|
3233
|
+
console.log('Works with: Claude Code, Cursor, Windsurf, Copilot, any agent');
|
|
3234
|
+
console.log('');
|
|
3235
|
+
}
|
|
3236
|
+
|
|
3170
3237
|
async function planAtris() {
|
|
3171
3238
|
const { loadConfig } = require('../utils/config');
|
|
3172
3239
|
const { loadCredentials } = require('../utils/auth');
|