agent-afk 5.213.2 → 5.214.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.
@@ -1,6 +1,6 @@
1
1
  export { readSpine, writeSpine, parseSpine, serializeSpine, nextId, addEntry, findEntry, sectionForPrefix, } from './spine-store.js';
2
2
  export type { SpineDocument, SpineEntry, SpineSection, SpineSectionName, SpineIdPrefix, } from './spine-store.js';
3
- export { classifyDiff, } from './spine-classifier.js';
3
+ export { classifyDiff, classifySeedMaterial, parseClassifierOutput, } from './spine-classifier.js';
4
4
  export type { ClassifierLabel, ClassifierResult, SpineAdditionItem, SpineRelationItem, SpineClassifierItem, } from './spine-classifier.js';
5
5
  export { createSpineSessionEndHook, } from './spine-hook.js';
6
6
  export type { SpineHookOptions, } from './spine-hook.js';
@@ -20,5 +20,6 @@ export interface ClassifierResult {
20
20
  parsed: boolean;
21
21
  }
22
22
  export declare function classifyDiff(diff: string, spineContent: string, signal?: AbortSignal): Promise<ClassifierResult>;
23
+ export declare function classifySeedMaterial(seedText: string, signal?: AbortSignal): Promise<ClassifierResult>;
23
24
  export declare function parseClassifierOutput(raw: string): ClassifierResult;
24
25
  export declare const MAX_DESCRIPTION_LEN = 120;
@@ -18,7 +18,7 @@ If the survey reveals a fix that's tempting to apply, **return it as a recommend
18
18
 
19
19
  ## Inline reconnaissance
20
20
 
21
- Run the three surveys below **directly using your own tools**. Do NOT dispatch any sub-agents via the `agent` or `skill` tools — every lookup in this phase is a deterministic read that you execute yourself using `bash`, `glob`, `read_file`, `grep`, `list_directory`, and `memory_search`. Issue all three surveys in a single batched tool-use round where possible.
21
+ Run the four surveys below **directly using your own tools**. Do NOT dispatch any sub-agents via the `agent` or `skill` tools — every lookup in this phase is a deterministic read that you execute yourself using `bash`, `glob`, `read_file`, `grep`, `list_directory`, and `memory_search`. Issue all four surveys in a single batched tool-use round where possible.
22
22
 
23
23
  ### State survey *(bash)*
24
24
 
@@ -62,13 +62,18 @@ Call the **`memory_search` tool** with keywords from the user's current request
62
62
 
63
63
  Return: relevant facts with 1-line summaries, **plus the stores actually consulted** — e.g. `memory_search: 3 queries, 0 hits; HOT.md: read; AFK.md: read` — so the orchestrator can tell "no relevant memory exists" from "the fork never looked." If `memory_search` is unavailable on this surface, say so explicitly.
64
64
 
65
+ ### Spine survey *(read_file)*
66
+
67
+ Read `SPINE.md` from the repo root (same directory as `AFK.md`). If the file does not exist or is empty, skip silently -- do not mention it in the snapshot. If it exists and has entries, extract its invariant (INV-*), rejected-pattern (REJ-*), and taste entries (TST-*) and include them in the snapshot so architectural constraints are visible before proposing changes.
68
+
65
69
  ## Synthesis
66
70
 
67
- Assemble the survey results into a **6-line ground-truth snapshot**:
71
+ Assemble the survey results into a ground-truth snapshot (6 lines minimum, 7 when SPINE.md has entries):
68
72
  - Branch: `<current>`, `<clean|diverged>`, upstream: `<fresh|stale>`
69
73
  - Recent work: last 3 commits or stash items
70
74
  - Infrastructure: CI present? package scripts? authoritative configs for this task
71
75
  - Memory hits: facts (1-line each) + which stores were consulted, or `none (consulted: …)`
76
+ - Spine constraints *(only when SPINE.md exists with entries)*: INV-*, REJ-*, TST-* entries. Omit this line entirely when SPINE.md is absent or empty.
72
77
  - Implementation risks: e.g. "branch is `main`, don't edit directly"; "CI runs on push"; "memory says prior attempt used approach X"
73
78
  - Epistemic confidence: `<high|medium|low>` — based on how much state could be verified. Flag if working directory is sparse, if domain is unfamiliar, or if key artifacts may be missing.
74
79
 
@@ -76,7 +81,7 @@ Surface the snapshot and stop. The orchestrator then uses these verified facts
76
81
 
77
82
  ## Brief Anchor (auto-runs after synthesis)
78
83
 
79
- After the 6-line snapshot is assembled, construct the **Brief Anchor** — a path-verified grounding preamble the orchestrator pastes verbatim into every subsequent sub-agent brief.
84
+ After the snapshot is assembled, construct the **Brief Anchor** — a path-verified grounding preamble the orchestrator pastes verbatim into every subsequent sub-agent brief.
80
85
 
81
86
  **Construction procedure:**
82
87