facult 2.12.0 → 2.13.1
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 +209 -715
- package/assets/packs/facult-operating-model/instructions/CAPABILITY_COMPOSITION.md +1 -1
- package/assets/packs/facult-operating-model/instructions/EVOLUTION.md +1 -1
- package/assets/packs/facult-operating-model/instructions/LEARNING_AND_WRITEBACK.md +1 -1
- package/bin/fclt.cjs +103 -56
- package/docs/README.md +19 -9
- package/docs/assets/fclt-capability-loop.png +0 -0
- package/docs/automations.md +68 -0
- package/docs/built-in-pack.md +10 -4
- package/docs/composable-capability.md +8 -0
- package/docs/concepts.md +11 -1
- package/docs/managed-mode.md +10 -4
- package/docs/project-ai.md +10 -4
- package/docs/reference.md +112 -0
- package/docs/roadmap.md +18 -7
- package/docs/security-trust.md +89 -0
- package/docs/writeback-evolution.md +10 -2
- package/package.json +2 -1
- package/src/builtin-assets.ts +1 -1
- package/src/doctor.ts +307 -5
- package/src/index.ts +6 -0
- package/src/paths-command.ts +223 -0
|
@@ -42,7 +42,7 @@ Use project scope for capability that belongs to a repo, team workflow, architec
|
|
|
42
42
|
|
|
43
43
|
Promote project capability to global only when repeated evidence shows reuse across projects. Do not globalize a project quirk just because it worked once.
|
|
44
44
|
|
|
45
|
-
## Writeback
|
|
45
|
+
## Writeback and Evolution
|
|
46
46
|
|
|
47
47
|
Target the smallest affected unit.
|
|
48
48
|
|
|
@@ -98,7 +98,7 @@ Review surfaces:
|
|
|
98
98
|
|
|
99
99
|
Evolution proposal metadata, markdown drafts, patch artifacts, writeback queues,
|
|
100
100
|
and journals are runtime state. `fclt` stores JSON queues, proposal records,
|
|
101
|
-
draft refs, patches, and journals in machine-local
|
|
101
|
+
draft refs, patches, and journals in machine-local `fclt` state. It mirrors
|
|
102
102
|
human-readable review artifacts into global `~/.ai/writebacks/...` and
|
|
103
103
|
`~/.ai/evolution/...`, including project-scoped artifacts under
|
|
104
104
|
`projects/<slug-hash>/` with cwd/project metadata in frontmatter. Canonical
|
|
@@ -29,7 +29,7 @@ fclt ai writeback add --kind <kind> --summary "<summary>" --asset <asset-selecto
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
The writeback queue is runtime state, not canonical source. `fclt` stores JSON
|
|
32
|
-
queue state in machine-local
|
|
32
|
+
queue state in machine-local `fclt` state so sandboxed agents can record durable
|
|
33
33
|
friction without mutating canonical assets unless an evolution proposal is later
|
|
34
34
|
reviewed and applied.
|
|
35
35
|
|
package/bin/fclt.cjs
CHANGED
|
@@ -15,6 +15,9 @@ const REPO_NAME = "fclt";
|
|
|
15
15
|
const PACKAGE_NAME = "facult";
|
|
16
16
|
const DOWNLOAD_RETRIES = 12;
|
|
17
17
|
const DOWNLOAD_RETRY_DELAY_MS = 5000;
|
|
18
|
+
const ACTIVE_RUNTIME_WAIT_MS = 10_000;
|
|
19
|
+
const ACTIVE_RUNTIME_WAIT_INTERVAL_MS = 100;
|
|
20
|
+
const STALE_RUNTIME_TEMP_MS = 10 * 60 * 1000;
|
|
18
21
|
|
|
19
22
|
function isHelpLikeArgs(args) {
|
|
20
23
|
return (
|
|
@@ -80,70 +83,75 @@ async function main() {
|
|
|
80
83
|
let installedBinaryThisRun = false;
|
|
81
84
|
|
|
82
85
|
if (!(await fileExists(binaryPath))) {
|
|
83
|
-
|
|
84
|
-
const hasSourceFallback = await canUseSourceFallback(sourceEntry);
|
|
85
|
-
const incompleteCache = await hasIncompleteRuntimeCache({
|
|
86
|
+
await removeStaleRuntimeTemps({
|
|
86
87
|
installDir,
|
|
87
88
|
binaryName,
|
|
89
|
+
maxAgeMs: STALE_RUNTIME_TEMP_MS,
|
|
88
90
|
});
|
|
91
|
+
const packageManager = detectPackageManager();
|
|
92
|
+
const hasSourceFallback = await canUseSourceFallback(sourceEntry);
|
|
89
93
|
|
|
90
|
-
if (
|
|
91
|
-
await removeIncompleteRuntimeTemps({ installDir, binaryName });
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (hasSourceFallback && (incompleteCache || isHelpLikeArgs(args))) {
|
|
94
|
+
if (hasSourceFallback && isHelpLikeArgs(args)) {
|
|
95
95
|
return runSourceFallback({
|
|
96
96
|
sourceEntry,
|
|
97
97
|
version,
|
|
98
98
|
packageManager,
|
|
99
|
-
reason: new Error(
|
|
100
|
-
incompleteCache
|
|
101
|
-
? "incomplete cached runtime download"
|
|
102
|
-
: "runtime binary missing for help-like command"
|
|
103
|
-
),
|
|
99
|
+
reason: new Error("runtime binary missing for help-like command"),
|
|
104
100
|
});
|
|
105
101
|
}
|
|
106
102
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
try {
|
|
113
|
-
await fsp.mkdir(installDir, { recursive: true });
|
|
114
|
-
await downloadWithRetry(url, tmpPath, {
|
|
115
|
-
attempts: DOWNLOAD_RETRIES,
|
|
116
|
-
delayMs: DOWNLOAD_RETRY_DELAY_MS,
|
|
103
|
+
if (await hasIncompleteRuntimeCache({ installDir, binaryName })) {
|
|
104
|
+
await waitForFile(binaryPath, {
|
|
105
|
+
timeoutMs: ACTIVE_RUNTIME_WAIT_MS,
|
|
106
|
+
intervalMs: ACTIVE_RUNTIME_WAIT_INTERVAL_MS,
|
|
117
107
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (await fileExists(binaryPath)) {
|
|
111
|
+
// Another concurrent launcher finished the runtime install while this
|
|
112
|
+
// process was waiting.
|
|
113
|
+
} else {
|
|
114
|
+
const tag = `v${version}`;
|
|
115
|
+
const assetName = `${PACKAGE_NAME}-${version}-${resolved.platform}-${resolved.arch}${resolved.ext}`;
|
|
116
|
+
const url = `https://github.com/${REPO_OWNER}/${REPO_NAME}/releases/download/${tag}/${assetName}`;
|
|
117
|
+
const tmpPath = `${binaryPath}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
await fsp.mkdir(installDir, { recursive: true });
|
|
121
|
+
await downloadWithRetry(url, tmpPath, {
|
|
122
|
+
attempts: DOWNLOAD_RETRIES,
|
|
123
|
+
delayMs: DOWNLOAD_RETRY_DELAY_MS,
|
|
131
124
|
});
|
|
125
|
+
if (resolved.platform !== "windows") {
|
|
126
|
+
await fsp.chmod(tmpPath, 0o755);
|
|
127
|
+
}
|
|
128
|
+
await installDownloadedRuntime(tmpPath, binaryPath);
|
|
129
|
+
installedBinaryThisRun = true;
|
|
130
|
+
} catch (error) {
|
|
131
|
+
await safeUnlink(tmpPath);
|
|
132
|
+
if (await canUseSourceFallback(sourceEntry)) {
|
|
133
|
+
return runSourceFallback({
|
|
134
|
+
sourceEntry,
|
|
135
|
+
version,
|
|
136
|
+
packageManager: detectPackageManager(),
|
|
137
|
+
reason: error,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
const message =
|
|
141
|
+
error instanceof Error ? error.message : String(error ?? "");
|
|
142
|
+
console.error(
|
|
143
|
+
[
|
|
144
|
+
"Unable to download the fclt binary for this platform.",
|
|
145
|
+
`Expected asset: ${assetName}`,
|
|
146
|
+
`URL: ${url}`,
|
|
147
|
+
`Reason: ${message}`,
|
|
148
|
+
"",
|
|
149
|
+
"Try installing directly from releases:",
|
|
150
|
+
"https://github.com/hack-dance/fclt/releases",
|
|
151
|
+
].join("\n")
|
|
152
|
+
);
|
|
153
|
+
process.exit(1);
|
|
132
154
|
}
|
|
133
|
-
const message =
|
|
134
|
-
error instanceof Error ? error.message : String(error ?? "");
|
|
135
|
-
console.error(
|
|
136
|
-
[
|
|
137
|
-
"Unable to download the fclt binary for this platform.",
|
|
138
|
-
`Expected asset: ${assetName}`,
|
|
139
|
-
`URL: ${url}`,
|
|
140
|
-
`Reason: ${message}`,
|
|
141
|
-
"",
|
|
142
|
-
"Try installing directly from releases:",
|
|
143
|
-
"https://github.com/hack-dance/fclt/releases",
|
|
144
|
-
].join("\n")
|
|
145
|
-
);
|
|
146
|
-
process.exit(1);
|
|
147
155
|
}
|
|
148
156
|
}
|
|
149
157
|
|
|
@@ -367,19 +375,58 @@ async function hasIncompleteRuntimeCache({ installDir, binaryName }) {
|
|
|
367
375
|
}
|
|
368
376
|
}
|
|
369
377
|
|
|
370
|
-
async function
|
|
378
|
+
async function removeStaleRuntimeTemps({ installDir, binaryName, maxAgeMs }) {
|
|
371
379
|
try {
|
|
372
380
|
const entries = await fsp.readdir(installDir);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
381
|
+
const now = Date.now();
|
|
382
|
+
const stalePaths = [];
|
|
383
|
+
for (const entry of entries) {
|
|
384
|
+
if (!entry.startsWith(`${binaryName}.tmp-`)) {
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
const candidate = path.join(installDir, entry);
|
|
388
|
+
try {
|
|
389
|
+
const stats = await fsp.stat(candidate);
|
|
390
|
+
if (now - stats.mtimeMs > maxAgeMs) {
|
|
391
|
+
stalePaths.push(candidate);
|
|
392
|
+
}
|
|
393
|
+
} catch {
|
|
394
|
+
// Ignore temp files that disappeared while scanning.
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
await Promise.all(stalePaths.map((candidate) => safeUnlink(candidate)));
|
|
378
398
|
} catch {
|
|
379
399
|
// Ignore missing runtime dirs while cleaning stale temp files.
|
|
380
400
|
}
|
|
381
401
|
}
|
|
382
402
|
|
|
403
|
+
async function waitForFile(filePath, { timeoutMs, intervalMs }) {
|
|
404
|
+
const deadline = Date.now() + timeoutMs;
|
|
405
|
+
while (Date.now() < deadline) {
|
|
406
|
+
if (await fileExists(filePath)) {
|
|
407
|
+
return true;
|
|
408
|
+
}
|
|
409
|
+
await sleep(intervalMs);
|
|
410
|
+
}
|
|
411
|
+
return await fileExists(filePath);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
async function installDownloadedRuntime(tmpPath, binaryPath) {
|
|
415
|
+
if (await fileExists(binaryPath)) {
|
|
416
|
+
await safeUnlink(tmpPath);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
try {
|
|
420
|
+
await fsp.rename(tmpPath, binaryPath);
|
|
421
|
+
} catch (error) {
|
|
422
|
+
if (await fileExists(binaryPath)) {
|
|
423
|
+
await safeUnlink(tmpPath);
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
throw error;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
383
430
|
async function safeUnlink(filePath) {
|
|
384
431
|
try {
|
|
385
432
|
await fsp.unlink(filePath);
|
package/docs/README.md
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
# fclt Documentation
|
|
2
2
|
|
|
3
|
-
These docs explain
|
|
3
|
+
These docs explain how `fclt` stores, inspects, composes, renders, and improves AI capability.
|
|
4
4
|
|
|
5
|
-
Start
|
|
5
|
+
Start with the root [README](../README.md) for installation and first workflows. Use these guides when you need the model, safety rules, or command details.
|
|
6
|
+
|
|
7
|
+
The concepts guide includes the [feedback-loop diagram](./assets/fclt-capability-loop.png) that explains why `fclt` exists: setup once, let agents preserve friction, then review the changes that should improve future work.
|
|
8
|
+
|
|
9
|
+
## Guides
|
|
6
10
|
|
|
7
11
|
- [Concepts](./concepts.md): canonical roots, generated state, rendered outputs, scopes, and asset types.
|
|
8
12
|
- [Composable Capability](./composable-capability.md): refs, snippets, instruction templates, and evolvable units.
|
|
9
|
-
- [Managed Mode](./managed-mode.md): when to let `fclt` write tool files, and how adoption works.
|
|
10
13
|
- [Project `.ai`](./project-ai.md): how repo-local capability works without leaking project review state into the repo.
|
|
11
|
-
- [Built-
|
|
12
|
-
- [Writeback
|
|
13
|
-
- [
|
|
14
|
+
- [Built-in pack](./built-in-pack.md): the packaged operating-model layer for writeback and evolution.
|
|
15
|
+
- [Writeback and evolution](./writeback-evolution.md): how real-work friction becomes reviewable capability changes.
|
|
16
|
+
- [Managed mode](./managed-mode.md): when to let `fclt` write tool files, and how adoption works.
|
|
17
|
+
- [Security and trust](./security-trust.md): source trust, audit, secrets, and commit hygiene.
|
|
18
|
+
- [Automations](./automations.md): recurring Codex loops for learning review, evolution review, and tool-call audit.
|
|
19
|
+
- [Command reference](./reference.md): command groups and common flags.
|
|
20
|
+
- [Roadmap](./roadmap.md): current product gaps and planned work.
|
|
14
21
|
|
|
15
|
-
##
|
|
22
|
+
## Reading Order
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
New users should read:
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
- [Concepts](./concepts.md)
|
|
27
|
+
- [Project `.ai`](./project-ai.md) if working in a repo
|
|
28
|
+
- [Managed mode](./managed-mode.md) only before allowing `fclt` to write tool files
|
|
29
|
+
- [Writeback and evolution](./writeback-evolution.md) before setting up feedback loops
|
|
Binary file
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Automations
|
|
2
|
+
|
|
3
|
+
`fclt` can scaffold Codex automations that run the feedback loop on a schedule.
|
|
4
|
+
|
|
5
|
+
Use automations for review and synthesis, not for bypassing review. They should preserve useful signal, group repeated patterns, and draft proposals only when the target is concrete.
|
|
6
|
+
|
|
7
|
+
## Templates
|
|
8
|
+
|
|
9
|
+
Learning review:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
fclt templates init automation learning-review \
|
|
13
|
+
--scope project \
|
|
14
|
+
--project-root /path/to/repo \
|
|
15
|
+
--status PAUSED
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Evolution review:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
fclt templates init automation evolution-review \
|
|
22
|
+
--scope wide \
|
|
23
|
+
--cwds /path/to/repo-a,/path/to/repo-b \
|
|
24
|
+
--status PAUSED
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Tool-call audit:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
fclt templates init automation tool-call-audit \
|
|
31
|
+
--scope project \
|
|
32
|
+
--project-root /path/to/repo \
|
|
33
|
+
--status PAUSED
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Scopes
|
|
37
|
+
|
|
38
|
+
- `project`: one repo. Use this for repo-specific writeback, verification, and tool friction.
|
|
39
|
+
- `wide`: a small related set of repos. Use this for shared capability review.
|
|
40
|
+
- `global`: global capability and shared agent behavior.
|
|
41
|
+
|
|
42
|
+
Keep wide scopes intentionally small. A good automation should preserve source boundaries instead of mixing unrelated repos into one vague proposal.
|
|
43
|
+
|
|
44
|
+
## Output
|
|
45
|
+
|
|
46
|
+
Automation files are written to:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
~/.codex/automations/<name>/automation.toml
|
|
50
|
+
~/.codex/automations/<name>/memory.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
When Codex is managed by `fclt`, canonical automation sources can live under:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
~/.ai/automations/<name>/
|
|
57
|
+
<repo>/.ai/automations/<name>/
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Project-scoped automation sources are default-deny for managed sync. Add their names to `[project_sync.codex].automations` before project managed sync can render them into the shared live Codex automation store.
|
|
61
|
+
|
|
62
|
+
## Suggested Cadence
|
|
63
|
+
|
|
64
|
+
- daily or per-project `learning-review` for durable signal
|
|
65
|
+
- weekly `evolution-review` for proposal triage
|
|
66
|
+
- targeted `tool-call-audit` when tool failures, missing skills, or shallow-success patterns repeat
|
|
67
|
+
|
|
68
|
+
High-risk global changes should still move through proposal review before apply.
|
package/docs/built-in-pack.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Built-
|
|
1
|
+
# Built-in Pack
|
|
2
2
|
|
|
3
3
|
`fclt` ships an operating-model pack:
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
assets/packs/facult-operating-model/
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
It provides
|
|
9
|
+
It provides default guidance for agents that use `fclt`: define the work, verify it, record durable feedback, and turn repeated signal into reviewed changes.
|
|
10
10
|
|
|
11
11
|
## Included Assets
|
|
12
12
|
|
|
@@ -80,7 +80,7 @@ sync_defaults = false
|
|
|
80
80
|
|
|
81
81
|
## Design Rule
|
|
82
82
|
|
|
83
|
-
The built-in pack should stay small. It
|
|
83
|
+
The built-in pack should stay small. It teaches:
|
|
84
84
|
|
|
85
85
|
- work-unit discipline
|
|
86
86
|
- composable refs, snippets, instructions, skills, agents, MCP, and automations
|
|
@@ -90,4 +90,10 @@ The built-in pack should stay small. It should teach:
|
|
|
90
90
|
- project/global scope decisions
|
|
91
91
|
- managed-mode ownership boundaries
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
Keep project-specific behavior in project `.ai`. Promote it only when repeated evidence shows it is reusable outside that project.
|
|
94
|
+
|
|
95
|
+
## Next
|
|
96
|
+
|
|
97
|
+
- Read [Composable Capability](./composable-capability.md) for refs, snippets, and instruction templates.
|
|
98
|
+
- Read [Writeback and evolution](./writeback-evolution.md) for the feedback loop.
|
|
99
|
+
- Read [Managed mode](./managed-mode.md) before rendering the pack into a tool home.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
`fclt` treats AI behavior as small capability units that can be composed into larger agent instructions and evolved independently.
|
|
4
4
|
|
|
5
|
+
This prevents one giant agent file from becoming the only place to put every preference, workflow, and exception. A language preference can live in one instruction. A repeated rendered block can live in one snippet. A workflow can live in one skill. Each unit can receive targeted writeback and targeted evolution.
|
|
6
|
+
|
|
5
7
|
This is the core model:
|
|
6
8
|
|
|
7
9
|
- write domain guidance once
|
|
@@ -168,3 +170,9 @@ fclt ai evolve list
|
|
|
168
170
|
```
|
|
169
171
|
|
|
170
172
|
Open `~/.ai/writebacks/` and `~/.ai/evolution/` in a markdown editor to inspect review artifacts with frontmatter status, scope, targets, project metadata, evidence, and proposal state.
|
|
173
|
+
|
|
174
|
+
## Next
|
|
175
|
+
|
|
176
|
+
- Read [Writeback and evolution](./writeback-evolution.md) for proposal flow.
|
|
177
|
+
- Read [Built-in Pack](./built-in-pack.md) for packaged defaults.
|
|
178
|
+
- Use [Command reference](./reference.md) for template and graph commands.
|
package/docs/concepts.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
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
6
|
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
The intended operating model is agent-led after setup. Users install and approve broad changes; agents inspect capability, run work units, record durable friction, and use repeated signal to propose small improvements.
|
|
10
|
+
|
|
7
11
|
## Roots And Scopes
|
|
8
12
|
|
|
9
13
|
Global root:
|
|
@@ -66,7 +70,7 @@ Examples:
|
|
|
66
70
|
~/.ai/.facult/ai/graph.json
|
|
67
71
|
```
|
|
68
72
|
|
|
69
|
-
Project generated state lives in machine-local
|
|
73
|
+
Project generated state lives in machine-local `fclt` state, not in the repo.
|
|
70
74
|
|
|
71
75
|
Machine runtime state records local behavior and history.
|
|
72
76
|
|
|
@@ -123,3 +127,9 @@ The durable loop is:
|
|
|
123
127
|
4. Draft the smallest valid proposal.
|
|
124
128
|
5. Review and apply accepted changes to canonical source.
|
|
125
129
|
6. Re-index and sync only the surfaces that should receive the change.
|
|
130
|
+
|
|
131
|
+
## Next
|
|
132
|
+
|
|
133
|
+
- Read [Project `.ai`](./project-ai.md) before adding repo-local capability.
|
|
134
|
+
- Read [Managed mode](./managed-mode.md) before allowing `fclt` to write tool files.
|
|
135
|
+
- Read [Composable Capability](./composable-capability.md) to split guidance into instructions, snippets, skills, agents, MCP, and automations.
|
package/docs/managed-mode.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Managed
|
|
1
|
+
# Managed mode
|
|
2
2
|
|
|
3
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
4
|
|
|
@@ -37,9 +37,9 @@ When live content differs from canonical content:
|
|
|
37
37
|
- rendered docs/config with local edits are skipped unless an explicit conflict option allows overwrite
|
|
38
38
|
- built-in rendered defaults require `--builtin-conflicts overwrite` before replacing local edits
|
|
39
39
|
|
|
40
|
-
This is deliberate. Managed mode should be
|
|
40
|
+
This is deliberate. Managed mode should be predictable and reversible.
|
|
41
41
|
|
|
42
|
-
## Project
|
|
42
|
+
## Project managed mode
|
|
43
43
|
|
|
44
44
|
Project sync is default-deny. A project `.ai` root can exist without rendering anything into repo-local tool outputs.
|
|
45
45
|
|
|
@@ -60,7 +60,7 @@ tool_config = true
|
|
|
60
60
|
|
|
61
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
62
|
|
|
63
|
-
## When
|
|
63
|
+
## When not to use managed mode
|
|
64
64
|
|
|
65
65
|
Do not use managed mode when:
|
|
66
66
|
|
|
@@ -71,3 +71,9 @@ Do not use managed mode when:
|
|
|
71
71
|
- you are debugging and need read-only evidence first
|
|
72
72
|
|
|
73
73
|
Use `fclt inventory`, `scan`, `list`, `show`, `graph`, `status`, and `audit` instead.
|
|
74
|
+
|
|
75
|
+
## Next
|
|
76
|
+
|
|
77
|
+
- Read [Project `.ai`](./project-ai.md) for repo-local sync policy.
|
|
78
|
+
- Read [Security and trust](./security-trust.md) for MCP secrets and audit.
|
|
79
|
+
- Use [Command reference](./reference.md) for common managed-mode commands.
|
package/docs/project-ai.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Project `.ai`
|
|
2
2
|
|
|
3
|
-
A project `.ai` root stores repo-owned capability. It is
|
|
3
|
+
A project `.ai` root stores repo-owned capability. It is for source that should travel with the codebase, not for generated state, review queues, or private local context.
|
|
4
4
|
|
|
5
5
|
Create one with:
|
|
6
6
|
|
|
@@ -44,11 +44,11 @@ Do not put these in project `.ai`:
|
|
|
44
44
|
- secrets
|
|
45
45
|
- private review artifacts
|
|
46
46
|
|
|
47
|
-
Project-scoped writebacks and evolution proposals are stored in machine-local
|
|
47
|
+
Project-scoped writebacks and evolution proposals are stored in machine-local `fclt` state and mirrored for review under global `~/.ai/writebacks/projects/<slug-hash>/` and `~/.ai/evolution/projects/<slug-hash>/`.
|
|
48
48
|
|
|
49
|
-
## Generated-Only Roots
|
|
49
|
+
## Migration From Generated-Only Roots
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Some repos may contain `<repo>/.ai/.facult/ai/index.json` and `graph.json` without any canonical source. That makes the repo look like it has project AI state even though there is nothing durable to render.
|
|
52
52
|
|
|
53
53
|
Current behavior:
|
|
54
54
|
|
|
@@ -79,6 +79,12 @@ tool_config = true
|
|
|
79
79
|
|
|
80
80
|
This includes inherited global assets. If a global skill should appear in project-managed Codex output, list it explicitly.
|
|
81
81
|
|
|
82
|
+
## Next
|
|
83
|
+
|
|
84
|
+
- Read [Concepts](./concepts.md) for source, generated state, machine-local state, and rendered outputs.
|
|
85
|
+
- Read [Managed mode](./managed-mode.md) before syncing project assets into tool outputs.
|
|
86
|
+
- Read [Security and trust](./security-trust.md) before committing MCP config.
|
|
87
|
+
|
|
82
88
|
## Verification
|
|
83
89
|
|
|
84
90
|
Use these commands after changing project `.ai`:
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Command reference
|
|
2
|
+
|
|
3
|
+
This page groups the main `fclt` commands by job. Use `fclt --help` and `fclt <command> --help` for exact flags.
|
|
4
|
+
|
|
5
|
+
## Discovery
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
fclt status [--json]
|
|
9
|
+
fclt doctor [--json] [--repair]
|
|
10
|
+
fclt paths [--json]
|
|
11
|
+
fclt scan [--from <path>] [--json] [--show-duplicates]
|
|
12
|
+
fclt inventory [--json] [--tool <name>] [--show-secrets]
|
|
13
|
+
fclt list [skills|mcp|agents|snippets|instructions|automations]
|
|
14
|
+
fclt show <selector>
|
|
15
|
+
fclt find <query>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use these first. They let you inspect tool state without claiming ownership of any files.
|
|
19
|
+
`doctor --json` is read-only and reports setup health, issues, and recommended
|
|
20
|
+
actions. `paths --json` reports canonical, generated, runtime, and review paths
|
|
21
|
+
for agents and integrations.
|
|
22
|
+
|
|
23
|
+
## Graph
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
fclt graph show <selector>
|
|
27
|
+
fclt graph deps <selector>
|
|
28
|
+
fclt graph dependents <selector>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The graph explains how instructions, snippets, config refs, and rendered targets relate.
|
|
32
|
+
|
|
33
|
+
## Canonical Store
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
fclt templates list
|
|
37
|
+
fclt templates init operating-model [--global|--project|--root PATH]
|
|
38
|
+
fclt templates init project-ai
|
|
39
|
+
fclt templates init instruction <name>
|
|
40
|
+
fclt templates init snippet <marker>
|
|
41
|
+
fclt templates init skill <name>
|
|
42
|
+
fclt templates init agent <name>
|
|
43
|
+
fclt templates init mcp <name>
|
|
44
|
+
fclt templates init automation <template-id> --scope global|project|wide
|
|
45
|
+
fclt consolidate --auto keep-current --from <path>
|
|
46
|
+
fclt index [--force]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Use these to create or normalize canonical capability in `~/.ai` or `<repo>/.ai`.
|
|
50
|
+
|
|
51
|
+
## Managed mode
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
fclt manage <tool> [--dry-run] [--adopt-existing]
|
|
55
|
+
fclt sync [tool] [--dry-run] [--adopt-live]
|
|
56
|
+
fclt enable <selector> --for codex,claude
|
|
57
|
+
fclt disable <selector> --for codex,claude
|
|
58
|
+
fclt managed
|
|
59
|
+
fclt unmanage <tool>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Managed mode writes rendered output into tool homes. Read [Managed mode](./managed-mode.md) before using it on an existing setup.
|
|
63
|
+
|
|
64
|
+
## Writeback and evolution
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
fclt ai writeback add --kind <kind> --summary <text> --asset <selector>
|
|
68
|
+
fclt ai writeback list
|
|
69
|
+
fclt ai writeback show WB-00001
|
|
70
|
+
fclt ai writeback group --by asset
|
|
71
|
+
fclt ai writeback summarize --by kind
|
|
72
|
+
|
|
73
|
+
fclt ai evolve propose
|
|
74
|
+
fclt ai evolve list
|
|
75
|
+
fclt ai evolve show EV-00001
|
|
76
|
+
fclt ai evolve draft EV-00001
|
|
77
|
+
fclt ai evolve review EV-00001
|
|
78
|
+
fclt ai evolve accept EV-00001
|
|
79
|
+
fclt ai evolve reject EV-00001 --reason <text>
|
|
80
|
+
fclt ai evolve apply EV-00001
|
|
81
|
+
fclt ai evolve promote EV-00003 --to global --project
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use these to turn repeated work friction into reviewed capability changes.
|
|
85
|
+
|
|
86
|
+
## Sources, Audit, And Updates
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
fclt search <query>
|
|
90
|
+
fclt install <source:item> [--as <name>] [--strict-source-trust]
|
|
91
|
+
fclt update [--apply]
|
|
92
|
+
fclt verify-source <name> [--json]
|
|
93
|
+
fclt sources list
|
|
94
|
+
fclt sources trust <source> [--note <text>]
|
|
95
|
+
fclt sources review <source> [--note <text>]
|
|
96
|
+
fclt sources block <source> [--note <text>]
|
|
97
|
+
fclt sources clear <source>
|
|
98
|
+
fclt audit [--non-interactive]
|
|
99
|
+
fclt self-update
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use `--strict-source-trust` when installing or updating remote capability from catalogs.
|
|
103
|
+
|
|
104
|
+
## Root Selection
|
|
105
|
+
|
|
106
|
+
Most commands accept the same root controls:
|
|
107
|
+
|
|
108
|
+
- `--global`: use `~/.ai`
|
|
109
|
+
- `--project`: use the nearest repo-local `.ai`
|
|
110
|
+
- `--root /path/to/.ai`: use an explicit canonical root
|
|
111
|
+
- `--scope merged|global|project`: choose a discovery view
|
|
112
|
+
- `--source builtin|global|project`: filter provenance in list/find/show/graph flows
|