faf-cli 6.8.0 → 6.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.
- package/README.md +13 -3
- package/dist/cli.js +263 -234
- package/dist/cli.js.map +16 -11
- package/dist/core/interview.d.ts +64 -0
- package/dist/core/slots.d.ts +4 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +110 -110
- package/dist/index.js.map +6 -5
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The 6Ws Interview — SINGLE SOURCE.
|
|
3
|
+
*
|
|
4
|
+
* The canonical question registry for filling a .faf by asking a human (or an
|
|
5
|
+
* agent asking a human). faf-cli OWNS it; consumers (claude-faf-mcp's faf_go,
|
|
6
|
+
* siblings, UIs) IMPORT it — never reimplement, never copy. Decided
|
|
7
|
+
* 2026-06-10: the CLI exports, CFM consumes, zero drift. (CFM's previous
|
|
8
|
+
* hand-maintained registry had already drifted — e.g. its `how` asked "How
|
|
9
|
+
* should AI assist?" while the canonical slot semantic is "How is it built /
|
|
10
|
+
* used?". This file is the arbiter; slots.ts is its spine.)
|
|
11
|
+
*
|
|
12
|
+
* Shape carries what interactive consumers need: question text, a short
|
|
13
|
+
* header chip, input type, required flag, select options where a closed-ish
|
|
14
|
+
* vocabulary exists. Question SEMANTICS align to core/slots.ts descriptions —
|
|
15
|
+
* the slot is the meaning, the question is just its interview voice.
|
|
16
|
+
*
|
|
17
|
+
* Authoring doctrine baked into the prompts: 6Ws answers are terse LABELS
|
|
18
|
+
* (3-4 words, hard cap <6) — a scannable spec card, not prose.
|
|
19
|
+
*/
|
|
20
|
+
/** Bump when questions/options change — consumers can pin or report it. */
|
|
21
|
+
export declare const INTERVIEW_VERSION = "faf-interview/1";
|
|
22
|
+
export interface InterviewOption {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
description: string;
|
|
26
|
+
}
|
|
27
|
+
export interface InterviewQuestion {
|
|
28
|
+
/** Canonical slot path (core/slots.ts is the spine). */
|
|
29
|
+
path: string;
|
|
30
|
+
question: string;
|
|
31
|
+
/** Short chip/header label (max ~12 chars) for option-UI consumers. */
|
|
32
|
+
header: string;
|
|
33
|
+
type: 'text' | 'select';
|
|
34
|
+
required: boolean;
|
|
35
|
+
options?: InterviewOption[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* THE 8-Q 6Ws INTERVIEW — the core. Project identity (name + goal) plus the
|
|
39
|
+
* six Ws. Language is deliberately NOT here: detection finds it; humans are
|
|
40
|
+
* only asked what machines cannot derive. The 6Ws are the underivable half.
|
|
41
|
+
*/
|
|
42
|
+
export declare const SIX_WS_INTERVIEW: InterviewQuestion[];
|
|
43
|
+
/**
|
|
44
|
+
* Stack interview — asked only for slots ACTIVE for the app_type and still
|
|
45
|
+
* empty. Selects where a common vocabulary exists; every select includes
|
|
46
|
+
* Other (specify) and None where absence is legitimate.
|
|
47
|
+
*/
|
|
48
|
+
export declare const STACK_INTERVIEW: InterviewQuestion[];
|
|
49
|
+
/** The full ordered registry: the 8-Q core first, then stack. */
|
|
50
|
+
export declare const INTERVIEW: InterviewQuestion[];
|
|
51
|
+
/** Lookup by slot path. */
|
|
52
|
+
export declare const INTERVIEW_BY_PATH: Map<string, InterviewQuestion>;
|
|
53
|
+
/**
|
|
54
|
+
* Interview voice for ANY slot: the registry question when one exists,
|
|
55
|
+
* otherwise derived from the slot's canonical description — so slot-driven
|
|
56
|
+
* flows (faf go) and registry-driven flows (faf_go) speak the same language.
|
|
57
|
+
*/
|
|
58
|
+
export declare function questionForSlot(path: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* The questions still worth asking for a given .faf: registry order, empty
|
|
61
|
+
* (or placeholder) slots only, slotignored skipped — the What-Not is never
|
|
62
|
+
* interviewed. `data` is the parsed .faf object.
|
|
63
|
+
*/
|
|
64
|
+
export declare function interviewForMissing(data: Record<string, unknown>, isEmpty: (value: unknown) => boolean): InterviewQuestion[];
|
package/dist/core/slots.d.ts
CHANGED
|
@@ -28,9 +28,10 @@ export declare const ENTERPRISE_SLOTS: SlotDef[];
|
|
|
28
28
|
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
|
-
/** App-type to active category mapping. The canonical
|
|
32
|
-
*
|
|
33
|
-
* + `encyclopedia` (curated knowledge surface, FAFipedia and similar)
|
|
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).
|
|
34
35
|
* (See v6.6.md doctrine memory + fafipedia-vs-grokipedia-architecture.)
|
|
35
36
|
* Sorted ascending by active slot count for readability.
|
|
36
37
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,6 @@ export { enrichScore, scoreFafYaml } from './core/scorer.js';
|
|
|
6
6
|
export { validateFaf } from './core/schema.js';
|
|
7
7
|
export { findFafFile, readFaf, readFafRaw } from './interop/faf.js';
|
|
8
8
|
export { generateProjectHtml, writeProjectHtml } from './interop/projecthtml.js';
|
|
9
|
+
export type { InterviewQuestion, InterviewOption } from './core/interview.js';
|
|
10
|
+
export { INTERVIEW, SIX_WS_INTERVIEW, STACK_INTERVIEW, INTERVIEW_BY_PATH, INTERVIEW_VERSION, questionForSlot, interviewForMissing, } from './core/interview.js';
|
|
9
11
|
export * as kernel from './wasm/kernel.js';
|