facult 2.13.5 → 2.14.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.
Files changed (35) hide show
  1. package/README.md +31 -10
  2. package/assets/packs/facult-operating-model/AGENTS.global.md +41 -41
  3. package/assets/packs/facult-operating-model/agents/evolution-planner/agent.toml +3 -0
  4. package/assets/packs/facult-operating-model/agents/integration-auditor/agent.toml +8 -1
  5. package/assets/packs/facult-operating-model/agents/scope-promoter/agent.toml +8 -1
  6. package/assets/packs/facult-operating-model/agents/writeback-curator/agent.toml +2 -0
  7. package/assets/packs/facult-operating-model/instructions/CAPABILITY_COMPOSITION.md +4 -4
  8. package/assets/packs/facult-operating-model/instructions/EVOLUTION.md +3 -3
  9. package/assets/packs/facult-operating-model/instructions/INTEGRATION.md +44 -0
  10. package/assets/packs/facult-operating-model/instructions/LEARNING_AND_WRITEBACK.md +1 -1
  11. package/assets/packs/facult-operating-model/instructions/PROJECT_CAPABILITY.md +35 -0
  12. package/assets/packs/facult-operating-model/instructions/WORK_UNITS.md +48 -0
  13. package/assets/packs/facult-operating-model/skills/capability-evolution/SKILL.md +25 -6
  14. package/assets/packs/facult-operating-model/skills/project-operating-layer-design/SKILL.md +33 -0
  15. package/assets/packs/facult-operating-model/snippets/global/baseline.md +3 -0
  16. package/assets/packs/facult-operating-model/snippets/global/core/feedback-loops.md +11 -0
  17. package/assets/packs/facult-operating-model/snippets/global/core/verification.md +6 -0
  18. package/assets/packs/facult-operating-model/snippets/global/core/work-units.md +7 -0
  19. package/assets/packs/facult-operating-model/snippets/global/core/writeback.md +9 -0
  20. package/docs/README.md +3 -0
  21. package/docs/assets/fclt-capability-loop.png +0 -0
  22. package/docs/built-in-pack.md +13 -0
  23. package/docs/composable-capability.md +21 -22
  24. package/docs/concepts.md +4 -1
  25. package/docs/pack-upgrades.md +67 -0
  26. package/docs/reference.md +10 -2
  27. package/docs/work-units.md +96 -0
  28. package/package.json +1 -1
  29. package/src/agents.ts +17 -0
  30. package/src/builtin-assets.ts +2 -1
  31. package/src/doctor.ts +238 -7
  32. package/src/global-docs.ts +10 -3
  33. package/src/remote.ts +149 -14
  34. package/src/snippets-cli.ts +2 -2
  35. package/src/snippets.ts +1 -1
package/README.md CHANGED
@@ -31,6 +31,8 @@ Use it when AI setup has become scattered across dotfiles, tool homes, repos, pr
31
31
 
32
32
  Most usage should be agent-led after setup. Humans install, inspect, audit, and approve broad changes. Agents use `fclt` to find the right capability, preserve friction as writeback, and turn repeated signal into reviewed improvements.
33
33
 
34
+ The basic operating unit is the work unit: a piece of agent work with a goal, context, constraints, evidence, an output artifact, verification, and a writeback target when the work teaches something reusable. That frame applies to normal coding, research, docs, setup, operations, and debugging work, not only to skill updates.
35
+
34
36
  ## What it does
35
37
 
36
38
  `fclt` helps you:
@@ -39,6 +41,7 @@ Most usage should be agent-led after setup. Humans install, inspect, audit, and
39
41
  - keep repo-specific capability in `<repo>/.ai`
40
42
  - inspect skills, instructions, MCP servers, agents, automations, and rendered outputs
41
43
  - compose guidance from smaller units with refs and snippets
44
+ - give agents a reusable work-unit frame for normal work
42
45
  - optionally render approved capability into Codex, Claude, Cursor, and similar tools
43
46
  - record writebacks when an agent finds missing context, weak verification, stale guidance, or tool friction
44
47
  - turn repeated writeback into reviewable evolution proposals
@@ -89,9 +92,11 @@ fclt doctor --repair
89
92
  ```
90
93
 
91
94
  `doctor --json` is read-only. `doctor --repair` is the self-heal path for legacy
92
- state, broken canonical global guidance, missing review artifacts, and stale
93
- local integration layout. Canonical repairs keep a backup under
94
- `.ai/.facult/backups/doctor/`.
95
+ state, broken rendered global guidance, missing review artifacts, and stale
96
+ local integration layout. It validates the rendered form of `AGENTS.global.md`
97
+ while preserving that file as a composable source template, and it repairs
98
+ leaked `${refs.*}` placeholders in direct-readable instruction files. Canonical
99
+ repairs keep a backup under `.ai/.facult/backups/doctor/`.
95
100
 
96
101
  Update an installed binary:
97
102
 
@@ -138,6 +143,13 @@ fclt templates init operating-model --global
138
143
  fclt index --global
139
144
  ```
140
145
 
146
+ Refresh an existing operating-model pack without overwriting local edits:
147
+
148
+ ```bash
149
+ fclt templates init operating-model --global --update --dry-run
150
+ fclt templates init operating-model --global --update
151
+ ```
152
+
141
153
  Create a repo-local `.ai` root:
142
154
 
143
155
  ```bash
@@ -149,8 +161,8 @@ fclt status --project
149
161
  Create individual capability units:
150
162
 
151
163
  ```bash
152
- fclt templates init instruction BUN
153
- fclt templates init snippet global/lang/bun
164
+ fclt templates init instruction LANGUAGE
165
+ fclt templates init snippet global/policy/review
154
166
  fclt templates init skill project-review
155
167
  fclt templates init agent review-operator
156
168
  ```
@@ -212,7 +224,7 @@ Canonical capability can include:
212
224
  Refs let markdown point at canonical assets without hard-coding paths:
213
225
 
214
226
  ```text
215
- @ai/instructions/BUN.md
227
+ @ai/instructions/LANGUAGE.md
216
228
  @project/instructions/TESTING.md
217
229
  @builtin/facult-operating-model/instructions/WORK_UNITS.md
218
230
  ```
@@ -220,12 +232,14 @@ Refs let markdown point at canonical assets without hard-coding paths:
220
232
  Snippet markers let repeated blocks stay independently editable:
221
233
 
222
234
  ```md
223
- <!-- fclty:global/lang/bun -->
224
- <!-- /fclty:global/lang/bun -->
235
+ <!-- fclty:global/policy/review -->
236
+ <!-- /fclty:global/policy/review -->
225
237
  ```
226
238
 
227
239
  The rule is simple: target the smallest unit that needs to change. Use instructions for doctrine, snippets for repeated blocks, skills for workflows, agents for roles, MCP/tool config for interfaces, and automations for scheduled loops.
228
240
 
241
+ Work units give those assets a practical operating frame. They keep intent, evidence, verification, output, and learning attached to a task so repeated friction can become writeback and evolution instead of disappearing into chat history.
242
+
229
243
  ## Writeback and evolution
230
244
 
231
245
  Writeback is preserved signal from real work. Evolution turns repeated signal into reviewed changes.
@@ -276,6 +290,7 @@ Install it without managing any tool:
276
290
  fclt templates init operating-model --global
277
291
  fclt templates init operating-model --project
278
292
  fclt templates init operating-model --root /path/to/.ai
293
+ fclt templates init operating-model --global --update
279
294
  ```
280
295
 
281
296
  The pack is also available as built-in refs under:
@@ -350,8 +365,8 @@ Canonical store:
350
365
 
351
366
  ```bash
352
367
  fclt templates list
353
- fclt templates init operating-model [--global|--project|--root PATH]
354
- fclt templates init project-ai
368
+ fclt templates init operating-model [--global|--project|--root PATH] [--update]
369
+ fclt templates init project-ai [--update]
355
370
  fclt templates init instruction <name>
356
371
  fclt templates init snippet <marker>
357
372
  fclt templates init skill <name>
@@ -398,9 +413,11 @@ Use `fclt --help` and `fclt <command> --help` for exact flags.
398
413
  Start with:
399
414
 
400
415
  - [Concepts](./docs/concepts.md): roots, scopes, state layers, and asset types
416
+ - [Work Units](./docs/work-units.md): general-purpose agent work framing
401
417
  - [Composable Capability](./docs/composable-capability.md): refs, snippets, instruction templates, and evolvable units
402
418
  - [Project `.ai`](./docs/project-ai.md): repo-owned capability and project sync policy
403
419
  - [Built-in pack](./docs/built-in-pack.md): packaged work-unit, writeback, and evolution defaults
420
+ - [Built-in pack upgrades](./docs/pack-upgrades.md): non-destructive refresh behavior for existing `.ai` roots
404
421
  - [Writeback and evolution](./docs/writeback-evolution.md): the feedback-loop workflow and review surfaces
405
422
  - [Managed mode](./docs/managed-mode.md): when to let `fclt` write tool files
406
423
  - [Roadmap](./docs/roadmap.md): current gaps and planned work
@@ -426,3 +443,7 @@ Commit canonical project assets that belong to the repo: instructions, snippets,
426
443
  ## Contributing
427
444
 
428
445
  Contributor and release workflow details live in [CONTRIBUTING.md](./CONTRIBUTING.md).
446
+
447
+ ## Background
448
+
449
+ The operating model behind `fclt` is related to the argument in [Governing the Machine](https://www.hack.dance/writing/governing-the-machine): as machine execution gets cheaper, the hard problem becomes governing work, evidence, memory, integration, and improvement.
@@ -1,41 +1,41 @@
1
- # Facult Operating Defaults
2
-
3
- This machine has a default Facult operating-model layer available.
4
-
5
- Default behavior:
6
-
7
- - Treat meaningful work as a work unit: know the goal, acceptance criteria, required context, constraints, evidence, output artifact, verification path, and likely writeback target.
8
- - Use the strongest practical feedback loop for the risk. Do not treat shallow success as proof when a better check is available.
9
- - 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.
10
- - Use `fclt ai evolve ...` or the `capability-evolution` skill only when repeated writebacks, a clearly missing capability, or a stale canonical asset point at a concrete improvement.
11
- - Keep one-off preferences and speculative ideas out of evolution. Use writeback, notes, or task tracking instead.
12
- - Use project scope for repo-specific workflow and global scope for reusable cross-project doctrine. Promote project capability only after evidence shows reuse.
13
- - Use Linear or another task system for executable product/tooling work that needs ownership, priority, state, or delivery follow-through.
14
- - Keep writeback/evolution runtime and review artifacts in the global `.ai` review tree; do not commit generated writeback queues or private review artifacts into project repos.
15
-
16
- For work-unit framing, read `@builtin/facult-operating-model/instructions/WORK_UNITS.md`.
17
- For composing refs, snippets, instructions, skills, agents, MCP, and automations as evolvable units, read `@builtin/facult-operating-model/instructions/CAPABILITY_COMPOSITION.md`.
18
- For writeback and evolution, read `@builtin/facult-operating-model/instructions/EVOLUTION.md`.
19
- For learning and writeback defaults, read `@builtin/facult-operating-model/instructions/LEARNING_AND_WRITEBACK.md`.
20
- For deciding whether capability belongs in global or project scope, read `@builtin/facult-operating-model/instructions/PROJECT_CAPABILITY.md`.
21
- For project operating-layer design, read `@builtin/facult-operating-model/instructions/INTEGRATION.md`.
22
-
23
- Builtin specialist agents are available for:
24
- - writeback curation
25
- - evolution planning
26
- - scope promotion
27
- - integration auditing
28
-
29
- Builtin skills are available for:
30
- - capability evolution
31
- - project operating-layer design
32
-
33
- Useful health and review commands:
34
-
35
- ```bash
36
- fclt doctor --json
37
- fclt status --json
38
- fclt ai writeback list
39
- fclt ai writeback group --by asset
40
- fclt ai evolve list
41
- ```
1
+ # Global Agent Instructions
2
+
3
+ This file is the global entry template for the operating-model pack. It should
4
+ stay small and composed from snippets. Put detailed doctrine in instructions,
5
+ workflow execution in skills, and local/private preferences in user-owned or
6
+ project-owned assets outside the public pack.
7
+
8
+ ## Working mode
9
+
10
+ <!-- fclty:global/baseline -->
11
+ <!-- /fclty:global/baseline -->
12
+
13
+ <!-- fclty:global/core/work-units -->
14
+ <!-- /fclty:global/core/work-units -->
15
+
16
+ <!-- fclty:global/core/feedback-loops -->
17
+ <!-- /fclty:global/core/feedback-loops -->
18
+
19
+ <!-- fclty:global/core/verification -->
20
+ <!-- /fclty:global/core/verification -->
21
+
22
+ <!-- fclty:global/core/writeback -->
23
+ <!-- /fclty:global/core/writeback -->
24
+
25
+ ## Shared instruction sources
26
+
27
+ - For work-unit definition and scope clarification, read ${refs.work_units}.
28
+ - For identifying, improving, and validating feedback loops, read ${refs.feedback_loops}.
29
+ - For verification and anti-false-positive checks, read ${refs.verification}.
30
+ - For checking integration boundaries, read ${refs.integration}.
31
+ - For learning, decisions, and writeback, read ${refs.learning_writeback}.
32
+ - For capability evolution, proposal kinds, and `facult ai` workflow, read ${refs.evolution}.
33
+ - For deciding whether something belongs in global or project scope, read ${refs.project_capability}.
34
+ - Add private language, coding, or writing refs in local config only when they belong to the user's own operating layer.
35
+
36
+ ## Layering
37
+
38
+ - Treat this file as the global baseline.
39
+ - Treat repo-level `AGENTS.md` files as more specific additions layered after this file.
40
+ - Repo-level files may add or refine project-specific behavior, but they should not weaken global defaults for rigor, verification, or writeback discipline.
41
+ - If a closer `AGENTS.override.md` exists, follow it as the most specific instructions file in that directory while still preserving the global baseline unless the closer file explicitly tightens it.
@@ -26,7 +26,10 @@ Return concise proposals ordered by expected leverage, including:
26
26
  - target asset
27
27
  - target scope
28
28
  - why this is the smallest durable change
29
+ - source writeback ids or evidence summary
30
+ - approval risk and verification path
29
31
 
30
32
  Do not escalate to evolution when a single writeback is enough.
31
33
  Do not use evolution as a substitute for executable task tracking when the main need is owner, priority, state, or implementation follow-through.
34
+ Do not globalize private, repo-specific, or speculative guidance.
32
35
  """
@@ -9,6 +9,13 @@ Prioritize:
9
9
  - rollout hazards
10
10
  - operational constraints
11
11
  - gaps between local verification and real system behavior
12
+ - packaged, installed, rendered, or synced paths that differ from source behavior
13
+ - parallel execution and state-location risks
14
+ - privacy boundaries between global, project, generated, and machine-local state
12
15
 
13
- Return concise findings ordered by impact.
16
+ Return concise findings ordered by impact. For each finding include:
17
+ - boundary at risk
18
+ - why the current evidence is or is not enough
19
+ - strongest next verification step
20
+ - whether the fix belongs in code, docs, a task, or capability evolution
14
21
  """
@@ -8,11 +8,18 @@ Prioritize:
8
8
  - project specificity
9
9
  - cross-project reuse potential
10
10
  - pollution risk from globalizing too early
11
+ - private or repo-specific details that must not move into global capability
12
+ - whether a smaller snippet, instruction, skill, or agent should be promoted instead of a broad doc
11
13
 
12
14
  When recommending promotion, make the standard path explicit:
13
15
  - keep the source capability in project scope until promotion is approved
14
16
  - create a reviewable global proposal
15
17
  - do not treat promotion as implicit apply
16
18
 
17
- Return concise decisions with rationale.
19
+ Return concise decisions with:
20
+ - recommended scope
21
+ - target asset or smallest unit
22
+ - evidence for reuse
23
+ - privacy/pollution risk
24
+ - promotion path or no-op rationale
18
25
  """
@@ -16,9 +16,11 @@ For each recommendation, prefer returning:
16
16
  - best target asset or destination
17
17
  - best scope (`project` or `global`)
18
18
  - the evidence that justifies recording it
19
+ - whether the signal is enough for writeback only, task tracking, or evolution
19
20
 
20
21
  Do not emit low-signal noise.
21
22
  If the learning is repo-specific, keep it project-scoped by default.
22
23
  When the signal is already strong and the target is clear, prefer recommending direct writeback capture rather than abstract advice.
23
24
  When the issue is executable tooling work, recommend task tracking for the fix and writeback only for the reusable operating-model learning.
25
+ When the issue contains private project details, preserve the general learning without copying private details into a global asset.
24
26
  """
@@ -29,8 +29,8 @@ The main units are:
29
29
 
30
30
  Examples:
31
31
 
32
- - `@ai/instructions/BUN.md` for shared Bun preferences.
33
- - `@ai/instructions/RUST.md` for shared Rust preferences.
32
+ - `@ai/instructions/LANGUAGE.md` for a user-owned language/tooling preference.
33
+ - `@ai/instructions/REVIEW.md` for a user-owned review standard.
34
34
  - `@project/instructions/TESTING.md` for repo-specific test policy.
35
35
  - `<!-- fclty:global/codex/baseline -->` for a shared rendered block.
36
36
 
@@ -56,7 +56,7 @@ Target the smallest affected unit.
56
56
  Good writeback targets are graph-backed selectors when possible:
57
57
 
58
58
  ```bash
59
- fclt ai writeback add --kind missing_context --summary "Bun guidance did not cover test runner selection." --asset instruction:BUN
59
+ fclt ai writeback add --kind missing_context --summary "Language guidance did not cover test runner selection." --asset instruction:LANGUAGE
60
60
  fclt ai writeback add --kind reusable_pattern --summary "Project test policy should become a shared verification snippet." --asset @project/instructions/TESTING.md
61
61
  fclt ai writeback add --kind bad_default --summary "The review automation escalated one-off preferences." --asset automation:evolution-review
62
62
  ```
@@ -65,7 +65,7 @@ Use `fclt ai evolve ...` only after repeated signal, a clearly missing capabilit
65
65
 
66
66
  ## Agent Defaults
67
67
 
68
- When an agent sees a repeated preference like "use Bun for JS projects" or "prefer Cargo nextest for Rust tests", it should not bury that in chat. It should identify whether the durable unit is:
68
+ When an agent sees a repeated language, framework, or test preference, it should not bury that in chat. It should identify whether the durable unit is:
69
69
 
70
70
  - a global instruction
71
71
  - a project instruction
@@ -64,9 +64,9 @@ Every good writeback should try to include:
64
64
 
65
65
  Good target examples:
66
66
 
67
- - `instruction:BUN` when shared Bun guidance is stale or missing
67
+ - `instruction:LANGUAGE` when shared language/tooling guidance is stale or missing
68
68
  - `@project/instructions/TESTING.md` when repo test policy needs project-scoped evolution
69
- - `snippet:global/lang/bun` when a repeated rendered block should be fixed or extracted
69
+ - `snippet:global/policy/review` when a repeated rendered block should be fixed or extracted
70
70
  - `skill:capability-evolution` when a workflow skill is missing steps or examples
71
71
  - `automation:evolution-review` when the scheduled review loop is noisy or incomplete
72
72
 
@@ -135,7 +135,7 @@ Use the smallest durable change that fits the evidence.
135
135
  Examples:
136
136
 
137
137
  - `update_asset`: fix a stale instruction, snippet, agent, or automation markdown asset.
138
- - `create_asset`: add a missing instruction such as `BUN.md` or `RUST.md`.
138
+ - `create_asset`: add a missing instruction such as `LANGUAGE.md` or `REVIEW.md`.
139
139
  - `extract_snippet`: move repeated guidance out of several docs into one snippet.
140
140
  - `add_skill`: create a workflow when instructions are not enough.
141
141
  - `promote_asset`: move a proven project instruction/snippet/skill toward global reuse.
@@ -6,3 +6,47 @@ tags: [facult, integration, verification]
6
6
  # Integration
7
7
 
8
8
  Distinguish local correctness from system correctness. Check hidden dependencies, rollout order, and operational constraints before calling work done.
9
+
10
+ ## When To Use
11
+
12
+ Use this when a local green signal may still fail at a boundary:
13
+
14
+ - code passes focused tests but has not been checked against the real workflow
15
+ - docs are correct in isolation but may send agents to a stale command or path
16
+ - a tool command works locally but may fail under packaged, sandboxed, or parallel execution
17
+ - a capability change renders into one agent tool but not another
18
+ - a project-local improvement may collide with global defaults or managed output
19
+ - a migration, release, or rollout has ordering constraints
20
+
21
+ ## Integration Questions
22
+
23
+ Ask the smallest set that matches the risk:
24
+
25
+ - What consumes this output?
26
+ - What state does this depend on?
27
+ - What happens if two agents or commands run this at the same time?
28
+ - Does the packaged/released path behave like the source checkout?
29
+ - Does the project-scoped path avoid leaking into global or public surfaces?
30
+ - Does the global path avoid overwriting tool-native or user-edited state?
31
+ - Is rollback or recovery clear if the integration fails?
32
+
33
+ ## Evidence
34
+
35
+ Prefer evidence that crosses the boundary that could fail:
36
+
37
+ - run the installed CLI, packaged binary, or generated artifact when source tests are not enough
38
+ - inspect rendered output when changing snippets, refs, or agent docs
39
+ - use temp roots and clean homes for setup, upgrade, and sync behavior
40
+ - verify review artifacts land in global `~/.ai/writebacks` or `~/.ai/evolution`, not repo-local private state
41
+ - check release, package, or plugin surfaces when the change affects users outside the repo
42
+
43
+ ## Output
44
+
45
+ Return concise findings ordered by risk:
46
+
47
+ - boundary checked
48
+ - evidence used
49
+ - remaining assumption
50
+ - fix or follow-up if local correctness does not prove system correctness
51
+
52
+ Record writeback when the same integration boundary repeatedly fails, the verification loop is too weak, or a missing skill/tool would make the boundary easier to check next time.
@@ -63,7 +63,7 @@ Target the smallest composable unit that explains the friction:
63
63
  - a cross-project behavior probably belongs in global capability
64
64
  - a skill, tool, MCP, plugin, automation, or instruction gap repeatedly slows work down
65
65
  - an agent has to restate the same workaround, verification rule, or review rule
66
- - a repeated preference should become an atomic instruction such as `BUN.md`, `RUST.md`, or a project-specific testing policy
66
+ - a repeated preference should become an atomic user-owned instruction or project-specific testing policy
67
67
 
68
68
  ## Do Not Record Writeback For
69
69
 
@@ -15,6 +15,28 @@ Default to `<repo>/.ai` when the capability is about:
15
15
  - repo-specific testing or verification
16
16
  - team conventions
17
17
  - project tools and workflows
18
+ - product, customer, deployment, or operational context tied to one repo
19
+ - examples that would leak private or irrelevant detail if copied globally
20
+
21
+ Project capability should travel with the repo when it is safe to commit. Generated state, machine-local runtime state, secrets, and review queues should not travel with it.
22
+
23
+ ## Global Scope
24
+
25
+ Use `~/.ai` when the capability should follow the user across projects:
26
+
27
+ - general verification standards
28
+ - reusable work-unit, feedback-loop, or writeback doctrine
29
+ - user-owned language/tool preferences that are safe to share across repos
30
+ - cross-project skills or agents
31
+ - MCP/tool integration patterns that are not tied to one repo
32
+
33
+ Global capability should be broadly useful and low-noise. A global rule that only helps one project is usually a project rule.
34
+
35
+ ## Review Artifacts
36
+
37
+ Project-scoped writebacks and evolution proposals use the project as evidence, but their Markdown review artifacts are mirrored under global `~/.ai/writebacks/projects/<slug-hash>/` and `~/.ai/evolution/projects/<slug-hash>/`.
38
+
39
+ Do not create repo-local `writebacks/` or `evolution/` review trees inside `<repo>/.ai`. Keep private review state out of the repo while preserving project metadata in the global review artifact frontmatter.
18
40
 
19
41
  ## Promote Carefully
20
42
 
@@ -23,6 +45,8 @@ Promote to `~/.ai` only when:
23
45
  - the same pattern succeeds in more than one repo
24
46
  - the capability is not coupled to local architecture
25
47
  - the global version will not create noise for unrelated projects
48
+ - private examples can be removed or generalized without losing the rule
49
+ - the target global unit is smaller than a broad rewrite
26
50
 
27
51
  Use:
28
52
 
@@ -31,3 +55,14 @@ fclt ai evolve promote EV-00001 --to global --project
31
55
  ```
32
56
 
33
57
  That creates a new global proposal for review. It does not auto-apply the promotion.
58
+
59
+ ## Decision Checklist
60
+
61
+ Choose project when the answer depends on "this repo". Choose global when the answer would still be correct after removing the repo name.
62
+
63
+ If unsure:
64
+
65
+ 1. keep the asset project-scoped
66
+ 2. record writeback with the reason it might generalize
67
+ 3. wait for another project or repeated evidence
68
+ 4. promote through a reviewable proposal, not by copying files by hand
@@ -9,6 +9,8 @@ A work unit is the smallest coherent unit of agent work that can be understood,
9
9
 
10
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
11
 
12
+ Use work units for ordinary work, not only for capability updates. Coding changes, research answers, documentation edits, operational triage, setup repair, design reviews, and capability evolution all benefit from the same shape when the task has real uncertainty or risk.
13
+
12
14
  ## Minimum Contract
13
15
 
14
16
  A well-formed work unit names:
@@ -24,6 +26,8 @@ A well-formed work unit names:
24
26
 
25
27
  If one of these is missing and the gap blocks correctness, surface the gap early and recover it before moving faster.
26
28
 
29
+ For low-risk one-step work, keep the contract implicit. For ambiguous, high-impact, cross-tool, stateful, or multi-step work, make the contract explicit before executing.
30
+
27
31
  ## Why It Exists
28
32
 
29
33
  Work-unit framing prevents shallow completion. It helps agents avoid:
@@ -34,6 +38,9 @@ Work-unit framing prevents shallow completion. It helps agents avoid:
34
38
  - creating duplicate tasks or proposals
35
39
  - turning one-off preferences into global rules
36
40
  - pushing project-specific details into global capability
41
+ - producing output faster than the system can review, integrate, or learn from it
42
+
43
+ The point is not paperwork. The point is to attach machine work to intent, context, evidence, and memory so that useful learning can change future work instead of disappearing into chat history.
37
44
 
38
45
  ## How To Use It
39
46
 
@@ -54,6 +61,47 @@ Writeback:
54
61
 
55
62
  Use the smallest framing that makes the task correct. Do not turn every request into paperwork.
56
63
 
64
+ ## Examples
65
+
66
+ Coding:
67
+
68
+ ```text
69
+ Goal: fix the failing login test
70
+ Acceptance: test passes and no auth regression is introduced
71
+ Context: failing test output, auth middleware, recent commits
72
+ Constraints: preserve public API
73
+ Evidence: focused test, relevant integration test
74
+ Artifact: code diff and concise summary
75
+ Verification: command output and changed behavior
76
+ Writeback: only if the failure exposes stale test or auth guidance
77
+ ```
78
+
79
+ Research:
80
+
81
+ ```text
82
+ Goal: answer a source-backed product question
83
+ Acceptance: answer cites current primary sources
84
+ Context: user question, relevant docs, dates
85
+ Constraints: distinguish verified facts from inference
86
+ Evidence: source links and quotes within fair-use limits
87
+ Artifact: answer or research note
88
+ Verification: source freshness and consistency check
89
+ Writeback: durable note if the finding will recur
90
+ ```
91
+
92
+ Capability evolution:
93
+
94
+ ```text
95
+ Goal: decide whether repeated writebacks justify a proposal
96
+ Acceptance: proposal exists only if evidence repeats or a capability is clearly missing
97
+ Context: grouped writebacks, target asset, current canonical guidance
98
+ Constraints: avoid global noise and private leakage
99
+ Evidence: writeback IDs and affected work units
100
+ Artifact: accepted proposal, rejected proposal, or no-op note
101
+ Verification: proposal kind, scope, target, and review artifact
102
+ Writeback: only for new meta-learning about the evolution process
103
+ ```
104
+
57
105
  ## Writeback
58
106
 
59
107
  When the work reveals durable friction, missing capability, stale guidance, or a repeatable workflow, prefer one strong writeback over many weak ones.
@@ -12,6 +12,8 @@ Do not wait for a human operator by default if the signal is already clear and t
12
12
 
13
13
  Use 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.
14
14
 
15
+ The goal is a governed feedback loop: work creates evidence, evidence produces writeback, repeated writeback becomes a small reviewed proposal, and accepted proposals change future agent behavior.
16
+
15
17
  ## Scope Decision
16
18
 
17
19
  Choose `project` when the behavior depends on repo-local architecture or workflow.
@@ -20,14 +22,17 @@ Choose `global` when the behavior is broadly reusable.
20
22
 
21
23
  If unsure, start at project scope and promote later with evidence.
22
24
 
25
+ Reject global scope when the proposal depends on private examples, one repo's architecture, a single user's temporary preference, or a workflow that has not repeated.
26
+
23
27
  ## Working Flow
24
28
 
25
- 1. record the strongest writeback
26
- 2. group or summarize repeated signal
27
- 3. choose the smallest valid proposal kind
28
- 4. draft the proposal
29
- 5. accept only after the target and scope are correct
30
- 6. apply only when the markdown target is the intended canonical asset
29
+ 1. Read current writebacks and existing proposals.
30
+ 2. Group or summarize repeated signal by asset, kind, and scope.
31
+ 3. Check the current target asset before proposing a change.
32
+ 4. Choose the smallest valid proposal kind.
33
+ 5. Draft the proposal with evidence and intended target.
34
+ 6. Accept only after the target and scope are correct.
35
+ 7. Apply only when the markdown target is the intended canonical asset.
31
36
 
32
37
  Use:
33
38
 
@@ -52,6 +57,8 @@ fclt templates init automation tool-call-audit
52
57
 
53
58
  If there is not yet enough repeated signal for evolution, record the writeback and stop there.
54
59
 
60
+ Do not create a proposal only to preserve an idea. Preserve the idea as writeback, notes, or task tracking unless it has enough evidence to change capability.
61
+
55
62
  ## Proposal Kind Selection
56
63
 
57
64
  - `update_asset` for tightening existing guidance
@@ -62,9 +69,21 @@ If there is not yet enough repeated signal for evolution, record the writeback a
62
69
 
63
70
  Use 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.
64
71
 
72
+ ## Review Criteria
73
+
74
+ Before accept/apply, verify:
75
+
76
+ - evidence is repeated or the missing capability is obvious
77
+ - the proposal targets the smallest affected unit
78
+ - project/global scope is correct
79
+ - private or project-specific examples are not leaking into global assets
80
+ - the patch changes canonical markdown assets, not generated runtime state
81
+ - the resulting behavior can be verified by reading, rendering, indexing, or running the relevant command
82
+
65
83
  ## Output Contract
66
84
  - repeated signal
67
85
  - proposed asset change
68
86
  - target scope
69
87
  - evidence
70
88
  - smallest useful next step
89
+ - approval or no-op rationale
@@ -8,8 +8,41 @@ tags: [facult, project, design]
8
8
  ## When To Use
9
9
  Use this skill when a project needs its own `.ai/` structure, repo-specific instructions, or local bootstrap guidance.
10
10
 
11
+ Use it when:
12
+
13
+ - a repo has recurring agent friction that should not become global doctrine
14
+ - setup or verification steps are repeatedly rediscovered
15
+ - project skills, agents, MCP definitions, or snippets need a stable source of truth
16
+ - a repo needs policy for what may be rendered into tool homes
17
+ - a project should contribute writeback/evolution evidence without committing private review artifacts
18
+
19
+ Do not use it to copy a user's private global preferences into a public repo.
20
+
21
+ ## Design Rules
22
+
23
+ - Start from the repo's real workflows, commands, and risk boundaries.
24
+ - Keep project-specific guidance in `<repo>/.ai`.
25
+ - Keep generated state, queues, review artifacts, and local machine config out of the repo.
26
+ - Prefer a few high-leverage instructions or skills over a large generic dump.
27
+ - Use snippets only for blocks that are reused or independently evolvable.
28
+ - Make verification and integration paths explicit enough for future agents to run.
29
+ - Add sync policy only for assets that should render into repo-local tool outputs.
30
+
31
+ ## Working Flow
32
+
33
+ 1. Inventory existing repo guidance and tool files.
34
+ 2. Identify repeated friction from recent work, issues, reviews, or writebacks.
35
+ 3. Separate project-specific behavior from global/user-owned behavior.
36
+ 4. Propose a minimal `.ai` layout.
37
+ 5. Add or update the smallest useful assets.
38
+ 6. Verify the graph/index and any rendered output.
39
+ 7. Record writeback for reusable learnings that should evolve later.
40
+
11
41
  ## Output Contract
12
42
  - recommended `.ai/` layout
13
43
  - what stays project-local
14
44
  - what stays global
15
45
  - what should remain generated runtime output only
46
+ - sync/rendering policy
47
+ - verification path
48
+ - privacy or commit-safety risks
@@ -0,0 +1,3 @@
1
+ - Preserve existing user changes unless asked to rewrite them.
2
+ - Prefer small, reviewable diffs and verify meaningful changes before claiming success.
3
+ - State constraints, risks, and follow-up steps directly.
@@ -0,0 +1,11 @@
1
+ - For any task, identify the highest-signal feedback loops available.
2
+ - Prefer loops that can verify progress, falsify weak assumptions, and expose failure early.
3
+ - Do not rely on a single shallow positive signal if stronger verification exists.
4
+ - If the available loop is stale, weak, noisy, or easy to game, improve it or say what is missing.
5
+ - When useful, leave behind a stronger loop than the one you started with.
6
+ - Treat verification, evaluation, and writeback as part of the work, not cleanup after it.
7
+ - For work-unit clarification, read ${refs.work_units}.
8
+ - For verification guidance, read ${refs.verification}.
9
+ - For integration risk, read ${refs.integration}.
10
+ - For learning and writeback, read ${refs.learning_writeback}.
11
+ - For deeper guidance, read ${refs.feedback_loops}.
@@ -0,0 +1,6 @@
1
+ - Treat verification as part of the work, not a final checkbox.
2
+ - Prefer the strongest available proof that matches the real risk.
3
+ - Make clear what has actually been verified and what remains assumed.
4
+ - Distrust shallow green signals when stronger checks are available.
5
+ - If the current harness is stale, weak, or misleading, say so and improve it where possible.
6
+ - For deeper guidance, read ${refs.verification}.
@@ -0,0 +1,7 @@
1
+ - Treat every task as a work unit, not just a request.
2
+ - A work unit should have a goal, acceptance criteria, required context, constraints, signals or evidence, an output artifact, a verification path, and a writeback target when the work teaches something reusable.
3
+ - If any of those are missing and the gap blocks correctness, surface it early and try to recover it.
4
+ - Prefer making the work unit more explicit before increasing execution speed.
5
+ - If the task is vague, ambiguous, or overloaded, narrow it before acting.
6
+ - Treat work-unit framing as generally applicable to coding, research, writing, operations, setup, debugging, and capability evolution.
7
+ - For deeper guidance, read ${refs.work_units}.