atris 2.3.8 → 2.5.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.
package/atris/AGENTS.md CHANGED
@@ -21,5 +21,4 @@ Instructions for coding agents working inside this repository.
21
21
  ## Notes
22
22
 
23
23
  - `TODO.md` is the current task file; `TASK_CONTEXTS.md` is legacy (fallback only).
24
- - Feature templates live in `atris/features/_templates/`.
25
-
24
+ - Feature templates live in `atris/features/_templates/` (`idea`, `build`, `validate`, optional `changelog`).
package/atris/atris.md CHANGED
@@ -88,12 +88,31 @@ Stage: PLAN → do → review (capitalize current stage)
88
88
  ## WORKFLOW
89
89
 
90
90
  ```
91
- plan → do → review
91
+ scout → plan → do → review
92
92
  ```
93
93
 
94
- - **PLAN** — ASCII visualization, get approval, NO code yet. Create `atris/features/[name]/idea.md` + `build.md` + `validate.md` for substantial work.
95
- - **DO** — Execute build.md step-by-step, update journal
96
- - **REVIEW** — Fill in validate.md, test, clean up. If anything surprised you, append to `atris/lessons.md`.
94
+ - **SCOUT** — Read relevant files first. Understand before you act. Report what you found.
95
+ - **PLAN** — ASCII visualization, get approval, NO code yet
96
+ - **DO** — Execute step-by-step, update journal
97
+ - **REVIEW** — Test, validate, clean up, delete completed tasks
98
+
99
+ ---
100
+
101
+ ## TASK RULES
102
+
103
+ Every task must follow these rules. No exceptions.
104
+
105
+ **One job per task.** If a task touches more than 2-3 files, break it down. If you can't describe "done" in one sentence, it's too big.
106
+
107
+ **Clear exit condition.** Every task states what "done" looks like. Not "improve auth" — instead: "Add session check to upload handler. Done when: unauthenticated requests return 401 and test passes."
108
+
109
+ **Tag every task:**
110
+ - `[explore]` — Ambiguous. Needs reading, research, judgment. Output is understanding.
111
+ - `[execute]` — Precise. Route is clear. Just do it. Output is code or artifact.
112
+
113
+ **Explore before execute.** When starting a new area of work, the first tasks should be `[explore]`. Read the files. Map the space. Report what you found. Then plan `[execute]` tasks based on what you learned.
114
+
115
+ **Sequence matters.** Order tasks so each one builds context for the next. Early tasks should teach you about the problem. Later tasks use that knowledge.
97
116
 
98
117
  ---
99
118
 
@@ -141,7 +160,6 @@ Specs loaded at activate from `team/*.md`
141
160
  |------|---------|
142
161
  | `MAP.md` | Where is X? (navigation) |
143
162
  | `TODO.md` | Task queue (target: 0) |
144
- | `lessons.md` | What we learned (append-only, read by navigator, written by validator) |
145
163
  | `logs/YYYY/MM-DD.md` | Journal (daily) |
146
164
  | `PERSONA.md` | Communication style |
147
165
  | `team/` | Agent behaviors |
@@ -169,6 +187,22 @@ Specs loaded at activate from `team/*.md`
169
187
 
170
188
  ---
171
189
 
190
+ ## PERSISTENCE
191
+
192
+ Context window = cache. Disk = truth. Route discoveries as they happen.
193
+
194
+ | You discover... | Write to... | Format |
195
+ |---------------------|----------------------|----------------------|
196
+ | Code location | MAP.md | file:line reference |
197
+ | New task | TODO.md | Task + exit condition |
198
+ | Decision / tradeoff | Journal → Notes | Timestamped line |
199
+ | Something learned | lessons.md | One-line lesson |
200
+ | Work finished | Journal → Completed | C#: description |
201
+
202
+ Don't batch. Don't wait for session end. Nothing important should live only in-context.
203
+
204
+ ---
205
+
172
206
  ## RULES
173
207
 
174
208
  - 3-4 sentences max
@@ -176,7 +210,7 @@ Specs loaded at activate from `team/*.md`
176
210
  - Check MAP.md before touching code
177
211
  - Update journal after completing work
178
212
  - Delete tasks when done (target: 0)
179
- - **Grep before acting:** `grep -i "<keywords>" atris/logs/**/*.md` — surface relevant history first
213
+ - Persist as you go (see PERSISTENCE)
180
214
 
181
215
  ---
182
216
 
@@ -0,0 +1,11 @@
1
+ # Changelog — [Feature Name]
2
+
3
+ Use this file only when useful (customer-visible changes, bug fixes, regressions, release notes).
4
+
5
+ ## [YYYY-MM-DD]
6
+
7
+ - type: feature | bug | refactor | security
8
+ - summary: One-line description of what changed
9
+ - gates: PASS | FAIL
10
+ - ref: PR/commit/link
11
+ - rollback: One-line rollback note
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: chief-of-staff
3
+ description: "Daily briefing agent that learns your patterns and gets better every morning. Requires member-runtime skill. Use when you want a personalized morning briefing, daily summary, or 'brief me'."
4
+ version: 1.0.0
5
+ tags:
6
+ - daily-briefing
7
+ - personal-assistant
8
+ - stateful
9
+ - productivity
10
+ - chief-of-staff
11
+ ---
12
+
13
+ # Chief of Staff
14
+
15
+ A MEMBER.md worker that runs on the member-runtime skill. Install both:
16
+
17
+ ```
18
+ clawhub install member-runtime
19
+ clawhub install chief-of-staff
20
+ ```
21
+
22
+ Then say: "brief me" or "be my chief of staff"
23
+
24
+ ## What This Member Does
25
+
26
+ Delivers a daily briefing covering your calendar, tasks, and relevant news. Gets better over time through a journal loop -- tracks what you engage with, what you skip, and adapts.
27
+
28
+ - **Day 1:** Generic briefing. Calendar + tasks. Fine but forgettable.
29
+ - **Day 5:** Knows you skip weather, care about AI news, want prep for external meetings.
30
+ - **Day 30:** Knows your Monday sprint routine, your team, your reading habits. The briefing is yours.
31
+
32
+ ## Files Installed
33
+
34
+ ```
35
+ team/chief-of-staff/
36
+ MEMBER.md # Persona and workflow
37
+ skills/daily-briefing/SKILL.md # How to build the briefing
38
+ skills/pattern-learning/SKILL.md # How to learn from each run
39
+ context/preferences.md # Starting defaults
40
+ ```
41
+
42
+ ## How It Works
43
+
44
+ 1. The member-runtime skill finds and loads `team/chief-of-staff/MEMBER.md`
45
+ 2. It reads the persona -- an opinionated prioritizer, not a data dumper
46
+ 3. It loads the daily-briefing skill for structure and the pattern-learning skill for the journal loop
47
+ 4. It checks memory for past briefings and user preferences
48
+ 5. It delivers a briefing adapted to what you actually care about
49
+ 6. After delivery, it writes a journal entry recording what happened
50
+ 7. Tomorrow's briefing is better because of today's journal
51
+
52
+ ## The Journal Loop
53
+
54
+ This is what makes chief-of-staff different from every other briefing skill:
55
+
56
+ - After each briefing, the member writes what was delivered and how the user reacted
57
+ - After 3 days of consistent behavior, it promotes a pattern to durable memory
58
+ - Direct requests ("never include weather") are remembered immediately
59
+ - The member reads all of this before building tomorrow's briefing
60
+
61
+ No configuration needed. Preferences build up through use.
62
+
63
+ ## Source
64
+
65
+ Format spec and full source: https://github.com/atrislabs/member
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: member-runtime
3
+ description: "Load and run MEMBER.md team members -- complete AI workers with persona, skills, tools, context, and a journal that learns over time. Use when you want to activate a team member, run 'be my chief of staff', or manage stateful AI workers."
4
+ version: 1.0.0
5
+ tags:
6
+ - ai-agents
7
+ - team-management
8
+ - stateful-skills
9
+ - member-format
10
+ - workflow
11
+ ---
12
+
13
+ # Member Runtime
14
+
15
+ This skill teaches you how to load and run MEMBER.md team members. A member is a skill that manages skills -- it bundles a persona, capabilities, tools, permissions, and a journal that gets smarter over time.
16
+
17
+ Format spec: https://github.com/atrislabs/member
18
+
19
+ ## What is a MEMBER.md?
20
+
21
+ A MEMBER.md is a directory (or single file) that defines a complete AI worker:
22
+
23
+ ```
24
+ team/{name}/
25
+ MEMBER.md # Who this worker is (persona, workflow, rules)
26
+ skills/ # What they can do (SKILL.md files)
27
+ context/ # What they know (domain knowledge)
28
+ tools/ # What they use (API docs, configs)
29
+ journal/ # What they've learned (grows over time)
30
+ ```
31
+
32
+ ## How to Load a Member
33
+
34
+ When the user activates a member (e.g., "be my chief of staff", "act as the sdr"), follow these steps:
35
+
36
+ ### 1. Find the member
37
+
38
+ Look for the member definition in order:
39
+ 1. `team/{name}/MEMBER.md` (directory format)
40
+ 2. `team/{name}.md` (flat file format)
41
+
42
+ If not found, tell the user: "Member '{name}' not found. Install one from ClawHub or create team/{name}/MEMBER.md."
43
+
44
+ ### 2. Parse the frontmatter
45
+
46
+ Read the YAML frontmatter between `---` delimiters. Extract:
47
+ - `name` -- the member's identifier
48
+ - `role` -- their job title
49
+ - `skills` -- list of capability names
50
+ - `permissions` -- what they can and can't do
51
+ - `tools` -- what external tools they need
52
+
53
+ ### 3. Load skills
54
+
55
+ For each skill in the frontmatter `skills` list:
56
+ 1. Check `team/{name}/skills/{skill-name}/SKILL.md`
57
+ 2. If found, read it and incorporate the instructions
58
+ 3. If not found, treat it as an abstract capability (the member knows how to do this but has no local definition)
59
+
60
+ ### 4. Load context
61
+
62
+ Read all markdown files in `team/{name}/context/`. These are domain knowledge the member references while working -- playbooks, reference docs, default preferences. Load them into your working context.
63
+
64
+ ### 5. Read the journal
65
+
66
+ This is what makes members stateful. Before doing anything:
67
+
68
+ 1. Search memory for past entries from this member: `memory_search("{member-name} preferences patterns")`
69
+ 2. Read today's and yesterday's memory files for recent journal entries
70
+ 3. Read `MEMORY.md` for durable preferences this member has recorded
71
+
72
+ If no journal entries exist (first run), proceed with defaults from `context/preferences.md`.
73
+
74
+ ### 6. Become the member
75
+
76
+ Adopt the persona, workflow, and rules from the MEMBER.md body. You are now this member. Follow their workflow step by step. Respect their permissions -- if `can-send: false`, draft but don't send.
77
+
78
+ ### 7. Write the journal
79
+
80
+ After completing the task, write a journal entry to `memory/YYYY-MM-DD.md`:
81
+
82
+ ```markdown
83
+ ## {member-name} - {date}
84
+
85
+ **Task:** What was requested
86
+ **Delivered:** What was produced
87
+ **User reaction:** What the user engaged with, asked follow-up about, or ignored
88
+ **Pattern:** Any emerging preference (e.g., "user prefers bullets over prose")
89
+ ```
90
+
91
+ If a pattern has been consistent for 3+ days, promote it to `MEMORY.md` as a durable preference.
92
+
93
+ ## Permissions Enforcement
94
+
95
+ The member's `permissions` field declares intent. Enforce it:
96
+
97
+ - `can-*: false` -- Don't do this action. Draft instead and ask for approval.
98
+ - `approval-required: [action]` -- Pause before this action and ask the user.
99
+ - If no permissions are declared, default to asking before any external action (send, delete, schedule).
100
+
101
+ ## Multiple Members
102
+
103
+ Users can install multiple members. Each has its own persona, skills, and journal entries in memory. When switching between members, load the new member's MEMBER.md fresh -- don't carry over the previous member's persona.
104
+
105
+ To list installed members: scan `team/` for MEMBER.md files and flat .md files.
106
+
107
+ ## Installing Members
108
+
109
+ Members are installed by placing their files in `team/`. This happens via:
110
+ - `clawhub install {member-name}` -- from ClawHub marketplace
111
+ - Manual creation -- user creates `team/{name}/MEMBER.md`
112
+ - Copy from another project -- member directories are portable (zip and share)
@@ -0,0 +1,278 @@
1
+ ---
2
+ name: create-app
3
+ description: Build and deploy an Atris app from a natural language description. Use when users ask to create Atris apps, workflows, or chat apps with setup automation.
4
+ version: 1.0.0
5
+ tags:
6
+ - atris
7
+ - apps
8
+ - workflow
9
+ - automation
10
+ ---
11
+
12
+ # Create App
13
+
14
+ Build and deploy an Atris app from a natural language description.
15
+
16
+ ## When to Use
17
+
18
+ User says something like:
19
+ - "I want daily analytics from my Mixpanel"
20
+ - "Make me a chat app for job screening"
21
+ - "Set up a workflow that monitors my app reviews"
22
+ - "Build an app that qualifies leads from a CSV"
23
+
24
+ ## What an App Is
25
+
26
+ An app is a container: data in, agent processes, data out. Three independent parts:
27
+
28
+ - **App** = the box (storage, API, schedule, auth)
29
+ - **Skill** = the brain (what to do with the data)
30
+ - **Member** = the operator (the agent that runs it)
31
+
32
+ Not every app needs all three. A chat widget just needs config. An autonomous workflow needs all three.
33
+
34
+ ## Bootstrap
35
+
36
+ Get the user's Atris API token:
37
+
38
+ ```bash
39
+ TOKEN=$(node -e "console.log(require('$HOME/.atris/credentials.json').token)" 2>/dev/null)
40
+ if [ -z "$TOKEN" ]; then
41
+ TOKEN=$(python3 -c "import json,os; print(json.load(open(os.path.expanduser('~/.atris/credentials.json')))['token'])" 2>/dev/null)
42
+ fi
43
+ if [ -z "$TOKEN" ]; then
44
+ echo "Not logged in. Run: atris login"
45
+ exit 1
46
+ fi
47
+ echo "Ready."
48
+ ```
49
+
50
+ Base URL: `https://api.atris.ai`
51
+ Auth header: `Authorization: Bearer $TOKEN`
52
+
53
+ ## Flow
54
+
55
+ Adapt the flow based on what the user described. Skip steps that don't apply.
56
+
57
+ ### Step 0: Clarify Intent
58
+
59
+ Before building anything, ask the user:
60
+
61
+ 1. **Personal or business?** — First check if the user has any businesses: `GET https://api.atris.ai/api/business` with their token. If empty, it's personal — don't ask, just proceed. If they have businesses, ask: "Is this just for you, or for [business name]?"
62
+ 2. **How does data get in?** — Schedule (daily pull), webhook (data pushed in), manual (you trigger it), email, or chat?
63
+ 3. **How should output reach you?** — Email, feed post, API (for a custom UI), or just stored for querying?
64
+ 4. **Any API keys needed?** — Does this connect to an external service (Mixpanel, GitHub, Stripe, etc)?
65
+
66
+ Keep it conversational. Don't ask all 4 at once if the answer is obvious from context. A mood tracker is clearly personal, manual input, no API keys. A Mixpanel analytics app clearly needs an API key and a daily schedule.
67
+
68
+ ### Step 1: Create the App
69
+
70
+ Ask the user for a name if they didn't already give one. Generate a slug (lowercase, hyphens, no spaces).
71
+
72
+ ```bash
73
+ curl -s -X POST "https://api.atris.ai/api/apps" \
74
+ -H "Authorization: Bearer $TOKEN" \
75
+ -H "Content-Type: application/json" \
76
+ -d '{
77
+ "name": "APP_NAME",
78
+ "description": "DESCRIPTION",
79
+ "instructions": "SYSTEM_PROMPT",
80
+ "share_token": "SLUG",
81
+ "app_type": "external",
82
+ "access_mode": "private",
83
+ "ui_template": "chat",
84
+ "config": {}
85
+ }'
86
+ ```
87
+
88
+ Save the returned `id` as `APP_ID` and `share_token` as `SLUG`.
89
+
90
+ **Decisions:**
91
+ - `access_mode`: `"private"` for personal workflows, `"public"` for shared apps
92
+ - `ui_template`: `"chat"` for conversational, omit for headless workflows
93
+ - `instructions`: the system prompt if it's a chat app, or a description of purpose for workflows
94
+
95
+ ### Step 2: Store API Keys (if needed)
96
+
97
+ Only if the workflow needs external API access (Mixpanel, GitHub, Stripe, etc).
98
+
99
+ Ask the user for each key. Store one at a time:
100
+
101
+ ```bash
102
+ curl -s -X PUT "https://api.atris.ai/api/apps/SLUG/secrets/KEY_NAME" \
103
+ -H "Authorization: Bearer $TOKEN" \
104
+ -H "Content-Type: application/json" \
105
+ -d '{"value": "THE_SECRET_VALUE"}'
106
+ ```
107
+
108
+ Never log or display the secret value after storing it.
109
+
110
+ **Skip this step** if the app doesn't need external API keys (chat apps, simple forms).
111
+
112
+ ### Step 3: Create the Agent + Skill (if needed)
113
+
114
+ For autonomous workflows, the app needs an agent with a skill that knows what to do.
115
+
116
+ **3a. Create or pick an agent:**
117
+
118
+ If the user already has an agent, use it. Otherwise create one:
119
+
120
+ ```bash
121
+ curl -s -X POST "https://api.atris.ai/api/agent/create" \
122
+ -H "Authorization: Bearer $TOKEN" \
123
+ -H "Content-Type: application/json" \
124
+ -d '{
125
+ "name": "AGENT_NAME",
126
+ "instructions": "AGENT_INSTRUCTIONS",
127
+ "access_mode": "api"
128
+ }'
129
+ ```
130
+
131
+ Save the returned `id` as `AGENT_ID`. If access_mode is "api", also save the `api_key` (shown once).
132
+
133
+ **3b. Write the skill:**
134
+
135
+ The skill is the logic. Write it as a markdown file that describes what the agent should do. Store it in the agent's file memory:
136
+
137
+ ```bash
138
+ curl -s -X POST "https://api.atris.ai/api/agent/AGENT_ID/files" \
139
+ -H "Authorization: Bearer $TOKEN" \
140
+ -H "Content-Type: application/json" \
141
+ -d '{
142
+ "name": "skills/APP_SLUG.md",
143
+ "content": "SKILL_CONTENT"
144
+ }'
145
+ ```
146
+
147
+ The skill content should include:
148
+ - What data to pull and how (API endpoints, auth patterns)
149
+ - What analysis to run
150
+ - What output to produce
151
+ - Where to store results
152
+
153
+ Example skill for Mixpanel analytics:
154
+ ```markdown
155
+ # Mixpanel Analytics Skill
156
+
157
+ Pull daily event data from Mixpanel, analyze user segments, report insights.
158
+
159
+ ## Steps
160
+ 1. Use MIXPANEL_API_KEY to call Mixpanel Export API
161
+ 2. Pull events from last 24 hours
162
+ 3. Segment users by: first-generation completion, paid conversion, feature usage
163
+ 4. Compare against previous day's data (read from app storage)
164
+ 5. Identify: what grew, what dropped, any anomalies
165
+ 6. Store results in app data (collection: "daily-analysis")
166
+ 7. Email summary to owner
167
+
168
+ ## Output Format
169
+ - 3-5 bullet points of what changed
170
+ - One recommendation
171
+ - Raw numbers for verification
172
+ ```
173
+
174
+ **3c. Add agent as app member:**
175
+
176
+ ```bash
177
+ curl -s -X POST "https://api.atris.ai/api/apps/SLUG/members" \
178
+ -H "Authorization: Bearer $TOKEN" \
179
+ -H "Content-Type: application/json" \
180
+ -d '{"agent_id": "AGENT_ID", "role": "operator"}'
181
+ ```
182
+
183
+ **Skip this step** for chat apps that don't need an autonomous agent.
184
+
185
+ ### Step 4: Set Schedule (if needed)
186
+
187
+ For apps that run on a schedule:
188
+
189
+ ```bash
190
+ curl -s -X POST "https://api.atris.ai/api/scheduled-tasks" \
191
+ -H "Authorization: Bearer $TOKEN" \
192
+ -H "Content-Type: application/json" \
193
+ -d '{
194
+ "agent_id": "AGENT_ID",
195
+ "task_type": "pulse",
196
+ "cron_expression": "0 8 * * *",
197
+ "enabled": true
198
+ }'
199
+ ```
200
+
201
+ Common schedules:
202
+ - `"0 8 * * *"` — daily at 8am UTC
203
+ - `"0 */6 * * *"` — every 6 hours
204
+ - `"0 9 * * 1"` — weekly Monday 9am UTC
205
+
206
+ **Skip this step** for on-demand apps (manual trigger only) or chat apps.
207
+
208
+ ### Step 5: Test It
209
+
210
+ Trigger the first run to verify everything works:
211
+
212
+ ```bash
213
+ curl -s -X POST "https://api.atris.ai/api/apps/SLUG/trigger" \
214
+ -H "Authorization: Bearer $TOKEN" \
215
+ -H "Content-Type: application/json" \
216
+ -d '{"trigger_type": "manual"}'
217
+ ```
218
+
219
+ Check status:
220
+
221
+ ```bash
222
+ curl -s "https://api.atris.ai/api/apps/SLUG/status" \
223
+ -H "Authorization: Bearer $TOKEN"
224
+ ```
225
+
226
+ Check run result:
227
+
228
+ ```bash
229
+ curl -s "https://api.atris.ai/api/apps/SLUG/runs?limit=1" \
230
+ -H "Authorization: Bearer $TOKEN"
231
+ ```
232
+
233
+ If the run succeeded, show the user. If it failed, read the error and fix.
234
+
235
+ ### Step 6: Confirm
236
+
237
+ Tell the user:
238
+ - App name and slug
239
+ - What it does
240
+ - When it runs (schedule or manual)
241
+ - Where output goes (email, API, feed)
242
+ - How to check status: `GET /api/apps/SLUG/status`
243
+ - How to query data: `GET /api/apps/SLUG/data`
244
+
245
+ ## App Runtime API Reference
246
+
247
+ All endpoints use the app's `share_token` as `{slug}`.
248
+
249
+ ```
250
+ POST /api/apps/{slug}/trigger — run the app now
251
+ POST /api/apps/{slug}/ingest — push data in
252
+ POST /api/apps/{slug}/ingest/batch — push multiple items
253
+ GET /api/apps/{slug}/data — read stored data
254
+ GET /api/apps/{slug}/data/{collection} — read specific collection
255
+ GET /api/apps/{slug}/status — health, last run, next run
256
+ GET /api/apps/{slug}/runs — execution history
257
+ GET /api/apps/{slug}/runs/{run_id} — single run details
258
+ PUT /api/apps/{slug}/secrets/{key} — store an API key (owner only)
259
+ GET /api/apps/{slug}/secrets — list key names (owner only)
260
+ DELETE /api/apps/{slug}/secrets/{key} — remove a key (owner only)
261
+ POST /api/apps/{slug}/members — add agent operator
262
+ GET /api/apps/{slug}/members — list members
263
+ DELETE /api/apps/{slug}/members/{agent_id} — remove member
264
+ ```
265
+
266
+ ## Examples
267
+
268
+ **"I want daily analytics from Mixpanel"**
269
+ → Steps 1-5. Private app, Mixpanel key stored, agent with analytics skill, daily schedule, email output.
270
+
271
+ **"Make a chat app for screening candidates"**
272
+ → Steps 1 only. Public app, chat template, instructions define the interview flow. No agent, no schedule, no keys.
273
+
274
+ **"Set up a webhook that collects app feedback"**
275
+ → Steps 1, 3. Private app, agent processes inbound data. No schedule (webhook-triggered). User posts to `/ingest`, agent analyzes on trigger.
276
+
277
+ **"Qualify leads from a CSV"**
278
+ → Steps 1-3, 5. Private app, agent with qualification skill. Manual trigger (upload CSV via `/ingest/batch`, then `/trigger`). No schedule.