atris 2.0.2 → 2.0.3
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 +92 -12
- package/package.json +1 -1
package/commands/init.js
CHANGED
|
@@ -356,35 +356,69 @@ function initAtris() {
|
|
|
356
356
|
console.log('✓ Injected project patterns into agent_team specs');
|
|
357
357
|
|
|
358
358
|
// Create agent instruction files for different tools
|
|
359
|
-
const agentInstructions = `#
|
|
359
|
+
const agentInstructions = `# AGENTS.md — Universal Agent Instructions
|
|
360
360
|
|
|
361
|
-
|
|
361
|
+
> Works with: Claude Code, Cursor, Codex, Windsurf, and any AI coding agent.
|
|
362
|
+
|
|
363
|
+
## Quick Start
|
|
362
364
|
|
|
363
365
|
\`\`\`bash
|
|
364
366
|
atris
|
|
365
367
|
\`\`\`
|
|
366
368
|
|
|
367
|
-
|
|
369
|
+
Run this first. Follow the output.
|
|
370
|
+
|
|
371
|
+
## Core Files
|
|
372
|
+
|
|
373
|
+
| File | Purpose |
|
|
374
|
+
|------|---------|
|
|
375
|
+
| \`atris/PERSONA.md\` | Communication style (read first) |
|
|
376
|
+
| \`atris/TODO.md\` | Current tasks |
|
|
377
|
+
| \`atris/MAP.md\` | Navigation (where is X?) |
|
|
368
378
|
|
|
369
379
|
## Workflow
|
|
370
380
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
381
|
+
\`\`\`
|
|
382
|
+
PLAN → atris plan (break ideas into tasks)
|
|
383
|
+
BUILD → atris do (execute tasks)
|
|
384
|
+
CHECK → atris review (verify + cleanup)
|
|
385
|
+
\`\`\`
|
|
386
|
+
|
|
387
|
+
## Rules
|
|
388
|
+
|
|
389
|
+
- [ ] 3-4 sentences max per response
|
|
390
|
+
- [ ] Use ASCII visuals for planning
|
|
391
|
+
- [ ] Check MAP.md before touching code
|
|
392
|
+
- [ ] Claim tasks in TODO.md before working
|
|
393
|
+
- [ ] Delete tasks when done
|
|
378
394
|
|
|
379
|
-
|
|
395
|
+
## Anti-patterns
|
|
380
396
|
|
|
381
|
-
|
|
397
|
+
- Don't explore codebase manually (use MAP.md)
|
|
398
|
+
- Don't skip visualization step
|
|
399
|
+
- Don't leave stale tasks
|
|
400
|
+
- Don't write verbose docs
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
**Protocol:** See \`atris/atris.md\` for full spec.`;
|
|
405
|
+
|
|
406
|
+
// .cursorrules for Cursor (legacy)
|
|
382
407
|
const cursorRulesFile = path.join(process.cwd(), '.cursorrules');
|
|
383
408
|
if (!fs.existsSync(cursorRulesFile)) {
|
|
384
409
|
fs.writeFileSync(cursorRulesFile, agentInstructions);
|
|
385
410
|
console.log('✓ Created .cursorrules (for Cursor)');
|
|
386
411
|
}
|
|
387
412
|
|
|
413
|
+
// .cursor/rules/atris.mdc for Cursor (new format)
|
|
414
|
+
const cursorRulesDir = path.join(process.cwd(), '.cursor', 'rules');
|
|
415
|
+
const cursorMdcFile = path.join(cursorRulesDir, 'atris.mdc');
|
|
416
|
+
if (!fs.existsSync(cursorMdcFile)) {
|
|
417
|
+
fs.mkdirSync(cursorRulesDir, { recursive: true });
|
|
418
|
+
fs.writeFileSync(cursorMdcFile, agentInstructions);
|
|
419
|
+
console.log('✓ Created .cursor/rules/atris.mdc (for Cursor)');
|
|
420
|
+
}
|
|
421
|
+
|
|
388
422
|
// AGENTS.md for Codex
|
|
389
423
|
const agentsMdFile = path.join(process.cwd(), 'AGENTS.md');
|
|
390
424
|
if (!fs.existsSync(agentsMdFile)) {
|
|
@@ -392,6 +426,52 @@ DO NOT explore the codebase manually. Run \`atris\` first, then follow its instr
|
|
|
392
426
|
console.log('✓ Created AGENTS.md (for Codex)');
|
|
393
427
|
}
|
|
394
428
|
|
|
429
|
+
// .claude/commands/atris.md for Claude Code
|
|
430
|
+
const claudeCommandsDir = path.join(process.cwd(), '.claude', 'commands');
|
|
431
|
+
const claudeCommandFile = path.join(claudeCommandsDir, 'atris.md');
|
|
432
|
+
if (!fs.existsSync(claudeCommandFile)) {
|
|
433
|
+
fs.mkdirSync(claudeCommandsDir, { recursive: true });
|
|
434
|
+
const claudeCommand = `---
|
|
435
|
+
description: Activate ATRIS context - loads TODO.md, journal, and persona
|
|
436
|
+
allowed-tools: Read, Bash, Glob, Grep
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
Read @AGENTS.md then run \`atris\` command.
|
|
440
|
+
|
|
441
|
+
Follow the workflow: plan → do → review
|
|
442
|
+
|
|
443
|
+
Rules: 3-4 sentences max, ASCII visuals, check MAP.md first.`;
|
|
444
|
+
fs.writeFileSync(claudeCommandFile, claudeCommand);
|
|
445
|
+
console.log('✓ Created .claude/commands/atris.md (for Claude Code)');
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// .claude/skills/atris/SKILL.md for Claude Code
|
|
449
|
+
const claudeSkillsDir = path.join(process.cwd(), '.claude', 'skills', 'atris');
|
|
450
|
+
const claudeSkillFile = path.join(claudeSkillsDir, 'SKILL.md');
|
|
451
|
+
if (!fs.existsSync(claudeSkillFile)) {
|
|
452
|
+
fs.mkdirSync(claudeSkillsDir, { recursive: true });
|
|
453
|
+
const claudeSkill = `---
|
|
454
|
+
name: atris
|
|
455
|
+
description: ATRIS workspace navigation. Triggers on: atris, TODO, tasks, MAP.md, backlog, "where is X?"
|
|
456
|
+
allowed-tools: Read, Bash, Glob, Grep, Write, Edit
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
# ATRIS Skill
|
|
460
|
+
|
|
461
|
+
Read @AGENTS.md for instructions.
|
|
462
|
+
|
|
463
|
+
Detect: Project has \`atris/\` folder with MAP.md, TODO.md, PERSONA.md
|
|
464
|
+
|
|
465
|
+
Workflow: plan → do → review
|
|
466
|
+
|
|
467
|
+
Key behaviors:
|
|
468
|
+
- Read PERSONA.md (3-4 sentences, ASCII visuals)
|
|
469
|
+
- Check MAP.md for file:line refs
|
|
470
|
+
- Update TODO.md (claim tasks, delete when done)`;
|
|
471
|
+
fs.writeFileSync(claudeSkillFile, claudeSkill);
|
|
472
|
+
console.log('✓ Created .claude/skills/atris/SKILL.md (for Claude Code)');
|
|
473
|
+
}
|
|
474
|
+
|
|
395
475
|
// CLAUDE.md for Claude Code (copy from atris/)
|
|
396
476
|
const claudeMdSource = path.join(__dirname, '..', 'atris', 'CLAUDE.md');
|
|
397
477
|
const claudeMdFile = path.join(targetDir, 'CLAUDE.md');
|