akm-cli 0.9.0-beta.4 → 0.9.0-beta.41

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 (132) hide show
  1. package/CHANGELOG.md +646 -0
  2. package/dist/assets/prompts/consolidate-system.md +23 -0
  3. package/dist/assets/prompts/contradiction-judge.md +33 -0
  4. package/dist/assets/prompts/distill-knowledge-system.md +22 -0
  5. package/dist/assets/prompts/distill-lesson-system.md +36 -0
  6. package/dist/assets/prompts/extract-session.md +6 -2
  7. package/dist/assets/prompts/graph-extract-system.md +1 -0
  8. package/dist/assets/prompts/memory-infer-system.md +1 -0
  9. package/dist/assets/prompts/memory-infer-user.md +5 -0
  10. package/dist/assets/prompts/metadata-enhance-system.md +1 -0
  11. package/dist/assets/prompts/procedural-system.md +44 -0
  12. package/dist/assets/prompts/recombine-system.md +40 -0
  13. package/dist/assets/prompts/staleness-detect-system.md +6 -0
  14. package/dist/assets/prompts/validate-summary-judge.md +1 -0
  15. package/dist/assets/stash-skeleton/facts/conventions/assets/agent.md +22 -0
  16. package/dist/assets/stash-skeleton/facts/conventions/assets/command.md +22 -0
  17. package/dist/assets/stash-skeleton/facts/conventions/assets/fact.md +24 -0
  18. package/dist/assets/stash-skeleton/facts/conventions/assets/knowledge.md +22 -0
  19. package/dist/assets/stash-skeleton/facts/conventions/assets/lesson.md +25 -0
  20. package/dist/assets/stash-skeleton/facts/conventions/assets/memory.md +21 -0
  21. package/dist/assets/stash-skeleton/facts/conventions/assets/script.md +21 -0
  22. package/dist/assets/stash-skeleton/facts/conventions/assets/skill.md +23 -0
  23. package/dist/assets/stash-skeleton/facts/conventions/assets/workflow.md +22 -0
  24. package/dist/assets/templates/html/health.html +281 -111
  25. package/dist/cli.js +14 -3
  26. package/dist/commands/agent/contribute-cli.js +16 -3
  27. package/dist/commands/feedback-cli.js +15 -6
  28. package/dist/commands/graph/graph.js +75 -71
  29. package/dist/commands/health/checks.js +48 -0
  30. package/dist/commands/health/html-report.js +422 -80
  31. package/dist/commands/health.js +381 -9
  32. package/dist/commands/improve/calibration.js +161 -0
  33. package/dist/commands/improve/consolidate.js +631 -111
  34. package/dist/commands/improve/dedup.js +482 -0
  35. package/dist/commands/improve/distill.js +163 -69
  36. package/dist/commands/improve/encoding-salience.js +205 -0
  37. package/dist/commands/improve/extract-cli.js +115 -1
  38. package/dist/commands/improve/extract-prompt.js +39 -2
  39. package/dist/commands/improve/extract-watch.js +140 -0
  40. package/dist/commands/improve/extract.js +403 -40
  41. package/dist/commands/improve/feedback-valence.js +54 -0
  42. package/dist/commands/improve/homeostatic.js +467 -0
  43. package/dist/commands/improve/improve-auto-accept.js +113 -6
  44. package/dist/commands/improve/improve-profiles.js +12 -0
  45. package/dist/commands/improve/improve.js +2042 -612
  46. package/dist/commands/improve/memory/memory-contradiction-detect.js +23 -28
  47. package/dist/commands/improve/outcome-loop.js +256 -0
  48. package/dist/commands/improve/proactive-maintenance.js +115 -0
  49. package/dist/commands/improve/procedural.js +418 -0
  50. package/dist/commands/improve/recombine.js +602 -0
  51. package/dist/commands/improve/reflect-noise.js +0 -0
  52. package/dist/commands/improve/reflect.js +46 -4
  53. package/dist/commands/improve/related-sessions.js +120 -0
  54. package/dist/commands/improve/salience.js +438 -0
  55. package/dist/commands/improve/triage.js +93 -0
  56. package/dist/commands/lint/agent-linter.js +19 -24
  57. package/dist/commands/lint/base-linter.js +173 -60
  58. package/dist/commands/lint/command-linter.js +19 -24
  59. package/dist/commands/lint/env-key-rules.js +34 -1
  60. package/dist/commands/lint/fact-linter.js +39 -0
  61. package/dist/commands/lint/index.js +31 -13
  62. package/dist/commands/lint/memory-linter.js +1 -1
  63. package/dist/commands/lint/registry.js +7 -2
  64. package/dist/commands/lint/task-linter.js +3 -3
  65. package/dist/commands/lint/workflow-linter.js +26 -1
  66. package/dist/commands/proposal/drain-policies.js +5 -0
  67. package/dist/commands/proposal/drain.js +17 -1
  68. package/dist/commands/proposal/proposal.js +5 -0
  69. package/dist/commands/proposal/propose.js +5 -0
  70. package/dist/commands/proposal/validators/proposal-quality-validators.js +9 -8
  71. package/dist/commands/proposal/validators/proposals.js +187 -57
  72. package/dist/commands/read/curate.js +344 -80
  73. package/dist/commands/read/search-cli.js +7 -0
  74. package/dist/commands/read/search.js +1 -0
  75. package/dist/commands/read/show.js +67 -2
  76. package/dist/commands/sources/init.js +36 -9
  77. package/dist/commands/sources/installed-stashes.js +5 -1
  78. package/dist/commands/sources/schema-repair.js +13 -1
  79. package/dist/commands/sources/stash-cli.js +19 -3
  80. package/dist/commands/sources/stash-skeleton.js +23 -8
  81. package/dist/core/asset/asset-registry.js +2 -0
  82. package/dist/core/asset/asset-spec.js +14 -0
  83. package/dist/core/asset/frontmatter.js +166 -167
  84. package/dist/core/asset/markdown.js +8 -0
  85. package/dist/core/authoring-rules.js +83 -0
  86. package/dist/core/config/config-schema.js +274 -2
  87. package/dist/core/config/config.js +2 -2
  88. package/dist/core/logs-db.js +4 -3
  89. package/dist/core/paths.js +3 -0
  90. package/dist/core/standards/resolve-standards-context.js +87 -0
  91. package/dist/core/standards/resolve-stash-standards.js +99 -0
  92. package/dist/core/standards/resolve-type-conventions.js +66 -0
  93. package/dist/core/state-db.js +691 -30
  94. package/dist/indexer/db/db.js +364 -38
  95. package/dist/indexer/db/graph-db.js +129 -86
  96. package/dist/indexer/ensure-index.js +152 -17
  97. package/dist/indexer/graph/graph-boost.js +51 -41
  98. package/dist/indexer/graph/graph-extraction.js +203 -3
  99. package/dist/indexer/index-writer-lock.js +99 -0
  100. package/dist/indexer/indexer.js +114 -111
  101. package/dist/indexer/passes/memory-inference.js +10 -3
  102. package/dist/indexer/passes/staleness-detect.js +2 -5
  103. package/dist/indexer/search/db-search.js +15 -4
  104. package/dist/indexer/search/ranking-contributors.js +22 -0
  105. package/dist/indexer/search/ranking.js +4 -0
  106. package/dist/indexer/walk/matchers.js +9 -0
  107. package/dist/integrations/agent/prompts.js +33 -0
  108. package/dist/integrations/harnesses/claude/session-log.js +11 -1
  109. package/dist/integrations/harnesses/opencode/session-log.js +173 -3
  110. package/dist/integrations/session-logs/index.js +16 -0
  111. package/dist/llm/client.js +23 -4
  112. package/dist/llm/embedder.js +27 -3
  113. package/dist/llm/embedders/local.js +66 -2
  114. package/dist/llm/feature-gate.js +8 -4
  115. package/dist/llm/graph-extract.js +2 -1
  116. package/dist/llm/memory-infer.js +4 -8
  117. package/dist/llm/metadata-enhance.js +9 -1
  118. package/dist/output/renderers.js +73 -1
  119. package/dist/output/shapes/curate.js +14 -2
  120. package/dist/output/text/helpers.js +16 -1
  121. package/dist/runtime.js +25 -1
  122. package/dist/scripts/migrate-storage.js +1378 -599
  123. package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +479 -270
  124. package/dist/setup/setup.js +3 -3
  125. package/dist/sources/providers/git.js +71 -61
  126. package/dist/sources/providers/tar-utils.js +16 -8
  127. package/dist/storage/sqlite-pragmas.js +146 -0
  128. package/dist/wiki/wiki.js +37 -0
  129. package/dist/workflows/db.js +3 -4
  130. package/dist/workflows/validate-summary.js +2 -7
  131. package/docs/data-and-telemetry.md +1 -0
  132. package/package.json +8 -6
@@ -0,0 +1,23 @@
1
+ You are the akm consolidate assistant analyzing memory assets.
2
+
3
+ Rules:
4
+ 1. MERGE: Two or more memories are substantially duplicated or closely related → propose merging. Return the primary ref to keep and secondary refs to delete. Do NOT include mergedContent — the merge will be executed in a separate step.
5
+ 2. DELETE: Memory is clearly outdated, contradicted, or redundant → propose deletion. NEVER propose delete for memories annotated `(captureMode: hot)` — they are user-explicit and only the user can retire them. The downstream guard will refuse these regardless, so proposing them just wastes tokens.
6
+ 3. PROMOTE: Memory expresses a stable, reusable fact suitable as a `knowledge:` asset → propose promotion. Do NOT delete the source memory. NEVER propose promote / merge / contradict for memories annotated `(already queued)` — they have a pending proposal whose body matches; a duplicate will be deterministically dropped, so proposing them just wastes tokens.
7
+ 4. CONTRADICT: Two memories assert logically exclusive facts such that following BOTH simultaneously is impossible — not merely related or overlapping. You MUST cite the exact sentence from Memory A and the exact sentence from Memory B that are in direct conflict. If you cannot cite specific opposing sentences, use KEEP instead. Sharing a topic, tool, domain, or workflow stage is NOT sufficient. Only direct factual opposites qualify: opposing recommended commands, opposing boolean flags, opposing version numbers, or mutually exclusive instructions. Use confidence ≥ 0.92 only; omit the op entirely if below that threshold.
8
+ 5. KEEP: Memory is unique and current → omit from output.
9
+
10
+ Return ONLY JSON (no prose, no code fences):
11
+ {
12
+ "operations": [
13
+ { "op": "merge", "primary": "memory:<name>", "secondaries": ["memory:<name>", ...], "mergeStrategy": "synthesize", "confidence": 0.95 },
14
+ { "op": "delete", "ref": "memory:<name>", "reason": "<brief reason>", "confidence": 0.90 },
15
+ { "op": "promote", "ref": "memory:<name>", "knowledgeRef": "knowledge:<suggested-slug>", "reason": "<brief reason>", "description": "<one sentence describing the new knowledge asset>", "confidence": 0.92 },
16
+ { "op": "contradict", "ref": "memory:<name>", "contradictedByRef": "memory:<name>", "reason": "<brief reason>", "confidence": 0.88 }
17
+ ],
18
+ "warnings": ["<optional concerns>"]
19
+ }
20
+
21
+ For every operation, emit a `confidence` field in [0, 1] expressing your certainty that the operation is correct and safe. Use 0.95+ only when evidence is unambiguous. Omit the field rather than guessing if you are uncertain.
22
+
23
+ When the merged content includes an `updated` frontmatter field, the value MUST be a real ISO date string (e.g. `updated: 2026-05-20`). NEVER emit `updated: today`, `updated: {today}`, `updated: {today: null}`, `updated: now`, or any other literal placeholder/template-variable. If you do not have a real source-of-truth date, OMIT the `updated` field entirely — the post-processor will not invent one for you.
@@ -0,0 +1,33 @@
1
+ You are evaluating two derived memory entries to determine if they contain
2
+ directly contradictory factual claims about the same subject.
3
+
4
+ Memory A:
5
+ Ref: {{A_REF}}
6
+ Description: {{A_DESCRIPTION}}
7
+ Content:
8
+ ```
9
+ {{A_BODY}}
10
+ ```
11
+
12
+ Memory B:
13
+ Ref: {{B_REF}}
14
+ Description: {{B_DESCRIPTION}}
15
+ Content:
16
+ ```
17
+ {{B_BODY}}
18
+ ```
19
+
20
+ Answer ONLY with valid JSON — no prose, no code fences:
21
+ {"contradicts": true|false, "confidence": 0.0, "reason": "<cite the exact opposing sentence from each memory, or explain why not contradicted>"}
22
+
23
+ A contradiction means the memories make LOGICALLY EXCLUSIVE claims: a practitioner
24
+ cannot follow BOTH simultaneously. The test: cite the exact sentence from Memory A
25
+ and the exact sentence from Memory B that are in direct conflict. If you cannot cite
26
+ specific opposing sentences, return false.
27
+
28
+ Sharing a topic, tool, domain, or workflow stage is NOT a contradiction. Only direct
29
+ factual opposites qualify: opposing recommended commands, opposing boolean flags,
30
+ opposing version numbers, or mutually exclusive instructions.
31
+
32
+ Set confidence ≥ 0.92 only when evidence is unambiguous. Use lower values when
33
+ uncertain — the caller will skip edges below 0.92.
@@ -0,0 +1,22 @@
1
+ You are the akm `distill` distiller.
2
+ Given an asset and recent feedback events about it, produce a concise
3
+ *knowledge* markdown document capturing the durable, reusable facts.
4
+ Prefer stable guidance over narrative recap.
5
+
6
+ YOUR RESPONSE MUST START EXACTLY WITH `---` ON THE VERY FIRST LINE.
7
+ DO NOT output any prose, explanation, or code fences before or after.
8
+
9
+ Required output format:
10
+ ---
11
+ description: <one-line summary of the knowledge asset>
12
+ tags: [<tag1>, <tag2>]
13
+ ---
14
+
15
+ # <Title>
16
+
17
+ <body — structured markdown, durable facts only>
18
+
19
+ RULES:
20
+ - `description` MUST be a non-empty single-line string.
21
+ - Include a meaningful markdown body with a `# Title` heading.
22
+ - Output ONLY the knowledge file. No preamble, no code fences, no trailing prose.
@@ -0,0 +1,36 @@
1
+ You are the akm `distill` distiller.
2
+ Given an asset and recent feedback events about it, produce a single
3
+ concise *lesson* an agent should remember next time it works on this
4
+ asset's domain.
5
+
6
+ YOUR RESPONSE MUST START EXACTLY WITH `---` ON THE VERY FIRST LINE.
7
+ DO NOT output any prose, explanation, or code fences before or after.
8
+
9
+ Required output format — copy this structure exactly:
10
+ ---
11
+ description: <one complete sentence (ending with `.`) summarising what the lesson teaches>
12
+ when_to_use: <one complete sentence describing the concrete trigger condition>
13
+ ---
14
+
15
+ <lesson body — plain markdown, 1–3 short paragraphs of practical guidance>
16
+
17
+ ## description field (MANDATORY)
18
+ - A single complete sentence in present tense, 20–400 chars, NO markdown.
19
+ - Self-contained: a reviewer must understand the lesson from this field alone.
20
+ - DO NOT start with "When ", "If ", or a connector word — that belongs in when_to_use.
21
+ - DO NOT copy a section heading ("Key takeaways", "For example", "Key pitfalls").
22
+ - DO NOT begin with a numbered list marker, code fence, or markdown heading.
23
+
24
+ GOOD: "Always validate ref existence before promoting a memory to knowledge; missing refs surface as silent 404s during accept."
25
+ BAD: "Key pitfalls"
26
+ BAD: "When working with the akm CLI"
27
+ BAD: "For example, you might..."
28
+ BAD: "1. Check the file"
29
+
30
+ RULES:
31
+ - `when_to_use` MUST be a complete sentence describing a concrete trigger. Never write `When working with <asset-name>` — that is circular and useless.
32
+ - `description` and `when_to_use` MUST differ from each other.
33
+ - The lesson body MUST be non-empty markdown prose. Do NOT restate `description:` or `when_to_use:` inside the body (no `**description:** ...` or `**when_to_use:** ...` lines — the frontmatter is the only place those keys belong).
34
+ - Do NOT emit a second `---` fence after the opening frontmatter — there are exactly two `---` lines in the output, both belonging to the single frontmatter block at the top.
35
+ - Do NOT reproduce the source asset verbatim — distil what a caller needs to know.
36
+ - Output ONLY the lesson file. No preamble, no code fences, no trailing prose.
@@ -28,7 +28,7 @@ Things NOT to extract:
28
28
  - Started: {{STARTED_AT}}
29
29
  - Ended: {{ENDED_AT}}
30
30
  - Project hint: {{PROJECT_HINT}}
31
-
31
+ {{STANDARDS}}
32
32
  ## Filtered session transcript
33
33
 
34
34
  The transcript below has already had read-only `akm` meta-ops and platform boilerplate stripped. Only content that might carry signal remains.
@@ -49,13 +49,17 @@ Respond with EXACTLY one JSON object matching this shape:
49
49
  "when_to_use": "<one sentence 15-400 chars; REQUIRED only when type=lesson>",
50
50
  "body": "<markdown body, 200-3000 chars typical>",
51
51
  "confidence": <number 0.0-1.0>,
52
- "evidence": "<one-line pointer to the moment in the session>"
52
+ "evidence": "<one-line pointer to the moment in the session>",
53
+ "orderedActions": ["<action-1>", "<action-2>", ...],
54
+ "outcomeData": "<one sentence describing the outcome of the action sequence>"
53
55
  }
54
56
  ],
55
57
  "rationale_if_empty": "<one sentence; REQUIRED when candidates is empty>"
56
58
  }
57
59
  ```
58
60
 
61
+ `orderedActions` and `outcomeData` are **optional**. Include them only when the candidate represents a recurring action sequence (e.g. a recovery procedure, a build-fix recipe, a deployment checklist) where preserving the ordered steps adds future value. When present, `outcomeData` is required and must describe what happened when the sequence completed (success or failure). Omit both fields entirely for standalone facts, observations, or lessons that are not action-sequence-shaped.
62
+
59
63
  ## Rules
60
64
 
61
65
  1. **Zero candidates is a valid and frequent answer.** Most sessions yield no new durable insight. When that's the case, return `{"candidates": [], "rationale_if_empty": "..."}` explaining what you saw and why it didn't rise to durable-knowledge level. Do not fabricate.
@@ -0,0 +1 @@
1
+ You extract a knowledge graph from developer notes. Return ONLY valid JSON — no prose, no markdown fences, no preamble.
@@ -0,0 +1 @@
1
+ You compress a developer memory into one high-signal derived memory for later retrieval. Return only valid JSON. No prose outside the JSON object. No markdown fences.
@@ -0,0 +1,5 @@
1
+ Compress the memory below into one derived memory. Output ONLY JSON:
2
+ {"title":"short title string","description":"one sentence summary string","tags":["tag1","tag2"],"searchHints":["search phrase 1","search phrase 2"],"content":"2-3 sentence compressed body preserving key facts verbatim"}
3
+ Rules: be specific, no vague generalizations, preserve key facts (names/versions/paths/config keys verbatim), merge related points, 3-8 tags, 3-6 searchHints. The content field must be a plain string with 2-3 sentences.
4
+
5
+ Memory:
@@ -0,0 +1 @@
1
+ You are a metadata generator for a developer asset registry. Given a script/skill/command/agent entry, generate improved metadata. Respond with ONLY valid JSON, no markdown fencing.
@@ -0,0 +1,44 @@
1
+ You are the akm `procedural` compiler.
2
+
3
+ You are given a RECURRING ordered action sequence — the SAME ordered list of
4
+ steps that an agent has successfully performed across several independent
5
+ sessions. Your job is to turn that bare sequence into a clean, reusable
6
+ WORKFLOW: give the workflow a title and a one-sentence description, and turn each
7
+ ordered action into a named step with clear imperative instructions.
8
+
9
+ You MUST NOT invent new steps, drop steps, merge steps, or reorder them. The
10
+ ordered action list is the source of truth. Return EXACTLY one step per input
11
+ action, in the SAME order.
12
+
13
+ YOUR RESPONSE MUST BE A SINGLE JSON OBJECT AND NOTHING ELSE.
14
+ DO NOT output prose, explanation, or code fences before or after the JSON.
15
+
16
+ When the sequence is a coherent, reusable procedure, return:
17
+ {
18
+ "title": "<short imperative workflow title, no trailing period>",
19
+ "description": "<one complete sentence (ending with a period) stating what the workflow accomplishes>",
20
+ "steps": [
21
+ {
22
+ "title": "<short imperative step title>",
23
+ "instructions": "<one or more imperative sentences telling an agent exactly how to perform this step>",
24
+ "completionCriteria": ["<optional bullet: an observable signal the step is done>"]
25
+ }
26
+ ]
27
+ }
28
+
29
+ When the sequence is NOT a coherent reusable procedure (it is noise, the steps do
30
+ not form a meaningful workflow, or any reusable framing would be a stretch),
31
+ return an explicit null:
32
+ null
33
+
34
+ A justified null is a CORRECT and expected outcome. Do NOT fabricate a hollow
35
+ workflow to avoid returning null.
36
+
37
+ ## Rules
38
+ - `steps` MUST have EXACTLY as many entries as the input action list, in order.
39
+ - Every step MUST have a non-empty `title` and non-empty `instructions`.
40
+ - `completionCriteria` is OPTIONAL; omit it rather than inventing weak criteria.
41
+ - The `description` MUST be a single complete present-tense sentence with NO
42
+ markdown, self-contained enough for a reviewer to understand the workflow.
43
+ - Ground every step in the corresponding input action; do not introduce outside
44
+ facts or tools the action does not mention.
@@ -0,0 +1,40 @@
1
+ You are the akm `recombine` synthesizer.
2
+
3
+ You are given a CLUSTER of related memories — distinct episodes that share a
4
+ topic (a tag or a graph entity) but were recorded independently. Your job is to
5
+ induce ONE cross-episodic generalization: a single durable insight that none of
6
+ the input memories states on its own, but that the cluster as a whole supports.
7
+
8
+ This is hypothesis formation, not summarization. A good generalization explains
9
+ WHY the individual episodes are instances of the same underlying pattern and
10
+ gives an agent a reusable rule for the next, unseen episode.
11
+
12
+ YOUR RESPONSE MUST BE A SINGLE JSON OBJECT AND NOTHING ELSE.
13
+ DO NOT output prose, explanation, or code fences before or after the JSON.
14
+
15
+ When a defensible generalization exists, return:
16
+ {
17
+ "description": "<one complete sentence (ending with a period) stating the generalization>",
18
+ "when_to_use": "<one complete sentence describing the concrete trigger condition>",
19
+ "body": "<1-3 short paragraphs of practical guidance grounded in the cluster>"
20
+ }
21
+
22
+ When NO defensible generalization exists — the memories merely share a keyword,
23
+ or any unifying claim would be a stretch — return an explicit null:
24
+ null
25
+
26
+ A justified null is a CORRECT and expected outcome. Do NOT invent a weak or
27
+ generic generalization to avoid returning null. It is better to propose nothing
28
+ than to propose a hollow over-generalization.
29
+
30
+ ## description field (MANDATORY when not null)
31
+ - A single complete present-tense sentence, NO markdown.
32
+ - Self-contained: a reviewer must understand the hypothesis from this field alone.
33
+ - DO NOT start with "When " or "If " — that belongs in `when_to_use`.
34
+ - DO NOT merely restate one input memory; the value is the CROSS-episode pattern.
35
+
36
+ ## Guardrails
37
+ - Induce exactly ONE generalization for the whole cluster.
38
+ - Ground every claim in the supplied memories; do not introduce outside facts.
39
+ - This is a HYPOTHESIS — it will be re-confirmed across future runs before it is
40
+ ever promoted to a durable lesson. Frame it as a candidate rule, not a verdict.
@@ -0,0 +1,6 @@
1
+ You are a belief-state classifier for a memory store. Given a candidate memory and a list of more-recent similar memories from the same store, decide whether the candidate is still current or has been superseded.
2
+
3
+ Respond on the first line with exactly YES or NO.
4
+ If YES, the second line MUST be of the form `SUPERSEDED_BY: <ref>` where <ref> is the exact ref of the superseding memory from the list provided. Do NOT invent refs.
5
+ If NO, do not include any additional lines.
6
+ No prose, no preamble, no markdown.
@@ -0,0 +1 @@
1
+ You are a strict completion auditor for a software workflow engine. Given a step's completion criteria and a summary of the work an agent claims to have done, judge whether the summary provides concrete evidence that EVERY criterion is satisfied. Be skeptical: vague, hand-wavy, or unsubstantiated claims do NOT satisfy a criterion. Respond with ONLY a JSON object: {"complete": boolean, "missing": string[], "feedback": string}. "missing" lists the exact criteria that are not yet satisfied; "feedback" is a short directive telling the agent what to finish or fix. No prose, no markdown fences.
@@ -0,0 +1,22 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for agent assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise an agent asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Agent authoring conventions
15
+
16
+ An agent is markdown whose frontmatter describes a reusable role.
17
+
18
+ - Frontmatter typically carries `name`, `description`, and optionally `tools` and
19
+ `model`. Write the `description` so a dispatcher knows exactly when to delegate.
20
+ - The body is the system prompt: establish the role, its scope, and its boundaries.
21
+ - Be explicit about what the agent should and should not do, and what it returns.
22
+ - Prefer a focused single-responsibility persona over a broad do-everything agent.
@@ -0,0 +1,22 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for command assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a command asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Command authoring conventions
15
+
16
+ A command is a markdown prompt template the user invokes by name.
17
+
18
+ - Optional frontmatter carries `name` and `description`; the body *is* the prompt.
19
+ - Write the body as the instruction you want the model to follow when invoked.
20
+ - State the task, the expected inputs, and the shape of the desired output up front.
21
+ - Keep it tight and unambiguous — a command is run repeatedly, so vagueness compounds.
22
+ - Use clear placeholders for any arguments the caller will supply.
@@ -0,0 +1,24 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for fact assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a fact asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Fact authoring conventions
15
+
16
+ A fact is durable stash-level context — personal, team, or project details,
17
+ coding conventions, or stash-meta.
18
+
19
+ - Frontmatter should include a `description` and a `category`
20
+ (personal | team | project | convention | meta).
21
+ - Set `pinned: true` only for the small always-injected core; most facts stay unpinned.
22
+ - Keep each fact short, high-signal, and self-contained — it is durable context,
23
+ not an episodic note.
24
+ - Write it as a standing declaration that stays true across sessions.
@@ -0,0 +1,22 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for knowledge assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a knowledge asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Knowledge authoring conventions
15
+
16
+ A knowledge asset is a reference document meant to be read on demand.
17
+
18
+ - Open with a top-level `# Title` that names the subject plainly.
19
+ - Organise into concise, well-headed sections so a reader can jump to what they need.
20
+ - Favour accuracy and clarity over completeness; link or cross-reference rather than
21
+ duplicating other assets.
22
+ - Voice: explanatory and neutral, written to be re-read months later.
@@ -0,0 +1,25 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for lesson assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a lesson asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate. Tune the guidance below to match
12
+ how your stash likes lessons written.
13
+ -->
14
+
15
+ # Lesson authoring conventions
16
+
17
+ A lesson captures durable, hard-won judgement about *when* to reach for something
18
+ and *what goes wrong without it* — it is not a restatement of the source asset.
19
+
20
+ - Lead with the trigger: when should a reader reach for this lesson?
21
+ - Then the failure mode: what breaks, or what gets missed, without it?
22
+ - Then the insight: what did real use reveal that the asset itself does not say?
23
+ - Keep it to one to three short, concrete paragraphs. Prefer specifics over
24
+ general advice; a lesson earns its keep by being actionable in a real moment.
25
+ - Voice: direct and practical, written for a future agent mid-task.
@@ -0,0 +1,21 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for memory assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a memory asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Memory authoring conventions
15
+
16
+ A memory is a short factual note the user wants persisted across sessions.
17
+
18
+ - Frontmatter usually includes a `description` that states the fact in one line.
19
+ - Keep the body brief and self-contained — one durable fact or decision per memory.
20
+ - Write it so it still reads clearly with no surrounding conversation for context.
21
+ - Prefer durable, reusable facts over episodic play-by-play of a single session.
@@ -0,0 +1,21 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for script assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a script asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Script authoring conventions
15
+
16
+ A script is an executable text file stored as-is and run on demand.
17
+
18
+ - Start with a shebang appropriate to the interpreter (e.g. `#!/usr/bin/env bash`).
19
+ - Follow it with a short usage comment: what the script does and how to invoke it.
20
+ - Keep the script focused on one job; fail loudly and early on bad input.
21
+ - Prefer readable, well-commented logic over cleverness — these get re-run by others.
@@ -0,0 +1,23 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for skill assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a skill asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Skill authoring conventions
15
+
16
+ A skill is a reusable, self-contained capability stored as `skills/<name>/SKILL.md`.
17
+
18
+ - Frontmatter usually carries `name`, `description`, and `when_to_use`. Write the
19
+ `description` so a dispatcher can decide *from it alone* whether to load the skill.
20
+ - Open the body with the goal in an imperative voice ("Generate…", "Review…").
21
+ - Structure as: purpose, when to use, then the procedure or guidance as ordered
22
+ steps or short sections. Favour scannable headings over long prose.
23
+ - Keep it focused on one capability; split unrelated concerns into separate skills.
@@ -0,0 +1,22 @@
1
+ ---
2
+ category: convention
3
+ description: Starter SOFT authoring conventions for workflow assets — edit to taste.
4
+ when_to_use: Surfaced to authoring agents when they write or revise a workflow asset.
5
+ ---
6
+
7
+ <!--
8
+ SOFT guidance only — advice, not a contract. Nothing here is enforced by the
9
+ proposal gate; the validator-rejecting HARD rules live in
10
+ src/core/authoring-rules.ts (#645) and remain the sole enforced source. Editing
11
+ or deleting this file cannot weaken the gate.
12
+ -->
13
+
14
+ # Workflow authoring conventions
15
+
16
+ A workflow describes a multi-step process an agent or human follows in order.
17
+
18
+ - Open with a top-level `# <Title>` naming the workflow's outcome.
19
+ - Lay out the steps as ordered `## Step N` sections, each with a clear action.
20
+ - For each step, state what to do, what it depends on, and how to know it is done.
21
+ - Keep steps atomic and resumable — a reader should be able to stop and pick up midway.
22
+ - Note any branch points or preconditions explicitly rather than burying them in prose.