faf-cli 8.9.0 → 8.10.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.
@@ -79,6 +79,9 @@ export interface WriteFafOptions {
79
79
  * overwrite (`faf init --new` / `--force`, `faf git --force`). Default: an existing
80
80
  * file is updated in place with {@link updateFafFile}. */
81
81
  replace?: boolean;
82
+ /** Called when `replace` overwrote an existing file after keeping
83
+ * `path.bak-<timestamp>`. */
84
+ onReplacedBackup?: (backupPath: string) => void;
82
85
  /** Called for each alias of an existing file that `data` would change
83
86
  * (`stack: *base` while `data.stack` has more keys): faf leaves it as
84
87
  * written — it never replaces or expands an alias — and that path is not
@@ -23,3 +23,12 @@ export declare function extractWhen(content: string): string | undefined;
23
23
  export declare function extractHow(content: string): string | undefined;
24
24
  /** Read README.md and extract per-slot content. Returns {} if no README. */
25
25
  export declare function interrogateReadme(dir: string): ExtractedContext;
26
+ /** A README find with where it came from: `README.md § Status`. */
27
+ export interface ReadmeFind {
28
+ value: string;
29
+ source: string;
30
+ }
31
+ /** The README's goal and six W's, each with its source — suggestions for the
32
+ * human to confirm in `faf go`, never written to project.faf by init or auto.
33
+ * Same anchors and slop rules as the extractors above. {} if no README. */
34
+ export declare function interrogateReadmeSourced(dir: string): Record<string, ReadmeFind>;
@@ -53,6 +53,21 @@ export interface ExtractedContext {
53
53
  example?: string;
54
54
  };
55
55
  }
56
+ /** The README headings that hold each slot's fact — one list, shared by the
57
+ * README interrogator and Relentless. Each is matched as the whole heading
58
+ * (regex source, case-insensitive; groups must be non-capturing). Left out,
59
+ * because they usually hold a misplaced fact: Release / Roadmap (the release
60
+ * process, future plans), History (a changelog), Design (visual design),
61
+ * About (the author), Users (an adopters list). */
62
+ export declare const SECTION_HEADINGS: {
63
+ readonly goal: readonly ["use\\s+cases?", "goals?"];
64
+ readonly what: readonly ["description", "overview", "purpose", "introduction", "what", "what\\s+is\\s+(?!new\\b)\\S+", "what\\s+it\\s+does"];
65
+ readonly who: readonly ["audience", "target\\s+audience", "for\\s+whom", "who", "who\\s+is\\s+(?:this|it)\\s+for", "who\\s+it.s\\s+for"];
66
+ readonly why: readonly ["why", "why\\s+(?:use\\s+)?(?!not\\b)\\S+", "motivations?", "(?:the\\s+)?problem", "rationale", "mission", "vision"];
67
+ readonly where: readonly ["deployment", "where", "where\\s+it\\s+runs", "hosting", "platforms", "supported\\s+platforms", "platform\\s+support"];
68
+ readonly when: readonly ["status", "(?:project|current)\\s+status", "timeline", "since", "launched"];
69
+ readonly how: readonly ["architecture", "how", "how\\s+it\\s+works", "how\\s+does\\s+it\\s+work", "under\\s+the\\s+hood", "internals", "approach", "methodology"];
70
+ };
56
71
  /** Confidence threshold rules for extracted text — empty if violated */
57
72
  export declare const EXTRACTION_LIMITS: {
58
73
  /** Minimum length for a slot to be considered worth filling (in chars) */
@@ -62,5 +77,24 @@ export declare const EXTRACTION_LIMITS: {
62
77
  };
63
78
  /** Generic slop patterns — extracted text matching these is rejected */
64
79
  export declare const SLOP_PATTERNS: readonly RegExp[];
80
+ /** A notice, not a description of the project: maintenance status,
81
+ * sponsors, hiring, where the docs are, requirements, a move or a mirror,
82
+ * merch, a question, a status label or an emoji-led feature label. Fine in
83
+ * `when` (## Status: "No longer maintained since 2024"), never the goal. */
84
+ export declare function isNotice(t: string): boolean;
85
+ /** A callout or banner, not a description: a GitHub admonition, a warning
86
+ * sign, or pre-release phrasing ("Nightly release, expect rough edges"). */
87
+ export declare function isCallout(t: string): boolean;
88
+ /** Lines without a setext title at the top ("Title" over "-----" or
89
+ * "=====") — it is the title, not the first paragraph. */
90
+ export declare function dropSetextTitle(lines: string[]): string[];
65
91
  /** Validate extracted text against the no-guess/no-slop doctrine */
66
92
  export declare function isValidExtraction(text: string): boolean;
93
+ /** The first sentence of `text` — whole, ending at its own full stop — or
94
+ * null when there is none, or when it is a question (not a fact). For a
95
+ * first paragraph too long to be a slot: its opening sentence is usually the
96
+ * fact ("Flask is a lightweight WSGI web application framework."), and a
97
+ * whole sentence is never a cut. A stop after `e.g.`, `i.e.`, `vs.`, `Dr.`
98
+ * or an ellipsis does not end it; after `etc.` or initials (`U.S.`) it ends
99
+ * only when the next word starts a sentence. */
100
+ export declare function firstSentence(text: string): string | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "faf-cli",
3
- "version": "8.9.0",
4
- "description": "Persistent AI context + memory — .faf and .fafm, IANA-registered. Anthropic-merged.",
3
+ "version": "8.10.1",
4
+ "description": "Persistent AI context + memory — .faf and .fafm, IANA-registered. AI suggests your goal and six W's; you confirm. Anthropic-merged.",
5
5
  "type": "module",
6
6
  "icon": "https://faf.one/orange-smiley.svg",
7
7
  "logo": "https://faf.one/orange-smiley.svg",
package/project.faf CHANGED
@@ -1,8 +1,8 @@
1
1
  faf_version: "3.0"
2
2
  project:
3
3
  name: faf-cli
4
- version: "8.9.0"
5
- goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v8.9.0 The Write-Once Edition — scored by the always-33 engine."
4
+ version: "8.10.0"
5
+ goal: "CLI for IANA-registered .faf + .fafm — context DNA and portable agent memory, scored by the always-33 engine"
6
6
  main_language: TypeScript
7
7
  type: cli # found: package.json bin
8
8
  # Commands + key_files feed `faf export --agents` (hand values win over detection).
@@ -58,11 +58,11 @@ stack:
58
58
  storage: slotignored
59
59
  human_context:
60
60
  who: Developers and teams using AI coding assistants
61
- what: Persistent AI Context Standard — project DNA for AI. IANA-registered. Anthropic-merged.
61
+ what: IANA-registered CLI for persistent project context and agent memory
62
62
  why: Ends context re-discovery — define once, AI remembers forever
63
63
  where: npm registry, Homebrew, GitHub
64
- when: Production since September 2025; Bun-native since v6; current package 8.9.0 (always-33 engine)
65
- how: bunx faf-cli auto, then project.faf versions with your code — faf show renders it human-visible
64
+ when: Production since September 2025; Bun-native since v6
65
+ how: Detects the stack from repo files and scores with the always-33 WASM kernel; the goal and six W's are only suggested, never written
66
66
  monorepo:
67
67
  packages_count: slotignored
68
68
  build_orchestrator: slotignored