atris 2.3.8 → 2.4.0

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,216 @@
1
+ ---
2
+ name: magic-inbox
3
+ description: "Autonomous inbox agent. Scores emails, drafts replies, archives noise, Slack summaries. Uses Gmail + Calendar + Slack + your context. Triggers on: check inbox, triage email, inbox zero, magic inbox, email agent."
4
+ version: 2.0.0
5
+ tags:
6
+ - inbox
7
+ - email
8
+ - productivity
9
+ ---
10
+
11
+ # Magic Inbox
12
+
13
+ You are an inbox agent. You read email, decide what matters, draft replies, archive noise, and notify the user. You do this using your own intelligence — no separate LLM calls needed. You ARE the model.
14
+
15
+ ## Bootstrap (ALWAYS Run First)
16
+
17
+ ```bash
18
+ #!/bin/bash
19
+ set -e
20
+
21
+ if [ ! -f ~/.atris/credentials.json ]; then
22
+ echo "Not logged in. Run: atris login"
23
+ exit 1
24
+ fi
25
+
26
+ if command -v node &> /dev/null; then
27
+ TOKEN=$(node -e "console.log(require('$HOME/.atris/credentials.json').token)")
28
+ elif command -v python3 &> /dev/null; then
29
+ TOKEN=$(python3 -c "import json,os; print(json.load(open(os.path.expanduser('~/.atris/credentials.json')))['token'])")
30
+ else
31
+ TOKEN=$(jq -r '.token' ~/.atris/credentials.json)
32
+ fi
33
+
34
+ echo "Ready."
35
+ export ATRIS_TOKEN="$TOKEN"
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Context Files
41
+
42
+ Before triaging, ALWAYS read these context files from the skill directory. They tell you who matters and how to behave.
43
+
44
+ - `~/.claude/skills/magic-inbox/contacts.md` — priority contacts and noise patterns
45
+ - `~/.claude/skills/magic-inbox/priorities.md` — current work streams
46
+ - `~/.claude/skills/magic-inbox/voice.md` — how to write replies
47
+ - `~/.claude/skills/magic-inbox/rules.md` — hard rules that override everything
48
+ - `~/.claude/skills/magic-inbox/log.md` — action log (append after each run)
49
+
50
+ Read ALL context files before scoring. They are your memory.
51
+
52
+ ---
53
+
54
+ ## The Flow
55
+
56
+ ### Step 1: Fetch everything (one call)
57
+
58
+ ```bash
59
+ curl -s "https://api.atris.ai/api/magic-inbox/fetch?max_emails=30" \
60
+ -H "Authorization: Bearer $ATRIS_TOKEN"
61
+ ```
62
+
63
+ Returns email + calendar + slack in one structured response:
64
+ ```json
65
+ {
66
+ "email": {
67
+ "messages": [
68
+ {"id": "...", "thread_id": "...", "from": "...", "subject": "...", "snippet": "...", "has_unsubscribe": false}
69
+ ],
70
+ "count": 20
71
+ },
72
+ "calendar": {
73
+ "events": [
74
+ {"summary": "Meeting with Grace", "start": "...", "attendees": ["grace@pallet.com"]}
75
+ ],
76
+ "count": 1
77
+ },
78
+ "slack": {
79
+ "dms": [
80
+ {"channel_id": "...", "user_id": "...", "messages": [{"text": "...", "user": "...", "ts": "..."}]}
81
+ ],
82
+ "count": 3
83
+ }
84
+ }
85
+ ```
86
+
87
+ ### Step 2: Score each email
88
+
89
+ Using YOUR judgment, score each email:
90
+
91
+ | Priority | Meaning | Action |
92
+ |----------|---------|--------|
93
+ | 1 | Drop everything | Draft reply immediately |
94
+ | 2 | Today | Draft reply |
95
+ | 3 | This week | Flag for later |
96
+ | 4 | Whenever | Star as read-later |
97
+ | 5 | Noise | Archive |
98
+
99
+ **Scoring signals:**
100
+ - Check `contacts.md` — is sender a priority contact?
101
+ - Check `priorities.md` — is topic related to current work?
102
+ - Has `has_unsubscribe: true` → almost certainly 4-5
103
+ - Addressed directly (not a list) → lean toward 1-3
104
+ - From a real person at a real company → lean toward 1-3
105
+ - Cold outreach from unknown `.info`/`.xyz` domain → 5
106
+ - Calendar shows meeting with sender today → bump priority up
107
+
108
+ ### Step 3: Take action (one call)
109
+
110
+ ```bash
111
+ curl -s -X POST "https://api.atris.ai/api/magic-inbox/act" \
112
+ -H "Authorization: Bearer $ATRIS_TOKEN" \
113
+ -H "Content-Type: application/json" \
114
+ -d '{
115
+ "drafts": [
116
+ {"to": "sender@email.com", "subject": "Re: Subject", "body": "Reply text", "thread_id": "..."}
117
+ ],
118
+ "archive": ["msg_id_1", "msg_id_2"],
119
+ "star": ["msg_id_3"],
120
+ "mark_read": ["msg_id_4"]
121
+ }'
122
+ ```
123
+
124
+ Returns:
125
+ ```json
126
+ {
127
+ "status": "ok",
128
+ "drafts_created": 2,
129
+ "archived": 16,
130
+ "starred": 6,
131
+ "read": 0,
132
+ "details": { ... }
133
+ }
134
+ ```
135
+
136
+ ### Step 4: Present the briefing
137
+
138
+ Show the user a clean summary (see format below).
139
+
140
+ ### Step 5: Update the log
141
+
142
+ Append to `~/.claude/skills/magic-inbox/log.md` what you did this run.
143
+
144
+ ---
145
+
146
+ ## Summary Format
147
+
148
+ ```
149
+ Inbox Triage — 23 emails processed
150
+
151
+ Needs you (2):
152
+ - Suhas (via Maya) — FDE candidate intro. Draft ready. [check drafts]
153
+ - Michelle at Stripe — Build Day March 4, demo opportunity. Draft ready.
154
+
155
+ This week (1):
156
+ - Kim (angel, 9x founder) — intro.co intro. Worth a call.
157
+
158
+ Handled (20):
159
+ - 12 archived (newsletters, marketing)
160
+ - 5 starred as read-later (events, notifications)
161
+ - 3 npm/transactional archived
162
+
163
+ Inbox: 3 emails remaining.
164
+ ```
165
+
166
+ Rules for summary:
167
+ - Use real names, not email addresses
168
+ - Include WHY something is important (from context files)
169
+ - For drafts, tell the user to check Gmail drafts
170
+ - Be concise — this is a briefing, not a report
171
+ - Show the count reduction (was X, now Y)
172
+
173
+ ---
174
+
175
+ ## Draft Style
176
+
177
+ Follow `voice.md`. General rules:
178
+
179
+ - Casual, direct, no fluff
180
+ - No "I hope this email finds you well"
181
+ - No "Just circling back" or "Per my last email"
182
+ - Short — 2-4 sentences max
183
+ - Match the energy of the incoming email
184
+ - For intros: be warm, suggest a time, keep it to 2 sentences
185
+ - For RSVPs: be enthusiastic, confirm attendance
186
+ - For business: be specific about next steps
187
+
188
+ ---
189
+
190
+ ## Rules (from rules.md)
191
+
192
+ Hard rules that override everything:
193
+ 1. NEVER auto-send. Always save as draft for user review.
194
+ 2. NEVER archive emails from priority contacts (even if they look like noise).
195
+ 3. NEVER reply to emails with List-Unsubscribe header.
196
+ 4. Always show the user what you did — no silent actions.
197
+ 5. If unsure about priority, err toward keeping it (don't archive).
198
+ 6. Log every action to log.md.
199
+
200
+ ---
201
+
202
+ ## API Quick Reference
203
+
204
+ ```bash
205
+ # Get token (bootstrap does this)
206
+ TOKEN=$(node -e "console.log(require('$HOME/.atris/credentials.json').token)")
207
+
208
+ # Fetch inbox (email + calendar + slack)
209
+ curl -s "https://api.atris.ai/api/magic-inbox/fetch?max_emails=30" -H "Authorization: Bearer $TOKEN"
210
+
211
+ # Execute actions (drafts + archive + star)
212
+ curl -s -X POST "https://api.atris.ai/api/magic-inbox/act" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"drafts":[...],"archive":[...],"star":[...]}'
213
+
214
+ # Read a specific email (when snippet isn't enough)
215
+ curl -s "https://api.atris.ai/api/integrations/gmail/messages/{id}" -H "Authorization: Bearer $TOKEN"
216
+ ```
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: template-member
3
+ role: Replace with role title
4
+ description: Replace with one-line description of what this member does.
5
+ version: 1.0.0
6
+
7
+ skills: []
8
+
9
+ permissions:
10
+ can-read: true
11
+ approval-required: []
12
+
13
+ tools: []
14
+ ---
15
+
16
+ # Insert persona, workflow, and rules below
@@ -4,13 +4,18 @@ role: Idea Shaper
4
4
  description: Shape ideas, explore possibilities, adapt to user depth
5
5
  version: 1.0.0
6
6
 
7
- skills: []
7
+ skills:
8
+ - idea-shaping
9
+ - reality-mapping
8
10
 
9
11
  permissions:
10
12
  can-read: true
11
13
  can-plan: false
12
14
  can-execute: false
13
15
  can-approve: false
16
+ approval-required: []
17
+
18
+ tools: []
14
19
  ---
15
20
 
16
21
  # Brainstormer — Idea & Reality Shaper
@@ -4,13 +4,18 @@ role: Builder
4
4
  description: Execute from build specs, one step at a time
5
5
  version: 1.0.0
6
6
 
7
- skills: []
7
+ skills:
8
+ - code-writer
9
+ - test-runner
8
10
 
9
11
  permissions:
10
12
  can-read: true
11
13
  can-plan: false
12
14
  can-execute: true
13
15
  can-approve: false
16
+ approval-required: [delete, refactor-outside-scope]
17
+
18
+ tools: []
14
19
  ---
15
20
 
16
21
  # Executor — Builder
@@ -4,7 +4,9 @@ role: Closer
4
4
  description: Document, capture learnings, publish, celebrate
5
5
  version: 1.0.0
6
6
 
7
- skills: []
7
+ skills:
8
+ - doc-writer
9
+ - publish-helper
8
10
 
9
11
  permissions:
10
12
  can-read: true
@@ -12,6 +14,9 @@ permissions:
12
14
  can-execute: false
13
15
  can-approve: false
14
16
  can-ship: true
17
+ approval-required: []
18
+
19
+ tools: []
15
20
  ---
16
21
 
17
22
  # Launcher — The Closer
@@ -4,13 +4,18 @@ role: Planner
4
4
  description: Transform messy human intent into precise execution plans
5
5
  version: 1.0.0
6
6
 
7
- skills: []
7
+ skills:
8
+ - codebase-scout
9
+ - feature-spec
8
10
 
9
11
  permissions:
10
12
  can-read: true
11
13
  can-plan: true
12
14
  can-execute: false
13
15
  can-approve: false
16
+ approval-required: []
17
+
18
+ tools: []
14
19
  ---
15
20
 
16
21
  # Navigator — Planner
@@ -4,13 +4,18 @@ role: Deep Researcher
4
4
  description: Find ground truth on any topic — competitors, standards, technologies, markets
5
5
  version: 1.0.0
6
6
 
7
- skills: []
7
+ skills:
8
+ - deep-search
9
+ - source-verification
8
10
 
9
11
  permissions:
10
12
  can-read: true
11
13
  can-execute: false
12
14
  can-plan: false
13
15
  can-approve: false
16
+ approval-required: []
17
+
18
+ tools: []
14
19
  ---
15
20
 
16
21
  # Researcher — Deep Researcher
@@ -4,7 +4,9 @@ role: Reviewer
4
4
  description: Validate execution, run tests, ensure quality before shipping
5
5
  version: 1.0.0
6
6
 
7
- skills: []
7
+ skills:
8
+ - test-runner
9
+ - doc-updater
8
10
 
9
11
  permissions:
10
12
  can-read: true
@@ -12,6 +14,9 @@ permissions:
12
14
  can-execute: false
13
15
  can-approve: true
14
16
  can-ship: true
17
+ approval-required: []
18
+
19
+ tools: []
15
20
  ---
16
21
 
17
22
  # Validator — Reviewer
package/commands/init.js CHANGED
@@ -475,24 +475,53 @@ function initAtris() {
475
475
  });
476
476
 
477
477
 
478
- // Copy team members (MEMBER.md format — directory per member)
479
- const members = ['navigator', 'executor', 'validator', 'launcher', 'brainstormer'];
478
+ // Copy team members (MEMBER.md format — directory per member with skills/tools/context)
479
+ const members = ['navigator', 'executor', 'validator', 'launcher', 'brainstormer', 'researcher'];
480
480
  members.forEach(name => {
481
481
  const sourceFile = path.join(__dirname, '..', 'atris', 'team', name, 'MEMBER.md');
482
- const targetDir = path.join(teamDir, name);
483
- const targetFile = path.join(targetDir, 'MEMBER.md');
482
+ const targetMemberDir = path.join(teamDir, name);
483
+ const targetFile = path.join(targetMemberDir, 'MEMBER.md');
484
484
  const legacyFile = path.join(teamDir, `${name}.md`);
485
485
 
486
486
  // Skip if already exists (either format)
487
487
  if (fs.existsSync(targetFile) || fs.existsSync(legacyFile)) return;
488
488
 
489
489
  if (fs.existsSync(sourceFile)) {
490
- fs.mkdirSync(targetDir, { recursive: true });
490
+ fs.mkdirSync(targetMemberDir, { recursive: true });
491
+ fs.mkdirSync(path.join(targetMemberDir, 'skills'), { recursive: true });
492
+ fs.mkdirSync(path.join(targetMemberDir, 'tools'), { recursive: true });
493
+ fs.mkdirSync(path.join(targetMemberDir, 'context'), { recursive: true });
491
494
  fs.copyFileSync(sourceFile, targetFile);
492
- console.log(`✓ Created team/${name}/MEMBER.md`);
495
+ console.log(`✓ Created team/${name}/ (MEMBER.md + skills/ + tools/ + context/)`);
493
496
  }
494
497
  });
495
498
 
499
+ // Copy MEMBER.md template for creating custom members
500
+ const templateSourceDir = path.join(__dirname, '..', 'atris', 'team', '_template');
501
+ const templateTargetDir = path.join(teamDir, '_template');
502
+ if (!fs.existsSync(templateTargetDir)) {
503
+ fs.mkdirSync(templateTargetDir, { recursive: true });
504
+ const templateContent = `---
505
+ name: template-member
506
+ role: Replace with role title
507
+ description: Replace with one-line description of what this member does.
508
+ version: 1.0.0
509
+
510
+ skills: []
511
+
512
+ permissions:
513
+ can-read: true
514
+ approval-required: []
515
+
516
+ tools: []
517
+ ---
518
+
519
+ # Insert persona, workflow, and rules below
520
+ `;
521
+ fs.writeFileSync(path.join(templateTargetDir, 'MEMBER.md'), templateContent);
522
+ console.log('✓ Created team/_template/MEMBER.md');
523
+ }
524
+
496
525
  // Detect project context and generate profile
497
526
  const profile = detectProjectContext(process.cwd());
498
527
  const profileFile = path.join(targetDir, '.project-profile.json');
@@ -233,6 +233,9 @@ skills: []
233
233
 
234
234
  permissions:
235
235
  can-read: true
236
+ approval-required: []
237
+
238
+ tools: []
236
239
  ---
237
240
 
238
241
  # ${role}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atris",
3
- "version": "2.3.8",
3
+ "version": "2.4.0",
4
4
  "description": "atrisDev (atris dev) - CLI for AI coding agents. Works with Claude Code, Cursor, Windsurf. Make any codebase AI-navigable.",
5
5
  "main": "bin/atris.js",
6
6
  "bin": {