facult 2.10.0 → 2.11.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 +29 -10
- package/assets/packs/facult-operating-model/AGENTS.global.md +1 -0
- package/assets/packs/facult-operating-model/instructions/EVOLUTION.md +1 -1
- package/assets/packs/facult-operating-model/instructions/WORK_UNITS.md +61 -0
- package/docs/README.md +18 -0
- package/docs/built-in-pack.md +91 -0
- package/docs/concepts.md +123 -0
- package/docs/managed-mode.md +73 -0
- package/docs/project-ai.md +91 -0
- package/docs/roadmap.md +56 -0
- package/docs/writeback-evolution.md +97 -0
- package/package.json +2 -1
- package/src/builtin-assets.ts +1 -1
- package/src/remote.ts +81 -13
package/README.md
CHANGED
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
<a aria-label="hack.dance" href="https://hack.dance">
|
|
14
14
|
<img alt="Made by hack.dance" src="https://img.shields.io/badge/MADE%20BY%20HACK.DANCE-000000.svg?style=flat-square&labelColor=000000">
|
|
15
15
|
</a>
|
|
16
|
-
<a aria-label="X" href="https://x.com/dimitrikennedy">
|
|
17
|
-
<img alt="Follow on X" src="https://img.shields.io/twitter/follow/dimitrikennedy?style=social">
|
|
18
|
-
</a>
|
|
19
16
|
</div>
|
|
20
17
|
|
|
21
18
|
<p align="center">
|
|
@@ -118,6 +115,13 @@ fclt templates init project-ai
|
|
|
118
115
|
fclt index
|
|
119
116
|
```
|
|
120
117
|
|
|
118
|
+
If you want a concrete copy of the built-in operating-model pack without managing a tool:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
fclt templates init operating-model --global
|
|
122
|
+
fclt templates init operating-model --root /path/to/.ai
|
|
123
|
+
```
|
|
124
|
+
|
|
121
125
|
### 3. Import existing skills or config
|
|
122
126
|
|
|
123
127
|
```bash
|
|
@@ -206,14 +210,27 @@ Useful AI behavior is composable. You need small reusable parts, a clean way to
|
|
|
206
210
|
|
|
207
211
|
The renderer is optional. The low-friction default is to let tools keep their native files, use `fclt inventory`/`scan`/`list` to see the full global set, and use `fclt consolidate` or `fclt sync --adopt-live` only when you explicitly want to promote live tool edits into canonical `~/.ai`.
|
|
208
212
|
|
|
213
|
+
## Documentation
|
|
214
|
+
|
|
215
|
+
Focused docs live under [docs](./docs/README.md):
|
|
216
|
+
|
|
217
|
+
- [Concepts](./docs/concepts.md): roots, scopes, state layers, and asset types
|
|
218
|
+
- [Managed Mode](./docs/managed-mode.md): safe rendering and adoption rules
|
|
219
|
+
- [Project `.ai`](./docs/project-ai.md): repo-local capability and project sync policy
|
|
220
|
+
- [Built-In Pack](./docs/built-in-pack.md): packaged writeback/evolution defaults
|
|
221
|
+
- [Writeback And Evolution](./docs/writeback-evolution.md): feedback-loop workflow and review surfaces
|
|
222
|
+
- [Roadmap](./docs/roadmap.md): current gaps and non-goals
|
|
223
|
+
|
|
209
224
|
## Built-in Defaults
|
|
210
225
|
|
|
211
226
|
`fclt` includes a built-in layer for writeback and evolution. By default, that layer provides:
|
|
212
|
-
- instructions for learning/writeback, evolution, integration, and project capability
|
|
227
|
+
- instructions for work units, learning/writeback, evolution, integration, and project capability
|
|
213
228
|
- agents such as `writeback-curator`, `evolution-planner`, and `scope-promoter`
|
|
214
229
|
- skills such as `capability-evolution` and `project-operating-layer-design`
|
|
215
230
|
|
|
216
|
-
Those built-in defaults
|
|
231
|
+
Those built-in defaults are always available as `@builtin/facult-operating-model/...`. To install a concrete copy into a canonical root without managing any tool, run `fclt templates init operating-model --global`, `--project`, or `--root /path/to/.ai`.
|
|
232
|
+
|
|
233
|
+
Managed mode is separate. Global tool management renders the bundled docs, agents, and skills into that tool's live files, so every managed agent sees that it can preserve strong friction with `fclt ai writeback ...` and escalate repeated signal with `fclt ai evolve ...`. Project-local `.ai` roots do not sync the built-in operating-model layer unless you explicitly enable it.
|
|
217
234
|
|
|
218
235
|
The intended feedback loop is:
|
|
219
236
|
1. agents notice durable friction, weak verification, stale guidance, or missing capability during normal work
|
|
@@ -238,9 +255,10 @@ Put that in `config.toml` or `config.local.toml` under the active canonical root
|
|
|
238
255
|
`fclt` is CLI-first. The practical setup is:
|
|
239
256
|
1. Install `fclt` globally so any agent runtime can execute it.
|
|
240
257
|
2. Use `fclt inventory`, `fclt list`, and `fclt consolidate` to inspect and normalize existing tool-native state.
|
|
241
|
-
3.
|
|
242
|
-
4.
|
|
243
|
-
5.
|
|
258
|
+
3. Install the built-in operating-model pack into `~/.ai` or a project `.ai` when you want editable canonical defaults without managed rendering.
|
|
259
|
+
4. If you want fclt-owned rendered outputs, manage each agent tool with `fclt manage <tool>` and `fclt sync`.
|
|
260
|
+
5. Let the built-in operating-model layer render global writeback/evolution instructions into the tool only where managed rendering is worth the ownership tradeoff.
|
|
261
|
+
6. Optionally scaffold MCP wrappers if you want an MCP entry that delegates to `fclt`.
|
|
244
262
|
|
|
245
263
|
```bash
|
|
246
264
|
# Scaffold reusable templates in the canonical store
|
|
@@ -269,7 +287,7 @@ The supported review surface today is the CLI plus generated Codex automation te
|
|
|
269
287
|
|
|
270
288
|
## Mental Model
|
|
271
289
|
|
|
272
|
-
`fclt` treats both `~/.ai` and `<repo>/.ai` as canonical stores. The global store is for
|
|
290
|
+
`fclt` treats both `~/.ai` and `<repo>/.ai` as canonical stores. The global store is for user-owned reusable capability. The project store is for repo-owned capability that should travel with the codebase.
|
|
273
291
|
|
|
274
292
|
Typical layout:
|
|
275
293
|
|
|
@@ -622,6 +640,7 @@ fclt sources clear <source>
|
|
|
622
640
|
- Templates and snippets
|
|
623
641
|
```bash
|
|
624
642
|
fclt templates list
|
|
643
|
+
fclt templates init operating-model [--global|--project|--root PATH] [--force] [--dry-run]
|
|
625
644
|
fclt templates init project-ai
|
|
626
645
|
fclt templates init skill <name>
|
|
627
646
|
fclt templates init mcp <name>
|
|
@@ -849,7 +868,7 @@ Not as a first-party `fclt mcp serve` runtime.
|
|
|
849
868
|
### Does fclt now manage global AI config, not just skills and MCP?
|
|
850
869
|
|
|
851
870
|
Yes. The core model now includes:
|
|
852
|
-
- canonical
|
|
871
|
+
- canonical user-owned AI source in `~/.ai`
|
|
853
872
|
- rendered managed outputs in tool homes such as `~/.codex`, `~/.agents`, and `~/plugins`
|
|
854
873
|
- global instruction docs such as `AGENTS.global.md`, rendered by default into `~/.codex/AGENTS.md`, `~/.claude/CLAUDE.md`, and `~/.cursor/AGENTS.md`
|
|
855
874
|
- Codex-authored skills in `~/.agents/skills`
|
|
@@ -4,6 +4,7 @@ This machine has a default Facult operating-model layer available.
|
|
|
4
4
|
|
|
5
5
|
When work produces durable friction, weak verification, stale guidance, or a missing skill/tool capability, preserve that signal with `fclt ai writeback ...` when the target and scope are clear. When repeated writebacks or clearly missing capability point at a concrete improvement, use `fclt ai evolve ...` or the `capability-evolution` skill to make a reviewable proposal.
|
|
6
6
|
|
|
7
|
+
For work-unit framing, read `@builtin/facult-operating-model/instructions/WORK_UNITS.md`.
|
|
7
8
|
For writeback and evolution, read `@builtin/facult-operating-model/instructions/EVOLUTION.md`.
|
|
8
9
|
For learning and writeback defaults, read `@builtin/facult-operating-model/instructions/LEARNING_AND_WRITEBACK.md`.
|
|
9
10
|
For deciding whether capability belongs in global or project scope, read `@builtin/facult-operating-model/instructions/PROJECT_CAPABILITY.md`.
|
|
@@ -129,6 +129,6 @@ Use the smallest durable change that fits the evidence.
|
|
|
129
129
|
- prefer the smallest safe change
|
|
130
130
|
- keep reviewable evidence tied to source writebacks
|
|
131
131
|
- do not globalize project behavior too early
|
|
132
|
-
- do not apply high-risk global instruction, skill, plugin, or
|
|
132
|
+
- do not apply high-risk global instruction, skill, plugin, or shared-tool changes without explicit review/approval
|
|
133
133
|
|
|
134
134
|
Apply is for markdown canonical assets only. If the target is wrong, revise the proposal rather than forcing it through.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Define work units so agent tasks have a clear goal, evidence path, artifact, and writeback target."
|
|
3
|
+
tags: ["work-units", "planning", "verification", "writeback"]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Work Units
|
|
7
|
+
|
|
8
|
+
A work unit is the smallest coherent unit of agent work that can be understood, verified, and preserved.
|
|
9
|
+
|
|
10
|
+
It is not just the user's latest sentence. It is the operational shape around that sentence: what is being changed, why it matters, what evidence is needed, what artifact should remain, and how future agents should benefit from the result.
|
|
11
|
+
|
|
12
|
+
## Minimum Contract
|
|
13
|
+
|
|
14
|
+
A well-formed work unit names:
|
|
15
|
+
|
|
16
|
+
- goal: the outcome the user needs
|
|
17
|
+
- acceptance criteria: what must be true when the work is done
|
|
18
|
+
- required context: source files, docs, systems, messages, or prior decisions needed for correctness
|
|
19
|
+
- constraints: permissions, privacy, compatibility, deadlines, ownership, or scope limits
|
|
20
|
+
- signals or evidence: checks that can confirm progress or falsify assumptions
|
|
21
|
+
- output artifact: code, docs, proposal, issue, note, draft, or report
|
|
22
|
+
- verification path: commands, review surfaces, manual checks, or source-of-truth reads
|
|
23
|
+
- writeback target: where durable learning belongs if the work teaches something reusable
|
|
24
|
+
|
|
25
|
+
If one of these is missing and the gap blocks correctness, surface the gap early and recover it before moving faster.
|
|
26
|
+
|
|
27
|
+
## Why It Exists
|
|
28
|
+
|
|
29
|
+
Work-unit framing prevents shallow completion. It helps agents avoid:
|
|
30
|
+
|
|
31
|
+
- changing files before understanding the target
|
|
32
|
+
- treating a weak green signal as proof
|
|
33
|
+
- losing reusable learning in chat
|
|
34
|
+
- creating duplicate tasks or proposals
|
|
35
|
+
- turning one-off preferences into global rules
|
|
36
|
+
- pushing project-specific details into global capability
|
|
37
|
+
|
|
38
|
+
## How To Use It
|
|
39
|
+
|
|
40
|
+
For simple tasks, keep the work unit implicit but still verify the result.
|
|
41
|
+
|
|
42
|
+
For ambiguous, high-impact, or multi-step tasks, make the work unit explicit before executing. A compact form is enough:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
Goal:
|
|
46
|
+
Acceptance:
|
|
47
|
+
Context:
|
|
48
|
+
Constraints:
|
|
49
|
+
Evidence:
|
|
50
|
+
Artifact:
|
|
51
|
+
Verification:
|
|
52
|
+
Writeback:
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Use the smallest framing that makes the task correct. Do not turn every request into paperwork.
|
|
56
|
+
|
|
57
|
+
## Writeback
|
|
58
|
+
|
|
59
|
+
When the work reveals durable friction, missing capability, stale guidance, or a repeatable workflow, prefer one strong writeback over many weak ones.
|
|
60
|
+
|
|
61
|
+
Use `fclt ai writeback add ...` when the target asset, scope, and evidence are clear. Use `fclt ai evolve ...` only when repeated signal supports a concrete proposal.
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# fclt Documentation
|
|
2
|
+
|
|
3
|
+
These docs explain the product model behind `fclt`. The root [README](../README.md) is the quick start and command reference. The files here explain why the pieces exist and how they fit together.
|
|
4
|
+
|
|
5
|
+
Start here:
|
|
6
|
+
|
|
7
|
+
- [Concepts](./concepts.md): canonical roots, generated state, rendered outputs, scopes, and asset types.
|
|
8
|
+
- [Managed Mode](./managed-mode.md): when to let `fclt` write tool files, and how adoption works.
|
|
9
|
+
- [Project `.ai`](./project-ai.md): how repo-local capability works without leaking project review state into the repo.
|
|
10
|
+
- [Built-In Pack](./built-in-pack.md): the packaged operating-model layer for writeback and evolution.
|
|
11
|
+
- [Writeback And Evolution](./writeback-evolution.md): how real-work friction becomes reviewable capability changes.
|
|
12
|
+
- [Roadmap](./roadmap.md): current product gaps and non-goals.
|
|
13
|
+
|
|
14
|
+
## Documentation Policy
|
|
15
|
+
|
|
16
|
+
Public docs should use generic examples. Do not include personal account names, private customer names, local machine paths, secret values, or project-specific operating notes. Use placeholders such as `/path/to/repo`, `example.com`, and `~/.ai`.
|
|
17
|
+
|
|
18
|
+
Machine-local state and review artifacts can contain project metadata. `fclt` keeps those artifacts in machine-local Facult state and global `~/.ai/writebacks` / `~/.ai/evolution` review directories, not in repo-local project `.ai` directories.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Built-In Pack
|
|
2
|
+
|
|
3
|
+
`fclt` ships an operating-model pack:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
assets/packs/facult-operating-model/
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
It provides a default feedback loop for agents that use `fclt`.
|
|
10
|
+
|
|
11
|
+
## Included Assets
|
|
12
|
+
|
|
13
|
+
Instructions:
|
|
14
|
+
|
|
15
|
+
- `WORK_UNITS.md`
|
|
16
|
+
- `LEARNING_AND_WRITEBACK.md`
|
|
17
|
+
- `EVOLUTION.md`
|
|
18
|
+
- `PROJECT_CAPABILITY.md`
|
|
19
|
+
- `INTEGRATION.md`
|
|
20
|
+
|
|
21
|
+
Skills:
|
|
22
|
+
|
|
23
|
+
- `capability-evolution`
|
|
24
|
+
- `project-operating-layer-design`
|
|
25
|
+
|
|
26
|
+
Agents:
|
|
27
|
+
|
|
28
|
+
- `writeback-curator`
|
|
29
|
+
- `evolution-planner`
|
|
30
|
+
- `scope-promoter`
|
|
31
|
+
- `integration-auditor`
|
|
32
|
+
|
|
33
|
+
Global doc:
|
|
34
|
+
|
|
35
|
+
- `AGENTS.global.md`
|
|
36
|
+
|
|
37
|
+
## When It Becomes Active
|
|
38
|
+
|
|
39
|
+
The built-in pack is always available as a built-in source:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
@builtin/facult-operating-model/...
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Install a concrete copy into a canonical root without managing any tool:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
fclt templates init operating-model --global
|
|
49
|
+
fclt templates init operating-model --project
|
|
50
|
+
fclt templates init operating-model --root /path/to/.ai
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
That writes the pack into the selected `.ai` root and rebuilds its index. It does not render files into Codex, Claude, or any other tool home.
|
|
54
|
+
|
|
55
|
+
Use `project-ai` when the target is the current repo:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cd /path/to/repo
|
|
59
|
+
fclt templates init project-ai
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Managed mode is only the rendering layer. The pack becomes live tool guidance when you manage a tool and sync:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
fclt manage codex
|
|
66
|
+
fclt sync codex
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Global managed tools receive the built-in writeback/evolution guidance by default. Project-local `.ai` roots do not render the built-in operating model into repo-local tool outputs unless project sync policy explicitly allows it. Installing the pack and rendering it into a tool are separate decisions.
|
|
70
|
+
|
|
71
|
+
Disable built-in default sync for a canonical root:
|
|
72
|
+
|
|
73
|
+
```toml
|
|
74
|
+
version = 1
|
|
75
|
+
|
|
76
|
+
[builtin]
|
|
77
|
+
sync_defaults = false
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Design Rule
|
|
81
|
+
|
|
82
|
+
The built-in pack should stay small. It should teach:
|
|
83
|
+
|
|
84
|
+
- work-unit discipline
|
|
85
|
+
- verification
|
|
86
|
+
- writeback
|
|
87
|
+
- evolution proposal review
|
|
88
|
+
- project/global scope decisions
|
|
89
|
+
- managed-mode ownership boundaries
|
|
90
|
+
|
|
91
|
+
It should not become a pile of preferences. Put project-specific behavior in project `.ai`; promote to global only when repeated evidence proves reuse.
|
package/docs/concepts.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Concepts
|
|
2
|
+
|
|
3
|
+
`fclt` keeps AI capability in a canonical store, lets you inspect it, and optionally renders approved pieces into tool-native files.
|
|
4
|
+
|
|
5
|
+
The important distinction is ownership. A file can be source, generated state, machine runtime state, a rendered output, or a review artifact. Treating those as separate layers prevents sync surprises.
|
|
6
|
+
|
|
7
|
+
## Roots And Scopes
|
|
8
|
+
|
|
9
|
+
Global root:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
~/.ai/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use this for user-owned reusable capability: shared instructions, snippets, skills, agents, MCP definitions, and writeback/evolution review artifacts.
|
|
16
|
+
|
|
17
|
+
Project root:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
<repo>/.ai/
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use this for repo-owned capability that should travel with the codebase: project instructions, project skills, project MCP definitions, and project sync policy.
|
|
24
|
+
|
|
25
|
+
Built-in root:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
@builtin/facult-operating-model/...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use this for packaged defaults shipped with `fclt`.
|
|
32
|
+
|
|
33
|
+
Remote sources:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
skills.sh:<name>
|
|
37
|
+
smithery:<name>
|
|
38
|
+
glama:<name>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use these as installable catalog sources. Review and trust source policy before installing remote capability broadly.
|
|
42
|
+
|
|
43
|
+
## Work Units
|
|
44
|
+
|
|
45
|
+
A work unit is a scoped agent task with a goal, acceptance criteria, required context, constraints, evidence, output artifact, verification path, and writeback target.
|
|
46
|
+
|
|
47
|
+
Agents should keep this implicit for simple work and make it explicit when the task is ambiguous, risky, or multi-step. The built-in operating-model pack includes `WORK_UNITS.md` so managed agents and canonical `.ai` roots can share the same framing.
|
|
48
|
+
|
|
49
|
+
## State Layers
|
|
50
|
+
|
|
51
|
+
Canonical source is edited by humans or accepted proposals.
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
~/.ai/instructions/VERIFICATION.md
|
|
57
|
+
<repo>/.ai/skills/project-review/SKILL.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Generated state is rebuildable.
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
~/.ai/.facult/ai/index.json
|
|
66
|
+
~/.ai/.facult/ai/graph.json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Project generated state lives in machine-local Facult state, not in the repo.
|
|
70
|
+
|
|
71
|
+
Machine runtime state records local behavior and history.
|
|
72
|
+
|
|
73
|
+
Examples:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
~/Library/Application Support/fclt/global/managed.json
|
|
77
|
+
~/Library/Application Support/fclt/projects/<slug-hash>/managed.json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Rendered outputs are files consumed by tools.
|
|
81
|
+
|
|
82
|
+
Examples:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
~/.codex/AGENTS.md
|
|
86
|
+
~/.agents/skills/<name>
|
|
87
|
+
<repo>/.codex/agents/<name>.toml
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Review artifacts are Markdown mirrors for human review.
|
|
91
|
+
|
|
92
|
+
Examples:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
~/.ai/writebacks/global/WB-00001.md
|
|
96
|
+
~/.ai/evolution/projects/<slug-hash>/EV-00001.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Asset Types
|
|
100
|
+
|
|
101
|
+
Common canonical asset types:
|
|
102
|
+
|
|
103
|
+
- instructions: reusable markdown guidance
|
|
104
|
+
- snippets: composable markdown partials
|
|
105
|
+
- skills: workflow-specific folders with `SKILL.md`
|
|
106
|
+
- agents: role manifests
|
|
107
|
+
- MCP servers: canonical MCP definitions
|
|
108
|
+
- tool config and rules: tool-specific defaults
|
|
109
|
+
- automations: scheduled review or maintenance prompts
|
|
110
|
+
- plugins: local tool plugin bundles and marketplaces
|
|
111
|
+
|
|
112
|
+
Not every asset must be rendered into every tool. Use inventory and policy first, then managed sync only where `fclt` should own the rendered output.
|
|
113
|
+
|
|
114
|
+
## Feedback Loop
|
|
115
|
+
|
|
116
|
+
The durable loop is:
|
|
117
|
+
|
|
118
|
+
1. Inspect live tool and project state.
|
|
119
|
+
2. Record strong writebacks when real work exposes reusable friction or missing capability.
|
|
120
|
+
3. Group repeated writebacks.
|
|
121
|
+
4. Draft the smallest valid proposal.
|
|
122
|
+
5. Review and apply accepted changes to canonical source.
|
|
123
|
+
6. Re-index and sync only the surfaces that should receive the change.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Managed Mode
|
|
2
|
+
|
|
3
|
+
Managed mode is optional. Use it when you want `fclt` to write rendered files into a tool home. Do not use it just to inspect or normalize existing tool-native state.
|
|
4
|
+
|
|
5
|
+
Prefer this default workflow:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
fclt status
|
|
9
|
+
fclt inventory --json
|
|
10
|
+
fclt list skills
|
|
11
|
+
fclt consolidate --auto keep-current --from ~/.codex/skills --from ~/.agents/skills
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Use managed mode only after that:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
fclt manage codex --dry-run
|
|
18
|
+
fclt manage codex --adopt-existing
|
|
19
|
+
fclt sync codex --dry-run
|
|
20
|
+
fclt sync codex
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Adoption Commands
|
|
24
|
+
|
|
25
|
+
`manage --adopt-existing` is for entering managed mode. It imports existing tool-native content into the canonical store before `fclt` starts writing that tool surface.
|
|
26
|
+
|
|
27
|
+
`sync --adopt-live` is for intentional later promotion. It imports live tool edits into canonical state before rendering.
|
|
28
|
+
|
|
29
|
+
Ordinary `fclt sync` does not adopt live tool edits. This lets Codex, Claude, Cursor, or another tool keep local edits without `fclt` silently claiming ownership.
|
|
30
|
+
|
|
31
|
+
## Conflict Behavior
|
|
32
|
+
|
|
33
|
+
When live content differs from canonical content:
|
|
34
|
+
|
|
35
|
+
- default `sync` preserves the live file and tells you to rerun with `--adopt-live` if you want promotion
|
|
36
|
+
- `sync --adopt-live` imports the live content into canonical source where supported
|
|
37
|
+
- rendered docs/config with local edits are skipped unless an explicit conflict option allows overwrite
|
|
38
|
+
- built-in rendered defaults require `--builtin-conflicts overwrite` before replacing local edits
|
|
39
|
+
|
|
40
|
+
This is deliberate. Managed mode should be boring and reversible.
|
|
41
|
+
|
|
42
|
+
## Project Managed Mode
|
|
43
|
+
|
|
44
|
+
Project sync is default-deny. A project `.ai` root can exist without rendering anything into repo-local tool outputs.
|
|
45
|
+
|
|
46
|
+
Allow project assets explicitly:
|
|
47
|
+
|
|
48
|
+
```toml
|
|
49
|
+
version = 1
|
|
50
|
+
|
|
51
|
+
[project_sync.codex]
|
|
52
|
+
skills = ["project-review"]
|
|
53
|
+
agents = ["review-operator"]
|
|
54
|
+
automations = ["project-check"]
|
|
55
|
+
mcp_servers = ["github"]
|
|
56
|
+
global_docs = true
|
|
57
|
+
tool_rules = true
|
|
58
|
+
tool_config = true
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If a repo-local `.ai` contains only generated state and no canonical assets, `fclt status --project` reports a generated-only warning and `fclt sync --project` skips. Initialize or restore canonical source before syncing managed project output.
|
|
62
|
+
|
|
63
|
+
## When Not To Use Managed Mode
|
|
64
|
+
|
|
65
|
+
Do not use managed mode when:
|
|
66
|
+
|
|
67
|
+
- you only need discovery or inventory
|
|
68
|
+
- another tool should remain the owner of its files
|
|
69
|
+
- a repo has no clear project sync policy
|
|
70
|
+
- the canonical source is missing
|
|
71
|
+
- you are debugging and need read-only evidence first
|
|
72
|
+
|
|
73
|
+
Use `fclt inventory`, `scan`, `list`, `show`, `graph`, `status`, and `audit` instead.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Project `.ai`
|
|
2
|
+
|
|
3
|
+
A project `.ai` root stores repo-owned capability. It is not a dumping ground for generated state, review queues, or private local context.
|
|
4
|
+
|
|
5
|
+
Create one with:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cd /path/to/repo
|
|
9
|
+
fclt templates init project-ai
|
|
10
|
+
fclt index --project
|
|
11
|
+
fclt status --project
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Typical layout:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
<repo>/.ai/
|
|
18
|
+
config.toml
|
|
19
|
+
instructions/
|
|
20
|
+
snippets/
|
|
21
|
+
agents/
|
|
22
|
+
skills/
|
|
23
|
+
mcp/
|
|
24
|
+
tools/
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## What Belongs In Project `.ai`
|
|
28
|
+
|
|
29
|
+
Use project `.ai` for:
|
|
30
|
+
|
|
31
|
+
- repo-specific instructions
|
|
32
|
+
- project review skills
|
|
33
|
+
- project MCP definitions without secrets
|
|
34
|
+
- project snippets
|
|
35
|
+
- project sync policy
|
|
36
|
+
- canonical automation prompts that should travel with the repo
|
|
37
|
+
|
|
38
|
+
Do not put these in project `.ai`:
|
|
39
|
+
|
|
40
|
+
- writeback queues
|
|
41
|
+
- evolution proposal metadata
|
|
42
|
+
- generated index/graph state
|
|
43
|
+
- local machine paths
|
|
44
|
+
- secrets
|
|
45
|
+
- private review artifacts
|
|
46
|
+
|
|
47
|
+
Project-scoped writebacks and evolution proposals are stored in machine-local Facult state and mirrored for review under global `~/.ai/writebacks/projects/<slug-hash>/` and `~/.ai/evolution/projects/<slug-hash>/`.
|
|
48
|
+
|
|
49
|
+
## Generated-Only Roots
|
|
50
|
+
|
|
51
|
+
Older versions could leave `<repo>/.ai/.facult/ai/index.json` and `graph.json` behind without any canonical source. That makes the repo look like it has project AI state even though there is nothing durable to render.
|
|
52
|
+
|
|
53
|
+
Current behavior:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
fclt status --project
|
|
57
|
+
fclt sync --project --dry-run
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`status` reports `project-generated-only`, and `sync` skips until canonical source is restored or initialized.
|
|
61
|
+
|
|
62
|
+
## Project Sync Policy
|
|
63
|
+
|
|
64
|
+
Project sync is default-deny. Nothing from global or project canonical source renders into repo-local managed tool outputs unless the repo opts in.
|
|
65
|
+
|
|
66
|
+
Example:
|
|
67
|
+
|
|
68
|
+
```toml
|
|
69
|
+
version = 1
|
|
70
|
+
|
|
71
|
+
[project_sync.codex]
|
|
72
|
+
skills = ["project-review"]
|
|
73
|
+
agents = ["review-operator"]
|
|
74
|
+
mcp_servers = ["github"]
|
|
75
|
+
global_docs = true
|
|
76
|
+
tool_rules = true
|
|
77
|
+
tool_config = true
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This includes inherited global assets. If a global skill should appear in project-managed Codex output, list it explicitly.
|
|
81
|
+
|
|
82
|
+
## Verification
|
|
83
|
+
|
|
84
|
+
Use these commands after changing project `.ai`:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
fclt status --project
|
|
88
|
+
fclt list skills --project
|
|
89
|
+
fclt graph AGENTS.global.md --project
|
|
90
|
+
fclt sync codex --project --dry-run
|
|
91
|
+
```
|
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
This replaces the older operating-model target-state notes. That file mixed current documentation, past investigation output, and future design ideas. The current docs now describe shipped behavior; this file tracks remaining product direction.
|
|
4
|
+
|
|
5
|
+
## Already Shipped
|
|
6
|
+
|
|
7
|
+
- `fclt status` with root, managed-tool, generated-state, writeback, and evolution review paths.
|
|
8
|
+
- Generated-only project `.ai` detection and sync skip.
|
|
9
|
+
- Machine-local project generated state.
|
|
10
|
+
- Global Markdown review artifacts for writebacks and evolution proposals.
|
|
11
|
+
- Project-scoped writeback/evolution artifacts mirrored under global `~/.ai`.
|
|
12
|
+
- Built-in operating-model pack.
|
|
13
|
+
- Independent built-in operating-model pack install with `templates init operating-model`.
|
|
14
|
+
- Cleaner built-in canonical refs.
|
|
15
|
+
- JSON-first `inventory`.
|
|
16
|
+
- `sync --adopt-live` for explicit promotion of live tool edits.
|
|
17
|
+
- Managed sync local-edit protection for rendered docs, config, MCP, and skills.
|
|
18
|
+
|
|
19
|
+
## Current Priorities
|
|
20
|
+
|
|
21
|
+
1. Make status more explanatory.
|
|
22
|
+
- Show policy summaries.
|
|
23
|
+
- Surface top recommended next action.
|
|
24
|
+
- Connect sync ledger history to rendered targets.
|
|
25
|
+
|
|
26
|
+
2. Add a structured sync plan.
|
|
27
|
+
- Group writes, updates, removals, skips, conflicts, and repairs.
|
|
28
|
+
- Expose the same plan as JSON.
|
|
29
|
+
- Explain source refs and policy reasons.
|
|
30
|
+
|
|
31
|
+
3. Improve project onboarding.
|
|
32
|
+
- Add a primary `fclt init project` flow.
|
|
33
|
+
- Explain default-deny project sync during setup.
|
|
34
|
+
- Offer safe adoption, detach, and restore choices.
|
|
35
|
+
|
|
36
|
+
4. Make policy inspectable.
|
|
37
|
+
- Add `policy show`.
|
|
38
|
+
- Add `policy explain`.
|
|
39
|
+
- Hide TOML details behind user-facing commands where possible.
|
|
40
|
+
|
|
41
|
+
5. Make templates, plugins, automations, and rendered targets first-class inventory objects.
|
|
42
|
+
- List and show them consistently.
|
|
43
|
+
- Add graph visibility.
|
|
44
|
+
- Include them in status and sync plans.
|
|
45
|
+
|
|
46
|
+
6. Tighten selector consistency.
|
|
47
|
+
- Use one selector grammar across `list`, `show`, `graph`, `enable`, `disable`, `trust`, `audit`, writeback, and evolution.
|
|
48
|
+
- Return useful ambiguity errors with candidates.
|
|
49
|
+
|
|
50
|
+
## Non-Goals
|
|
51
|
+
|
|
52
|
+
- Do not make managed mode the default way to inspect existing AI tool state.
|
|
53
|
+
- Do not store project writeback/evolution review artifacts in repo-local `.ai`.
|
|
54
|
+
- Do not silently adopt live tool edits during ordinary sync.
|
|
55
|
+
- Do not turn the built-in pack into a general preference archive.
|
|
56
|
+
- Do not require users to inspect machine-local state files to understand normal CLI behavior.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Writeback And Evolution
|
|
2
|
+
|
|
3
|
+
Writeback preserves useful signal from real work. Evolution turns repeated signal into reviewable changes.
|
|
4
|
+
|
|
5
|
+
Use this loop when a task exposes durable friction:
|
|
6
|
+
|
|
7
|
+
1. record one targeted writeback
|
|
8
|
+
2. group or summarize related writebacks
|
|
9
|
+
3. propose only when the evidence repeats or a missing capability is obvious
|
|
10
|
+
4. draft the smallest valid proposal
|
|
11
|
+
5. review, accept, and apply when the change is safe
|
|
12
|
+
|
|
13
|
+
## Writeback
|
|
14
|
+
|
|
15
|
+
Record writeback when the signal is durable and targetable:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
fclt ai writeback add \
|
|
19
|
+
--kind weak_verification \
|
|
20
|
+
--summary "Checks were too shallow" \
|
|
21
|
+
--asset instruction:VERIFICATION
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Useful kinds:
|
|
25
|
+
|
|
26
|
+
- `weak_verification`
|
|
27
|
+
- `false_positive`
|
|
28
|
+
- `missing_context`
|
|
29
|
+
- `reusable_pattern`
|
|
30
|
+
- `capability_gap`
|
|
31
|
+
- `bad_default`
|
|
32
|
+
|
|
33
|
+
Avoid writeback for one-off preferences, vague complaints, or speculative ideas.
|
|
34
|
+
|
|
35
|
+
## Evolution
|
|
36
|
+
|
|
37
|
+
Review accumulated signal:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
fclt ai writeback list
|
|
41
|
+
fclt ai writeback group --by asset
|
|
42
|
+
fclt ai writeback summarize --by kind
|
|
43
|
+
fclt ai evolve propose
|
|
44
|
+
fclt ai evolve list
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Draft and review:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
fclt ai evolve draft EV-00001
|
|
51
|
+
fclt ai evolve review EV-00001
|
|
52
|
+
fclt ai evolve accept EV-00001
|
|
53
|
+
fclt ai evolve apply EV-00001
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Supported durable proposal kinds include:
|
|
57
|
+
|
|
58
|
+
- `update_asset`
|
|
59
|
+
- `create_asset`
|
|
60
|
+
- `extract_snippet`
|
|
61
|
+
- `add_skill`
|
|
62
|
+
- `promote_asset`
|
|
63
|
+
|
|
64
|
+
Use the smallest kind that solves the repeated problem.
|
|
65
|
+
|
|
66
|
+
## Scope
|
|
67
|
+
|
|
68
|
+
Use project scope for repo-specific tooling, tests, architecture, and workflows.
|
|
69
|
+
|
|
70
|
+
Use global scope for shared doctrine, reusable skills, shared agents, or cross-project capability gaps.
|
|
71
|
+
|
|
72
|
+
Promote project proposals to global only after repeated reuse:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
fclt ai evolve promote EV-00003 --to global --project
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Review Artifacts
|
|
79
|
+
|
|
80
|
+
Runtime JSON queues, proposal metadata, draft patches, and journals stay in machine-local Facult state.
|
|
81
|
+
|
|
82
|
+
Human-readable Markdown mirrors live under global `~/.ai`:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
~/.ai/writebacks/global/
|
|
86
|
+
~/.ai/writebacks/projects/<slug-hash>/
|
|
87
|
+
~/.ai/evolution/global/
|
|
88
|
+
~/.ai/evolution/projects/<slug-hash>/
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Project-scoped artifacts include project metadata in frontmatter. They do not get written into repo-local `<repo>/.ai/writebacks` or `<repo>/.ai/evolution`.
|
|
92
|
+
|
|
93
|
+
## Approval Rule
|
|
94
|
+
|
|
95
|
+
Global instructions, skills, plugins, and other high-risk shared surfaces require explicit review before apply. Project-scoped additive markdown changes can be lower risk, but still need evidence and a clear target.
|
|
96
|
+
|
|
97
|
+
Executable product or tooling work belongs in the task system. Use evolution for the reusable instruction, skill, prompt, or operating-model change that should survive that work.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "facult",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Manage canonical AI capabilities, sync surfaces, and evolution state.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"assets/**/*.toml",
|
|
32
32
|
"bin/fclt.cjs",
|
|
33
33
|
"bin/facult.cjs",
|
|
34
|
+
"docs/**/*.md",
|
|
34
35
|
"src/**/*.ts",
|
|
35
36
|
"!src/**/*.test.ts",
|
|
36
37
|
"README.md",
|
package/src/builtin-assets.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-builtin-assets.ts. Do not edit by hand.
|
|
2
2
|
|
|
3
3
|
export const BUILTIN_OPERATING_MODEL_FILES = JSON.parse(
|
|
4
|
-
'{"AGENTS.global.md":"# Facult Operating Defaults\\n\\nThis machine has a default Facult operating-model layer available.\\n\\nWhen work produces durable friction, weak verification, stale guidance, or a missing skill/tool capability, preserve that signal with `fclt ai writeback ...` when the target and scope are clear. When repeated writebacks or clearly missing capability point at a concrete improvement, use `fclt ai evolve ...` or the `capability-evolution` skill to make a reviewable proposal.\\n\\nFor writeback and evolution, read `@builtin/facult-operating-model/instructions/EVOLUTION.md`.\\nFor learning and writeback defaults, read `@builtin/facult-operating-model/instructions/LEARNING_AND_WRITEBACK.md`.\\nFor deciding whether capability belongs in global or project scope, read `@builtin/facult-operating-model/instructions/PROJECT_CAPABILITY.md`.\\nFor project operating-layer design, read `@builtin/facult-operating-model/instructions/INTEGRATION.md`.\\n\\nBuiltin specialist agents are available for:\\n- writeback curation\\n- evolution planning\\n- scope promotion\\n- integration auditing\\n\\nBuiltin skills are available for:\\n- capability evolution\\n- project operating-layer design\\n","agents/evolution-planner/agent.toml":"name = \\"evolution-planner\\"\\ndescription = \\"Turn repeated writeback into concrete capability proposals.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou plan capability evolution.\\n\\nPrioritize:\\n- smallest useful change\\n- correct target asset type\\n- correct target scope\\n- evidence that justifies the change\\n- repeated writeback clusters or clearly missing capabilities, not isolated preferences\\n\\nProposal kinds you should consider first:\\n- update_asset\\n- create_asset\\n- extract_snippet\\n- add_skill\\n- promote_asset\\n\\nDefault to project scope when the pattern is repo-local.\\nPromote to global only when reuse is demonstrated and pollution risk is low.\\n\\nReturn concise proposals ordered by expected leverage, including:\\n- proposal kind\\n- target asset\\n- target scope\\n- why this is the smallest durable change\\n\\nDo not escalate to evolution when a single writeback is enough.\\nDo not use evolution as a substitute for executable task tracking when the main need is owner, priority, state, or implementation follow-through.\\n\\"\\"\\"\\n","agents/integration-auditor/agent.toml":"name = \\"integration-auditor\\"\\ndescription = \\"Find where local success can still fail system-wide.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou audit integration risk.\\n\\nPrioritize:\\n- hidden dependencies\\n- rollout hazards\\n- operational constraints\\n- gaps between local verification and real system behavior\\n\\nReturn concise findings ordered by impact.\\n\\"\\"\\"\\n","agents/scope-promoter/agent.toml":"name = \\"scope-promoter\\"\\ndescription = \\"Decide whether learning belongs at project or global scope.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou decide scope.\\n\\nPrioritize:\\n- project specificity\\n- cross-project reuse potential\\n- pollution risk from globalizing too early\\n\\nWhen recommending promotion, make the standard path explicit:\\n- keep the source capability in project scope until promotion is approved\\n- create a reviewable global proposal\\n- do not treat promotion as implicit apply\\n\\nReturn concise decisions with rationale.\\n\\"\\"\\"\\n","agents/writeback-curator/agent.toml":"name = \\"writeback-curator\\"\\ndescription = \\"Turn noisy outcomes into high-signal writeback.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou curate durable writeback.\\n\\nPrioritize:\\n- repeated failures\\n- repeated wins\\n- stale guidance\\n- missing capability edges\\n- tool, skill, MCP, plugin, automation, or instruction friction that repeatedly slows work down\\n\\nFor each recommendation, prefer returning:\\n- suggested writeback kind\\n- best target asset or destination\\n- best scope (`project` or `global`)\\n- the evidence that justifies recording it\\n\\nDo not emit low-signal noise.\\nIf the learning is repo-specific, keep it project-scoped by default.\\nWhen the signal is already strong and the target is clear, prefer recommending direct writeback capture rather than abstract advice.\\nWhen the issue is executable tooling work, recommend task tracking for the fix and writeback only for the reusable operating-model learning.\\n\\"\\"\\"\\n","instructions/EVOLUTION.md":"---\\ndescription: Turn repeated signal into concrete capability changes.\\ntags: [facult, evolution, writeback]\\n---\\n\\n# Evolution\\n\\nUse writeback and evolution to improve the AI operating layer itself.\\n\\nEvolution is the synthesis and change side of the feedback loop. It turns accumulated writebacks, repeated tool friction, stale canonical assets, or clearly missing capability into small reviewable changes to instructions, skills, snippets, agents, or other markdown canonical assets.\\n\\n## When To Record Writeback\\n\\nRecord writeback when one of these is true:\\n\\n- the same failure repeats\\n- the same success pattern repeats\\n- guidance is stale or missing\\n- a prompt or loop has to be restated often\\n- a project-specific pattern looks reusable\\n\\nDo not record low-signal noise:\\n\\n- one-off annoyance with no reuse value\\n- generic \\"could be better\\" commentary\\n- duplicate observations with no new evidence\\n\\nThe intended default is that agents record strong writebacks themselves when the signal is clear enough, rather than only recommending that a user do it manually later.\\n\\nDo not wait for a weekly review to preserve high-signal evidence. Do wait for repeated evidence or a clearly missing capability before drafting a proposal.\\n\\n## Scope\\n\\nChoose `project` scope when the learning depends on:\\n\\n- repo architecture\\n- team workflow\\n- project tooling\\n- local testing or verification behavior\\n\\nChoose `global` scope when the learning is reusable across projects.\\n\\nPromote from project to global only after repeated reuse or strong evidence.\\n\\n## Writeback Kinds\\n\\nCommon kinds:\\n\\n- `weak_verification`\\n- `false_positive`\\n- `missing_context`\\n- `reusable_pattern`\\n- `capability_gap`\\n- `bad_default`\\n\\nEvery good writeback should try to include:\\n\\n- a concrete summary\\n- the best target asset if known\\n- the right scope\\n- domain or tags when useful\\n\\n## Operator Flow\\n\\nTypical workflow:\\n\\n```bash\\nfclt ai writeback add --kind weak_verification --summary \\"Checks were too shallow\\" --asset instruction:VERIFICATION\\nfclt ai writeback group --by asset\\nfclt ai writeback summarize --by domain\\nfclt ai evolve propose\\nfclt ai evolve draft EV-00001\\nfclt ai evolve accept EV-00001\\nfclt ai evolve apply EV-00001\\n```\\n\\nUse `fclt ai evolve draft <id> --append \\"...\\"` to revise a draft while preserving draft history.\\n\\nReview surfaces:\\n\\n- open `~/.ai/writebacks/` and `~/.ai/evolution/` in a Markdown editor for frontmatter-rich global and project-scoped review artifacts\\n- `fclt status --json` for queue/proposal paths, review artifact paths, counts, and active scope\\n- `fclt ai writeback list|show|group|summarize` for raw and clustered signal\\n- `fclt ai evolve list|show|review` for proposal state without applying changes\\n- `fclt templates init automation learning-review` for recurring capture/review\\n- `fclt templates init automation evolution-review` for recurring proposal review\\n- `fclt templates init automation tool-call-audit` for repeated tool-friction review\\n\\nEvolution proposal metadata, markdown drafts, patch artifacts, writeback queues,\\nand journals are runtime state. `fclt` stores JSON queues, proposal records,\\ndraft refs, patches, and journals in machine-local Facult state. It mirrors\\nhuman-readable review artifacts into global `~/.ai/writebacks/...` and\\n`~/.ai/evolution/...`, including project-scoped artifacts under\\n`projects/<slug-hash>/` with cwd/project metadata in frontmatter. Canonical\\nassets in `~/.ai` or `<repo>/.ai` should only change when a proposal is applied.\\n\\n## Default Agent Behavior\\n\\nUse the smallest action that fits the signal:\\n\\n1. record one strong writeback when there is a clear durable learning\\n2. use `writeback-curator` when the target, kind, or scope is ambiguous\\n3. use `capability-evolution` or `evolution-planner` when repeated signal should become a proposal\\n4. do not draft or apply proposals just because a writeback exists; require repeated evidence or a clearly missing capability\\n\\nAvoid creating writeback/evolution noise for one-off nits, vague preferences, or speculative ideas without evidence.\\n\\nWhen the friction is executable product/tooling work that needs ownership,\\npriority, state, or implementation follow-through, create or update a real task\\nsystem item instead of forcing it into capability evolution. Use evolution for\\nthe reusable operating-layer change.\\n\\n## Proposal Kinds\\n\\nCurrent supported proposal kinds:\\n\\n- `update_asset`\\n- `create_asset`\\n- `extract_snippet`\\n- `add_skill`\\n- `promote_asset`\\n\\nUse the smallest durable change that fits the evidence.\\n\\n## Review And Apply Rules\\n\\n- draft before apply\\n- accept before apply\\n- prefer the smallest safe change\\n- keep reviewable evidence tied to source writebacks\\n- do not globalize project behavior too early\\n- do not apply high-risk global instruction, skill, plugin, or non-COS changes without explicit review/approval\\n\\nApply is for markdown canonical assets only. If the target is wrong, revise the proposal rather than forcing it through.\\n","instructions/INTEGRATION.md":"---\\ndescription: Detect where local success can still fail at integration boundaries.\\ntags: [facult, integration, verification]\\n---\\n\\n# Integration\\n\\nDistinguish local correctness from system correctness. Check hidden dependencies, rollout order, and operational constraints before calling work done.\\n","instructions/LEARNING_AND_WRITEBACK.md":"---\\ndescription: Preserve durable signal and record writeback when the operating layer should learn.\\ntags: [facult, learning, writeback]\\n---\\n\\n# Learning And Writeback\\n\\nUse this when work produces a durable decision, failure, success pattern, or missing guardrail that should outlive the current task.\\n\\nThis is the capture side of the feedback loop. The goal is to let normal agent work produce reusable signal without requiring a human to manually restate every friction point later.\\n\\n## Default Behavior\\n\\nThe normal path should be agent-driven.\\n\\nIf you can clearly answer:\\n\\n- what was learned\\n- why it matters\\n- where it should land\\n- whether it belongs in `project` or `global`\\n\\nthen record the writeback instead of only suggesting that someone should do it later.\\n\\nUse:\\n\\n```bash\\nfclt ai writeback add --kind <kind> --summary \\"<summary>\\" --asset <asset-selector>\\n```\\n\\nThe writeback queue is runtime state, not canonical source. `fclt` stores JSON\\nqueue state in machine-local Facult state so sandboxed agents can record durable\\nfriction without mutating canonical assets unless an evolution proposal is later\\nreviewed and applied.\\n\\nEvery writeback also refreshes a Markdown review artifact under the global\\n`~/.ai/writebacks/...` tree. Global signal lands in `~/.ai/writebacks/global/`;\\nproject-scoped signal lands in `~/.ai/writebacks/projects/<slug-hash>/` with\\nfrontmatter for scope, project root, cwd, target asset, status, tags, evidence,\\nand timestamps. Do not write writeback review artifacts into a repo-local `.ai`;\\nrepo-local state should contribute project metadata and evidence, not bundled\\nprivate review files.\\n\\nProject-scoped writebacks should usually be recorded from the repo that produced\\nthe evidence. Global writebacks should be reserved for shared doctrine, shared\\nskills, shared agents, tool behavior, or cross-project capability gaps.\\n\\n## Record Writeback When\\n\\n- the same failure or weak loop appears again\\n- a reusable success pattern shows up\\n- guidance is clearly stale or missing\\n- a repo-local behavior probably belongs in project capability\\n- a cross-project behavior probably belongs in global capability\\n- a skill, tool, MCP, plugin, automation, or instruction gap repeatedly slows work down\\n- an agent has to restate the same workaround, verification rule, or review rule\\n\\n## Do Not Record Writeback For\\n\\n- one-off annoyance with no durable value\\n- weak commentary with no target\\n- speculative ideas without evidence\\n- duplicate noise with no new signal\\n\\n## Follow Through\\n\\n- prefer one strong writeback over many weak ones\\n- mention the writeback id when summarizing what changed\\n- escalate to `capability-evolution` or `fclt ai evolve ...` only when the signal is repeated or clearly points at a durable capability change\\n- use `fclt ai writeback group --by asset` or `fclt ai writeback summarize --by domain` to review accumulated signal before proposing broad changes\\n- use scheduled `learning-review`, `evolution-review`, or `tool-call-audit` automations when the signal should be reviewed in the background\\n","instructions/PROJECT_CAPABILITY.md":"---\\ndescription: Decide what belongs in repo-local .ai versus the global store.\\ntags: [facult, project, scope]\\n---\\n\\n# Project Capability\\n\\nPrefer project scope when the guidance depends on repo architecture, team workflow, or colocated tooling. Promote to global only after repeated cross-project reuse.\\n\\n## Project First\\n\\nDefault to `<repo>/.ai` when the capability is about:\\n\\n- local architecture\\n- repo-specific testing or verification\\n- team conventions\\n- project tools and workflows\\n\\n## Promote Carefully\\n\\nPromote to `~/.ai` only when:\\n\\n- the same pattern succeeds in more than one repo\\n- the capability is not coupled to local architecture\\n- the global version will not create noise for unrelated projects\\n\\nUse:\\n\\n```bash\\nfclt ai evolve promote EV-00001 --to global --project\\n```\\n\\nThat creates a new global proposal for review. It does not auto-apply the promotion.\\n","skills/capability-evolution/SKILL.md":"---\\ndescription: Convert repeated writeback into concrete fclt capability proposals.\\ntags: [facult, evolution, writeback]\\n---\\n\\n# capability-evolution\\n\\n## When To Use\\nUse this skill when the same missing guidance, weak loop, or recurring win appears often enough that the AI system itself should probably change.\\n\\nDo not wait for a human operator by default if the signal is already clear and the environment permits local AI runtime state to be updated.\\n\\nUse writeback first when the signal is useful but not yet repeated. Use evolution when accumulated writebacks, repeated tool friction, or a clearly missing capability point at a specific target asset or new capability.\\n\\n## Scope Decision\\n\\nChoose `project` when the behavior depends on repo-local architecture or workflow.\\n\\nChoose `global` when the behavior is broadly reusable.\\n\\nIf unsure, start at project scope and promote later with evidence.\\n\\n## Working Flow\\n\\n1. record the strongest writeback\\n2. group or summarize repeated signal\\n3. choose the smallest valid proposal kind\\n4. draft the proposal\\n5. accept only after the target and scope are correct\\n6. apply only when the markdown target is the intended canonical asset\\n\\nUse:\\n\\n```bash\\nfclt ai writeback add ...\\nfclt ai writeback group --by asset\\nfclt ai writeback summarize --by domain\\nfclt ai evolve propose\\nfclt ai evolve draft EV-00001\\nfclt ai evolve draft EV-00001 --append \\"tighten the rule with a concrete verification step\\"\\nfclt ai evolve accept EV-00001\\nfclt ai evolve apply EV-00001\\n```\\n\\nFor background review loops, use:\\n\\n```bash\\nfclt templates init automation learning-review\\nfclt templates init automation evolution-review\\nfclt templates init automation tool-call-audit\\n```\\n\\nIf there is not yet enough repeated signal for evolution, record the writeback and stop there.\\n\\n## Proposal Kind Selection\\n\\n- `update_asset` for tightening existing guidance\\n- `create_asset` for missing instructions or docs\\n- `extract_snippet` for reusable partial guidance\\n- `add_skill` for reusable workflow instruction\\n- `promote_asset` for project-to-global promotion\\n\\nUse task tracking instead of evolution when the main work is an executable tool or product fix that needs an owner, priority, state, or delivery plan. Use evolution for the reusable instruction, skill, or operating-model change that should survive that fix.\\n\\n## Output Contract\\n- repeated signal\\n- proposed asset change\\n- target scope\\n- evidence\\n- smallest useful next step\\n","skills/project-operating-layer-design/SKILL.md":"---\\ndescription: Design or improve a repo-local .ai operating layer.\\ntags: [facult, project, design]\\n---\\n\\n# project-operating-layer-design\\n\\n## When To Use\\nUse this skill when a project needs its own `.ai/` structure, repo-specific instructions, or local bootstrap guidance.\\n\\n## Output Contract\\n- recommended `.ai/` layout\\n- what stays project-local\\n- what stays global\\n- what should remain generated runtime output only\\n"}'
|
|
4
|
+
'{"AGENTS.global.md":"# Facult Operating Defaults\\n\\nThis machine has a default Facult operating-model layer available.\\n\\nWhen work produces durable friction, weak verification, stale guidance, or a missing skill/tool capability, preserve that signal with `fclt ai writeback ...` when the target and scope are clear. When repeated writebacks or clearly missing capability point at a concrete improvement, use `fclt ai evolve ...` or the `capability-evolution` skill to make a reviewable proposal.\\n\\nFor work-unit framing, read `@builtin/facult-operating-model/instructions/WORK_UNITS.md`.\\nFor writeback and evolution, read `@builtin/facult-operating-model/instructions/EVOLUTION.md`.\\nFor learning and writeback defaults, read `@builtin/facult-operating-model/instructions/LEARNING_AND_WRITEBACK.md`.\\nFor deciding whether capability belongs in global or project scope, read `@builtin/facult-operating-model/instructions/PROJECT_CAPABILITY.md`.\\nFor project operating-layer design, read `@builtin/facult-operating-model/instructions/INTEGRATION.md`.\\n\\nBuiltin specialist agents are available for:\\n- writeback curation\\n- evolution planning\\n- scope promotion\\n- integration auditing\\n\\nBuiltin skills are available for:\\n- capability evolution\\n- project operating-layer design\\n","agents/evolution-planner/agent.toml":"name = \\"evolution-planner\\"\\ndescription = \\"Turn repeated writeback into concrete capability proposals.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou plan capability evolution.\\n\\nPrioritize:\\n- smallest useful change\\n- correct target asset type\\n- correct target scope\\n- evidence that justifies the change\\n- repeated writeback clusters or clearly missing capabilities, not isolated preferences\\n\\nProposal kinds you should consider first:\\n- update_asset\\n- create_asset\\n- extract_snippet\\n- add_skill\\n- promote_asset\\n\\nDefault to project scope when the pattern is repo-local.\\nPromote to global only when reuse is demonstrated and pollution risk is low.\\n\\nReturn concise proposals ordered by expected leverage, including:\\n- proposal kind\\n- target asset\\n- target scope\\n- why this is the smallest durable change\\n\\nDo not escalate to evolution when a single writeback is enough.\\nDo not use evolution as a substitute for executable task tracking when the main need is owner, priority, state, or implementation follow-through.\\n\\"\\"\\"\\n","agents/integration-auditor/agent.toml":"name = \\"integration-auditor\\"\\ndescription = \\"Find where local success can still fail system-wide.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou audit integration risk.\\n\\nPrioritize:\\n- hidden dependencies\\n- rollout hazards\\n- operational constraints\\n- gaps between local verification and real system behavior\\n\\nReturn concise findings ordered by impact.\\n\\"\\"\\"\\n","agents/scope-promoter/agent.toml":"name = \\"scope-promoter\\"\\ndescription = \\"Decide whether learning belongs at project or global scope.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou decide scope.\\n\\nPrioritize:\\n- project specificity\\n- cross-project reuse potential\\n- pollution risk from globalizing too early\\n\\nWhen recommending promotion, make the standard path explicit:\\n- keep the source capability in project scope until promotion is approved\\n- create a reviewable global proposal\\n- do not treat promotion as implicit apply\\n\\nReturn concise decisions with rationale.\\n\\"\\"\\"\\n","agents/writeback-curator/agent.toml":"name = \\"writeback-curator\\"\\ndescription = \\"Turn noisy outcomes into high-signal writeback.\\"\\n\\ndeveloper_instructions = \\"\\"\\"\\nYou curate durable writeback.\\n\\nPrioritize:\\n- repeated failures\\n- repeated wins\\n- stale guidance\\n- missing capability edges\\n- tool, skill, MCP, plugin, automation, or instruction friction that repeatedly slows work down\\n\\nFor each recommendation, prefer returning:\\n- suggested writeback kind\\n- best target asset or destination\\n- best scope (`project` or `global`)\\n- the evidence that justifies recording it\\n\\nDo not emit low-signal noise.\\nIf the learning is repo-specific, keep it project-scoped by default.\\nWhen the signal is already strong and the target is clear, prefer recommending direct writeback capture rather than abstract advice.\\nWhen the issue is executable tooling work, recommend task tracking for the fix and writeback only for the reusable operating-model learning.\\n\\"\\"\\"\\n","instructions/EVOLUTION.md":"---\\ndescription: Turn repeated signal into concrete capability changes.\\ntags: [facult, evolution, writeback]\\n---\\n\\n# Evolution\\n\\nUse writeback and evolution to improve the AI operating layer itself.\\n\\nEvolution is the synthesis and change side of the feedback loop. It turns accumulated writebacks, repeated tool friction, stale canonical assets, or clearly missing capability into small reviewable changes to instructions, skills, snippets, agents, or other markdown canonical assets.\\n\\n## When To Record Writeback\\n\\nRecord writeback when one of these is true:\\n\\n- the same failure repeats\\n- the same success pattern repeats\\n- guidance is stale or missing\\n- a prompt or loop has to be restated often\\n- a project-specific pattern looks reusable\\n\\nDo not record low-signal noise:\\n\\n- one-off annoyance with no reuse value\\n- generic \\"could be better\\" commentary\\n- duplicate observations with no new evidence\\n\\nThe intended default is that agents record strong writebacks themselves when the signal is clear enough, rather than only recommending that a user do it manually later.\\n\\nDo not wait for a weekly review to preserve high-signal evidence. Do wait for repeated evidence or a clearly missing capability before drafting a proposal.\\n\\n## Scope\\n\\nChoose `project` scope when the learning depends on:\\n\\n- repo architecture\\n- team workflow\\n- project tooling\\n- local testing or verification behavior\\n\\nChoose `global` scope when the learning is reusable across projects.\\n\\nPromote from project to global only after repeated reuse or strong evidence.\\n\\n## Writeback Kinds\\n\\nCommon kinds:\\n\\n- `weak_verification`\\n- `false_positive`\\n- `missing_context`\\n- `reusable_pattern`\\n- `capability_gap`\\n- `bad_default`\\n\\nEvery good writeback should try to include:\\n\\n- a concrete summary\\n- the best target asset if known\\n- the right scope\\n- domain or tags when useful\\n\\n## Operator Flow\\n\\nTypical workflow:\\n\\n```bash\\nfclt ai writeback add --kind weak_verification --summary \\"Checks were too shallow\\" --asset instruction:VERIFICATION\\nfclt ai writeback group --by asset\\nfclt ai writeback summarize --by domain\\nfclt ai evolve propose\\nfclt ai evolve draft EV-00001\\nfclt ai evolve accept EV-00001\\nfclt ai evolve apply EV-00001\\n```\\n\\nUse `fclt ai evolve draft <id> --append \\"...\\"` to revise a draft while preserving draft history.\\n\\nReview surfaces:\\n\\n- open `~/.ai/writebacks/` and `~/.ai/evolution/` in a Markdown editor for frontmatter-rich global and project-scoped review artifacts\\n- `fclt status --json` for queue/proposal paths, review artifact paths, counts, and active scope\\n- `fclt ai writeback list|show|group|summarize` for raw and clustered signal\\n- `fclt ai evolve list|show|review` for proposal state without applying changes\\n- `fclt templates init automation learning-review` for recurring capture/review\\n- `fclt templates init automation evolution-review` for recurring proposal review\\n- `fclt templates init automation tool-call-audit` for repeated tool-friction review\\n\\nEvolution proposal metadata, markdown drafts, patch artifacts, writeback queues,\\nand journals are runtime state. `fclt` stores JSON queues, proposal records,\\ndraft refs, patches, and journals in machine-local Facult state. It mirrors\\nhuman-readable review artifacts into global `~/.ai/writebacks/...` and\\n`~/.ai/evolution/...`, including project-scoped artifacts under\\n`projects/<slug-hash>/` with cwd/project metadata in frontmatter. Canonical\\nassets in `~/.ai` or `<repo>/.ai` should only change when a proposal is applied.\\n\\n## Default Agent Behavior\\n\\nUse the smallest action that fits the signal:\\n\\n1. record one strong writeback when there is a clear durable learning\\n2. use `writeback-curator` when the target, kind, or scope is ambiguous\\n3. use `capability-evolution` or `evolution-planner` when repeated signal should become a proposal\\n4. do not draft or apply proposals just because a writeback exists; require repeated evidence or a clearly missing capability\\n\\nAvoid creating writeback/evolution noise for one-off nits, vague preferences, or speculative ideas without evidence.\\n\\nWhen the friction is executable product/tooling work that needs ownership,\\npriority, state, or implementation follow-through, create or update a real task\\nsystem item instead of forcing it into capability evolution. Use evolution for\\nthe reusable operating-layer change.\\n\\n## Proposal Kinds\\n\\nCurrent supported proposal kinds:\\n\\n- `update_asset`\\n- `create_asset`\\n- `extract_snippet`\\n- `add_skill`\\n- `promote_asset`\\n\\nUse the smallest durable change that fits the evidence.\\n\\n## Review And Apply Rules\\n\\n- draft before apply\\n- accept before apply\\n- prefer the smallest safe change\\n- keep reviewable evidence tied to source writebacks\\n- do not globalize project behavior too early\\n- do not apply high-risk global instruction, skill, plugin, or shared-tool changes without explicit review/approval\\n\\nApply is for markdown canonical assets only. If the target is wrong, revise the proposal rather than forcing it through.\\n","instructions/INTEGRATION.md":"---\\ndescription: Detect where local success can still fail at integration boundaries.\\ntags: [facult, integration, verification]\\n---\\n\\n# Integration\\n\\nDistinguish local correctness from system correctness. Check hidden dependencies, rollout order, and operational constraints before calling work done.\\n","instructions/LEARNING_AND_WRITEBACK.md":"---\\ndescription: Preserve durable signal and record writeback when the operating layer should learn.\\ntags: [facult, learning, writeback]\\n---\\n\\n# Learning And Writeback\\n\\nUse this when work produces a durable decision, failure, success pattern, or missing guardrail that should outlive the current task.\\n\\nThis is the capture side of the feedback loop. The goal is to let normal agent work produce reusable signal without requiring a human to manually restate every friction point later.\\n\\n## Default Behavior\\n\\nThe normal path should be agent-driven.\\n\\nIf you can clearly answer:\\n\\n- what was learned\\n- why it matters\\n- where it should land\\n- whether it belongs in `project` or `global`\\n\\nthen record the writeback instead of only suggesting that someone should do it later.\\n\\nUse:\\n\\n```bash\\nfclt ai writeback add --kind <kind> --summary \\"<summary>\\" --asset <asset-selector>\\n```\\n\\nThe writeback queue is runtime state, not canonical source. `fclt` stores JSON\\nqueue state in machine-local Facult state so sandboxed agents can record durable\\nfriction without mutating canonical assets unless an evolution proposal is later\\nreviewed and applied.\\n\\nEvery writeback also refreshes a Markdown review artifact under the global\\n`~/.ai/writebacks/...` tree. Global signal lands in `~/.ai/writebacks/global/`;\\nproject-scoped signal lands in `~/.ai/writebacks/projects/<slug-hash>/` with\\nfrontmatter for scope, project root, cwd, target asset, status, tags, evidence,\\nand timestamps. Do not write writeback review artifacts into a repo-local `.ai`;\\nrepo-local state should contribute project metadata and evidence, not bundled\\nprivate review files.\\n\\nProject-scoped writebacks should usually be recorded from the repo that produced\\nthe evidence. Global writebacks should be reserved for shared doctrine, shared\\nskills, shared agents, tool behavior, or cross-project capability gaps.\\n\\n## Record Writeback When\\n\\n- the same failure or weak loop appears again\\n- a reusable success pattern shows up\\n- guidance is clearly stale or missing\\n- a repo-local behavior probably belongs in project capability\\n- a cross-project behavior probably belongs in global capability\\n- a skill, tool, MCP, plugin, automation, or instruction gap repeatedly slows work down\\n- an agent has to restate the same workaround, verification rule, or review rule\\n\\n## Do Not Record Writeback For\\n\\n- one-off annoyance with no durable value\\n- weak commentary with no target\\n- speculative ideas without evidence\\n- duplicate noise with no new signal\\n\\n## Follow Through\\n\\n- prefer one strong writeback over many weak ones\\n- mention the writeback id when summarizing what changed\\n- escalate to `capability-evolution` or `fclt ai evolve ...` only when the signal is repeated or clearly points at a durable capability change\\n- use `fclt ai writeback group --by asset` or `fclt ai writeback summarize --by domain` to review accumulated signal before proposing broad changes\\n- use scheduled `learning-review`, `evolution-review`, or `tool-call-audit` automations when the signal should be reviewed in the background\\n","instructions/PROJECT_CAPABILITY.md":"---\\ndescription: Decide what belongs in repo-local .ai versus the global store.\\ntags: [facult, project, scope]\\n---\\n\\n# Project Capability\\n\\nPrefer project scope when the guidance depends on repo architecture, team workflow, or colocated tooling. Promote to global only after repeated cross-project reuse.\\n\\n## Project First\\n\\nDefault to `<repo>/.ai` when the capability is about:\\n\\n- local architecture\\n- repo-specific testing or verification\\n- team conventions\\n- project tools and workflows\\n\\n## Promote Carefully\\n\\nPromote to `~/.ai` only when:\\n\\n- the same pattern succeeds in more than one repo\\n- the capability is not coupled to local architecture\\n- the global version will not create noise for unrelated projects\\n\\nUse:\\n\\n```bash\\nfclt ai evolve promote EV-00001 --to global --project\\n```\\n\\nThat creates a new global proposal for review. It does not auto-apply the promotion.\\n","instructions/WORK_UNITS.md":"---\\ndescription: \\"Define work units so agent tasks have a clear goal, evidence path, artifact, and writeback target.\\"\\ntags: [\\"work-units\\", \\"planning\\", \\"verification\\", \\"writeback\\"]\\n---\\n\\n# Work Units\\n\\nA work unit is the smallest coherent unit of agent work that can be understood, verified, and preserved.\\n\\nIt is not just the user\'s latest sentence. It is the operational shape around that sentence: what is being changed, why it matters, what evidence is needed, what artifact should remain, and how future agents should benefit from the result.\\n\\n## Minimum Contract\\n\\nA well-formed work unit names:\\n\\n- goal: the outcome the user needs\\n- acceptance criteria: what must be true when the work is done\\n- required context: source files, docs, systems, messages, or prior decisions needed for correctness\\n- constraints: permissions, privacy, compatibility, deadlines, ownership, or scope limits\\n- signals or evidence: checks that can confirm progress or falsify assumptions\\n- output artifact: code, docs, proposal, issue, note, draft, or report\\n- verification path: commands, review surfaces, manual checks, or source-of-truth reads\\n- writeback target: where durable learning belongs if the work teaches something reusable\\n\\nIf one of these is missing and the gap blocks correctness, surface the gap early and recover it before moving faster.\\n\\n## Why It Exists\\n\\nWork-unit framing prevents shallow completion. It helps agents avoid:\\n\\n- changing files before understanding the target\\n- treating a weak green signal as proof\\n- losing reusable learning in chat\\n- creating duplicate tasks or proposals\\n- turning one-off preferences into global rules\\n- pushing project-specific details into global capability\\n\\n## How To Use It\\n\\nFor simple tasks, keep the work unit implicit but still verify the result.\\n\\nFor ambiguous, high-impact, or multi-step tasks, make the work unit explicit before executing. A compact form is enough:\\n\\n```text\\nGoal:\\nAcceptance:\\nContext:\\nConstraints:\\nEvidence:\\nArtifact:\\nVerification:\\nWriteback:\\n```\\n\\nUse the smallest framing that makes the task correct. Do not turn every request into paperwork.\\n\\n## Writeback\\n\\nWhen the work reveals durable friction, missing capability, stale guidance, or a repeatable workflow, prefer one strong writeback over many weak ones.\\n\\nUse `fclt ai writeback add ...` when the target asset, scope, and evidence are clear. Use `fclt ai evolve ...` only when repeated signal supports a concrete proposal.\\n","skills/capability-evolution/SKILL.md":"---\\ndescription: Convert repeated writeback into concrete fclt capability proposals.\\ntags: [facult, evolution, writeback]\\n---\\n\\n# capability-evolution\\n\\n## When To Use\\nUse this skill when the same missing guidance, weak loop, or recurring win appears often enough that the AI system itself should probably change.\\n\\nDo not wait for a human operator by default if the signal is already clear and the environment permits local AI runtime state to be updated.\\n\\nUse writeback first when the signal is useful but not yet repeated. Use evolution when accumulated writebacks, repeated tool friction, or a clearly missing capability point at a specific target asset or new capability.\\n\\n## Scope Decision\\n\\nChoose `project` when the behavior depends on repo-local architecture or workflow.\\n\\nChoose `global` when the behavior is broadly reusable.\\n\\nIf unsure, start at project scope and promote later with evidence.\\n\\n## Working Flow\\n\\n1. record the strongest writeback\\n2. group or summarize repeated signal\\n3. choose the smallest valid proposal kind\\n4. draft the proposal\\n5. accept only after the target and scope are correct\\n6. apply only when the markdown target is the intended canonical asset\\n\\nUse:\\n\\n```bash\\nfclt ai writeback add ...\\nfclt ai writeback group --by asset\\nfclt ai writeback summarize --by domain\\nfclt ai evolve propose\\nfclt ai evolve draft EV-00001\\nfclt ai evolve draft EV-00001 --append \\"tighten the rule with a concrete verification step\\"\\nfclt ai evolve accept EV-00001\\nfclt ai evolve apply EV-00001\\n```\\n\\nFor background review loops, use:\\n\\n```bash\\nfclt templates init automation learning-review\\nfclt templates init automation evolution-review\\nfclt templates init automation tool-call-audit\\n```\\n\\nIf there is not yet enough repeated signal for evolution, record the writeback and stop there.\\n\\n## Proposal Kind Selection\\n\\n- `update_asset` for tightening existing guidance\\n- `create_asset` for missing instructions or docs\\n- `extract_snippet` for reusable partial guidance\\n- `add_skill` for reusable workflow instruction\\n- `promote_asset` for project-to-global promotion\\n\\nUse task tracking instead of evolution when the main work is an executable tool or product fix that needs an owner, priority, state, or delivery plan. Use evolution for the reusable instruction, skill, or operating-model change that should survive that fix.\\n\\n## Output Contract\\n- repeated signal\\n- proposed asset change\\n- target scope\\n- evidence\\n- smallest useful next step\\n","skills/project-operating-layer-design/SKILL.md":"---\\ndescription: Design or improve a repo-local .ai operating layer.\\ntags: [facult, project, design]\\n---\\n\\n# project-operating-layer-design\\n\\n## When To Use\\nUse this skill when a project needs its own `.ai/` structure, repo-specific instructions, or local bootstrap guidance.\\n\\n## Output Contract\\n- recommended `.ai/` layout\\n- what stays project-local\\n- what stays global\\n- what should remain generated runtime output only\\n"}'
|
|
5
5
|
) as Record<string, string>;
|
package/src/remote.ts
CHANGED
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
relative,
|
|
10
10
|
resolve,
|
|
11
11
|
} from "node:path";
|
|
12
|
-
import { fileURLToPath } from "node:url";
|
|
13
12
|
import { isCancel, multiselect, select, text } from "@clack/prompts";
|
|
13
|
+
import { facultBuiltinPackRoot } from "./builtin";
|
|
14
|
+
import { parseCliContextArgs, resolveCliContextRoot } from "./cli-context";
|
|
14
15
|
import {
|
|
15
16
|
renderBullets,
|
|
16
17
|
renderCatalog,
|
|
@@ -1221,11 +1222,6 @@ updated_at = ${timestamp}
|
|
|
1221
1222
|
};
|
|
1222
1223
|
}
|
|
1223
1224
|
|
|
1224
|
-
function builtinPackRoot(packName: string): string {
|
|
1225
|
-
const here = dirname(fileURLToPath(import.meta.url));
|
|
1226
|
-
return join(here, "..", "assets", "packs", packName);
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
1225
|
async function pathExists(pathValue: string): Promise<boolean> {
|
|
1230
1226
|
try {
|
|
1231
1227
|
await Bun.file(pathValue).stat();
|
|
@@ -1258,15 +1254,15 @@ async function listFilesRecursive(rootDir: string): Promise<string[]> {
|
|
|
1258
1254
|
return out.sort();
|
|
1259
1255
|
}
|
|
1260
1256
|
|
|
1261
|
-
async function
|
|
1262
|
-
|
|
1257
|
+
async function scaffoldBuiltinOperatingModelPack(args: {
|
|
1258
|
+
rootDir: string;
|
|
1263
1259
|
homeDir?: string;
|
|
1264
1260
|
dryRun?: boolean;
|
|
1265
1261
|
force?: boolean;
|
|
1262
|
+
installedAs?: string;
|
|
1266
1263
|
}): Promise<InstallResult> {
|
|
1267
|
-
const
|
|
1268
|
-
const
|
|
1269
|
-
const packRoot = builtinPackRoot("facult-operating-model");
|
|
1264
|
+
const rootDir = resolve(args.rootDir);
|
|
1265
|
+
const packRoot = facultBuiltinPackRoot("facult-operating-model");
|
|
1270
1266
|
const files = await listFilesRecursive(packRoot);
|
|
1271
1267
|
const changedPaths: string[] = [];
|
|
1272
1268
|
|
|
@@ -1307,7 +1303,7 @@ async function scaffoldBuiltinProjectAiPack(args: {
|
|
|
1307
1303
|
return {
|
|
1308
1304
|
ref: `${BUILTIN_INDEX_NAME}:facult-operating-model`,
|
|
1309
1305
|
type: "skill",
|
|
1310
|
-
installedAs: "
|
|
1306
|
+
installedAs: args.installedAs ?? "operating-model",
|
|
1311
1307
|
path: rootDir,
|
|
1312
1308
|
sourceTrustLevel: "trusted",
|
|
1313
1309
|
dryRun: Boolean(args.dryRun),
|
|
@@ -1315,6 +1311,22 @@ async function scaffoldBuiltinProjectAiPack(args: {
|
|
|
1315
1311
|
};
|
|
1316
1312
|
}
|
|
1317
1313
|
|
|
1314
|
+
async function scaffoldBuiltinProjectAiPack(args: {
|
|
1315
|
+
cwd?: string;
|
|
1316
|
+
homeDir?: string;
|
|
1317
|
+
dryRun?: boolean;
|
|
1318
|
+
force?: boolean;
|
|
1319
|
+
}): Promise<InstallResult> {
|
|
1320
|
+
const cwd = resolve(args.cwd ?? process.cwd());
|
|
1321
|
+
return await scaffoldBuiltinOperatingModelPack({
|
|
1322
|
+
rootDir: join(cwd, ".ai"),
|
|
1323
|
+
homeDir: args.homeDir,
|
|
1324
|
+
dryRun: args.dryRun,
|
|
1325
|
+
force: args.force,
|
|
1326
|
+
installedAs: "project-ai",
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1318
1330
|
function compareVersions(a: string, b: string): number {
|
|
1319
1331
|
const aTokens = (a.match(VERSION_TOKEN_RE) ?? []).map((t) => t.toLowerCase());
|
|
1320
1332
|
const bTokens = (b.match(VERSION_TOKEN_RE) ?? []).map((t) => t.toLowerCase());
|
|
@@ -2658,6 +2670,9 @@ function printTemplatesHelp() {
|
|
|
2658
2670
|
"fclt templates init snippet <marker> [--force] [--dry-run]"
|
|
2659
2671
|
),
|
|
2660
2672
|
renderCode("fclt templates init agents [--force] [--dry-run]"),
|
|
2673
|
+
renderCode(
|
|
2674
|
+
"fclt templates init operating-model [--global|--project|--root PATH] [--force] [--dry-run]"
|
|
2675
|
+
),
|
|
2661
2676
|
renderCode("fclt templates init project-ai [--force] [--dry-run]"),
|
|
2662
2677
|
renderCode(
|
|
2663
2678
|
"fclt templates init automation <template-id> [--scope global|project|wide] [--name <name>] [--project-root <path>] [--cwds <path1,path2>] [--rrule <RRULE>] [--status PAUSED|ACTIVE] [--yes] [--dry-run]"
|
|
@@ -3052,6 +3067,14 @@ export async function templatesCommand(
|
|
|
3052
3067
|
description: item.description ?? "",
|
|
3053
3068
|
version: item.version ?? "",
|
|
3054
3069
|
})),
|
|
3070
|
+
{
|
|
3071
|
+
id: "operating-model",
|
|
3072
|
+
type: "pack",
|
|
3073
|
+
title: "Operating Model Pack",
|
|
3074
|
+
description:
|
|
3075
|
+
"Install the built-in Facult operating-model pack into the active canonical root.",
|
|
3076
|
+
version: "1.0.0",
|
|
3077
|
+
},
|
|
3055
3078
|
{
|
|
3056
3079
|
id: "project-ai",
|
|
3057
3080
|
type: "pack",
|
|
@@ -3101,7 +3124,7 @@ export async function templatesCommand(
|
|
|
3101
3124
|
const [kind, ...args] = rest;
|
|
3102
3125
|
if (!kind) {
|
|
3103
3126
|
console.error(
|
|
3104
|
-
"templates init requires a kind (skill|mcp|agent|snippet|agents|claude|project-ai|automation)"
|
|
3127
|
+
"templates init requires a kind (skill|mcp|agent|snippet|agents|claude|operating-model|project-ai|automation)"
|
|
3105
3128
|
);
|
|
3106
3129
|
process.exitCode = 2;
|
|
3107
3130
|
return;
|
|
@@ -3144,6 +3167,51 @@ export async function templatesCommand(
|
|
|
3144
3167
|
}
|
|
3145
3168
|
}
|
|
3146
3169
|
|
|
3170
|
+
if (kind === "operating-model") {
|
|
3171
|
+
try {
|
|
3172
|
+
const context = parseCliContextArgs(args, { allowScope: false });
|
|
3173
|
+
const cwd = resolve(ctx.cwd ?? process.cwd());
|
|
3174
|
+
const rootDir = ctx.rootDir
|
|
3175
|
+
? resolve(ctx.rootDir)
|
|
3176
|
+
: context.scope === "project" && !context.rootArg
|
|
3177
|
+
? join(findGitRootFromPath(cwd) ?? cwd, ".ai")
|
|
3178
|
+
: resolveCliContextRoot({
|
|
3179
|
+
rootArg: context.rootArg,
|
|
3180
|
+
scope: context.scope,
|
|
3181
|
+
homeDir: ctx.homeDir,
|
|
3182
|
+
cwd,
|
|
3183
|
+
});
|
|
3184
|
+
const result = await scaffoldBuiltinOperatingModelPack({
|
|
3185
|
+
rootDir,
|
|
3186
|
+
homeDir: ctx.homeDir,
|
|
3187
|
+
dryRun,
|
|
3188
|
+
force,
|
|
3189
|
+
});
|
|
3190
|
+
if (json) {
|
|
3191
|
+
console.log(JSON.stringify(result, null, 2));
|
|
3192
|
+
return;
|
|
3193
|
+
}
|
|
3194
|
+
const action = dryRun ? "Would install" : "Installed";
|
|
3195
|
+
console.log(
|
|
3196
|
+
renderPage({
|
|
3197
|
+
title: `fclt templates init ${kind}`,
|
|
3198
|
+
subtitle: `${action} ${result.installedAs} into ${result.path}`,
|
|
3199
|
+
sections: [
|
|
3200
|
+
{
|
|
3201
|
+
title: "Changed Paths",
|
|
3202
|
+
lines: renderBullets(result.changedPaths),
|
|
3203
|
+
},
|
|
3204
|
+
],
|
|
3205
|
+
})
|
|
3206
|
+
);
|
|
3207
|
+
return;
|
|
3208
|
+
} catch (err) {
|
|
3209
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
3210
|
+
process.exitCode = 1;
|
|
3211
|
+
return;
|
|
3212
|
+
}
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3147
3215
|
let ref = "";
|
|
3148
3216
|
let as: string | undefined;
|
|
3149
3217
|
if (kind === "skill") {
|