atris 2.0.5 → 2.0.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.
package/commands/init.js CHANGED
@@ -274,14 +274,30 @@ function initAtris() {
274
274
  }
275
275
 
276
276
  if (!fs.existsSync(todoFile)) {
277
- fs.writeFileSync(
278
- todoFile,
279
- '# TODO.md\n\n' +
280
- '> Working TODO list for this project.\n' +
281
- '> Use this file as the current working context (tasks, links to features, etc.).\n' +
282
- '\n' +
283
- 'Your AI agent can auto-populate this file after reading atris.md.\n'
284
- );
277
+ fs.writeFileSync(todoFile, `# TODO.md
278
+
279
+ > Working task queue for this project. Target state = 0.
280
+
281
+ ---
282
+
283
+ ## Backlog
284
+
285
+ (Empty)
286
+
287
+ ---
288
+
289
+ ## In Progress
290
+
291
+ (Empty)
292
+
293
+ ---
294
+
295
+ ## Completed
296
+
297
+ (Validator deletes after verification)
298
+
299
+ ---
300
+ `);
285
301
  console.log('✓ Created TODO.md placeholder');
286
302
  }
287
303
 
@@ -296,22 +312,42 @@ function initAtris() {
296
312
  console.log('✓ Created features/ directory with README');
297
313
  }
298
314
 
299
- // Create _templates/validate.md.template if not exists
315
+ // Create feature templates (idea/build/validate)
300
316
  if (!fs.existsSync(templatesDir)) {
301
317
  fs.mkdirSync(templatesDir, { recursive: true });
302
318
  }
303
- const validateTemplateSource = path.join(__dirname, '..', 'atris', 'features', '_templates', 'validate.md.template');
304
- const validateTemplateTarget = path.join(templatesDir, 'validate.md.template');
305
-
306
- if (fs.existsSync(validateTemplateSource)) {
307
- fs.copyFileSync(validateTemplateSource, validateTemplateTarget);
308
- console.log('✓ Created features/_templates/validate.md.template');
309
- } else {
310
- // Fallback if source not found (for safety)
311
- const fallbackContent = `# Validation — [Feature Name]\n\n> **Role:** System Validation Script\n> **Executor:** Validator Agent\n> **Instructions:** Run these steps sequentially. If ANY step fails, the feature is broken.\n\n---\n\n## 1. Environment Check\n- [ ] **Pre-flight:**\n - Command: \`npm run type-check\` (or relevant)\n - Expect: No errors\n\n## 2. Simulation Steps (The "Real" Test)\n\n### Step 1: [Name]\n- **Action:** [Exact command]\n- **Expect:** [Exact output regex]\n\n---\n\n**Status:** [Pending | Verified]\n`;
312
- fs.writeFileSync(validateTemplateTarget, fallbackContent);
313
- console.log('✓ Created features/_templates/validate.md.template (fallback)');
314
- }
319
+
320
+ const templateSpecs = [
321
+ {
322
+ name: 'idea.md.template',
323
+ fallback: `# [Feature Name]\n\n> **Status:** planning | in-progress | complete\n> **Created:** YYYY-MM-DD\n> **Last Updated:** YYYY-MM-DD\n\n---\n\n## Problem Statement\n\n(2-3 sentences)\n\n---\n\n## Solution Design\n\n(3-4 sentences)\n\n---\n\n## ASCII Visualization\n\n\`\`\`\n[diagram]\n\`\`\`\n\n---\n\n## Success Criteria\n\n- [ ] Criterion 1\n- [ ] Criterion 2\n`,
324
+ },
325
+ {
326
+ name: 'build.md.template',
327
+ fallback: `# [Feature Name] — Build Plan\n\n> **For Executor Agent** Follow these steps exactly.\n\n---\n\n## Overview\n\n(1-2 sentences)\n\n---\n\n## Files Touched\n\n**Created:**\n- \`path/to/new/file\` Why\n\n**Modified:**\n- \`path/to/existing/file\` What changes\n\n---\n\n## Build Steps\n\n### Step 1: [Action]\n\n**File:** \`path/to/file\`\n\n**What to do:**\n- Specific instruction\n\n**Validation:**\n- How to verify\n`,
328
+ },
329
+ {
330
+ name: 'validate.md.template',
331
+ fallback: `# Validation — [Feature Name]\n\n> **Role:** System Validation Script\n> **Executor:** Validator Agent\n> **Instructions:** Run these steps sequentially. If ANY step fails, the feature is broken.\n\n---\n\n## 1. Environment Check\n- [ ] **Pre-flight:**\n - Command: \`npm test\` (or relevant)\n - Expect: No errors\n\n## 2. Simulation Steps (The \"Real\" Test)\n\n### Step 1: [Name]\n- **Action:** [Exact command]\n- **Expect:** [Exact output regex]\n\n---\n\n**Status:** [Pending | Verified]\n`,
332
+ },
333
+ ];
334
+
335
+ templateSpecs.forEach(({ name, fallback }) => {
336
+ const target = path.join(templatesDir, name);
337
+ if (fs.existsSync(target)) {
338
+ return;
339
+ }
340
+
341
+ const source = path.join(__dirname, '..', 'atris', 'features', '_templates', name);
342
+ if (fs.existsSync(source)) {
343
+ fs.copyFileSync(source, target);
344
+ console.log(`✓ Created features/_templates/${name}`);
345
+ return;
346
+ }
347
+
348
+ fs.writeFileSync(target, fallback);
349
+ console.log(`✓ Created features/_templates/${name} (fallback)`);
350
+ });
315
351
 
316
352
 
317
353
  const navigatorSource = path.join(__dirname, '..', 'atris', 'agent_team', 'navigator.md');
@@ -483,23 +519,7 @@ Key behaviors:
483
519
  if (fs.existsSync(sourceFile)) {
484
520
  fs.copyFileSync(sourceFile, targetFile);
485
521
  console.log('✓ Copied atris.md to atris/ folder');
486
- console.log('\n ATRIS initialized! Full structure created:');
487
- console.log(' atris/');
488
- console.log(' ├── GETTING_STARTED.md (read this first!)');
489
- console.log(' ├── PERSONA.md (agent personality)');
490
- console.log(' ├── atris.md (AI agent instructions)');
491
- console.log(' ├── MAP.md (placeholder)');
492
- console.log(' ├── TODO.md (placeholder)');
493
- console.log(' └── agent_team/');
494
- console.log(' ├── brainstormer.md (vision shaper)');
495
- console.log(' ├── navigator.md (planner)');
496
- console.log(' ├── executor.md (builder)');
497
- console.log(' ├── validator.md (reviewer)');
498
- console.log(' └── launcher.md (closer)');
499
- console.log('\nNext steps:');
500
- console.log('1. Read atris/GETTING_STARTED.md for the full guide');
501
- console.log('2. Open atris/atris.md and paste it to your AI agent');
502
- console.log('3. Your agent will populate all placeholder files in ~10 mins');
522
+ console.log('\n ATRIS initialized.');
503
523
  } else {
504
524
  console.error('✗ Error: atris.md not found in package');
505
525
  process.exit(1);
package/commands/log.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
  const readline = require('readline');
4
- const { getLogPath, ensureLogDirectory, createLogFile } = require('../lib/file-ops');
4
+ const { getLogPath, ensureLogDirectory, createLogFile, addInboxIdea } = require('../lib/file-ops');
5
5
 
6
6
  function logAtris() {
7
7
  const targetDir = path.join(process.cwd(), 'atris');
@@ -41,8 +41,7 @@ function logAtris() {
41
41
  }
42
42
 
43
43
  if (input) {
44
- const entry = `- ${input}\n`;
45
- fs.appendFileSync(logFile, entry);
44
+ addInboxIdea(logFile, input);
46
45
  }
47
46
 
48
47
  rl.prompt();
package/commands/sync.js CHANGED
@@ -14,6 +14,13 @@ function syncAtris() {
14
14
  fs.mkdirSync(agentTeamDir, { recursive: true });
15
15
  }
16
16
 
17
+ // Ensure policies folder exists
18
+ const policiesDir = path.join(targetDir, 'policies');
19
+ if (!fs.existsSync(policiesDir)) {
20
+ fs.mkdirSync(policiesDir, { recursive: true });
21
+ console.log('✓ Created atris/policies/ folder');
22
+ }
23
+
17
24
  const filesToSync = [
18
25
  { source: 'atris.md', target: 'atris.md' },
19
26
  { source: 'PERSONA.md', target: 'PERSONA.md' },
@@ -22,7 +29,8 @@ function syncAtris() {
22
29
  { source: 'atris/agent_team/executor.md', target: 'agent_team/executor.md' },
23
30
  { source: 'atris/agent_team/validator.md', target: 'agent_team/validator.md' },
24
31
  { source: 'atris/agent_team/launcher.md', target: 'agent_team/launcher.md' },
25
- { source: 'atris/agent_team/brainstormer.md', target: 'agent_team/brainstormer.md' }
32
+ { source: 'atris/agent_team/brainstormer.md', target: 'agent_team/brainstormer.md' },
33
+ { source: 'atris/policies/ANTISLOP.md', target: 'policies/ANTISLOP.md' }
26
34
  ];
27
35
 
28
36
  let updated = 0;