atris 3.15.0 → 3.15.12
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/AGENTS.md +35 -4
- package/README.md +3 -3
- package/atris/atris.md +38 -13
- package/atris/features/company-brain-sync/build.md +140 -0
- package/atris/features/company-brain-sync/idea.md +52 -0
- package/atris/features/company-brain-sync/validate.md +250 -0
- package/atris/skills/imessage/SKILL.md +44 -0
- package/bin/atris.js +44 -4
- package/commands/align.js +1 -1
- package/commands/brain.js +840 -0
- package/commands/business-sync.js +716 -0
- package/commands/init.js +15 -3
- package/commands/integrations.js +136 -0
- package/commands/live.js +28 -6
- package/commands/now.js +263 -0
- package/commands/pull.js +142 -8
- package/commands/push.js +181 -57
- package/commands/task.js +1658 -18
- package/commands/wiki.js +40 -1
- package/lib/company-brain-sync.js +178 -0
- package/lib/manifest.js +2 -1
- package/lib/task-db.js +271 -4
- package/lib/todo-fallback.js +34 -9
- package/lib/wiki.js +84 -4
- package/package.json +12 -2
package/AGENTS.md
CHANGED
|
@@ -15,7 +15,9 @@ Run this first. Follow the output.
|
|
|
15
15
|
| File | Purpose |
|
|
16
16
|
|------|---------|
|
|
17
17
|
| `atris/PERSONA.md` | Communication style (read first) |
|
|
18
|
-
| `atris
|
|
18
|
+
| `atris task` | Current tasks, claims, dialogue, proof |
|
|
19
|
+
| `.atris/state/tasks.projection.json` | Readable task projection for UIs/agents |
|
|
20
|
+
| `atris/TODO.md` | Rendered/legacy task view only |
|
|
19
21
|
| `atris/MAP.md` | Navigation (where is X?) |
|
|
20
22
|
|
|
21
23
|
## Workflow
|
|
@@ -31,16 +33,45 @@ CHECK → atris review (verify + cleanup)
|
|
|
31
33
|
- [ ] 3-4 sentences max per response
|
|
32
34
|
- [ ] Use ASCII visuals for planning
|
|
33
35
|
- [ ] Check MAP.md before touching code
|
|
34
|
-
- [ ]
|
|
35
|
-
- [ ]
|
|
36
|
+
- [ ] Run `atris task list` or `atris task next` before picking work
|
|
37
|
+
- [ ] Claim tasks with `atris task claim <id> --as <agent>`
|
|
38
|
+
- [ ] Finish tasks with proof via `atris task finish <id> --proof "..."`
|
|
39
|
+
- [ ] Treat `atris/TODO.md` as a rendered view; do not manually use it as the source of truth
|
|
36
40
|
|
|
37
41
|
## Anti-patterns
|
|
38
42
|
|
|
39
43
|
- Don't explore codebase manually (use MAP.md)
|
|
40
44
|
- Don't skip visualization step
|
|
41
45
|
- Don't leave stale tasks
|
|
46
|
+
- Don't hand-edit TODO.md for active task ownership
|
|
42
47
|
- Don't write verbose docs
|
|
43
48
|
|
|
44
49
|
---
|
|
45
50
|
|
|
46
|
-
**Protocol:** See `atris/atris.md` for full spec.
|
|
51
|
+
**Protocol:** See `atris/atris.md` for full spec.
|
|
52
|
+
|
|
53
|
+
<!-- ATRIS_BRAIN_COMPILE:START -->
|
|
54
|
+
## Atris Brain Compile
|
|
55
|
+
|
|
56
|
+
This workspace has a compiled agent brain.
|
|
57
|
+
|
|
58
|
+
On session start, activate it first:
|
|
59
|
+
`atris brain activate --root /Users/keshavrao/arena/atris-cli --verify`
|
|
60
|
+
|
|
61
|
+
Load these first:
|
|
62
|
+
- `atris/now.md`
|
|
63
|
+
- `atris/brain/STATUS.md`
|
|
64
|
+
- `atris/brain/self_improvement_ledger.md`
|
|
65
|
+
- `atris/wiki/concepts/sync-language.md`
|
|
66
|
+
- `atris/skills/activation/SKILL.md`
|
|
67
|
+
- `atris/MAP.md`
|
|
68
|
+
- `atris/TODO.md`
|
|
69
|
+
|
|
70
|
+
First-message rule: follow the sync-language contract before writing to the operator.
|
|
71
|
+
Purpose: optimize for decision-speed; lead with the move, then use descriptions only when they help the operator act.
|
|
72
|
+
Shape: `<operator>, today is about <move>` -> `I picked this because <why now>` -> `Ready: <draft/proof/context>` -> `Go deeper: <paths>`.
|
|
73
|
+
Definitions: operator = current person or agent; move = one concrete high-leverage workflow; why now = business reason; ready = prepared action or proof; paths = 2-4 optional deeper views.
|
|
74
|
+
|
|
75
|
+
Re-run after meaningful work:
|
|
76
|
+
`atris brain compile --root /Users/keshavrao/arena/atris-cli`
|
|
77
|
+
<!-- ATRIS_BRAIN_COMPILE:END -->
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Then read the workspace's `atris/atris.md` and follow it exactly. `atris.md` is
|
|
|
41
41
|
|------|---------|
|
|
42
42
|
| `atris/atris.md` | Main instructions for agents working in this repo |
|
|
43
43
|
| `atris/MAP.md` | Navigation index with file:line refs |
|
|
44
|
-
| `atris/TODO.md` |
|
|
44
|
+
| `atris/TODO.md` | Human-readable task view |
|
|
45
45
|
| `atris/logs/YYYY/YYYY-MM-DD.md` | Daily log, inbox, notes, completions |
|
|
46
46
|
| `atris/features/` | Feature packs with `idea.md`, `build.md`, `validate.md` |
|
|
47
47
|
| `atris/skills/` | Reusable skills for agents |
|
|
@@ -137,7 +137,7 @@ atris business record atris/reports/2026-04-12-operator-recap.md --outcome mixed
|
|
|
137
137
|
| `atris autopilot` | Guided loop with approvals |
|
|
138
138
|
| `atris log` | Add inbox items to today's journal |
|
|
139
139
|
| `atris status` | Show active work and completions |
|
|
140
|
-
| `atris task` |
|
|
140
|
+
| `atris task` | Durable local task state with claims, dialogue, review episodes, JSON export, TODO import, TODO render, board, and sync dry-run |
|
|
141
141
|
| `atris learn` | Manage structured learnings |
|
|
142
142
|
| `atris ingest` | Stage raw evidence into `atris/context/` and compile into `atris/wiki/` |
|
|
143
143
|
| `atris loop` | Refresh wiki health, stale/orphan signals, and next ingest candidates |
|
|
@@ -154,7 +154,7 @@ atris business record atris/reports/2026-04-12-operator-recap.md --outcome mixed
|
|
|
154
154
|
- `atris wiki --private` stores local-only sensitive notes under `.atris/presidio/`
|
|
155
155
|
- `atris loop` refreshes `atris/wiki/STATUS.md` and `atris/wiki/log.md`, flags stale/orphan pages, and suggests the next ingest
|
|
156
156
|
- `atris activate` loads the current wiki status so the next session starts with project memory, not just tasks
|
|
157
|
-
- `atris task` keeps
|
|
157
|
+
- `atris task` keeps durable local task state and append-only events for agents while `atris/TODO.md` remains a readable regenerated project board. Use `atris task new`, `atris task delegate "..." --to <owner>`, `atris task day`, `atris task next`, `atris task say`, and `atris task finish` for the natural loop; add `--json` for headless agents. Use `atris task serve` to open the local Task Factory board with goals, work streams, lineage, proof, lessons, and the compounding chain. Every change refreshes `.atris/state/tasks.projection.json` for web/desktop. Use `atris task sync --dry-run` to preview the canonical Supabase/Swarlo task writes before any cloud mutation. Use `--via swarlo` on delegation when the live coordination layer should claim/report from the same task record. Use `--create-next` with review/finish to turn a `--next` suggestion into the next durable task. Use `atris task setup --import-todo` to bootstrap, `atris task review` to write an RSI episode, and `atris task render` to rebuild markdown if it gets clobbered. In cloud business workspaces, Supabase `tasks` is the source of truth and Swarlo is the live claim/report layer.
|
|
158
158
|
- `atris experiments` runs small test packs in `atris/experiments/`
|
|
159
159
|
- `atris pull` and `atris push` sync cloud workspaces and journals
|
|
160
160
|
- `atris live` keeps a business brain fresh by checking/fixing the workspace, pushing local state, pulling cloud state, and pushing again after local changes go quiet
|
package/atris/atris.md
CHANGED
|
@@ -58,18 +58,43 @@ Labels used below:
|
|
|
58
58
|
- `guarded` — checked by code or a pre-commit hook; bypassing is a bug
|
|
59
59
|
- `expected` — convention; honor it or stop
|
|
60
60
|
|
|
61
|
-
## task
|
|
61
|
+
## task source of truth
|
|
62
|
+
|
|
63
|
+
Use `atris task` as the source of truth for active work. It stores durable local
|
|
64
|
+
SQLite state plus append-only task events, and refreshes
|
|
65
|
+
`.atris/state/tasks.projection.json` for desktop/web UIs. `atris/TODO.md` is a
|
|
66
|
+
rendered/legacy view and can be rebuilt with `atris task render`; do not rely on
|
|
67
|
+
manual TODO.md edits for ownership.
|
|
68
|
+
|
|
69
|
+
Core loop:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
atris task list
|
|
73
|
+
atris task delegate "<title>" --to <owner> --tag <tag>
|
|
74
|
+
atris task delegate "<title>" --to <owner> --via swarlo --tag <tag>
|
|
75
|
+
atris task day
|
|
76
|
+
atris task next
|
|
77
|
+
atris task claim <id> --as <agent>
|
|
78
|
+
atris task note <id> "<context, blocker, decision, or handoff>"
|
|
79
|
+
atris task finish <id> --proof "<tests, screenshot, diff, or receipt>"
|
|
80
|
+
atris task review <id> --lesson "<what improved>" --next "<next task>"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Headless agents should add `--json` where available and read
|
|
84
|
+
`.atris/state/tasks.projection.json` for a compact board view.
|
|
85
|
+
Swarlo is the live coordination layer for claims, heartbeats, and reports; the
|
|
86
|
+
task row/event stream remains the durable source of truth.
|
|
62
87
|
|
|
63
|
-
Every task
|
|
88
|
+
Every task record should carry:
|
|
64
89
|
|
|
65
90
|
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
91
|
+
Title: <small work packet>
|
|
92
|
+
Owner: <agent or unclaimed>
|
|
93
|
+
Objective: <why this matters>
|
|
94
|
+
Context: <links/files/decisions>
|
|
95
|
+
Exit: <observable done condition>
|
|
96
|
+
Verify: <shell command or concrete proof>
|
|
97
|
+
Next: <suggested follow-up task>
|
|
73
98
|
```
|
|
74
99
|
|
|
75
100
|
| Field | Meaning | Enforcement |
|
|
@@ -87,7 +112,7 @@ Verify cannot be a raw shell shortcut; it must call a rubric or test that can fa
|
|
|
87
112
|
## routing
|
|
88
113
|
|
|
89
114
|
Before picking up work, decide scope:
|
|
90
|
-
- single project → route to that project's `atris/team/` and `
|
|
115
|
+
- single project → route to that project's `atris/team/` and `atris task` queue
|
|
91
116
|
- crosses projects → route to `atris/team/cross-project-architect/` and plan the dependency order first
|
|
92
117
|
|
|
93
118
|
The human is the constructor. You multiply. Handoff fidelity lives in the files, not in context.
|
|
@@ -98,8 +123,8 @@ Move one task at a time through plan → do → review.
|
|
|
98
123
|
|
|
99
124
|
- **plan** — read relevant files, produce an ASCII visualization, wait for approval. No code.
|
|
100
125
|
- **plan-review** — the validator reads the plan fresh and signs off with `SIGNOFF:` or halts with `REJECT:\nFIX:`. Plan does not move to do without signoff. Codex is optional escalation when `ATRIS_USE_CODEX=1` or the task carries `[codex]`.
|
|
101
|
-
- **do** — claim the task
|
|
102
|
-
- **review** — run the task's
|
|
126
|
+
- **do** — claim the task with `atris task claim <id> --as <agent>`, execute step by step, add notes as reality changes, update `MAP.md` and the journal when needed.
|
|
127
|
+
- **review** — run the task's verification, read the diff, run the relevant tests, finish with `atris task finish <id> --proof "..."`, and add the lesson/next task with `atris task review`.
|
|
103
128
|
|
|
104
129
|
State the next stage:
|
|
105
130
|
|
|
@@ -149,7 +174,7 @@ Context is a cache. Disk is truth. Route discoveries as they happen:
|
|
|
149
174
|
| You discover... | Write to... |
|
|
150
175
|
|---|---|
|
|
151
176
|
| a code location | `MAP.md` (file:line) |
|
|
152
|
-
| a new task | `
|
|
177
|
+
| a new task | `atris task new "<title>"` |
|
|
153
178
|
| a decision or tradeoff | journal `## Notes` |
|
|
154
179
|
| something learned | `lessons.md` (one line) |
|
|
155
180
|
| work finished | journal `## Completed` (C#) |
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Company Brain Sync Build Plan
|
|
2
|
+
|
|
3
|
+
## Current Patch
|
|
4
|
+
|
|
5
|
+
The immediate DoorDash lane now follows the correct company-brain model:
|
|
6
|
+
|
|
7
|
+
- `atris push` keeps the business root as the path root so `doordash/atris/MAP.md` maps to cloud `/atris/MAP.md`
|
|
8
|
+
- business `pull` and `push` default to the `atris/` scope
|
|
9
|
+
- root-level duplicates such as `MAP.md`, `TODO.md`, and `security-report.md` are ignored by default
|
|
10
|
+
- manifests record the local workspace root to prevent a manifest from one folder authorizing pushes from another folder
|
|
11
|
+
- real cloud deletes require `--delete`
|
|
12
|
+
- `atris sync <business>` runs the safe operator sequence as one command
|
|
13
|
+
- `atris sync` auto-detects the business slug inside a pulled business workspace
|
|
14
|
+
- `lib/company-brain-sync.js` contains the pure classification core for Notion/Drive/GitHub-style sync decisions
|
|
15
|
+
- conflict review packet generation exists as a pure artifact builder
|
|
16
|
+
- `pull --fail-on-conflict` writes the conflict review packet before `atris sync` stops
|
|
17
|
+
- `atris sync --watch` watches the local `atris/` brain, debounces local edits, periodically checks cloud using the same safe sync cycle, and keeps retrying after transient failures
|
|
18
|
+
- `atris sync --status` gives a local, nonengineer-readable status card: detected business, brain file count, manifest health, conflict packets, and watcher heartbeat
|
|
19
|
+
- `atris sync --review` prints the latest local conflict review packet without credentials or cloud calls
|
|
20
|
+
- `atris sync --resolve local|cloud|both|merge` applies the latest conflict packet's chosen side or a safe deterministic merge back into local `atris/` files, then tells the operator to dry-run before publishing
|
|
21
|
+
- local safety commands (`--status`, `--review`, `--resolve`) route to company-brain sync even if business slug detection is missing or broken
|
|
22
|
+
- successful pulls cache base content under `.atris/sync/base/` so future conflict packets can include `.base` files for safe merge resolution
|
|
23
|
+
- real sync/watch cycles write `.atris/sync/status.json` as the local heartbeat; `--dry-run` still writes nothing
|
|
24
|
+
|
|
25
|
+
## Desired Sync Engine
|
|
26
|
+
|
|
27
|
+
Move from command sequencing to a single sync engine with explicit state.
|
|
28
|
+
|
|
29
|
+
### State Model
|
|
30
|
+
|
|
31
|
+
For each cloud path under `/atris/`, track:
|
|
32
|
+
|
|
33
|
+
- base hash: last version both local and cloud agreed on
|
|
34
|
+
- local hash: current local file
|
|
35
|
+
- remote hash: current cloud file
|
|
36
|
+
- local mtime: local edit signal
|
|
37
|
+
- remote version or commit: cloud edit signal
|
|
38
|
+
- actor metadata when available
|
|
39
|
+
|
|
40
|
+
### Change Classes
|
|
41
|
+
|
|
42
|
+
The engine should classify every path as:
|
|
43
|
+
|
|
44
|
+
- unchanged
|
|
45
|
+
- local created
|
|
46
|
+
- local updated
|
|
47
|
+
- local deleted
|
|
48
|
+
- remote created
|
|
49
|
+
- remote updated
|
|
50
|
+
- remote deleted
|
|
51
|
+
- both changed same content
|
|
52
|
+
- both changed conflicting content
|
|
53
|
+
|
|
54
|
+
Initial classifier coverage exists in `test/company-brain-sync.test.js`.
|
|
55
|
+
|
|
56
|
+
### Actions
|
|
57
|
+
|
|
58
|
+
Default actions:
|
|
59
|
+
|
|
60
|
+
- pull remote-only changes
|
|
61
|
+
- push local-only creates/updates
|
|
62
|
+
- preserve local work on conflicts
|
|
63
|
+
- never delete cloud by default
|
|
64
|
+
- never delete local untracked files by default
|
|
65
|
+
- write a sync report for review
|
|
66
|
+
|
|
67
|
+
### Conflict UX
|
|
68
|
+
|
|
69
|
+
A conflict should create a review artifact, not a scary merge state.
|
|
70
|
+
|
|
71
|
+
Recommended local artifact:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
.atris/sync/conflicts/<timestamp>/<path>.local
|
|
75
|
+
.atris/sync/conflicts/<timestamp>/<path>.remote
|
|
76
|
+
.atris/sync/conflicts/<timestamp>/summary.md
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The packet shape is implemented in `buildConflictReviewPacket`, and `pull --fail-on-conflict` materializes it before stopping sync.
|
|
80
|
+
|
|
81
|
+
Recommended summary language:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
3 files need review before publishing:
|
|
85
|
+
- atris/wiki/concepts/weekly-business-review.md
|
|
86
|
+
- atris/TODO.md
|
|
87
|
+
- atris/reports/wbr-panel-2026-04-23.md
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Publish UX
|
|
91
|
+
|
|
92
|
+
The first local review command exists:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
atris sync --review
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
It prints the latest conflict summary and tells the operator to resolve locally, then run `atris sync --dry-run`.
|
|
99
|
+
|
|
100
|
+
The first resolution command exists:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
atris sync --resolve local
|
|
104
|
+
atris sync --resolve cloud
|
|
105
|
+
atris sync --resolve both
|
|
106
|
+
atris sync --resolve merge
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
It applies the selected side into local `atris/` files and keeps the conflict packet as the audit trail. `both` keeps the local version at the original path and writes the cloud version beside it as `<file>.cloud`. `merge` requires `.base`, `.local`, and `.remote` artifacts and only writes a merged file when local and cloud edits are safe: non-overlapping line ranges, or different markdown heading sections. Same-section markdown edits stay in review.
|
|
110
|
+
|
|
111
|
+
Later it should also let the user ask Atris to merge semantically with model assistance when the conservative line merge refuses.
|
|
112
|
+
|
|
113
|
+
### Watch UX
|
|
114
|
+
|
|
115
|
+
`atris sync --watch` is the current always-on lane:
|
|
116
|
+
|
|
117
|
+
- watch `doordash/atris/`
|
|
118
|
+
- debounce local edits
|
|
119
|
+
- fetch cloud hashes periodically
|
|
120
|
+
- sync clean changes
|
|
121
|
+
- pause on conflicts with a clear review summary
|
|
122
|
+
- keep the process alive on transient network/API failures and retry on the next cycle
|
|
123
|
+
- record a heartbeat under `.atris/sync/status.json`
|
|
124
|
+
|
|
125
|
+
`atris live` should eventually delegate to the same sync engine instead of carrying a parallel implementation.
|
|
126
|
+
|
|
127
|
+
## Quality Bar
|
|
128
|
+
|
|
129
|
+
This lane is production-critical because it touches customer company memory.
|
|
130
|
+
|
|
131
|
+
Required before broad customer use:
|
|
132
|
+
|
|
133
|
+
- fixture tests for every change class
|
|
134
|
+
- fixture tests for conflict artifact creation
|
|
135
|
+
- status/heartbeat tests for the nonengineer "am I current?" surface
|
|
136
|
+
- retry-policy tests proving watch failures do not kill the alive loop
|
|
137
|
+
- fixture tests proving parent-folder junk is ignored
|
|
138
|
+
- fixture tests proving no cloud deletes without explicit opt-in
|
|
139
|
+
- end-to-end dry-run against a real DoorDash-shaped workspace
|
|
140
|
+
- command copy that never recommends `--force` for normal use
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Company Brain Sync
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
Atris business workspaces are company brains, not plain folders. The canonical knowledge surface is the `atris/` folder inside each business workspace, for example `doordash/atris/`.
|
|
6
|
+
|
|
7
|
+
Raw push/pull is the wrong abstraction for this surface. It makes a shared knowledge base feel like file mirroring, which creates merge anxiety and makes users responsible for sync safety.
|
|
8
|
+
|
|
9
|
+
The product bar is closer to Notion, Google Drive, and GitHub:
|
|
10
|
+
|
|
11
|
+
- local edits should be detected automatically
|
|
12
|
+
- cloud updates should arrive without users thinking about manifests
|
|
13
|
+
- conflicts should become reviewable knowledge decisions, not overwrite prompts
|
|
14
|
+
- publishing should be explicit, auditable, and reversible
|
|
15
|
+
|
|
16
|
+
## Principle
|
|
17
|
+
|
|
18
|
+
Cloud Atris is canonical. Local Atris is a working copy. Sync publishes proposed knowledge updates into the company brain.
|
|
19
|
+
|
|
20
|
+
## User Model
|
|
21
|
+
|
|
22
|
+
Jonathan should be able to work inside `doordash/atris/` and run one command:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
atris sync
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
He should not need to know about `--force`, `--from`, manifests, root folders, business slugs, or cloud path prefixes.
|
|
29
|
+
|
|
30
|
+
## Product Shape
|
|
31
|
+
|
|
32
|
+
`atris sync <business>` is the primary operator command.
|
|
33
|
+
|
|
34
|
+
When run inside a pulled business workspace, `atris sync` auto-detects the business from `.atris/business.json`.
|
|
35
|
+
|
|
36
|
+
It should:
|
|
37
|
+
|
|
38
|
+
- scope to `atris/` by default for business workspaces
|
|
39
|
+
- pull cloud truth first without destroying local work
|
|
40
|
+
- detect local changes since the last known base
|
|
41
|
+
- push only clean non-conflicting changes
|
|
42
|
+
- block destructive deletes unless explicitly approved
|
|
43
|
+
- produce a human-readable sync summary
|
|
44
|
+
|
|
45
|
+
Longer term, `atris live <business>` should watch file changes and run the same sync engine continuously, similar to Google Drive local sync plus GitHub-style conflict review.
|
|
46
|
+
|
|
47
|
+
## Non-Goals
|
|
48
|
+
|
|
49
|
+
- Do not mirror the parent business folder by default.
|
|
50
|
+
- Do not use `--force` as a normal collaboration path.
|
|
51
|
+
- Do not treat conflicts as "local wins" or "cloud wins" without review.
|
|
52
|
+
- Do not expose manifest internals to nontechnical customer operators.
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Company Brain Sync Validation
|
|
2
|
+
|
|
3
|
+
## Validated Now
|
|
4
|
+
|
|
5
|
+
Focused tests pass:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node --test --test-name-pattern 'push|business workspace|business sync|manifest records workspace root' test/commands.test.js
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Company brain sync classifier tests pass:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node --test test/company-brain-sync.test.js
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Covered classifier cases:
|
|
18
|
+
|
|
19
|
+
- clean local creates and updates
|
|
20
|
+
- clean remote creates and updates
|
|
21
|
+
- both-changed update conflict
|
|
22
|
+
- held local delete
|
|
23
|
+
- remote delete plus local update conflict
|
|
24
|
+
- conflict summary rendering
|
|
25
|
+
- conflict review packet generation with local and remote artifacts
|
|
26
|
+
- conflict review packet writing to disk
|
|
27
|
+
- command-path pull conflict packet builder includes `.base`, `.local`, and `.remote` artifacts
|
|
28
|
+
- local `atris sync --status` command works without credentials
|
|
29
|
+
- local `atris sync --review` command prints the latest conflict packet without credentials
|
|
30
|
+
- local `atris sync --resolve local|cloud|both|merge` applies conflict artifacts into local `atris/` files without credentials
|
|
31
|
+
- conflict packets can include `.base` artifacts, and successful pulls cache base content under `.atris/sync/base/`
|
|
32
|
+
- safe merge resolution writes non-overlapping local/cloud line edits, can merge different markdown heading sections, and refuses overlapping or same-section edits
|
|
33
|
+
- local safety commands route correctly even when business slug detection is unavailable
|
|
34
|
+
- safe/unsafe merge-matrix cases are covered: converged same content, cloud delete, deleted both, local delete plus cloud edit, and conflicting created files
|
|
35
|
+
- status rendering shows business, brain file count, conflict packets, and watcher heartbeat
|
|
36
|
+
- watch failure policy keeps the alive loop retrying on transient failures
|
|
37
|
+
- watch failure policy treats conflict exits as review state instead of process death
|
|
38
|
+
- watch-mode snapshot detects `atris/` changes
|
|
39
|
+
- watch-mode ignores runtime and OS noise
|
|
40
|
+
- push planner publishes only scoped local `atris/` creates and updates
|
|
41
|
+
- push planner treats scoped local deletes as gated deletes
|
|
42
|
+
- push planner ignores parent-folder junk outside `atris/`
|
|
43
|
+
|
|
44
|
+
Syntax checks pass:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
node -c bin/atris.js
|
|
48
|
+
node -c commands/business-sync.js
|
|
49
|
+
node -c lib/company-brain-sync.js
|
|
50
|
+
node -c commands/pull.js
|
|
51
|
+
node -c commands/push.js
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Fresh DoorDash-shaped workspace dry-run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
atris sync doordash --dry-run
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Observed result:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Syncing doordash knowledge wiki...
|
|
64
|
+
scope: atris/
|
|
65
|
+
...
|
|
66
|
+
Pushing to DoorDash...
|
|
67
|
+
Checking cloud freshness... fresh
|
|
68
|
+
Already up to date.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Fresh DoorDash-shaped workspace real command with no local edits:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
atris sync doordash
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Observed result:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
Pulling DoorDash...
|
|
81
|
+
Already up to date.
|
|
82
|
+
122 unchanged.
|
|
83
|
+
Pushing to DoorDash...
|
|
84
|
+
Checking cloud freshness... fresh
|
|
85
|
+
Already up to date.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
No cloud writes were required in the validation case because the clean workspace had no local changes to publish.
|
|
89
|
+
|
|
90
|
+
Local edit dry-run in a DoorDash-shaped workspace:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
printf '# Sync smoke\n\nLocal-only knowledge update.\n' > atris/wiki/smoke/local-edit.md
|
|
94
|
+
atris sync doordash --dry-run
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Observed result:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
+ atris/wiki/smoke/local-edit.md new file (dry run)
|
|
101
|
+
1 would be pushed, 122 unchanged. (--dry-run, nothing sent)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Local delete dry-run in a DoorDash-shaped workspace:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
rm -f atris/wiki/index.md
|
|
108
|
+
atris sync doordash --dry-run
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Observed result:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
x atris/wiki/index.md deleted (dry run)
|
|
115
|
+
Deletes require an explicit real push with --delete.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Real delete attempt without `--delete`:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
atris sync doordash
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Observed result:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
Refusing to delete 1 cloud file without --delete.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Fresh folder true dry-run:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
atris sync --dry-run
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Observed result:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
122 would be pulled. (--dry-run, nothing written)
|
|
140
|
+
Publish preview skipped until the pull preview is applied.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
File count before and after stayed the same, proving dry-run did not materialize the remote brain locally.
|
|
144
|
+
|
|
145
|
+
Slug auto-detection:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
atris sync --dry-run
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Observed result from a DoorDash-shaped workspace:
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
Syncing doordash knowledge wiki...
|
|
155
|
+
scope: atris/
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Local status surface:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
atris sync --status
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Observed shape:
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
Company brain status
|
|
168
|
+
business: doordash
|
|
169
|
+
brain: atris/ (...)
|
|
170
|
+
conflicts: none
|
|
171
|
+
watcher: ...
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
This command is local-only and does not require credentials.
|
|
175
|
+
|
|
176
|
+
Local conflict review surface:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
atris sync --review
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Observed shape:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
Latest sync conflict review: .atris/sync/conflicts/.../summary.md
|
|
186
|
+
...
|
|
187
|
+
Resolve the local file, then run `atris sync --dry-run` before publishing.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Local conflict resolution surface:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
atris sync --resolve local
|
|
194
|
+
atris sync --resolve cloud
|
|
195
|
+
atris sync --resolve both
|
|
196
|
+
atris sync --resolve merge
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Validated behavior:
|
|
200
|
+
|
|
201
|
+
- reads the latest `.atris/sync/conflicts/...` packet
|
|
202
|
+
- writes the chosen `.local` or `.remote` artifact back to the target `atris/...` file
|
|
203
|
+
- `both` keeps the local artifact at the original path and writes the cloud artifact as `<file>.cloud`
|
|
204
|
+
- `merge` requires `.base`, `.local`, and `.remote`, writes non-overlapping line edits or different markdown sections, and leaves overlapping or same-section edits in review
|
|
205
|
+
- does not require credentials or cloud calls
|
|
206
|
+
- tells the operator to run `atris sync --dry-run` before publishing
|
|
207
|
+
|
|
208
|
+
## Still Needed
|
|
209
|
+
|
|
210
|
+
- Publish `atris@3.15.12`.
|
|
211
|
+
- Deploy the backend workspace snapshot patch from `atrisos-backend`.
|
|
212
|
+
- After deploy, run a Pallet smoke:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
npm i -g atris@3.15.12
|
|
216
|
+
cd ~/arena/atris-business/pallet
|
|
217
|
+
atris pull pallet --keep-local --only atris/wiki --timeout 120
|
|
218
|
+
atris push pallet --only atris/wiki --dry-run
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
- DoorDash post-publish smoke:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
cd ~/arena/atris-business/doordash
|
|
225
|
+
atris wiki verify
|
|
226
|
+
atris push doordash --dry-run
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
- Packaged CLI smoke already passed locally for `3.15.12`: tarball install exposes `atris pull --no-manifest` and `atris wiki verify`.
|
|
230
|
+
|
|
231
|
+
This feature is safer and usable, but the "perfect sync" bar still requires more command-path fixtures and model-assisted semantic merge support.
|
|
232
|
+
|
|
233
|
+
Missing validation:
|
|
234
|
+
|
|
235
|
+
- local-only create pushes cleanly end-to-end
|
|
236
|
+
- local-only update pushes cleanly end-to-end
|
|
237
|
+
- remote-only create pulls cleanly end-to-end
|
|
238
|
+
- remote-only update pulls cleanly end-to-end
|
|
239
|
+
- local delete does not delete cloud without `--delete` end-to-end
|
|
240
|
+
- remote delete does not destroy local modified work end-to-end
|
|
241
|
+
- parent folder junk is ignored by the push planner; still needs a full command fixture
|
|
242
|
+
- long-running watcher needs an integration test with a mocked local edit and no real cloud calls
|
|
243
|
+
- Pallet shipped-command smoke test from a real Pallet-shaped workspace
|
|
244
|
+
- npm publication after refreshing the invalid npm token
|
|
245
|
+
|
|
246
|
+
## Release Gate
|
|
247
|
+
|
|
248
|
+
It is fair to call this safer than raw Notion/GitHub-style customer-brain editing for scoped markdown sync after the shipped-command smoke passes.
|
|
249
|
+
|
|
250
|
+
Do not call the syncs "perfect" until the missing fixture cases and model-assisted semantic-merge conflict resolution flow are complete.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: imessage
|
|
3
|
+
description: Use when an agent needs to inspect or send local macOS iMessage through Atris CLI. Triggers on iMessage, Messages.app, local text messages, chat.db, or texting someone from the user's Mac.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags:
|
|
6
|
+
- imessage
|
|
7
|
+
- local
|
|
8
|
+
- messaging
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# iMessage
|
|
12
|
+
|
|
13
|
+
Local iMessage is a Mac capability, not a cloud OAuth integration.
|
|
14
|
+
|
|
15
|
+
Use Atris CLI as the control surface.
|
|
16
|
+
|
|
17
|
+
1. Check availability first.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
atris imessage doctor --json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
2. If the doctor says permissions are missing, ask the user to grant Full Disk Access to the terminal or Atris Desktop.
|
|
24
|
+
|
|
25
|
+
3. Read context only when needed.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
atris imessage recent "+15555555555" --limit 20
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. Never send a message unless the user approved the exact recipient and exact text.
|
|
32
|
+
|
|
33
|
+
5. For sending, use the project-approved local iMessage path only after explicit approval.
|
|
34
|
+
|
|
35
|
+
## Status Meaning
|
|
36
|
+
|
|
37
|
+
- `connected: true` means this Mac can access the local Messages database and local scripting tools.
|
|
38
|
+
- `connected: false` means the user needs macOS permissions, Messages setup, or local tooling.
|
|
39
|
+
|
|
40
|
+
## Boundaries
|
|
41
|
+
|
|
42
|
+
- Do not route iMessage setup through Google OAuth.
|
|
43
|
+
- Do not treat iMessage as a cloud credential.
|
|
44
|
+
- Do not upload message contents unless the user explicitly asks.
|