@sayansr26/agent-os 0.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/.claude-plugin/marketplace.json +27 -0
- package/CHANGELOG.md +203 -0
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/bin/agent-os.mjs +6 -0
- package/package.json +49 -0
- package/plugins/agent-os/.claude-plugin/plugin.json +18 -0
- package/plugins/agent-os/agents/architect.md +77 -0
- package/plugins/agent-os/agents/builder.md +90 -0
- package/plugins/agent-os/agents/documenter.md +87 -0
- package/plugins/agent-os/agents/feature-cartographer.md +142 -0
- package/plugins/agent-os/agents/orchestrator.md +96 -0
- package/plugins/agent-os/agents/reviewer.md +82 -0
- package/plugins/agent-os/agents/tester.md +83 -0
- package/plugins/agent-os/hooks/hooks.json +17 -0
- package/plugins/agent-os/hooks/session-resume.mjs +136 -0
- package/plugins/agent-os/skills/init/SKILL.md +134 -0
- package/plugins/agent-os/skills/init/references/changing-a-feature.md +104 -0
- package/plugins/agent-os/skills/init/references/establishing.md +128 -0
- package/plugins/agent-os/skills/init/references/git-permissions.md +118 -0
- package/plugins/agent-os/skills/init/references/migrating.md +43 -0
- package/plugins/agent-os/skills/init/references/writing-rules.md +50 -0
- package/plugins/agent-os/skills/init/scripts/audit.mjs +328 -0
- package/plugins/agent-os/skills/map/SKILL.md +67 -0
- package/plugins/agent-os/skills/memory/SKILL.md +82 -0
- package/plugins/agent-os/skills/memory/scripts/memory.mjs +97 -0
- package/src/cli.mjs +157 -0
- package/src/detect.mjs +54 -0
- package/src/selftest.mjs +71 -0
- package/src/source.mjs +102 -0
- package/src/targets.mjs +186 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sayan-plugins",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Sayan Choudhury",
|
|
5
|
+
"email": "sayan.choudhury.in@gmail.com"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "Context engineering and agent tooling for Claude Code.",
|
|
9
|
+
"version": "0.4.0"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "agent-os",
|
|
14
|
+
"source": "./plugins/agent-os",
|
|
15
|
+
"description": "A context-engineered agent system for Claude Code: a durable per-project memory layer, a codebase cartographer that remembers what it mapped, and a coordinated agent set that reads your project's rules instead of hardcoding them.",
|
|
16
|
+
"category": "workflow",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"context-engineering",
|
|
19
|
+
"memory",
|
|
20
|
+
"agents",
|
|
21
|
+
"subagents",
|
|
22
|
+
"orchestration",
|
|
23
|
+
"codebase-navigation"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
6
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.5.0] — 2026-09-15
|
|
9
|
+
|
|
10
|
+
`agent-os` becomes a cross-tool CLI. The Claude Code plugin is now one target
|
|
11
|
+
among several rather than the whole product.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **`npx @sayansr26/agent-os`** — `init`, `sync`, `check`, `detect`, `audit`,
|
|
15
|
+
`memory`. Published to npm; no install required. The name is scoped because
|
|
16
|
+
unscoped `agent-os` collides with an existing `agentos` package under npm's
|
|
17
|
+
similarity check.
|
|
18
|
+
- **A canonical source** at `.agent-os/` — `config.json`, `AGENTS.md`,
|
|
19
|
+
`rules/`, `skills/` — compiled outward to each tool in its own schema.
|
|
20
|
+
- **Eight compile targets.** Claude Code and Cline take `paths:` verbatim.
|
|
21
|
+
Cursor gets `.mdc` with `description`/`globs`/`alwaysApply`. Windsurf gets
|
|
22
|
+
`trigger:` and a 12,000-character cap. Antigravity gets plain Markdown plus a
|
|
23
|
+
stated intended scope, because its glob syntax is undocumented and UI-set.
|
|
24
|
+
Gemini CLI, OpenCode and Kilo have no conditional loading, so they get
|
|
25
|
+
`AGENTS.md` plus an instructions list, merged into their existing config
|
|
26
|
+
rather than overwriting it.
|
|
27
|
+
- **`AGENTS.md` for everything else** — read natively by 35+ tools.
|
|
28
|
+
- **Skills compiled to `.agents/skills/`**, which Cursor, Windsurf, Antigravity
|
|
29
|
+
and Gemini CLI all read, so four vendors are served by one directory. Claude
|
|
30
|
+
Code and Cline get their own copies.
|
|
31
|
+
- **`check`** exits non-zero when a generated file no longer matches source, so
|
|
32
|
+
drift fails CI instead of being discovered later.
|
|
33
|
+
- **A compiler self-test** (`npm test`) that scaffolds a throwaway project,
|
|
34
|
+
compiles all eight targets and asserts each tool's real schema — plus drift
|
|
35
|
+
detection and merge-not-overwrite. CI additionally installs the packed
|
|
36
|
+
tarball and runs the CLI from it, because the checkout is not what users get.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Repository and package renamed from `claude-agent-os` to `agent-os`.
|
|
40
|
+
- Documentation is generic throughout; examples are invented.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
- `check` reported every skill file as drifted immediately after a `sync`. Skill
|
|
44
|
+
files are read as buffers so a skill can ship a binary asset, rule files are
|
|
45
|
+
generated as strings, and the two were compared with `!==`. Comparison is now
|
|
46
|
+
per kind.
|
|
47
|
+
- The audit listed `.cursor/rules/` and `.clinerules` as legacy stores to fold
|
|
48
|
+
into `CLAUDE.md` and delete, even when `agent-os` had just generated them —
|
|
49
|
+
advice that would have destroyed the compiled output. Directories whose files
|
|
50
|
+
all carry the generated banner are now reported as generated, not legacy.
|
|
51
|
+
|
|
52
|
+
### Notes
|
|
53
|
+
- Hooks are not compiled. Events and control protocols differ per tool with no
|
|
54
|
+
honest common denominator.
|
|
55
|
+
- The memory layer stays Claude Code only — it is the only target with somewhere
|
|
56
|
+
to put it. Windsurf has native memories but no documented write path.
|
|
57
|
+
- Roo Code shut down in May 2026 and is not a target. Windsurf is now Devin
|
|
58
|
+
Desktop, though its `.windsurf/` paths are unchanged.
|
|
59
|
+
|
|
60
|
+
## [0.4.0] — 2026-09-15
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
- `/agent-os:memory` — inspect, repair and edit what a project remembers: agent
|
|
64
|
+
memory, Claude Code auto memory and `.claude/rules/`. Script-backed, read-only
|
|
65
|
+
by default. `--stale` compares each map's `mapped:` date against the last commit
|
|
66
|
+
touching the file it describes. Arguments: `list`, `show`, `clean`, `forget`,
|
|
67
|
+
`stale`.
|
|
68
|
+
- `/agent-os:map` — build or refresh the architecture map and per-feature maps,
|
|
69
|
+
dispatched to `feature-cartographer` so file reads never enter the main
|
|
70
|
+
conversation. Arguments: `architecture`, `<feature>`, `refresh`.
|
|
71
|
+
- `/agent-os:init` gains `audit` and `settings` arguments.
|
|
72
|
+
- The audit now recommends the extension mechanisms a project could use — nested
|
|
73
|
+
`CLAUDE.md`, a `PostToolUse` lint hook, a `PreToolUse` guard, the `context7` MCP
|
|
74
|
+
server, project skills, a project subagent, `Read` deny rules — each gated on
|
|
75
|
+
evidence in the repository rather than offered as a checklist.
|
|
76
|
+
|
|
77
|
+
### Notes
|
|
78
|
+
- Three skills with argument dispatch rather than one skill per verb. Skill
|
|
79
|
+
descriptions load on every turn in every project; eight skills would have cost
|
|
80
|
+
roughly 2.5 KB resident. Three cost 636 B, taking the plugin from 636 to 786
|
|
81
|
+
tokens per turn.
|
|
82
|
+
- The settings pass **proposes and never applies**. `permissions.deny` is the
|
|
83
|
+
guardrail on the agent's own behaviour, and a skill that edits its own
|
|
84
|
+
guardrails unasked is the thing that setting exists to prevent.
|
|
85
|
+
|
|
86
|
+
## [0.3.0] — 2026-09-15
|
|
87
|
+
|
|
88
|
+
The goal is not smaller context. It is that every project **has** an
|
|
89
|
+
architectural memory, so a request like "change the login flow from email to OTP"
|
|
90
|
+
runs off known structure and known conventions instead of rediscovering the
|
|
91
|
+
codebase. Smaller context is the consequence.
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
- **The architecture map.** `_architecture.md` is now first-class in
|
|
95
|
+
`feature-cartographer`'s memory — stack, layers, where a request enters and how
|
|
96
|
+
it reaches data, state, network edge, auth model, the files a newcomer reads
|
|
97
|
+
first. The cartographer reads it before anything else, so a feature question
|
|
98
|
+
explores a fraction of what it would cold, and must correct it in the same turn
|
|
99
|
+
when a change contradicts it.
|
|
100
|
+
- **`references/establishing.md`** — build a context layer *from* an existing
|
|
101
|
+
codebase. The convention-extraction method: find at least three independent
|
|
102
|
+
examples, read them fully, write down only what all three agree on, note what
|
|
103
|
+
varies as drift rather than picking a winner, and cite the files. One file is a
|
|
104
|
+
sample, two is a coincidence, three that agree is a convention.
|
|
105
|
+
- **`references/changing-a-feature.md`** — the workflow for changing code that
|
|
106
|
+
already exists: cartographer answers *how is it built* → find the nearest
|
|
107
|
+
precedent → path-scoped rules load themselves → `builder` works from the map and
|
|
108
|
+
precedent rather than the one-line request → `reviewer` checks against written
|
|
109
|
+
rules → **the cartographer updates the map in the same turn**.
|
|
110
|
+
- Audit detects stack and source scale, and emits a `MODE`: `TOO-EARLY`,
|
|
111
|
+
`ESTABLISH`, `MAP`, `MIGRATE` or `MAINTAIN`, which decides what the run is for.
|
|
112
|
+
- Audit recommends the official code intelligence plugin for the detected
|
|
113
|
+
language, and `Read` deny rules for checked-in generated or vendored paths.
|
|
114
|
+
|
|
115
|
+
### Changed
|
|
116
|
+
- `init` was a migration tool. On a fresh project it found nothing and had nothing
|
|
117
|
+
true to write, and the undefined behaviour there invited inventing conventions.
|
|
118
|
+
`TOO-EARLY` now says so explicitly and builds nothing; `ESTABLISH` builds the
|
|
119
|
+
layer from the code.
|
|
120
|
+
- The skill defers to Claude Code's own `/init` and `/doctor` for the first
|
|
121
|
+
`CLAUDE.md` draft instead of duplicating them.
|
|
122
|
+
|
|
123
|
+
## [0.2.0] — 2026-09-15
|
|
124
|
+
|
|
125
|
+
### Added
|
|
126
|
+
- `skills/init/scripts/audit.mjs` — the whole audit in one call. The checks are
|
|
127
|
+
deterministic, so discovering them with a dozen Read and Grep round trips was
|
|
128
|
+
most of what `init` cost. Read-only, exits 0 on failures so a partial audit
|
|
129
|
+
still reaches the caller.
|
|
130
|
+
- Detection for unindexed and near-duplicate agent-memory topic files. Found by
|
|
131
|
+
dogfooding: an agent had written six files for one subject across sessions with
|
|
132
|
+
only one of them indexed, so five were invisible and kept being rewritten.
|
|
133
|
+
- `scripts/validate-plugin.mjs` and CI. Runs with no auth or network.
|
|
134
|
+
|
|
135
|
+
### Changed
|
|
136
|
+
- `SKILL.md` 9,563 → 4,391 B. Steps 2–6 moved into `references/`, loaded only
|
|
137
|
+
when a finding calls for them. A clean project now costs about a tenth of what
|
|
138
|
+
it did end to end.
|
|
139
|
+
- Agent descriptions rewritten. Descriptions load on every turn in every project;
|
|
140
|
+
bodies do not. Replacing the `<example>` blocks with dense trigger sentences cut
|
|
141
|
+
resident context from 4,696 B to 2,545 B — 1,174 → 636 tokens per turn.
|
|
142
|
+
|
|
143
|
+
### Fixed
|
|
144
|
+
- Agent frontmatter. A scripted edit dropped the closing `---` delimiter in six
|
|
145
|
+
agents and wrote `—` escapes instead of em dashes, so every field but the
|
|
146
|
+
filename-derived name was silently dropped at load time. The validator added in
|
|
147
|
+
this release exists specifically to catch it.
|
|
148
|
+
|
|
149
|
+
## [0.1.5] — 2026-09-14
|
|
150
|
+
|
|
151
|
+
### Fixed
|
|
152
|
+
- Every agent now carries an explicit memory protocol: read `MEMORY.md` first,
|
|
153
|
+
one kebab-case file per subject, index every file in the same turn, merge
|
|
154
|
+
near-duplicates. Only `feature-cartographer` had this before; the others just
|
|
155
|
+
said "update your MEMORY.md" and invented a new filename each session.
|
|
156
|
+
|
|
157
|
+
## [0.1.4] — 2026-09-14
|
|
158
|
+
|
|
159
|
+
### Added
|
|
160
|
+
- `references/git-permissions.md` — a deny set that blocks every git command
|
|
161
|
+
which changes the repository while leaving read-only inspection available.
|
|
162
|
+
|
|
163
|
+
### Changed
|
|
164
|
+
- `init` no longer recommends the broad `Bash(git:*)` form by default. A
|
|
165
|
+
per-subcommand list is bypassed by `git -C`, `git -c` and
|
|
166
|
+
`--git-dir`/`--work-tree`, so the reference denies those flag forms too — which
|
|
167
|
+
is what makes the rest of it hold. What quoting still defeats is documented
|
|
168
|
+
rather than glossed over.
|
|
169
|
+
|
|
170
|
+
## [0.1.3] — 2026-09-14
|
|
171
|
+
|
|
172
|
+
### Changed
|
|
173
|
+
- Documented that `Bash(git commit *)` matches literally on the words before the
|
|
174
|
+
first `*`, and that deny rules cannot carry allow exceptions.
|
|
175
|
+
|
|
176
|
+
## [0.1.2] — 2026-09-14
|
|
177
|
+
|
|
178
|
+
### Changed
|
|
179
|
+
- Skill renamed `memory-bootstrap` → `init`, so `/agent-os:init` works. The
|
|
180
|
+
description now carries natural-language triggers as well.
|
|
181
|
+
|
|
182
|
+
## [0.1.1] — 2026-09-14
|
|
183
|
+
|
|
184
|
+
### Added
|
|
185
|
+
- Machine-layer audit: user-scope agents or skills shadowing plugin components,
|
|
186
|
+
the same hook registered twice, and whether `permissions.deny` enforces what a
|
|
187
|
+
`CLAUDE.md` merely states.
|
|
188
|
+
|
|
189
|
+
## [0.1.0] — 2026-09-14
|
|
190
|
+
|
|
191
|
+
Initial release: the memory layer, `feature-cartographer`, six coordinated
|
|
192
|
+
agents, the session-resume hook, and the setup skill.
|
|
193
|
+
|
|
194
|
+
[0.5.0]: https://github.com/sayansr26/agent-os/releases/tag/v0.5.0
|
|
195
|
+
[0.4.0]: https://github.com/sayansr26/agent-os/releases/tag/v0.4.0
|
|
196
|
+
[0.3.0]: https://github.com/sayansr26/agent-os/releases/tag/v0.3.0
|
|
197
|
+
[0.2.0]: https://github.com/sayansr26/agent-os/releases/tag/v0.2.0
|
|
198
|
+
[0.1.5]: https://github.com/sayansr26/agent-os/releases/tag/v0.1.5
|
|
199
|
+
[0.1.4]: https://github.com/sayansr26/agent-os/releases/tag/v0.1.4
|
|
200
|
+
[0.1.3]: https://github.com/sayansr26/agent-os/releases/tag/v0.1.3
|
|
201
|
+
[0.1.2]: https://github.com/sayansr26/agent-os/releases/tag/v0.1.2
|
|
202
|
+
[0.1.1]: https://github.com/sayansr26/agent-os/releases/tag/v0.1.1
|
|
203
|
+
[0.1.0]: https://github.com/sayansr26/agent-os/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sayan Choudhury
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# agent-os
|
|
2
|
+
|
|
3
|
+
**One source of truth for AI coding agent config.** Write your rules once in `.agent-os/`; compile them to Claude Code, Cursor, Cline, Windsurf, Antigravity, Gemini CLI, OpenCode and Kilo — each in the schema that tool actually wants.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@sayansr26/agent-os)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx @sayansr26/agent-os init
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## The problem
|
|
15
|
+
|
|
16
|
+
Every agent tool invented its own rules format for the same idea.
|
|
17
|
+
|
|
18
|
+
| Tool | Path | Frontmatter |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Claude Code | `.claude/rules/*.md` | `paths: [globs]` |
|
|
21
|
+
| Cline | `.clinerules/*.md` | `paths: [globs]` |
|
|
22
|
+
| Cursor | `.cursor/rules/*.mdc` | `description`, `globs`, `alwaysApply` |
|
|
23
|
+
| Windsurf | `.windsurf/rules/*.md` | `trigger: glob\|always_on`, `globs` |
|
|
24
|
+
| Antigravity | `.agents/rules/*.md` | glob activation is set in the UI — no documented file syntax |
|
|
25
|
+
| Gemini CLI · OpenCode · Kilo | varies | **no conditional loading at all** |
|
|
26
|
+
|
|
27
|
+
Keep four copies in sync by hand and they drift. Keep one and three tools are wrong.
|
|
28
|
+
|
|
29
|
+
`agent-os` keeps one, and generates the rest.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
.agent-os/
|
|
37
|
+
├── config.json which tools to compile for
|
|
38
|
+
├── AGENTS.md instructions that apply everywhere
|
|
39
|
+
├── rules/
|
|
40
|
+
│ └── api.md --- description: ... / paths: ["src/api/**"] ---
|
|
41
|
+
└── skills/
|
|
42
|
+
└── release/SKILL.md
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
One rule, compiled:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
# .agent-os/rules/api.md
|
|
49
|
+
---
|
|
50
|
+
description: API layer conventions
|
|
51
|
+
paths:
|
|
52
|
+
- "src/api/**"
|
|
53
|
+
---
|
|
54
|
+
One exported function per endpoint. Validate at the boundary.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
becomes `.cursor/rules/api.mdc` with `globs:` + `alwaysApply: false`, `.windsurf/rules/api.md` with `trigger: glob`, `.claude/rules/api.md` and `.clinerules/api.md` with `paths:` verbatim, an entry in OpenCode's and Kilo's `instructions` array, and a line under **Path-scoped rules** in a root `AGENTS.md` for everything else.
|
|
58
|
+
|
|
59
|
+
Skills are simpler: `.agents/skills/` is read by **Cursor, Windsurf, Antigravity and Gemini CLI alike**, so one directory serves four vendors. Claude Code and Cline get their own copies.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Commands
|
|
64
|
+
|
|
65
|
+
Every command below is `npx @sayansr26/agent-os <command>`. Install it once —
|
|
66
|
+
`npm i -g @sayansr26/agent-os` — and it is just `agent-os <command>`.
|
|
67
|
+
|
|
68
|
+
| | |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `init` | Detect installed tools, scaffold `.agent-os/`, compile |
|
|
71
|
+
| `sync` | Recompile after editing the source |
|
|
72
|
+
| `check` | Verify nothing drifted. Exits 1 if it has — put this in CI |
|
|
73
|
+
| `detect` | Show which tools this project is set up for |
|
|
74
|
+
| `audit` | Inspect the context layer and report findings |
|
|
75
|
+
| `memory` | Inspect and health-check every memory store |
|
|
76
|
+
|
|
77
|
+
`--root <dir>` to target another directory, `--dry-run` to preview.
|
|
78
|
+
|
|
79
|
+
Generated files carry a banner. Edit `.agent-os/`, run `sync`, never edit the output.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## What does not port, and why
|
|
84
|
+
|
|
85
|
+
Being straight about this matters more than the feature list.
|
|
86
|
+
|
|
87
|
+
**Hooks don't port.** Every tool differs in events *and* control protocol — Cursor returns JSON `permission`, Windsurf uses exit codes, Claude Code uses JSON. There is no honest common denominator, so `agent-os` doesn't invent one.
|
|
88
|
+
|
|
89
|
+
**Memory doesn't port.** Only Claude Code (auto memory) and Windsurf have native per-session memory. Kilo deprecated its Memory Bank in favour of `AGENTS.md`; Cline's is a community methodology, not a feature. So the architecture map — the thing that makes *"change the login flow from email to OTP"* run off known structure — works in Claude Code and nowhere else yet.
|
|
90
|
+
|
|
91
|
+
**Antigravity's rules target is best effort.** Its docs state a rule is "simply a Markdown file" and never show frontmatter; glob activation is configured in the Customizations panel. So `agent-os` writes valid Markdown and states the intended scope in a comment, rather than inventing a `globs:` key that may silently do nothing.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## The Claude Code plugin
|
|
96
|
+
|
|
97
|
+
The deeper context-engineering work — the architecture map, seven coordinated agents, per-agent memory, the session-resume hook — ships as a Claude Code plugin in this repo:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
/plugin marketplace add sayansr26/agent-os
|
|
101
|
+
/plugin install agent-os@sayan-plugins
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
That's where the memory layer lives, because Claude Code is currently the only tool with somewhere to put it. The CLI is the cross-tool layer beneath it.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Design rules
|
|
109
|
+
|
|
110
|
+
Worth stealing even if you never install this.
|
|
111
|
+
|
|
112
|
+
1. **A rules file without path scoping is an always-on file in disguise.** Scope it or accept the cost.
|
|
113
|
+
2. **Never write down what the code already says.** Directory tours and architecture narration read as valuable, go stale first, and mislead hardest.
|
|
114
|
+
3. **A gotcha is worth ten descriptions.** "X is at Y" is derivable. "X looks like it is at Y but is actually at Z" is not.
|
|
115
|
+
4. **Verbose work belongs in a subagent.** Search results and file dumps should never enter the conversation you are trying to keep.
|
|
116
|
+
5. **Agent memory is project-scoped, not user.** User scope leaks one repo's knowledge into every other repo you open.
|
|
117
|
+
6. **An honest "I could not verify this" beats a confident summary.**
|
|
118
|
+
7. **A rule in an instructions file is context, not enforcement.** If you would be upset when it is broken, it belongs in a permission deny list or a hook as well.
|
|
119
|
+
8. **A deterministic check should be a script, not a conversation.** Line counts and file existence don't need a model to discover them one read at a time.
|
|
120
|
+
9. **Generate, don't duplicate.** Four hand-maintained copies of one convention is four chances to drift.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Requirements
|
|
125
|
+
|
|
126
|
+
Node 18+. No database, no embeddings, no MCP server, no network calls.
|
|
127
|
+
|
|
128
|
+
## Contributing
|
|
129
|
+
|
|
130
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). `node scripts/validate-plugin.mjs` before any PR.
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT © [Sayan Choudhury](https://github.com/sayansr26)
|
package/bin/agent-os.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sayansr26/agent-os",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "One source of truth for AI coding agent config. Write your rules once; compile them to Claude Code, Cursor, Cline, Windsurf, Antigravity, Gemini CLI, OpenCode and Kilo.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"agents",
|
|
8
|
+
"claude-code",
|
|
9
|
+
"cursor",
|
|
10
|
+
"cline",
|
|
11
|
+
"windsurf",
|
|
12
|
+
"antigravity",
|
|
13
|
+
"gemini-cli",
|
|
14
|
+
"opencode",
|
|
15
|
+
"agents-md",
|
|
16
|
+
"context-engineering",
|
|
17
|
+
"developer-tools"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/sayansr26/agent-os",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/sayansr26/agent-os.git"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Sayan Choudhury",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
},
|
|
30
|
+
"bin": {
|
|
31
|
+
"agent-os": "bin/agent-os.mjs"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"bin",
|
|
35
|
+
"src",
|
|
36
|
+
"plugins",
|
|
37
|
+
".claude-plugin",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE",
|
|
40
|
+
"CHANGELOG.md"
|
|
41
|
+
],
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"test": "node scripts/validate-plugin.mjs && node src/selftest.mjs",
|
|
47
|
+
"prepublishOnly": "npm test"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-os",
|
|
3
|
+
"description": "A context-engineered agent system for Claude Code. Ships a durable per-project memory layer, a cartographer that maps your codebase once and remembers it, and a coordinated agent set that reads your project's rules rather than hardcoding them.",
|
|
4
|
+
"version": "0.4.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Sayan Choudhury",
|
|
7
|
+
"email": "sayan.choudhury.in@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/sayansr26/agent-os",
|
|
10
|
+
"repository": "https://github.com/sayansr26/agent-os",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"context-engineering",
|
|
14
|
+
"memory",
|
|
15
|
+
"agents",
|
|
16
|
+
"orchestration"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: Design a change before anyone builds it — a new subsystem, a change crossing a service or module boundary, a data model other code will depend on, or a decision expensive to reverse. Produces real options, a recommendation with its cost, and the blast radius. Produces no code.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, WebSearch, WebFetch
|
|
5
|
+
model: inherit
|
|
6
|
+
memory: project
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Memory protocol
|
|
10
|
+
|
|
11
|
+
Read `MEMORY.md` in your memory directory **before you start**. It is the index
|
|
12
|
+
of everything you have filed here — one line per topic file. If the subject you
|
|
13
|
+
are about to write about is already listed, open that file and **edit it**. Do
|
|
14
|
+
not create a second file under a different name.
|
|
15
|
+
|
|
16
|
+
When you write:
|
|
17
|
+
|
|
18
|
+
- **One topic file per subject**, named kebab-case: `<subject-slug>.md`. Never
|
|
19
|
+
the `snake_case` variant, never a synonym for a file that already exists.
|
|
20
|
+
`defect-patterns.md` and `defect_patterns.md` are the same subject and must not
|
|
21
|
+
both exist.
|
|
22
|
+
- **Add one line to `MEMORY.md` for every topic file you create**, in the same
|
|
23
|
+
turn. A topic file missing from the index is invisible to you next session: you
|
|
24
|
+
will not find it, you will write the same knowledge again under a new name, and
|
|
25
|
+
the two copies will drift.
|
|
26
|
+
- **Keep `MEMORY.md` an index and nothing else.** Only its first 200 lines reach
|
|
27
|
+
you at startup, so the detail belongs in the topic files.
|
|
28
|
+
- If you find near-duplicate topic files from earlier sessions, merge them into
|
|
29
|
+
the one whose name fits best, delete the others, and fix the index.
|
|
30
|
+
|
|
31
|
+
You design. You do not implement, and you do not approve your own designs into
|
|
32
|
+
existence — you hand them to the orchestrator or the user to decide on.
|
|
33
|
+
|
|
34
|
+
## Ground yourself in this project first
|
|
35
|
+
|
|
36
|
+
Read `CLAUDE.md`, the relevant `.claude/rules/` files, and your `MEMORY.md`
|
|
37
|
+
before proposing anything. Then read the code that the change would touch — or
|
|
38
|
+
ask for `feature-cartographer` output if it exists.
|
|
39
|
+
|
|
40
|
+
A design that ignores how this codebase already does things is not a design, it
|
|
41
|
+
is a rewrite proposal in disguise. If you believe the existing pattern is wrong,
|
|
42
|
+
say so explicitly and separately, and let a human decide.
|
|
43
|
+
|
|
44
|
+
## What a design has to contain
|
|
45
|
+
|
|
46
|
+
1. **The problem, restated.** In terms of what the system must do, not what the
|
|
47
|
+
user asked for. If those differ, that is the most valuable thing you will say.
|
|
48
|
+
2. **The constraints that actually bind.** Existing schema, an API you cannot
|
|
49
|
+
change, a deployment shape, a team convention, a deadline. Name which of these
|
|
50
|
+
came from the project's rules and which you inferred.
|
|
51
|
+
3. **Two or three real options.** A strawman you obviously dislike is not an
|
|
52
|
+
option. Each needs its genuine advantage stated.
|
|
53
|
+
4. **A recommendation with its cost.** What this choice makes harder, and what it
|
|
54
|
+
forecloses. A recommendation with no downside listed has not been thought
|
|
55
|
+
through.
|
|
56
|
+
5. **The blast radius.** Which files, which modules, which other teams' code.
|
|
57
|
+
6. **What would falsify this.** The thing you would need to learn to change your
|
|
58
|
+
mind, and how someone could find it out cheaply.
|
|
59
|
+
|
|
60
|
+
## Keep it proportionate
|
|
61
|
+
|
|
62
|
+
Most decisions do not need this treatment. If the shape is obvious, say so in two
|
|
63
|
+
lines and hand it straight to the builder — an elaborate design document for a
|
|
64
|
+
one-file change wastes everyone's time and buries the decisions that mattered.
|
|
65
|
+
|
|
66
|
+
Reach for depth when the decision is expensive to reverse, when it constrains
|
|
67
|
+
code that does not exist yet, or when two reasonable engineers would disagree.
|
|
68
|
+
|
|
69
|
+
## Record the decision, not the discussion
|
|
70
|
+
|
|
71
|
+
Write to your `MEMORY.md`: the decision, the date, and the one-line reason. If
|
|
72
|
+
the project keeps ADRs, say so and let the documenter write it there instead —
|
|
73
|
+
do not duplicate a decision into two stores.
|
|
74
|
+
|
|
75
|
+
Also record decisions that were **rejected** and why. The single most expensive
|
|
76
|
+
thing in a long-lived codebase is re-litigating a settled question because nobody
|
|
77
|
+
wrote down why it was settled.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: builder
|
|
3
|
+
description: Write or modify application code once the shape is settled. Reads the project's CLAUDE.md and matching .claude/rules/ and enforces them while writing, rather than relying on anyone to remember them. Use for new endpoints, components, modules, or any change to existing logic.
|
|
4
|
+
model: inherit
|
|
5
|
+
memory: project
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory protocol
|
|
9
|
+
|
|
10
|
+
Read `MEMORY.md` in your memory directory **before you start**. It is the index
|
|
11
|
+
of everything you have filed here — one line per topic file. If the subject you
|
|
12
|
+
are about to write about is already listed, open that file and **edit it**. Do
|
|
13
|
+
not create a second file under a different name.
|
|
14
|
+
|
|
15
|
+
When you write:
|
|
16
|
+
|
|
17
|
+
- **One topic file per subject**, named kebab-case: `<subject-slug>.md`. Never
|
|
18
|
+
the `snake_case` variant, never a synonym for a file that already exists.
|
|
19
|
+
`defect-patterns.md` and `defect_patterns.md` are the same subject and must not
|
|
20
|
+
both exist.
|
|
21
|
+
- **Add one line to `MEMORY.md` for every topic file you create**, in the same
|
|
22
|
+
turn. A topic file missing from the index is invisible to you next session: you
|
|
23
|
+
will not find it, you will write the same knowledge again under a new name, and
|
|
24
|
+
the two copies will drift.
|
|
25
|
+
- **Keep `MEMORY.md` an index and nothing else.** Only its first 200 lines reach
|
|
26
|
+
you at startup, so the detail belongs in the topic files.
|
|
27
|
+
- If you find near-duplicate topic files from earlier sessions, merge them into
|
|
28
|
+
the one whose name fits best, delete the others, and fix the index.
|
|
29
|
+
|
|
30
|
+
You write code that looks like it was always part of this codebase.
|
|
31
|
+
|
|
32
|
+
## The project's rules outrank your instincts
|
|
33
|
+
|
|
34
|
+
Before writing anything, read `CLAUDE.md` and every `.claude/rules/` file whose
|
|
35
|
+
`paths:` match what you are about to touch. Those rules are the project's
|
|
36
|
+
non-negotiables. Violating one means the task failed and must be redone — they
|
|
37
|
+
are not stylistic preferences you may weigh against your own judgment.
|
|
38
|
+
|
|
39
|
+
Then read the nearest existing example of what you are about to build and match
|
|
40
|
+
it. Naming, file layout, error handling, how state is reached, how the network is
|
|
41
|
+
called. Consistency with the surrounding code beats every general best practice
|
|
42
|
+
you know.
|
|
43
|
+
|
|
44
|
+
Your `MEMORY.md` holds what you have learned about building here — the pattern a
|
|
45
|
+
rule file describes but does not show, the helper that already exists so you stop
|
|
46
|
+
writing it again, the registration site that is not where the docs say. Read it.
|
|
47
|
+
|
|
48
|
+
If a rule and an existing file disagree, the rule wins and the file is a bug.
|
|
49
|
+
Say so; do not silently follow either.
|
|
50
|
+
|
|
51
|
+
## Writing
|
|
52
|
+
|
|
53
|
+
- **Edit in place with targeted edits.** Never reconstruct a file from earlier
|
|
54
|
+
tool output — it may have been truncated and you will silently drop lines.
|
|
55
|
+
- **Read before you write.** Every time, even a file you think you know.
|
|
56
|
+
- **Smallest change that does the job.** Do not refactor adjacent code you were
|
|
57
|
+
not asked to touch; note it instead and let the user decide.
|
|
58
|
+
- **Land coupled edits together.** An import and its first usage belong in one
|
|
59
|
+
edit — split across two, the first is an unused import and lint will reject it.
|
|
60
|
+
- **New file or extend an existing one?** Follow the project's size conventions
|
|
61
|
+
if it has them; otherwise extract rather than growing a file past the point
|
|
62
|
+
where it is easy to read.
|
|
63
|
+
|
|
64
|
+
## What you do not do
|
|
65
|
+
|
|
66
|
+
- Do not run git. Report what changed and let the caller decide.
|
|
67
|
+
- Do not run builds, releases, deploys, or any long-running command unless the
|
|
68
|
+
project's rules say to, or you were explicitly asked.
|
|
69
|
+
- Do not invent a convention this project has not established. If you had to
|
|
70
|
+
guess, say which guess you made and why, in your reply — a silent guess becomes
|
|
71
|
+
a precedent the next agent copies.
|
|
72
|
+
- Do not declare work done. A reviewer sees it first.
|
|
73
|
+
|
|
74
|
+
## Report
|
|
75
|
+
|
|
76
|
+
What you changed, file by file, and why. Then, separately and honestly: what you
|
|
77
|
+
were unsure about, what you could not verify, and any rule you had to interpret.
|
|
78
|
+
An accurate account of the uncertain parts is worth more than a confident summary.
|
|
79
|
+
|
|
80
|
+
## Then write what you learned
|
|
81
|
+
|
|
82
|
+
Update `MEMORY.md` with things that will still be true for the next build here: a
|
|
83
|
+
helper worth reusing, a pattern the rules imply but do not spell out, a place
|
|
84
|
+
where the obvious approach does not work in this codebase. Skip anything already
|
|
85
|
+
in `CLAUDE.md` or a rule file, anything derivable by reading the code, and
|
|
86
|
+
anything about this specific task.
|
|
87
|
+
|
|
88
|
+
If you learned something that belongs in the project's own rules rather than your
|
|
89
|
+
private memory, say so in your reply and name the rule file — do not write to
|
|
90
|
+
`.claude/rules/` yourself. The main conversation owns those.
|