faf-cli 7.7.0 → 7.9.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.
@@ -0,0 +1,22 @@
1
+ /** About is a repo role, not an app_type.
2
+ *
3
+ * Signal: the `about:` block with `represents: owner/repo`.
4
+ * Score is inherited (`about.source_score`) or unknown (−1 / —).
5
+ */
6
+ export declare const REPRESENTS_RE: RegExp;
7
+ export interface AboutDecl {
8
+ represents: string;
9
+ sourceScore: number;
10
+ }
11
+ /** Parsed .faf object: About iff about.represents is a non-empty string. */
12
+ export declare function isAboutFaf(data: {
13
+ about?: {
14
+ represents?: unknown;
15
+ };
16
+ } | null | undefined): boolean;
17
+ /**
18
+ * Hot-path YAML detect — no parser.
19
+ * About = an `about:` map that contains `represents:`.
20
+ * `app_type: about` is not a type and does not trigger this.
21
+ */
22
+ export declare function aboutFromYaml(yaml: string): AboutDecl | null;
@@ -4,20 +4,15 @@ export declare function enrichScore(kernel: KernelScoreResult): ScoreResult;
4
4
  /**
5
5
  * Score a .faf YAML string with About-Repo short-circuit.
6
6
  *
7
- * About Repos (app_type: about) are documentation surfaces, not apps.
8
- * They DISPLAY the source codebase's Trophy, they don't earn one. The
9
- * scorer reads `about.source_score` from the project.faf and emits that
10
- * directly — no slot scoring, no kernel call.
7
+ * About is a repo role, not an app_type. The signal is the `about:` block
8
+ * (`about.represents`). The scorer reads `about.source_score` and emits
9
+ * that directly — no slot scoring, no kernel call.
11
10
  *
12
- * Truth-printing is preserved by owner accountability: the score is
13
- * their attestation of the source's score; they're on the hook if it's wrong.
14
- *
15
- * Required for about: `app_type: about` + `about.represents: <owner>/<repo>`.
16
11
  * Optional: `about.source_score: <number>` — without it, score is -1
17
12
  * (renders as "—" honest unknown).
18
13
  *
19
14
  * Doctrine: memory/private-source-public-about-pattern.md.
20
15
  *
21
- * For non-about types: delegates to kernel.score() + enrichScore().
16
+ * For apps: delegates to kernel.score() + enrichScore().
22
17
  */
23
18
  export declare function scoreFafYaml(yaml: string): ScoreResult;
@@ -29,9 +29,8 @@ export declare const PLACEHOLDERS: Set<string>;
29
29
  /** Check if a value is a placeholder (empty) */
30
30
  export declare function isPlaceholder(value: unknown): boolean;
31
31
  /** App-type to active category mapping. The canonical 24-type ladder —
32
- * 21 detectable apps + `about` (non-app, 0 slots, owner-attested)
33
- * + `encyclopedia` (curated knowledge surface, FAFipedia and similar)
34
- * + `intent` (human-intent seed from builder.faf.one, not auto-detected).
32
+ * detectable apps + `encyclopedia` (curated knowledge) + `intent` (seed).
33
+ * About is NOT an app_type — it is a repo role (`about.represents`).
35
34
  * (See v6.6.md doctrine memory + fafipedia-vs-grokipedia-architecture.)
36
35
  * Sorted ascending by active slot count for readability.
37
36
  *
@@ -45,11 +45,10 @@ export interface ScoreResult {
45
45
  slots: Record<string, SlotState>;
46
46
  /**
47
47
  * When true, the score is INHERITED from a source codebase (declared via
48
- * `app_type: about` + `about.source_score` in project.faf). The scorer
49
- * did NOT calculate this — the owner attested to it. About Repos are
50
- * documentation surfaces, not apps.
48
+ * the `about:` block + `about.source_score`). The scorer did NOT calculate
49
+ * this — the owner attested to it. About is a repo role, not an app_type.
51
50
  *
52
- * Set by scoreFafYaml when the input declares `app_type: about`.
51
+ * Set by scoreFafYaml when the input has `about.represents`.
53
52
  * Consumers (TAF receipt generation, display logic) should distinguish
54
53
  * inherited scores from calculated ones — they're qualitatively different
55
54
  * artifacts. See memory/private-source-public-about-pattern.md.
@@ -77,17 +76,19 @@ export interface FafData {
77
76
  goal?: string;
78
77
  main_language?: string;
79
78
  type?: string;
79
+ /** Integration branch agents PR into — `dev`/`develop` for git-flow repos. Default `main`. */
80
+ default_branch?: string;
80
81
  [key: string]: unknown;
81
82
  };
82
83
  /**
83
84
  * Top-level app_type — drives slot selection in APP_TYPE_CATEGORIES.
84
- * Special value `'about'` is a non-app representation (see `about` block).
85
+ * Must be a real app (cli, library, mcp, …). `about` is not an app_type.
85
86
  */
86
87
  app_type?: string;
87
88
  /**
88
- * About Repo declaration block. Present when `app_type: about`. Lets the
89
- * repo represent a private codebase: scorer short-circuits and emits
90
- * `source_score` as the score. See memory/private-source-public-about-pattern.md.
89
+ * About Repo declaration. The `about:` block is the role signal
90
+ * (`about.represents` required). Scorer short-circuits and emits
91
+ * `source_score`. See memory/private-source-public-about-pattern.md.
91
92
  */
92
93
  about?: {
93
94
  /** Required: "owner/repo" pointing at the private source codebase. */
@@ -37,8 +37,8 @@ export interface ProjectTypeDetection {
37
37
  * positive signal that contributed to the classification — used downstream
38
38
  * by `writeFaf` to render `# found: <list>` next to `type:` in the .faf.
39
39
  *
40
- * Priority order per v6.6.md doctrine (most-specific first). `about` is
41
- * owner-declared, not auto-detected — never matches in this function.
40
+ * Priority order per v6.6.md doctrine (most-specific first). About is a
41
+ * repo role (`about.represents`), not an app_type — never matches here.
42
42
  * Rule: SDK keyword takes priority (sdk wins over library/cli/wasm). */
43
43
  export declare function detectProjectTypeWithRationale(dir: string): ProjectTypeDetection;
44
44
  /** Detect the project type for slot mapping. Backward-compatible wrapper —
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { findFafFile, readFaf, readFafRaw } from './interop/faf.js';
8
8
  export { generateProjectHtml, writeProjectHtml } from './interop/projecthtml.js';
9
9
  export { generateServerCard, writeServerCard, fafContextBlock, registryMeta, registryName, REGISTRY_PUBLISHER_KEY, } from './interop/servercard.js';
10
10
  export type { ServerCardOptions } from './interop/servercard.js';
11
+ export { projectCards, readFafa, findFafaFile, generateA2ACard, upsertCatalog, A2A_CONTEXT_URI, } from './interop/cards.js';
12
+ export type { FafaDoc, CardTarget, ProjectedCards } from './interop/cards.js';
11
13
  export { Soul as FafmSoul, fromClaudeDir, canonicalPriority, utcNow, PRIORITY_ORDER, PRIORITY_RANK, KNOWLEDGE_TYPES, } from './fafm/index.js';
12
14
  export type { Fact as FafmFact, SoulDoc, Profile as FafmProfile } from './fafm/index.js';
13
15
  export type { InterviewQuestion, InterviewOption, HumanSlotPath, SourcedSlotPath, GoalSeed, TableOf8, TableOf8Row, BoxStatus } from './core/interview.js';