Archetype AI
Web
.
Components
40
Data flows
0
Stores
0
Endpoints
6
Unused
12
Skipped parses
0
Last ingest
9/19/2026, 9:19:06 PM
caa052369e0e
Architecture insights
Import cycles
No static-import cycles.
Hotspots
- POST
8 incoming · unknown
- client
7 incoming · unknown
- CODEBASE_GRAPH_QUERY
6 incoming · unknown
- PROJECTS_QUERY
6 incoming · unknown
- metadata
0 incoming · fresh
- HomePage
0 incoming · fresh
- ComponentTreeList
2 incoming · unknown
- syncRepositoryToSanity
2 incoming · unknown
Client → server imports
No "use client" files import "use server" or server-only modules.
Watchlist
Unused
- internalGroqTypeReferenceTo
sanity.types.ts · Types / generated types
- parse-and-sync
scripts/parse-and-sync.ts · Likely app code
- ComponentNode
src/components/canvas/nodes/ComponentNode.tsx · Likely app code
- EndpointNode
src/components/canvas/nodes/EndpointNode.tsx · Likely app code
- GroupNode
src/components/canvas/nodes/GroupNode.tsx · Likely app code
- StoreNode
src/components/canvas/nodes/StoreNode.tsx · Likely app code
- nodeTypes
src/components/canvas/nodes/index.ts · Likely app code
- ArchitectureCanvas
src/components/hud/ArchitectureCanvas.tsx · Likely app code
- CustomComponentNode
src/components/hud/CustomComponentNode.tsx · Likely app code
- findGitRoot
src/lib/engine/gitHistory.ts · Likely app code
- server
src/mcp/server.ts · Likely app code
- COMPONENT_FIELDS
src/sanity/fragments.ts · Likely app code
TODOs / FIXMEs
- AskChat
TODO: and FIXME comments",
- createParserContext
TODO: ' | 'fixme' | 'hack' | 'xxx'; · TODO: |FIXME|HACK|XXX)\b[:\s-]*(.*)$/i;
- answerCodebaseQuestion
TODO: |fixme|hack)\b/.test(lower)) return { intent: "todos", terms }; · TODO: /FIXME markers.` : "No TODO/FIXME markers indexed.",
Recently changed
Parse failed
No skipped files.
Route tree
layout
metadata
Open treesrc/app/layout.tsx
Parsed automatically from src/app/layout.tsx. Client: false.
component
next.config
Open treenext.config.ts
component
next.config
Open treenext.config.ts
component
next.config
Open treenext.config.ts
test
no-next-runtime.test
Open treesrc/lib/grants/no-next-runtime.test.ts
The grants sync must not drag the Next.js runtime behind it. It runs as a plain Netlify background function, outside the Next build. On 2026-09-04 the deployed function died on EVERY invocation with ERR_MODULE_NOT_FOUND for `next/server`, pulled in through a chain nothing looked at: sync → ecosystem-monitors → api-helpers → next/server, all for `generateId`. tsc, lint and 1,363 tests passed the wh
test
no-next-runtime.test
Open treesrc/lib/grants/no-next-runtime.test.ts
The grants sync must not drag the Next.js runtime behind it. It runs as a plain Netlify background function, outside the Next build. On 2026-09-04 the deployed function died on EVERY invocation with ERR_MODULE_NOT_FOUND for `next/server`, pulled in through a chain nothing looked at: sync → ecosystem-monitors → api-helpers → next/server, all for `generateId`. tsc, lint and 1,363 tests passed the wh
component
vitest.config
Open treevitest.config.ts
// B0 (copilot-sota): stand up the test runner for the LaunchPad WEB CLOSURE only.
api-route
GET
Open treesrc/app/api/projects/[projectId]/intelligence-briefs/route.ts
GET /api/projects/{projectId}/intelligence-briefs Query params: status — filter by brief status (active | expired | superseded | dismissed). Omitted → defaults to excluding dismissed briefs. entity — filter by entity_name limit — max results (default 20)
hook
useIntelligenceBriefs
Open treesrc/hooks/useIntelligenceBriefs.ts
Fetches active intelligence briefs for a project. Cached via TanStack under the 'briefs' topic so it survives tab navigation (no refetch on remount). It refreshes only when the lp-actions-changed bridge invalidates 'briefs' — e.g. after streaming ends or an action is applied.
test
commit-fast-path.test
Open treesrc/lib/chat/commit-fast-path.test.ts
// Commit-guard regexes copied VERBATIM from src/app/api/chat/route.ts
utility
parseChipCommit
Open treesrc/lib/chat/commit-fast-path.ts
Deterministic chip-commit fast path (velocity lever). When a founder clicks a commit option (OptionSetCard `commit:apply`), the evidence is ALREADY persisted by the client's awaited POSTs (/idea-canvas, /validation/commit) BEFORE /api/chat is even called. The follow-up model turn used to spend ~12-15s and 1 credit narrating a confirmation the server could compose deterministically. This module hol
test
gate-writepath.live.test
Open treesrc/lib/journey/gate-writepath.live.test.ts
Gate write-path audit — is every fact-driven gate check MECHANICALLY closeable, end to end, through the real executor? ── Why this exists, and what it is NOT ──────────────────────────────────── `scripts/gate-baseline.mjs` answers "does FOLLOWING the product close the gate?" by driving N founders through the real chat API. That measurement is irreducibly LLM-bound — what it measures IS whether the
test
no-next-runtime.test
Open treesrc/lib/grants/no-next-runtime.test.ts
The grants sync must not drag the Next.js runtime behind it. It runs as a plain Netlify background function, outside the Next build. On 2026-09-04 the deployed function died on EVERY invocation with ERR_MODULE_NOT_FOUND for `next/server`, pulled in through a chain nothing looked at: sync → ecosystem-monitors → api-helpers → next/server, all for `generateId`. tsc, lint and 1,363 tests passed the wh
component
vitest.config
Open treevitest.config.ts
// B0 (copilot-sota): stand up the test runner for the LaunchPad WEB CLOSURE only.
api-route
GET
Open treesrc/app/api/projects/[projectId]/intelligence-briefs/route.ts
GET /api/projects/{projectId}/intelligence-briefs Query params: status — filter by brief status (active | expired | superseded | dismissed). Omitted → defaults to excluding dismissed briefs. entity — filter by entity_name limit — max results (default 20)
utility
query
Open treesrc/lib/db/index.ts
// ---------------------------------------------------------------------------
utility
json
Open treesrc/lib/api-helpers.ts
// Map DB row { id } to frontend { project_id } for projects
component
ARTIFACTS_REQUIRING_SOURCES
Open treesrc/types/artifacts.ts
Source — verifiable provenance for every factual claim the agent makes. Enforced across artifacts (via parser) and prose (via [N] inline markers). The five variants cover the full spectrum of provenance: - web: external evidence (URL from web_search / read_url / Jina). The default for market claims, competitor data, benchmarks. - skill: a prior skill run (e.g., "per market-research 2026-04
test
graph.test
Open treesrc/types/graph.test.ts
// MACRO_CATEGORY and NODE_TYPE_LABEL are Record<GraphNodeType, …> so the
component
MACRO_CATEGORY
Open treesrc/types/graph.ts
Macro-category grouping — the "matrioska" the founder asked for in the 2026-06 weekly sync, expanded 2026-07 to the 12-satellite hub-and-spoke of the mockup: every node type collapses into one of 12 founder-legible ecosystem roles arranged clockwise around the startup root. The old catch-all "contesto" is gone — its former residents now have real homes (technology → trend_tech, trend/signal → tren
utility
requireProjectAccess
Open treesrc/lib/auth/require-project-access.ts
How the current user gained access to the project. Owner = via the project's org_id matching their org; member = via a project_members row. Lets API routes treat sharing-management + project-deletion as owner-only.
hook
useIntelligenceBriefs
Open treesrc/hooks/useIntelligenceBriefs.ts
Fetches active intelligence briefs for a project. Cached via TanStack under the 'briefs' topic so it survives tab navigation (no refetch on remount). It refreshes only when the lp-actions-changed bridge invalidates 'briefs' — e.g. after streaming ends or an action is applied.
component
ARTIFACTS_REQUIRING_SOURCES
Open treesrc/types/artifacts.ts
Source — verifiable provenance for every factual claim the agent makes. Enforced across artifacts (via parser) and prose (via [N] inline markers). The five variants cover the full spectrum of provenance: - web: external evidence (URL from web_search / read_url / Jina). The default for market claims, competitor data, benchmarks. - skill: a prior skill run (e.g., "per market-research 2026-04
test
graph.test
Open treesrc/types/graph.test.ts
// MACRO_CATEGORY and NODE_TYPE_LABEL are Record<GraphNodeType, …> so the
component
MACRO_CATEGORY
Open treesrc/types/graph.ts
Macro-category grouping — the "matrioska" the founder asked for in the 2026-06 weekly sync, expanded 2026-07 to the 12-satellite hub-and-spoke of the mockup: every node type collapses into one of 12 founder-legible ecosystem roles arranged clockwise around the startup root. The old catch-all "contesto" is gone — its former residents now have real homes (technology → trend_tech, trend/signal → tren
test
commit-fast-path.test
Open treesrc/lib/chat/commit-fast-path.test.ts
// Commit-guard regexes copied VERBATIM from src/app/api/chat/route.ts
component
vitest.config
Open treevitest.config.ts
// B0 (copilot-sota): stand up the test runner for the LaunchPad WEB CLOSURE only.
utility
CANVAS_COMMIT_FIELD_KEYS
Open treesrc/lib/canvas-commit.ts
Field picker for the one-click deterministic canvas commit (chat option-set `commit.canvas`). Pure — shared by the chat page handler and unit tests. All 11 Lean Canvas blocks are allowed: the 7 core/text fields plus the 4 SOFT fields (unfair_advantage text; key_metrics / revenue_streams / cost_structure as lists). The model may emit list fields as arrays OR as prose strings — strings pass through
utility
detectRiskOverrides
Open treesrc/lib/direction/index.ts
Direction engine — the single source of truth for "what should the founder do next?". Iteration-2 / WS-B. Direction was already COMPUTED deterministically (`getStageReadiness().next_recommended_skill`, `activeStage()`), but only reachable by the chat via a tool the model might forget to call — so proactivity was left to the LLM re-deriving it each turn ("feels passive"). This module CONSOLIDATES t
test
needs-phase0-scoring.test
Open treesrc/lib/direction/needs-phase0-scoring.test.ts
// needsPhase0Scoring hits the DB (scores probe) and skill-prereqs (canvas
utility
parseChipCommit
Open treesrc/lib/chat/commit-fast-path.ts
Deterministic chip-commit fast path (velocity lever). When a founder clicks a commit option (OptionSetCard `commit:apply`), the evidence is ALREADY persisted by the client's awaited POSTs (/idea-canvas, /validation/commit) BEFORE /api/chat is even called. The follow-up model turn used to spend ~12-15s and 1 credit narrating a confirmation the server could compose deterministically. This module hol
utility
CANVAS_COMMIT_FIELD_KEYS
Open treesrc/lib/canvas-commit.ts
Field picker for the one-click deterministic canvas commit (chat option-set `commit.canvas`). Pure — shared by the chat page handler and unit tests. All 11 Lean Canvas blocks are allowed: the 7 core/text fields plus the 4 SOFT fields (unfair_advantage text; key_metrics / revenue_streams / cost_structure as lists). The model may emit list fields as arrays OR as prose strings — strings pass through
utility
NODE_STEP_PREFIX
Open treesrc/lib/chat/node-scope.ts
Node-scoped chat threads (#330, epic #324). A per-node thread is just the main chat pipeline addressed with a different `step`. That works with ZERO schema change because `step` is already the thread axis everywhere it matters: - `chat_messages.step` is a free-form VARCHAR (no CHECK constraint), - `useChat` keys its module store by `${projectId}::${step}`, - `GET /api/chat/history` filters b
utility
src/lib/i18n/messages/en.ts
English message catalog — the CANONICAL key set. Every other language is a `Partial` of this, so: - `MessageKey` (the union of valid keys) is derived from this file, - a missing key in another language silently falls back to English, - TypeScript flags a typo'd key at every `t('...')` call site. Keys are namespaced by surface (`nav.*`, `settings.*`, `common.*`). Use `{name}` placeholders for
utility
translate
Open treesrc/lib/i18n/messages/index.ts
Catalog registry + the `translate` core used by the `useT` hook. Lookup chain for every key: locale catalog → English → the key itself. That means a half-translated language degrades gracefully to English rather than rendering blanks, and a typo'd key shows the key (a visible signal in dev) instead of crashing. UI catalogs exist for en + it — the only locales in SUPPORTED_LOCALES (the picker is r
utility
src/lib/i18n/messages/it.ts
Italian message catalog. Partial — any key omitted here falls back to the English value in en.ts. The app already ships curated Italian agent prompts, so Italian is the most complete non-default UI translation.
utility
SUPPORTED_LOCALES
Open treesrc/lib/i18n/locales.ts
Locale registry — the single source of truth for which languages the app supports, how they're named, and how to validate an untrusted string. Everything else (the agent prompt loader, the UI message catalogs, the settings selector, the resolution logic) imports `Locale` and the helpers from here, so adding a language is a one-line change in SUPPORTED_LOCALES plus a message catalog. Note the split
utility
detectRiskOverrides
Open treesrc/lib/direction/index.ts
Direction engine — the single source of truth for "what should the founder do next?". Iteration-2 / WS-B. Direction was already COMPUTED deterministically (`getStageReadiness().next_recommended_skill`, `activeStage()`), but only reachable by the chat via a tool the model might forget to call — so proactivity was left to the LLM re-deriving it each turn ("feels passive"). This module CONSOLIDATES t
test
needs-phase0-scoring.test
Open treesrc/lib/direction/needs-phase0-scoring.test.ts
// needsPhase0Scoring hits the DB (scores probe) and skill-prereqs (canvas
test
gate-writepath.live.test
Open treesrc/lib/journey/gate-writepath.live.test.ts
Gate write-path audit — is every fact-driven gate check MECHANICALLY closeable, end to end, through the real executor? ── Why this exists, and what it is NOT ──────────────────────────────────── `scripts/gate-baseline.mjs` answers "does FOLLOWING the product close the gate?" by driving N founders through the real chat API. That measurement is irreducibly LLM-bound — what it measures IS whether the
component
vitest.config
Open treevitest.config.ts
// B0 (copilot-sota): stand up the test runner for the LaunchPad WEB CLOSURE only.
utility
query
Open treesrc/lib/db/index.ts
// ---------------------------------------------------------------------------
utility
json
Open treesrc/lib/api-helpers.ts
// Map DB row { id } to frontend { project_id } for projects
utility
buildMonitorScanPrompt
Open treesrc/lib/action-executors.ts
Action Executors — the Phase 0 "sent" transition implementation. When a founder applies a pending_action, this module is the dispatch layer that turns "applied" intent into an actual effect. Two classes of action: 1. STRUCTURED actions — write directly to a domain table (growth_iterations, investor_interactions, graph_nodes). Applying transitions straight to 'sent' atomically. 2. COM
utility
CANONICAL_STAGES
Open treesrc/lib/journey/canonical.ts
Canonical 7-stage taxonomy — THE single source of truth for stage ids, numbers, and founder-facing labels. Every surface (journey gate checks in this module, the pipeline-skill engine in src/lib/stages.ts, the chat system prompt, StageCard, SpineSection, /api/projects/[id]/stages and /intelligence) must render stages with EXACTLY these labels and this numbering. The pre-unification names ("Spark /
test
chat-proposable-kinds.test
Open treesrc/lib/journey/chat-proposable-kinds.test.ts
The write path, end to end: keyword family → item kind → source mapping → executor Apply. It was complete on every side EXCEPT the chat proposer, which accepted three hardcoded kinds while the executor handled 22. A gate walkthrough priced the bug: a founder who clicked every substep and said exactly what the product suggested closed 3 of 21 checks. The co-pilot produced real GTM, IP, regulatory a
test
gate-fact-ownership.test
Open treesrc/lib/journey/gate-fact-ownership.test.ts
Gate-fact ownership — a fact approved as family X greens X and nothing else. The defect these pin (measured on prod 2026-08-14): the apply path collapsed all 13 approved item kinds into kind='observation' and re-encoded the family as a text prefix, so every check re-derived meaning by keyword over the whole corpus. 18 of 103 gate greens were false — 14 of them cross-family bleed: an approved GTM f
test
gate-writepath.live.test
Open treesrc/lib/journey/gate-writepath.live.test.ts
Gate write-path audit — is every fact-driven gate check MECHANICALLY closeable, end to end, through the real executor? ── Why this exists, and what it is NOT ──────────────────────────────────── `scripts/gate-baseline.mjs` answers "does FOLLOWING the product close the gate?" by driving N founders through the real chat API. That measurement is irreducibly LLM-bound — what it measures IS whether the
utility
STAGES
Open treesrc/lib/journey/index.ts
Stages — public API. `evaluateAllStages(snapshot)` runs every stage's checks against the project snapshot and returns ordered StageEvaluations with status (done/active/ pending). The first stage that isn't done becomes "active".
test
operate-fact-targets.test
Open treesrc/lib/journey/operate-fact-targets.test.ts
// Operate-stage digest kinds (plan happy-beacon B1): metric / financial_fact /
test
phases.test
Open treesrc/lib/journey/phases.test.ts
// Tooltip coverage (spine hover explainers). The component maps phase and loop
utility
PHASES
Open treesrc/lib/journey/phases.ts
Phase view — a READ-ONLY reduction of the 7 canonical stages into the founder- facing 5 macro phases (+ the cross-cutting Financial & Pitch module + the 4 validation loops in the critical transitions), matching the /demo spine and Luca's architecture table. This is presentation only: it groups the existing `evaluateAllStages()` output and the live `validation_loops` — it does NOT change stage ids,
utility
buildProjectSnapshot
Open treesrc/lib/journey/snapshot.ts
Snapshot builder — reads every facet table needed by stage evaluators in one parallel batch. Called once per /api/projects/[id]/stages request. Keep this in lockstep with ProjectSnapshot in types.ts: when a check needs a new field, add it here AND extend the type.
test
spine-preview.test
Open treesrc/lib/journey/spine-preview.test.ts
// The upload draft's per-stage spine preview (stage → checks filled → the
test
stage-1-idea-validation.test
Open treesrc/lib/journey/stage-1-idea-validation.test.ts
Stage 1 — Idea Canvas (L2 spec Phase 0) — evaluator unit test. The 9 checks must mirror the spec's Phase-0 step list 1:1 (founder feedback 2026-07: "il blocco Idea Canvas è rimasto uguale come workflow"), in order, and each must flip on exactly its evidence.
utility
baselineScore100
Open treesrc/lib/journey/stage-1-idea-validation.ts
Stage 1 — Idea Validation (L2 spec Phase 0 — "Idea Canvas"). The founder structures the raw idea into a full Lean Canvas and sets the Startup Scoring baseline for the whole cycle. Not market-validated yet — assumptions made explicit before they harden into implicit certainties. Reworked 2026-07 to mirror the L2 Iteration Cycle spec Phase-0 step list 1:1 (founder feedback: "il blocco Idea Canvas è
utility
MARKET_SIZE_CHECK_SOURCE
Open treesrc/lib/journey/stage-2-market-validation.ts
Stage 2 — Validation Gate (L2 Phase 1). Evidence that the problem is real, painful, and frequent enough that someone would pay to solve it — and that you can name why you win. Three sub-tracks per the L2 walkthrough §2: 1A Market — problem, segment, competitors, sizing, differentiation, L1 watchers. Runs in parallel with 1B. 1B Technical — feasibility, dependencies, regulat
utility
stagePersona
Open treesrc/lib/journey/stage-3-persona.ts
Stage 3 — Persona. Beachhead chosen. ICP defined. Acquisition path imagined. The founder can point at a specific list of N people and say "these are the ones." Re-bucketing note (2026-06 taxonomy unification): all of legacy "Segment"'s checks, unchanged ids and evaluator logic. 2026-07 (L2 Phase-0 alignment): the `target_market` presence check moved to Stage 1 as `target_icp_defined` — the spec pu
test
stage-4-business-model.test
Open treesrc/lib/journey/stage-4-business-model.test.ts
Stage 4 — Business Essentials (Iteration Cycle 2A). The two checks added 2026-08-04 must be CLOSEABLE: a check reading a column nothing fills is permanently red (#251). Every assertion here is about the write path being intact, not about the check merely existing.
utility
COGS_OPEX_KEYWORDS
Open treesrc/lib/journey/stage-4-business-model.ts
Stage 4 — Business Model. Anchor set. Tiers articulated. Willingness-to-pay researched. Unit economics show a viable shape (LTV : CAC at least 1, payback under 18mo). Re-bucketing note (2026-06 taxonomy unification): all of legacy "Pricing"'s checks, unchanged ids and evaluator logic.
utility
stageBuildLaunch
Open treesrc/lib/journey/stage-5-build-launch.ts
Stage 5 — Build & Launch. Build → ship → first users. Workflow is active, scope is defined, tasks are moving, something is published, early users are in. Re-bucketing note (2026-06 taxonomy unification): all of legacy "MVP"'s checks, unchanged ids and evaluator logic. (The 'spark'/'idea' strings in scope_defined are persisted workflow.current_step values, not stage ids.)
utility
stageFundraise
Open treesrc/lib/journey/stage-6-fundraise.ts
Stage 6 — Fundraise. Runway is clear (or revenue is replacing it) and the capital plan is in motion — a round open or revenue compounding. Re-bucketing note (2026-06 taxonomy unification): legacy "Growth"'s runway_clear + capital_plan checks, unchanged ids and evaluator logic. Growth's loop/metric checks moved to Stage 7 (Operate).
test
stage-7-operate.test
Open treesrc/lib/journey/stage-7-operate.test.ts
Stage 7 — Operate — metrics_tracked gate. Regression guard (2026-07-13): the dashboard REST POST blind-inserts metrics with no dedup, so a repeated name would inflate a raw `.length` count and green this gate off a single real metric. The gate must count DISTINCT names.
utility
stageOperate
Open treesrc/lib/journey/stage-7-operate.ts
Stage 7 — Operate. Loops running. Metrics tracked. The founder is no longer guessing — they're optimizing a repeatable engine. Re-bucketing note (2026-06 taxonomy unification): legacy "Growth"'s loop_active + metrics_tracked checks, unchanged ids and evaluator logic. Growth's runway/capital checks moved to Stage 6 (Fundraise).
test
stage-history.test
Open treesrc/lib/journey/stage-history.test.ts
// Minimal StageEvaluation fixtures (only the fields recordStageTransitions reads).
utility
recordStageTransitions
Open treesrc/lib/journey/stage-history.ts
Stage transition history (gap 5) — the 7-stage journey is recomputed every turn (single source of truth) and never persisted, so there was no way to answer "when did Stage 1 close?" or diff progress week-over-week. This keeps an APPEND-ONLY `stage_events` log: the evaluator stays pure (evaluateAllStages writes nothing); the write lives HERE, in the caller, and only inserts a row when a check or st
test
stage-lock-ui.test
Open treesrc/lib/journey/stage-lock-ui.test.ts
// Gap B: evaluateAllStages marks failed checks of PENDING stages 5-7 as
test
stage-lock.test
Open treesrc/lib/journey/stage-lock.test.ts
// stageSequenceLock reads a journey snapshot then evaluates stages. Mock the
utility
LOCK_FROM_STAGE
Open treesrc/lib/journey/stage-lock.ts
Stage-sequence lock (founder directive 2026-07-13): the execution stages — Build & Launch (5), Fundraise (6), Operate (7) — are LOCKED until every earlier stage is complete ('done'). A founder should not spin up an MVP, pitch investors, or run ops dashboards before the idea is validated, the persona is proven, and the business model is scored. This is a HARD gate on RUNNING those stages' skills (m
test
stage-prompt.phase0.test
Open treesrc/lib/journey/stage-prompt.phase0.test.ts
Phase-0 copilot behaviour (founder changelog 4/08 — #384, #386, #387). Four complaints, one root: on a fresh project the agent pushed competitor research, offered to invert the phases, and answered a rough "main cost & revenue sources" question with a full pricing analysis. He was explicit that this is a REGRESSION — "nello scorso testing era perfetto". Prompt guidance has no type checker, so thes
utility
JOURNEY_RULES
Open treesrc/lib/journey/stage-prompt.ts
Stage context formatter — turns a project snapshot into a structured block the chat agent can read in its system prompt to focus on the active journey stage and its missing evidence. Wire: called from src/app/api/chat/route.ts where the system prompt is built. Output gets prepended to projectContext so it sits near the top of the agent's instructions.
test
tech-fact-prefixes.test
Open treesrc/lib/journey/tech-fact-prefixes.test.ts
The last link of the write path: keyword family → item kind → source mapping → **executor Apply prefix**. The prefix is the link that rots silently — the check keyword-matches memory_facts, so a prefix that drifts out of its family turns the check red for every founder while every test still passes. These pin the four tech_fact prefixes to the four keyword lists they must satisfy, in BOTH locales.
test
tech-fact-targets.test
Open treesrc/lib/journey/tech-fact-targets.test.ts
// The technical-validation deterministic fallback (cert 2026-07-07) stages
utility
TRACK_LABEL
Open treesrc/lib/journey/tracks.ts
Validation-Gate sub-tracks (walkthrough §2) — the ONE definition of the 1A / 1B / 1C labels, their hover explainers, and their render order. Only the validation stage tags its checks with a track; everywhere else `track` is undefined and the checks render flat. This lives in lib (not in either component) because BOTH the Home StageCard and the Canvas SpineSection render these tracks. They previous
utility
types
Open treesrc/lib/journey/types.ts
Stages — types for the 7-stage founder journey ("smarcamento"). Stages are HORIZONTAL checkpoints across the VERTICAL facet data (Canvas / Intel / Product / Pricing / Finance / Growth). Each stage declares its evidence contract: a list of checks that read the project snapshot and return passed/gap verdicts with source pointers. The founder doesn't see a numeric score — they see "Stage N: 4 of 7 ch
test
validation-gate-1b.test
Open treesrc/lib/journey/validation-gate-1b.test.ts
L2 Validation Gate · track 1B (Technical Validation) — integration test. Exercises the REAL evaluateAllStages over the validation stage so we prove the "validate man mano" chain end-to-end: APPLIED chat memory_facts flip the 1B checks green incrementally. ⚠️ How a fact BECOMES applied changed on 2026-08-09: save_memory_fact no longer writes a gate-moving fact straight to memory — it stages an appr
test
validation-gate-1c-revision.test
Open treesrc/lib/journey/validation-gate-1c-revision.test.ts
The three 1C steps that ask whether the founder REVISED their thinking after meeting customers — "Solution described in-depth (aggiornata sulla base degli insight)", "Value proposition sharpened", "Startup Scoring review". All three measure a CHANGE, which is the whole point: a solution written before anyone was interviewed is a hypothesis, and a check that accepts it would green on evidence the f
test
validation-gate-tracks.test
Open treesrc/lib/journey/validation-gate-tracks.test.ts
L2 Validation Gate — Phase-1 track restructure (1A ∥ 1B → 1C). Proves: track membership, the 1C lock/unlock behavior, the structured-first market_size check, the new wtp_signal check, the validation-targets source sync, and the Phase-1 watcher predicate truth table.
utility
CHAT_PROPOSABLE_KINDS
Open treesrc/lib/journey/validation-targets.ts
validation-targets — the reverse map at the heart of the validation gate. Founder directive (2026-06-12): NOTHING turns a spine substep green without the founder's explicit yes. To propose a write for approval, we must tell the founder EXACTLY which substep it would satisfy ("validates ✓ 3+ competitors mapped — Stage 2"). This module answers that question. It indexes the REAL check definitions (`S
test
journey-prompt-routing.test
Open treesrc/lib/journey-prompt-routing.test.ts
Clicking a red substep pre-fills the co-pilot composer. WHICH sentence it fills is decided by keyword-matching the check's English label against an ordered rule chain — and a label that matches an earlier, broader rule is silently routed to the wrong conversation. Nothing type-checks that. It had already happened twice, found 2026-08-14 by running the real router: Build approach sketched (archit
test
journey-prompts.test
Open treesrc/lib/journey-prompts.test.ts
// Build locale-bound translate fns matching the TFn the helpers expect.
utility
checkActionPrompt
Open treesrc/lib/journey-prompts.ts
Map an open validation check's label to an actionable co-pilot prompt. Keyword-matched (robust to check-id / label changes). Shared by the chat empty-state briefing, the project-brief endpoint, and the clickable SpineSection substeps — so "click an unmet substep → pre-fill chat" and the briefing's next steps always phrase the ask the same way. Pure → depends only on the injected translate fn, so i
component
ARTIFACTS_REQUIRING_SOURCES
Open treesrc/types/artifacts.ts
Source — verifiable provenance for every factual claim the agent makes. Enforced across artifacts (via parser) and prose (via [N] inline markers). The five variants cover the full spectrum of provenance: - web: external evidence (URL from web_search / read_url / Jina). The default for market claims, competitor data, benchmarks. - skill: a prior skill run (e.g., "per market-research 2026-04
test
graph.test
Open treesrc/types/graph.test.ts
// MACRO_CATEGORY and NODE_TYPE_LABEL are Record<GraphNodeType, …> so the
component
MACRO_CATEGORY
Open treesrc/types/graph.ts
Macro-category grouping — the "matrioska" the founder asked for in the 2026-06 weekly sync, expanded 2026-07 to the 12-satellite hub-and-spoke of the mockup: every node type collapses into one of 12 founder-legible ecosystem roles arranged clockwise around the startup root. The old catch-all "contesto" is gone — its former residents now have real homes (technology → trend_tech, trend/signal → tren
page
IngestPage
Open treesrc/app/ingest/page.tsx
Parsed automatically from src/app/ingest/page.tsx. Client: true.
page
revalidate
Open treesrc/app/hud/page.tsx
Parsed automatically from src/app/hud/page.tsx. Client: false.
page
CanvasPage
Open treesrc/app/canvas/page.tsx
Parsed automatically from src/app/canvas/page.tsx. Client: false.
page
ProjectPage
Open treesrc/app/[slug]/page.tsx
Parsed automatically from src/app/[slug]/page.tsx. Client: false.