facult 1.0.3 → 1.2.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/README.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # facult
2
2
 
3
- `facult` is a CLI for managing coding-agent skills and MCP configs across tools.
3
+ <div align="center">
4
+ <a aria-label="NPM version" href="https://www.npmjs.com/package/facult">
5
+ <img alt="facult npm version" src="https://img.shields.io/npm/v/facult.svg?style=flat-square&logo=npm&labelColor=000000&label=facult">
6
+ </a>
7
+ <a aria-label="CI status" href="https://github.com/hack-dance/facult/actions/workflows/ci.yml">
8
+ <img alt="CI" src="https://img.shields.io/github/actions/workflow/status/hack-dance/facult/ci.yml?branch=main&style=flat-square&logo=github&label=ci&labelColor=000000">
9
+ </a>
10
+ <a aria-label="hack.dance" href="https://hack.dance">
11
+ <img alt="Made by hack.dance" src="https://img.shields.io/badge/MADE%20BY%20HACK.DANCE-000000.svg?style=flat-square&labelColor=000000">
12
+ </a>
13
+ <a aria-label="X" href="https://x.com/dimitrikennedy">
14
+ <img alt="Follow on X" src="https://img.shields.io/twitter/follow/dimitrikennedy?style=social">
15
+ </a>
16
+ </div>
17
+
18
+ `facult` is a CLI for managing canonical AI capability across tools, users, and projects.
4
19
 
5
20
  It helps you:
6
21
  - discover what is installed on your machine
7
22
  - consolidate everything into one canonical store
8
23
  - review trust/security before installing remote content
9
- - enable a curated skill set across Codex, Cursor, and Claude
24
+ - sync managed outputs into Codex, Cursor, and Claude
25
+ - manage a git-backed AI store under `~/.ai` and repo-local `.ai/`
26
+ - model relationships between instructions, snippets, agents, skills, and rendered tool outputs
27
+ - preserve learning through writeback and evolve canonical assets over time
10
28
 
11
29
  ## What facult Is
12
30
 
@@ -16,6 +34,126 @@ Think of it as:
16
34
  - inventory + auditing for agent assets
17
35
  - package manager interface for skill/MCP catalogs
18
36
  - sync layer that applies your chosen setup to each tool
37
+ - canonical source manager for global and project AI instructions, snippets, agents, skills, tool configs, and rules
38
+ - a local capability graph for discovering what exists and what depends on what
39
+ - a writeback/evolution loop for turning repeated friction into durable improvements
40
+
41
+ ## What facult Does
42
+
43
+ `facult` is not just a skill manager.
44
+
45
+ It provides five connected layers:
46
+
47
+ 1. Canonical source
48
+ - global capability in `~/.ai`
49
+ - project capability in `<repo>/.ai`
50
+ - optional built-in Facult capability packs for bootstrap and defaults
51
+ 2. Discovery
52
+ - inventory across skills, agents, snippets, instructions, MCP, and rendered surfaces
53
+ - merged views across builtin, global, and project provenance
54
+ - explicit dependency graph queries
55
+ 3. Sync
56
+ - managed tool outputs for Codex, Claude, Cursor, and other file-backed surfaces
57
+ - rendered docs, agents, skills, MCP, config, and rules
58
+ 4. Automation
59
+ - background autosync for local propagation
60
+ - optional git autosync for the canonical store
61
+ 5. Evolution
62
+ - writeback capture
63
+ - proposal drafting and review
64
+ - controlled apply back into canonical assets
65
+
66
+ ## Default Operating Model
67
+
68
+ `facult` ships with a built-in Facult operating-model pack. That pack includes default:
69
+
70
+ - instructions for evolution, integration, and project capability
71
+ - specialist agents such as `writeback-curator`, `evolution-planner`, and `scope-promoter`
72
+ - skills such as `capability-evolution` and `project-operating-layer-design`
73
+
74
+ When managed sync is enabled, these built-in assets are available by default even if you never copy them into `~/.ai`.
75
+
76
+ That means:
77
+ - builtin skills sync into managed tool skill directories by default
78
+ - builtin agents sync into tool agent directories when the tool supports agents
79
+ - if you do not author your own `AGENTS.global.md`, `facult` renders a builtin global baseline doc into tool-native global docs
80
+
81
+ This is intentionally virtual at the canonical level:
82
+ - builtin defaults remain part of the packaged tool
83
+ - your personal `~/.ai` stays clean unless you explicitly vendor or override something
84
+ - the live tool output on disk still contains the rendered defaults, so users and agents can read them directly
85
+
86
+ In practice, this means you do not need to drive writeback and evolution through the CLI alone. The default skills, agents, and global docs are meant to make that operating model available automatically.
87
+
88
+ If you want to disable the builtin default layer for a specific global or project canonical root:
89
+
90
+ ```toml
91
+ version = 1
92
+
93
+ [builtin]
94
+ sync_defaults = false
95
+ ```
96
+
97
+ Put that in `config.toml` or `config.local.toml` under the active canonical root.
98
+
99
+ ## Core Concepts
100
+
101
+ ### Canonical vs rendered
102
+
103
+ `facult` separates source-of-truth from tool-native output.
104
+
105
+ - canonical source lives in `~/.ai` or `<repo>/.ai`
106
+ - rendered outputs live in tool homes like `~/.codex`, `<repo>/.codex`, `~/.claude`, or `~/.cursor`
107
+ - generated state lives in `~/.facult` or `<repo>/.facult`
108
+
109
+ This keeps authored capability portable and reviewable while still producing the exact files each tool expects.
110
+
111
+ ### Global vs project capability
112
+
113
+ Use global `~/.ai` for reusable personal defaults:
114
+ - cross-project instructions
115
+ - reusable specialist agents
116
+ - shared skills
117
+ - default tool config and rules
118
+
119
+ Use project `.ai/` for repo-owned capability:
120
+ - project-specific instructions and snippets
121
+ - local architecture/testing doctrine
122
+ - project agents and skills that should travel with the codebase
123
+ - repo-local rendered outputs for teammates
124
+
125
+ Project capability is allowed to extend or shadow global capability in merged views, but it does not silently mutate the global source of truth.
126
+
127
+ ### The capability graph
128
+
129
+ `facult` builds a generated graph of explicit relationships between canonical assets and rendered outputs.
130
+
131
+ That graph tracks things like:
132
+ - snippet markers
133
+ - `@ai/...` and `@project/...` refs
134
+ - `${refs.*}` symbolic refs
135
+ - rendered-target edges from canonical source to live tool files
136
+
137
+ This makes it possible to answer:
138
+ - what capability do I already have?
139
+ - what instructions or snippets does this agent depend on?
140
+ - what rendered files change if I update this canonical asset?
141
+ - what project asset is shadowing a global asset?
142
+
143
+ ### Writeback and evolution
144
+
145
+ `facult` treats repeated failures, weak loops, missing context, and reusable patterns as signal worth preserving.
146
+
147
+ Writeback is the act of recording that signal in a structured way.
148
+ Evolution is the act of grouping that signal into reviewable proposals and applying it back into canonical assets.
149
+
150
+ This matters because otherwise the same problems repeat in chat without ever improving the actual operating layer. With `facult`, you can:
151
+ - record a weak verification pattern
152
+ - group repeated writebacks around an instruction or agent
153
+ - draft a proposal to tighten that canonical asset
154
+ - review and apply the change in a controlled way
155
+
156
+ The result is that your AI system can get better over time without hiding mutations in tool-specific state or losing the reasoning behind a change.
19
157
 
20
158
  ## Quick Start
21
159
 
@@ -60,7 +198,17 @@ Pin to a specific version:
60
198
  facult self-update --version 0.0.1
61
199
  ```
62
200
 
63
- ### 2. Import existing skills/configs
201
+ ### 2. Start with a read-only inventory (recommended first)
202
+
203
+ ```bash
204
+ facult scan --show-duplicates
205
+ # optional machine-readable output
206
+ facult scan --json
207
+ ```
208
+
209
+ `scan` is read-only. It inspects local configs and reports what `facult` found without changing files.
210
+
211
+ ### 3. Import existing skills/configs
64
212
 
65
213
  ```bash
66
214
  facult consolidate --auto keep-current --from ~/.codex/skills --from ~/.agents/skills
@@ -69,21 +217,57 @@ facult index
69
217
 
70
218
  Why `keep-current`: it is deterministic and non-interactive for duplicate sources.
71
219
 
72
- Default canonical store: `~/agents/.facult`. You can change it later with `FACULT_ROOT_DIR` or `~/.facult/config.json`.
220
+ Canonical source root: `~/.ai` for global work, or `<repo>/.ai` for project-local work. Generated state lives next to the active canonical root:
221
+ - global: `~/.facult`
222
+ - project: `<repo>/.facult`
223
+
224
+ ### 3b. Bootstrap a repo-local `.ai`
225
+
226
+ ```bash
227
+ cd /path/to/repo
228
+ bunx facult templates init project-ai
229
+ bunx facult index
230
+ ```
231
+
232
+ This seeds `<repo>/.ai` from the built-in Facult operating-model pack and writes a merged project index/graph under `<repo>/.facult/ai/`.
73
233
 
74
- ### 3. Inspect what you have
234
+ ### 4. Inspect what you have
75
235
 
76
236
  ```bash
77
237
  facult list skills
238
+ facult list instructions
78
239
  facult list mcp
79
240
  facult show requesting-code-review
241
+ facult show instruction:WRITING
80
242
  facult show mcp:github
243
+ facult find verification
244
+ facult graph show instruction:WRITING
245
+ facult graph deps AGENTS.global.md
246
+ facult graph dependents @ai/instructions/WRITING.md
247
+ facult ai writeback add --kind weak_verification --summary "Checks were too shallow" --asset instruction:VERIFICATION
248
+ facult ai evolve propose
249
+ facult ai evolve draft EV-00001
250
+ facult ai evolve accept EV-00001
251
+ facult ai evolve apply EV-00001
81
252
  ```
82
253
 
83
- ### 4. Enable managed mode for your tools
254
+ Context controls:
84
255
 
85
256
  ```bash
86
- facult manage codex
257
+ facult list instructions --global
258
+ facult list instructions --project
259
+ facult find verification --scope merged --source project
260
+ facult sync codex --project
261
+ facult autosync status --global
262
+ facult list agents --root /path/to/repo/.ai
263
+ ```
264
+
265
+ ### 5. Enable managed mode for your tools
266
+
267
+ ```bash
268
+ facult manage codex --dry-run
269
+ facult manage codex --adopt-existing
270
+ facult sync codex --builtin-conflicts overwrite
87
271
  facult manage cursor
88
272
  facult manage claude
89
273
 
@@ -92,8 +276,25 @@ facult sync
92
276
  ```
93
277
 
94
278
  At this point, your selected skills are actively synced to all managed tools.
279
+ If you run these commands from inside a repo that has `<repo>/.ai`, `facult` targets the project-local canonical store and repo-local tool outputs by default.
280
+ On first entry to managed mode, use `--dry-run` first if the live tool already has local content. `facult` will show what it would adopt into the active canonical store across skills, agents, docs, rules, config, and MCP, plus any conflicts. Then rerun with `--adopt-existing`; if names or files collide, add `--existing-conflicts keep-canonical` or `--existing-conflicts keep-existing`.
281
+ For builtin-backed rendered defaults, `facult` now tracks the last managed render hash. If a user edits the generated target locally, normal sync warns and preserves that local edit instead of silently overwriting it. To replace the local edit with the latest packaged builtin default, rerun sync with `--builtin-conflicts overwrite`.
282
+
283
+ ### 6. Turn on background autosync
95
284
 
96
- ### 5. Turn on source trust and strict install flow
285
+ ```bash
286
+ facult autosync install --git-remote origin --git-branch main --git-interval-minutes 60
287
+ facult autosync status
288
+ ```
289
+
290
+ This installs a macOS LaunchAgent that:
291
+ - watches the active canonical root (`~/.ai` or `<repo>/.ai`) for local changes and syncs managed tool outputs automatically
292
+ - tracks dirty state for the canonical repo
293
+ - runs a slower git autosync loop that batches changes, auto-commits them, rebases on the configured remote branch, and pushes on success
294
+
295
+ If the repo hits a rebase conflict, remote autosync stops and reports the blocked state, but local tool sync continues.
296
+
297
+ ### 7. Turn on source trust and strict install flow
97
298
 
98
299
  ```bash
99
300
  facult sources list
@@ -134,6 +335,208 @@ facult sync
134
335
 
135
336
  Note: `templates init mcp ...` is a scaffold, not a running server by itself.
136
337
 
338
+ ## The `.ai` Model
339
+
340
+ `facult` treats both `~/.ai` and `<repo>/.ai` as canonical AI stores. The global store is for personal reusable capability; the project store is for repo-owned capability that should travel with the codebase.
341
+
342
+ Typical layout:
343
+
344
+ ```text
345
+ ~/.ai/
346
+ AGENTS.global.md
347
+ AGENTS.override.global.md
348
+ config.toml
349
+ config.local.toml
350
+ instructions/
351
+ snippets/
352
+ agents/
353
+ skills/
354
+ mcp/
355
+ templates/
356
+ tools/
357
+ codex/
358
+ config.toml
359
+ rules/
360
+ <repo>/
361
+ .ai/
362
+ config.toml
363
+ instructions/
364
+ snippets/
365
+ agents/
366
+ skills/
367
+ tools/
368
+ .facult/
369
+ ai/
370
+ index.json
371
+ graph.json
372
+ .codex/
373
+ .claude/
374
+ ```
375
+
376
+ Important split:
377
+ - `.ai/` is canonical source
378
+ - `.facult/` is generated state, trust state, managed tool state, autosync state, and caches
379
+ - tool homes such as `.codex/` and `.claude/` are rendered outputs
380
+ - the generated capability graph lives at `.facult/ai/graph.json`
381
+
382
+ ### Asset types
383
+
384
+ The canonical store can contain several distinct asset classes:
385
+
386
+ - `instructions/`: reusable doctrine and deeper conceptual guidance
387
+ - `snippets/`: small composable blocks that can be inserted into rendered markdown
388
+ - `agents/`: role-specific agent manifests
389
+ - `skills/`: workflow-specific capability folders
390
+ - `mcp/`: canonical MCP server definitions
391
+ - `tools/<tool>/config.toml`: canonical tool config
392
+ - `tools/<tool>/rules/*.rules`: canonical tool rules
393
+ - global docs such as `AGENTS.global.md` and `AGENTS.override.global.md`
394
+
395
+ Not every asset syncs directly to a tool. Some exist primarily to support rendered outputs or to be discovered and reused by other canonical assets.
396
+
397
+ ### Canonical conventions
398
+
399
+ - Use `instructions/` for reusable markdown documents
400
+ - Use `snippets/` for composable partial blocks injected into markdown templates
401
+ - Use `tools/codex/rules/*.rules` for actual Codex approval-policy rules
402
+ - Use logical refs such as `@ai/instructions/WRITING.md` in tracked source
403
+ - Use `@builtin/facult-operating-model/...` for packaged Facult defaults
404
+ - Use `@project/...` when a tracked ref must resolve inside a repo-local `.ai`
405
+ - Use config-backed refs in prompts where you want stable named references such as `${refs.writing_rule}`
406
+
407
+ ### Config and env layering
408
+
409
+ Canonical render context is layered explicitly:
410
+ 1. built-ins injected by `facult`
411
+ 2. `~/.ai/config.toml`
412
+ 3. `~/.ai/config.local.toml`
413
+ 4. `~/.ai/projects/<slug>/config.toml`
414
+ 5. `~/.ai/projects/<slug>/config.local.toml`
415
+ 6. explicit runtime overrides
416
+
417
+ Built-ins currently include:
418
+ - `AI_ROOT`
419
+ - `HOME`
420
+ - `PROJECT_ROOT`
421
+ - `PROJECT_SLUG`
422
+ - `TARGET_TOOL`
423
+ - `TARGET_PATH`
424
+
425
+ Recommended split:
426
+ - `config.toml`: tracked, portable, non-secret refs/defaults
427
+ - `config.local.toml`: ignored, machine-local paths and secrets
428
+ - `[builtin].sync_defaults = false`: disable builtin default sync/materialization for this root
429
+ - `facult sync --builtin-conflicts overwrite`: allow packaged builtin defaults to overwrite locally modified generated targets
430
+
431
+ ### Snippets
432
+
433
+ Snippets use HTML comment markers:
434
+
435
+ ```md
436
+ <!-- fclty:global/codex/baseline -->
437
+ <!-- /fclty:global/codex/baseline -->
438
+ ```
439
+
440
+ Resolution rules:
441
+ - unscoped marker `codingstyle` prefers `snippets/projects/<project>/codingstyle.md`, then falls back to `snippets/global/codingstyle.md`
442
+ - explicit marker `global/codex/baseline` resolves directly to `snippets/global/codex/baseline.md`
443
+
444
+ Commands:
445
+
446
+ ```bash
447
+ facult snippets list
448
+ facult snippets show global/codex/baseline
449
+ facult snippets sync [--dry-run] [file...]
450
+ ```
451
+
452
+ Snippets are already used during global Codex `AGENTS.md` rendering.
453
+
454
+ ### Graph inspection
455
+
456
+ The generated graph in `.facult/ai/graph.json` is queryable directly:
457
+
458
+ ```bash
459
+ facult graph show instruction:WRITING
460
+ facult graph deps AGENTS.global.md
461
+ facult graph dependents @project/instructions/TESTING.md
462
+ ```
463
+
464
+ This is the explicit dependency layer for:
465
+ - snippet markers like `<!-- fclty:... -->`
466
+ - config-backed refs like `${refs.*}`
467
+ - canonical refs like `@ai/...`
468
+ - project refs like `@project/...`
469
+ - rendered outputs such as managed agents, docs, MCP configs, tool configs, and tool rules
470
+
471
+ ### Writeback and evolution
472
+
473
+ `facult` also has a local writeback/evolution substrate built on top of the graph:
474
+
475
+ ```bash
476
+ facult ai writeback add \
477
+ --kind weak_verification \
478
+ --summary "Verification guidance did not distinguish shallow checks from meaningful proof." \
479
+ --asset instruction:VERIFICATION \
480
+ --tag verification \
481
+ --tag false-positive
482
+
483
+ facult ai writeback list
484
+ facult ai writeback show WB-00001
485
+ facult ai writeback group --by asset
486
+ facult ai writeback summarize --by kind
487
+ facult ai evolve propose
488
+ facult ai evolve list
489
+ facult ai evolve show EV-00001
490
+ facult ai evolve draft EV-00001
491
+ facult ai evolve review EV-00001
492
+ facult ai evolve accept EV-00001
493
+ facult ai evolve reject EV-00001 --reason "Needs a tighter draft"
494
+ facult ai evolve supersede EV-00001 --by EV-00002
495
+ facult ai evolve apply EV-00001
496
+ facult ai evolve promote EV-00003 --to global --project
497
+ ```
498
+
499
+ Runtime state stays generated and local:
500
+ - global writeback state: `~/.facult/ai/global/...`
501
+ - project writeback state: `~/.facult/ai/projects/<slug>/...`
502
+
503
+ That split is intentional:
504
+ - canonical source remains in `~/.ai` or `<repo>/.ai`
505
+ - writeback queues, journals, and proposal records stay outside the canonical git-backed tree by default
506
+
507
+ Use writeback when:
508
+ - a task exposed a weak or misleading verification loop
509
+ - an instruction or agent was missing key context
510
+ - a pattern proved reusable enough to become doctrine
511
+ - a project-local pattern deserves promotion toward global capability
512
+
513
+ Do not think of writeback as “taking notes.” Think of it as preserving signal that should change the system, not just the current conversation.
514
+
515
+ For many users, the normal entrypoint is not the CLI directly. The builtin operating-model layer is designed so synced agents, skills, and global docs can push the system toward writeback and evolution by default, while the `facult ai ...` commands remain the explicit operator surface when you want direct control.
516
+
517
+ Current apply semantics are intentionally policy-bound:
518
+ - targets are resolved through the generated graph when possible and fall back to canonical ref resolution for missing assets
519
+ - apply is limited to markdown canonical assets
520
+ - proposals must be drafted before they can be applied; higher-risk proposals still require explicit acceptance
521
+ - supported proposal kinds currently include `create_instruction`, `update_instruction`, `create_agent`, `update_agent`, `update_asset`, `create_asset`, `extract_snippet`, `add_skill`, and `promote_asset`
522
+ - low-risk project-scoped additive proposals such as `create_instruction` can be applied directly after drafting, while global and higher-risk proposals still require review/acceptance
523
+
524
+ Current review/draft semantics:
525
+ - `writeback group` and `writeback summarize` expose recurring patterns across `asset`, `kind`, and `domain` without mutating canonical assets
526
+ - drafted proposals emit both a human-readable markdown draft and a patch artifact under generated state
527
+ - rerunning `evolve draft <id> --append ...` revises the draft and records draft history
528
+ - `evolve promote --to global` creates a new high-risk global proposal from a project-scoped proposal; that promoted proposal can then be drafted, reviewed, and applied into `~/.ai`
529
+
530
+ ### Scope and source selection
531
+
532
+ Most inventory and sync commands support explicit canonical-root selection:
533
+
534
+ - `--global` to force `~/.ai`
535
+ - `--project` to force the nearest repo-local `.ai`
536
+ - `--root /path/to/.ai` to point at a specific canonical root
537
+ - `--scope merged|global|project` for discovery views
538
+ - `--source builtin|global|project` to filter provenance in list/find/show/graph flows
539
+
137
540
  ## Security and Trust
138
541
 
139
542
  `facult` has two trust layers:
@@ -168,19 +571,22 @@ Recommended security flow:
168
571
  ### Capability categories
169
572
 
170
573
  - Inventory: discover local skills, MCP configs, hooks, and instruction files
171
- - Management: consolidate, index, manage/unmanage tools, enable/disable entries
574
+ - Management: consolidate, index, manage/unmanage tools, enable/disable entries, manage canonical AI config
172
575
  - Security: static audit, agent audit, item trust, source trust, source verification
173
576
  - Distribution: search/install/update from catalogs and verified manifests
174
577
  - DX: scaffold templates and sync snippets into instruction/config files
578
+ - Automation: background autosync for local tool propagation and canonical repo git sync
175
579
 
176
580
  ### Command categories
177
581
 
178
582
  - Inventory and discovery
179
583
  ```bash
180
584
  facult scan [--from <path>] [--json] [--show-duplicates]
181
- facult list [skills|mcp|agents|snippets] [--enabled-for <tool>] [--untrusted] [--flagged] [--pending]
585
+ facult list [skills|mcp|agents|snippets|instructions] [--enabled-for <tool>] [--untrusted] [--flagged] [--pending]
182
586
  facult show <name>
587
+ facult show instruction:<name>
183
588
  facult show mcp:<name> [--show-secrets]
589
+ facult find <query> [--json]
184
590
  ```
185
591
 
186
592
  - Canonical store and migration
@@ -192,13 +598,17 @@ facult migrate [--from <path>] [--dry-run] [--move] [--write-config]
192
598
 
193
599
  - Managed mode and rollout
194
600
  ```bash
195
- facult manage <tool>
601
+ facult manage <tool> [--dry-run] [--adopt-existing] [--existing-conflicts keep-canonical|keep-existing]
196
602
  facult unmanage <tool>
197
603
  facult managed
198
604
  facult enable <name> [--for <tool1,tool2,...>]
199
605
  facult enable mcp:<name> [--for <tool1,tool2,...>]
200
606
  facult disable <name> [--for <tool1,tool2,...>]
201
- facult sync [tool] [--dry-run]
607
+ facult sync [tool] [--dry-run] [--builtin-conflicts overwrite]
608
+ facult autosync install [tool] [--git-remote <name>] [--git-branch <name>] [--git-interval-minutes <n>] [--git-disable]
609
+ facult autosync status [tool]
610
+ facult autosync restart [tool]
611
+ facult autosync uninstall [tool]
202
612
  ```
203
613
 
204
614
  - Remote catalogs and policies
@@ -217,6 +627,7 @@ facult sources clear <source>
217
627
  - Templates and snippets
218
628
  ```bash
219
629
  facult templates list
630
+ facult templates init project-ai
220
631
  facult templates init skill <name>
221
632
  facult templates init mcp <name>
222
633
  facult templates init snippet <marker>
@@ -240,8 +651,10 @@ facult <command> --help
240
651
 
241
652
  `facult` resolves the canonical root in this order:
242
653
  1. `FACULT_ROOT_DIR`
243
- 2. `~/.facult/config.json` (`rootDir`)
244
- 3. `~/agents/.facult` (or a detected legacy store under `~/agents/`)
654
+ 2. nearest project `.ai` from the current working directory for CLI-facing commands
655
+ 3. `~/.facult/config.json` (`rootDir`)
656
+ 4. `~/.ai`
657
+ 5. `~/agents/.facult` (or a detected legacy store under `~/agents/`)
245
658
 
246
659
  ### Runtime env vars
247
660
 
@@ -256,9 +669,13 @@ Under `~/.facult/`:
256
669
  - `sources.json` (latest inventory scan state)
257
670
  - `consolidated.json` (consolidation state)
258
671
  - `managed.json` (managed tool state)
672
+ - `ai/index.json` (generated canonical AI inventory)
259
673
  - `audit/static-latest.json` (latest static audit report)
260
674
  - `audit/agent-latest.json` (latest agent audit report)
261
675
  - `trust/sources.json` (source trust policy state)
676
+ - `autosync/services/*.json` (autosync service configs)
677
+ - `autosync/state/*.json` (autosync runtime state)
678
+ - `autosync/logs/*` (autosync service logs)
262
679
 
263
680
  ### Config reference
264
681
 
@@ -275,7 +692,7 @@ Under `~/.facult/`:
275
692
  Example:
276
693
  ```json
277
694
  {
278
- "rootDir": "~/agents/.facult",
695
+ "rootDir": "~/.ai",
279
696
  "scanFrom": ["~/dev", "~/work"],
280
697
  "scanFromIgnore": ["vendor", ".venv"],
281
698
  "scanFromNoDefaultIgnore": false,
@@ -307,6 +724,50 @@ bun run install:status
307
724
 
308
725
  Default install path is `~/.facult/bin/facult`. You can pass a custom target dir via `--dir=/path`.
309
726
 
727
+ ## Autosync
728
+
729
+ `facult autosync` is the background propagation layer for managed installs.
730
+
731
+ Current v1 behavior:
732
+ - macOS LaunchAgent-backed
733
+ - immediate local managed-tool sync on the configured canonical root
734
+ - periodic git autosync for the canonical repo
735
+ - automatic autosync commits with source-tagged commit messages such as:
736
+ - `chore(facult-autosync): sync canonical ai changes from <host> [service:all]`
737
+
738
+ Recommended usage:
739
+
740
+ ```bash
741
+ facult autosync install
742
+ facult autosync status
743
+ ```
744
+
745
+ Project-local usage:
746
+
747
+ ```bash
748
+ cd /path/to/repo
749
+ facult autosync install codex
750
+ facult autosync status codex
751
+ ```
752
+
753
+ Tool-scoped service:
754
+
755
+ ```bash
756
+ facult autosync install codex
757
+ ```
758
+
759
+ One-shot runner for verification/debugging:
760
+
761
+ ```bash
762
+ facult autosync run --service all --once
763
+ ```
764
+
765
+ Remote git policy:
766
+ - do not sync on every file event
767
+ - mark the canonical repo dirty on local changes
768
+ - on the configured timer, fetch, auto-commit local canonical changes if needed, pull `--rebase`, then push
769
+ - if rebase conflicts occur, remote autosync is blocked and reported, but local managed-tool sync keeps running
770
+
310
771
  ## CI and Release Automation
311
772
 
312
773
  - CI workflow: `.github/workflows/ci.yml`
@@ -373,3 +834,18 @@ bun run release:dry-run
373
834
  Not as a first-party `facult mcp serve` runtime.
374
835
 
375
836
  `facult` currently focuses on inventory, trust/audit, install/update, and managed sync of skills/MCP configs.
837
+
838
+ ### Does facult now manage global AI config, not just skills and MCP?
839
+
840
+ Yes. The core model now includes:
841
+ - canonical personal AI source in `~/.ai`
842
+ - rendered managed outputs in tool homes such as `~/.codex`
843
+ - global instruction docs such as `AGENTS.global.md`, rendered by default into `~/.codex/AGENTS.md`, `~/.claude/CLAUDE.md`, and `~/.cursor/AGENTS.md`
844
+ - tool-native configs such as `~/.codex/config.toml`
845
+ - tool-native rule files such as `~/.codex/rules/*.rules`
846
+
847
+ ### Do I still need to run `facult sync` manually?
848
+
849
+ If autosync is not installed, yes.
850
+
851
+ If autosync is installed, local changes under `~/.ai` propagate automatically to managed tools. Manual `facult sync` is still useful for explicit repair, dry-runs, and non-daemon workflows.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "facult",
3
- "version": "1.0.3",
3
+ "version": "1.2.0",
4
4
  "description": "Manage coding-agent skills and MCP configs across tools.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -11,6 +11,7 @@ export const codexAdapter: ToolAdapter = {
11
11
  getDefaultPaths: () => ({
12
12
  mcp: "~/.codex/mcp.json",
13
13
  skills: "~/.codex/skills",
14
+ agents: "~/.codex/agents",
14
15
  config: "~/.config/openai/codex.json",
15
16
  }),
16
17
  parseMcp: (config) => parseMcpConfig(config),
@@ -21,6 +21,7 @@ export interface CanonicalSkill {
21
21
  export interface AdapterDefaultPaths {
22
22
  mcp?: string;
23
23
  skills?: string | string[];
24
+ agents?: string | string[];
24
25
  config?: string;
25
26
  }
26
27