dotai-cli 0.2.0__tar.gz → 0.4.0__tar.gz
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.
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/.gitignore +2 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/PKG-INFO +249 -34
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/README.md +247 -32
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/pyproject.toml +3 -2
- dotai_cli-0.4.0/rdc.yaml +8 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/__init__.py +1 -1
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/cli/__init__.py +9 -2
- dotai_cli-0.4.0/src/dotai/cli/prefs_cmd.py +364 -0
- dotai_cli-0.4.0/src/dotai/cli/rules_cmd.py +672 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/cli/skills_cmd.py +149 -13
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/cli/sync_cmd.py +26 -5
- dotai_cli-0.4.0/src/dotai/import_agent.py +269 -0
- dotai_cli-0.4.0/src/dotai/maintenance.py +821 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/models.py +58 -0
- dotai_cli-0.4.0/src/dotai/preferences.py +575 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/rules.py +227 -27
- dotai_cli-0.4.0/src/dotai/seed/skills/compress.md +59 -0
- dotai_cli-0.4.0/src/dotai/seed/skills/learn.md +53 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/sync.py +133 -49
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/vet.py +48 -0
- dotai_cli-0.4.0/tests/test_import_agent.py +188 -0
- dotai_cli-0.4.0/tests/test_maintenance.py +362 -0
- dotai_cli-0.4.0/tests/test_preferences.py +184 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_vet.py +43 -1
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/uv.lock +172 -144
- dotai_cli-0.2.0/src/dotai/cli/rules_cmd.py +0 -202
- dotai_cli-0.2.0/src/dotai/seed/skills/learn.md +0 -37
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/.github/workflows/ci.yml +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/.github/workflows/publish.yml +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/LICENSE +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/__main__.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/cli/__main__.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/cli/roles_cmd.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/cli/watch_cmd.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/converter.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/indexer.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/roles.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/architect.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/debugger.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/founder.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/mentor.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/product-manager.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/qa.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/reviewer.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/security.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/ship.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/roles/writer.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/careful.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/commit-helper.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/context-dump.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/investigate.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/parallel-work.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/plan.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/review.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/scaffold.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/ship.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/techdebt.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/seed/skills/verify.md +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/skills.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/store.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/tools/__init__.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/tools/base.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/tools/registry.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/src/dotai/utils.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/__init__.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/conftest.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_converter.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_models.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_roles.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_rules.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_skills.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_store.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_sync.py +0 -0
- {dotai_cli-0.2.0 → dotai_cli-0.4.0}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dotai-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Universal AI context for any coding agent. Roles, skills, and rules in ~/.ai/
|
|
5
5
|
Project-URL: Homepage, https://github.com/dawalama/dotai
|
|
6
6
|
Project-URL: Repository, https://github.com/dawalama/dotai
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
|
-
Requires-Dist: ai-skill-audit>=0.
|
|
21
|
+
Requires-Dist: ai-skill-audit>=0.5.1
|
|
22
22
|
Requires-Dist: pydantic>=2.0
|
|
23
23
|
Requires-Dist: rich>=13.0
|
|
24
24
|
Requires-Dist: typer>=0.9
|
|
@@ -29,28 +29,63 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
|
|
30
30
|
# dotai
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
**Your coding agents should remember what you taught them.**
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
dotai gives Claude, Cursor, Gemini, Codex, and other coding agents one shared memory for how you build software. Keep your rules, workflows, and engineering taste in `~/.ai/`; sync them into any project with one command.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
```text
|
|
37
|
+
┌─ CLAUDE.md + native slash commands
|
|
38
|
+
~/.ai/ ── dotai sync ───┼─ .cursorrules
|
|
39
|
+
├─ GEMINI.md
|
|
40
|
+
└─ AGENTS.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
No server. No account. No proprietary memory layer. Just portable Markdown that you own.
|
|
44
|
+
|
|
45
|
+
## Stop reteaching every agent
|
|
37
46
|
|
|
38
|
-
|
|
39
|
-
- Cursor → `.cursorrules`
|
|
40
|
-
- Gemini CLI → `GEMINI.md`
|
|
41
|
-
- Codex / Copilot → `AGENTS.md`
|
|
47
|
+
You tell one agent “never call `useEffect` directly.” Next week, a different agent does exactly that. Your review checklist lives in one tool, your deployment workflow in another, and the correction you made yesterday disappears with the chat.
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
dotai turns those corrections into durable, reusable context:
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
- **Rules are hard constraints.** Capture coding standards and scope them by project or file pattern.
|
|
52
|
+
- **Skills are repeatable workflows.** Plan, investigate, review, verify, and ship the same way every time.
|
|
53
|
+
- **Roles change how the agent thinks.** Review as a security engineer; plan as a product manager.
|
|
54
|
+
- **Preference packs carry your taste.** Share softer choices without weakening hard rules.
|
|
55
|
+
- **Sync speaks each agent's language.** Generate the bootstrap file that Claude, Cursor, Gemini, or Codex already understands.
|
|
46
56
|
|
|
47
|
-
|
|
57
|
+
The useful part is the feedback loop:
|
|
48
58
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
```text
|
|
60
|
+
agent makes a mistake → capture the correction → sync → every agent learns it
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## See it in action
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Set up your global knowledge base
|
|
67
|
+
dotai init
|
|
68
|
+
|
|
69
|
+
# Teach every agent a correction you never want to repeat
|
|
70
|
+
dotai learn "no-print-debugging" \
|
|
71
|
+
--issue "Debug output was left in production code" \
|
|
72
|
+
--correction "Use structured logging and remove temporary debug output" \
|
|
73
|
+
--globs "*.py"
|
|
74
|
+
|
|
75
|
+
# Bring that knowledge into a project
|
|
76
|
+
cd ~/my-project
|
|
77
|
+
dotai sync
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Now the rule is available to every supported agent, alongside reusable commands such as:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
/run_plan as product-manager
|
|
84
|
+
/run_investigate as debugger
|
|
85
|
+
/run_review as security-engineer
|
|
86
|
+
/run_verify
|
|
87
|
+
/run_ship
|
|
88
|
+
```
|
|
54
89
|
|
|
55
90
|
## Installation
|
|
56
91
|
|
|
@@ -91,7 +126,7 @@ cd ~/my-project
|
|
|
91
126
|
dotai sync
|
|
92
127
|
```
|
|
93
128
|
|
|
94
|
-
This generates agent config files in your project root — `CLAUDE.md`, `.cursorrules`, `GEMINI.md`, and `AGENTS.md
|
|
129
|
+
This generates agent config files in your project root — `CLAUDE.md`, `.cursorrules`, `GEMINI.md`, and `AGENTS.md`. Structured rules and freeform conventions are included in full; roles and skills are included as a compact catalog by default. For Claude Code, sync also generates `.claude/skills/` entries so skills appear as native slash commands. Use `dotai sync --full` when an agent needs every role and skill definition inline.
|
|
95
130
|
|
|
96
131
|
## Usage
|
|
97
132
|
|
|
@@ -124,6 +159,7 @@ After `dotai sync`, skills appear as native slash commands:
|
|
|
124
159
|
> /run_careful # Enter production-safety mode
|
|
125
160
|
> /run_verify # Run tests, types, lint, build
|
|
126
161
|
> /run_learn # Capture a mistake as a permanent rule
|
|
162
|
+
> /run_compress # Draft and review smaller rule definitions
|
|
127
163
|
```
|
|
128
164
|
|
|
129
165
|
### Using skills outside Claude Code
|
|
@@ -143,23 +179,157 @@ dotai skills --category deployment
|
|
|
143
179
|
|
|
144
180
|
### Recording what you learn
|
|
145
181
|
|
|
182
|
+
`dotai learn` creates a **structured rule file** in `~/.ai/rules/` by default (not a freeform journal scrap).
|
|
183
|
+
|
|
146
184
|
```bash
|
|
147
|
-
#
|
|
185
|
+
# Preview the rule without writing
|
|
148
186
|
dotai learn "auth-header" \
|
|
149
187
|
--issue "Forgot Bearer prefix on API token" \
|
|
150
|
-
--correction "Always prepend 'Bearer ' to auth tokens"
|
|
188
|
+
--correction "Always prepend 'Bearer ' to auth tokens" \
|
|
189
|
+
--dry-run
|
|
151
190
|
|
|
152
|
-
#
|
|
153
|
-
|
|
191
|
+
# Save structured rule + resync agent configs
|
|
192
|
+
dotai learn "auth-header" \
|
|
193
|
+
-i "Forgot Bearer prefix on API token" \
|
|
194
|
+
-c "Always prepend 'Bearer ' to auth tokens" \
|
|
195
|
+
--sync
|
|
154
196
|
|
|
155
197
|
# Import a detailed rule from a file
|
|
156
198
|
dotai learn "no-useEffect" --from-file react-rules.md --globs "*.tsx,*.ts"
|
|
157
199
|
|
|
200
|
+
# Freeform journal entry in rules.md (opt-in)
|
|
201
|
+
dotai learn "note" -i "..." -c "..." --append-md
|
|
202
|
+
|
|
203
|
+
# Or let the agent do it — /run_learn reviews the session and proposes a rule
|
|
204
|
+
> /run_learn
|
|
205
|
+
|
|
158
206
|
# Disable a rule for one legacy project
|
|
159
207
|
dotai toggle no-useeffect --off --project legacy-app
|
|
208
|
+
|
|
209
|
+
# Audit rule quality (duplicates, empty bodies)
|
|
210
|
+
dotai rules --check
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The feedback loop: **vibe-code → agent makes mistake → `/run_learn` → structured rule → `dotai sync` → agent never repeats it.**
|
|
214
|
+
|
|
215
|
+
### Keeping rules healthy
|
|
216
|
+
|
|
217
|
+
Knowledge gets noisy as it grows. `dotai audit` reviews the effective ruleset locally and deterministically—nothing is sent to an external model.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Find weak, generic, preference-like, oversized, or overlapping rules
|
|
221
|
+
dotai audit
|
|
222
|
+
dotai audit --project my-app
|
|
223
|
+
|
|
224
|
+
# Machine-readable output or a CI quality gate
|
|
225
|
+
dotai audit --json
|
|
226
|
+
dotai audit --fail-on high
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The report includes stable finding codes, evidence, suggested actions, an estimated prompt-token cost, and a context-concentration summary showing which rules dominate the budget. Large-rule findings show the rule's share of total context, change risk, reviewable sections, and a conservative manual-savings range. Security and other high-consequence rules receive preservation-first guidance and are deliberately protected from “the model probably knows this” recommendations.
|
|
230
|
+
|
|
231
|
+
`dotai compress` turns high-confidence findings into a conservative plan. Semantic rewriting is handled by the active coding agent, not a hidden provider inside the CLI:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Inspect candidates
|
|
235
|
+
dotai compress
|
|
236
|
+
|
|
237
|
+
# Ask the current coding agent to draft, diff, and review changes
|
|
238
|
+
> /run_compress
|
|
239
|
+
|
|
240
|
+
# Low-level application boundary for an approved versioned proposal
|
|
241
|
+
dotai compress apply proposal.json
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
`/run_compress` reads the JSON plan, drafts shorter complete rules, explains what it preserved and consolidated, shows the full diff in conversation, and asks `Apply this compression? [y/N]`. It then passes only approved changes to dotai. Near-duplicates, generic guidance, and rules that may belong in a preference pack remain suggestions unless the developer explicitly approves a concrete proposal.
|
|
245
|
+
|
|
246
|
+
When no exact duplicates exist, compression says there are no **safe automatic** savings while still listing semantic review candidates and their estimated savings. These estimates are directional—they help prioritize review. The CLI never invents a semantic rewrite or calls an external provider.
|
|
247
|
+
|
|
248
|
+
Proposal files are versioned and bound to the original rule with a SHA-256 hash, so stale or renamed rules are rejected. Before applying approved changes, dotai validates every proposed rule and creates a complete timestamped snapshot under the applicable `.ai/backups/<timestamp>-compress/`. After writing, the manifest is finalized with actual before/after hashes, per-rule token savings, total savings, and completion status. Subsequent audits show recently compressed rules and clearly note when a successful reduction remains above the large-rule threshold. Backups are ordinary local files and are never deleted automatically.
|
|
249
|
+
|
|
250
|
+
### Migrating existing agent files
|
|
251
|
+
|
|
252
|
+
Already have a `CLAUDE.md`, `.cursorrules`, or `AGENTS.md`? Import user-authored content into `~/.ai/`:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# Preview
|
|
256
|
+
dotai import-agent CLAUDE.md --dry-run
|
|
257
|
+
|
|
258
|
+
# Append into project .ai/rules.md (default)
|
|
259
|
+
dotai import-agent CLAUDE.md
|
|
260
|
+
|
|
261
|
+
# One structured rule
|
|
262
|
+
dotai import-agent .cursorrules --mode rule --name project-conventions
|
|
263
|
+
|
|
264
|
+
# One rule per ## section
|
|
265
|
+
dotai import-agent AGENTS.md --mode sections --dry-run
|
|
266
|
+
|
|
267
|
+
# Scan a project directory for known agent files
|
|
268
|
+
dotai import-agent . --mode rules_md
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
dotai strips its own managed marker sections so you don't re-import generated primers. Directory imports combine all discovered agent files into one update, and structured-rule imports choose a new suffixed filename rather than overwrite an existing rule. Preview unfamiliar files with `--dry-run` before importing.
|
|
272
|
+
|
|
273
|
+
### Preference packs (taste) — borrowable soft style
|
|
274
|
+
|
|
275
|
+
Hard rules are law. **Preference packs** are soft taste: CLI stack, design micro-details, export style — things that are too granular or fluid for hard rules. You can author them, pull someone else's, and activate them per project.
|
|
276
|
+
|
|
277
|
+
**Precedence:** hard rules → freeform `rules.md` → active preference packs → model default.
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Create a pack
|
|
281
|
+
dotai prefs new "CLI Conventions" --domain cli
|
|
282
|
+
# Edit ~/.ai/preferences/cli-conventions.md, then activate:
|
|
283
|
+
dotai prefs use cli-conventions
|
|
284
|
+
dotai sync
|
|
285
|
+
|
|
286
|
+
# Borrow / pull someone else's taste (local file or git repo)
|
|
287
|
+
dotai prefs pull ./design-eng-taste.md --name design-eng --domain design
|
|
288
|
+
dotai prefs pull https://github.com/org/taste-packs -n cli
|
|
289
|
+
dotai prefs use design-eng
|
|
290
|
+
|
|
291
|
+
# Session overlay without changing active list
|
|
292
|
+
dotai sync --with-prefs design-eng,cli
|
|
293
|
+
dotai primer --with-prefs design-eng
|
|
294
|
+
|
|
295
|
+
# List / show / deactivate
|
|
296
|
+
dotai prefs
|
|
297
|
+
dotai prefs show cli-conventions
|
|
298
|
+
dotai prefs unuse design-eng
|
|
299
|
+
|
|
300
|
+
# Project operations stay inside that project; global removal is explicit
|
|
301
|
+
dotai prefs use cli-conventions --project my-app
|
|
302
|
+
dotai prefs remove cli-conventions --global
|
|
160
303
|
```
|
|
161
304
|
|
|
162
|
-
|
|
305
|
+
Preference lookup and removal are scope-safe: a project command cannot mutate a pack owned by another registered project. Removing a pack also removes it from the activation list for the pack's owning scope.
|
|
306
|
+
|
|
307
|
+
Example pack (`~/.ai/preferences/cli.md`):
|
|
308
|
+
|
|
309
|
+
```markdown
|
|
310
|
+
---
|
|
311
|
+
name: CLI Conventions
|
|
312
|
+
id: cli
|
|
313
|
+
description: How I build CLIs
|
|
314
|
+
domain: cli
|
|
315
|
+
tags: typescript, commander
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Soft preferences
|
|
319
|
+
|
|
320
|
+
Hard rules always take precedence if they conflict.
|
|
321
|
+
|
|
322
|
+
### Stack
|
|
323
|
+
- TypeScript + tsup
|
|
324
|
+
- Commander.js
|
|
325
|
+
- Vitest
|
|
326
|
+
- pnpm (npm link for local bins)
|
|
327
|
+
|
|
328
|
+
### Style
|
|
329
|
+
- Lowercase `-v` for version
|
|
330
|
+
- Start version at `0.0.1`
|
|
331
|
+
- Commands live under `commands/`
|
|
332
|
+
```
|
|
163
333
|
|
|
164
334
|
### Searching your knowledge
|
|
165
335
|
|
|
@@ -193,8 +363,12 @@ dotai init ~/other-project
|
|
|
193
363
|
```
|
|
194
364
|
~/.ai/ # Global (cross-project)
|
|
195
365
|
├── rules.md # Inline rules, conventions, and lessons learned
|
|
196
|
-
├── rules/ # Structured rules (
|
|
366
|
+
├── rules/ # Structured rules (hard constraints)
|
|
197
367
|
│ └── no-useeffect.md # Example: ban useEffect in React
|
|
368
|
+
├── preferences/ # Soft taste packs (borrowable style priors)
|
|
369
|
+
│ └── cli.md # Example: CLI stack / micro-style
|
|
370
|
+
├── preferences-active.json # Which preference packs are active
|
|
371
|
+
├── backups/ # Local snapshots created before compression writes
|
|
198
372
|
├── roles/ # Cognitive modes
|
|
199
373
|
│ ├── reviewer.md # Paranoid staff engineer
|
|
200
374
|
│ ├── architect.md # Systems thinker
|
|
@@ -219,6 +393,7 @@ dotai init ~/other-project
|
|
|
219
393
|
│ ├── verify.md # Run tests, types, lint (/run_verify)
|
|
220
394
|
│ ├── plan.md # Structured planning workflow (/run_plan)
|
|
221
395
|
│ ├── learn.md # Capture learnings as rules (/run_learn)
|
|
396
|
+
│ ├── compress.md # Review semantic rule compression (/run_compress)
|
|
222
397
|
│ └── deploy/ # Folder-based skill (with scripts & assets)
|
|
223
398
|
│ ├── main.md
|
|
224
399
|
│ ├── scripts/
|
|
@@ -404,12 +579,18 @@ All useEffect usage must be replaced with declarative patterns...
|
|
|
404
579
|
# List active rules
|
|
405
580
|
dotai rules
|
|
406
581
|
|
|
582
|
+
# Audit duplicates / empty bodies
|
|
583
|
+
dotai rules --check
|
|
584
|
+
|
|
407
585
|
# Import a rule from an external file
|
|
408
586
|
dotai learn "no-useEffect" --from-file react-rule.md --globs "*.tsx,*.ts"
|
|
409
587
|
|
|
410
|
-
# Record
|
|
588
|
+
# Record a learning as a structured rule (default)
|
|
411
589
|
dotai learn "auth-header" --issue "Forgot Bearer prefix" --correction "Always prepend Bearer to tokens"
|
|
412
590
|
|
|
591
|
+
# Preview first
|
|
592
|
+
dotai learn "auth-header" -i "..." -c "..." --dry-run
|
|
593
|
+
|
|
413
594
|
# Disable a rule globally
|
|
414
595
|
dotai toggle no-useeffect --off
|
|
415
596
|
|
|
@@ -420,11 +601,20 @@ dotai toggle no-useeffect --off --project my-legacy-app
|
|
|
420
601
|
dotai toggle no-useeffect --on
|
|
421
602
|
```
|
|
422
603
|
|
|
423
|
-
|
|
604
|
+
Structured rules are included **inline** in every synced agent file. Freeform `rules.md` is included too. Skills/roles stay as catalogs unless you pass `dotai sync --full`.
|
|
424
605
|
|
|
425
606
|
## Agent Sync
|
|
426
607
|
|
|
427
|
-
`dotai sync` generates tool-specific bootstrap files with
|
|
608
|
+
`dotai sync` generates tool-specific bootstrap files with:
|
|
609
|
+
|
|
610
|
+
- **Full structured rule bodies** (high-value constraints)
|
|
611
|
+
- **Freeform `rules.md` conventions** (previously referenced but not inlined)
|
|
612
|
+
- **Role and skill catalogs** (names, triggers, descriptions — not every skill novel)
|
|
613
|
+
- **Claude Code**: compact pointers + native `.claude/skills/` slash commands
|
|
614
|
+
|
|
615
|
+
Use `--full` only when you need every role persona and skill definition dumped inline (larger context).
|
|
616
|
+
|
|
617
|
+
These files contain machine-specific context and may include absolute paths. Treat them as generated per-user artifacts unless your team intentionally commits shared agent instructions. dotai-managed sections are marker-delimited, so syncing preserves user-authored content outside those markers.
|
|
428
618
|
|
|
429
619
|
```bash
|
|
430
620
|
# Generate all (CLAUDE.md + .cursorrules + GEMINI.md + AGENTS.md)
|
|
@@ -434,8 +624,13 @@ dotai sync
|
|
|
434
624
|
dotai sync --agents claude,cursor
|
|
435
625
|
dotai sync --agents gemini
|
|
436
626
|
|
|
627
|
+
# Legacy-style full dump (roles + skill definitions inline)
|
|
628
|
+
dotai sync --full
|
|
629
|
+
|
|
437
630
|
# Print primer to stdout (for piping)
|
|
438
631
|
dotai primer
|
|
632
|
+
dotai primer --compact
|
|
633
|
+
dotai primer --full
|
|
439
634
|
```
|
|
440
635
|
|
|
441
636
|
### Supported Agents
|
|
@@ -443,17 +638,17 @@ dotai primer
|
|
|
443
638
|
| Agent | Output File | Sync Command | Notes |
|
|
444
639
|
|-------|-------------|--------------|-------|
|
|
445
640
|
| Claude Code | `CLAUDE.md` + `.claude/skills/` | `dotai sync --agents claude` | Marker-based merging + native slash commands |
|
|
446
|
-
| Cursor | `.cursorrules` | `dotai sync --agents cursor` | Full
|
|
641
|
+
| Cursor | `.cursorrules` | `dotai sync --agents cursor` | Full rules and preferences; role/skill catalog by default |
|
|
447
642
|
| Gemini CLI | `GEMINI.md` | `dotai sync --agents gemini` | Auto-discovered in project root and `~/.gemini/GEMINI.md` |
|
|
448
643
|
| Generic | `AGENTS.md` | `dotai sync --agents generic` | Works with Codex, Copilot, and any agent that reads it |
|
|
449
644
|
|
|
450
645
|
For Claude Code, `dotai sync` also generates `.claude/skills/<trigger>/SKILL.md` files. These register as native slash commands — they appear in autocomplete and work as real `/run_*` commands with role composition support built in.
|
|
451
646
|
|
|
452
|
-
> **Tip:** Run `dotai primer | pbcopy` to copy the
|
|
647
|
+
> **Tip:** Run `dotai primer --full | pbcopy` to copy the complete context to your clipboard for pasting into an agent's system prompt.
|
|
453
648
|
|
|
454
649
|
## Installing Skills
|
|
455
650
|
|
|
456
|
-
Install skills from git repos or local directories. Claude-native `SKILL.md` files are auto-detected and converted to dotai format with triggers and categories inferred from the content.
|
|
651
|
+
Install skills from git repos or local directories. Claude-native `SKILL.md` files are auto-detected and converted to dotai format with triggers and categories inferred from the content. New installs are security-vetted before use.
|
|
457
652
|
|
|
458
653
|
```bash
|
|
459
654
|
# Install from a GitHub repo — auto-detects and converts Claude-native skills
|
|
@@ -471,6 +666,15 @@ dotai install https://github.com/team/skills -p my-project
|
|
|
471
666
|
|
|
472
667
|
After install, run `dotai sync` to make them available as slash commands in Claude Code, Gemini, etc.
|
|
473
668
|
|
|
669
|
+
Refresh skills that were installed from a tracked source (team conventions repo):
|
|
670
|
+
|
|
671
|
+
```bash
|
|
672
|
+
dotai install --update
|
|
673
|
+
dotai install --update -s mvp
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
Updates are staged and security-vetted before installation. A blocked or declined update leaves the existing skill unchanged. Multi-skill repositories refresh each recorded skill independently. `--skip-vet` is an explicit trust override and should only be used for a source you have reviewed.
|
|
677
|
+
|
|
474
678
|
### Converting Claude-native skills
|
|
475
679
|
|
|
476
680
|
If you have a Claude-native `SKILL.md` and want to convert it manually:
|
|
@@ -564,13 +768,24 @@ dotai roles # List available roles
|
|
|
564
768
|
dotai role <name> # Output a role's full prompt to stdout
|
|
565
769
|
dotai skills [-c category] # List skills (optionally filter by category)
|
|
566
770
|
dotai prompt <skill> [--role <role>] # Assemble skill + role prompt for any agent
|
|
567
|
-
dotai sync [path] [--agents ...]
|
|
568
|
-
dotai primer [--project <name>]
|
|
569
|
-
dotai rules [-p project] [-a]
|
|
771
|
+
dotai sync [path] [--agents ...] [--full] # Sync ~/.ai/ into agent config files
|
|
772
|
+
dotai primer [--project <name>] [--full|--compact] # Print agent context to stdout
|
|
773
|
+
dotai rules [-p project] [-a] [--check] # List rules (or audit quality)
|
|
774
|
+
dotai audit [-p project] [--json] [--fail-on severity] # Read-only rule audit
|
|
775
|
+
dotai compress [-p project] [--json] # Plan compression candidates
|
|
776
|
+
dotai compress apply <proposal.json> [--yes] # Validate, back up, and apply proposals
|
|
570
777
|
dotai toggle <rule-id> --on/--off # Enable/disable rules globally or per-project
|
|
778
|
+
dotai learn "title" -i "..." -c "..." # Create structured rule (default)
|
|
779
|
+
dotai learn "title" -i "..." -c "..." --dry-run|--sync|--force|--append-md
|
|
571
780
|
dotai learn "title" --from-file <f> # Import structured rule from a file
|
|
572
|
-
dotai
|
|
781
|
+
dotai import-agent <path> [-m mode] [--dry-run] # Non-destructive agent-file migration
|
|
782
|
+
dotai prefs [list|show|new|pull|use|unuse|remove] # Preference / taste packs
|
|
783
|
+
dotai prefs new "CLI" --domain cli # Create a soft style pack
|
|
784
|
+
dotai prefs pull <path|url> [-n id] # Borrow / install a pack
|
|
785
|
+
dotai prefs use <id> [-p project|--global] # Activate pack in an explicit scope
|
|
786
|
+
dotai sync --with-prefs a,b # Session overlay of preference packs
|
|
573
787
|
dotai install <source> [-s skill] # Install skills from git repo or local path
|
|
788
|
+
dotai install --update [-s skill] [--skip-vet] # Vetted refresh from recorded sources
|
|
574
789
|
dotai import-plugin <source> # Import from Claude/Cursor/Gemini plugin
|
|
575
790
|
dotai remove <skill> [-p project] # Remove an installed skill
|
|
576
791
|
dotai convert <path> [--dry-run] # Convert Claude-native SKILL.md to dotai format
|