Version: 1.1 Compiled From: 33 ChatGPT conversations Last Updated: 2026-02-06
Last Verified: 2026-02-06 — All originally specified features are now implemented. See
docs/FEATURE-AUDIT.mdfor the complete spec→implementation mapping.
apps/web — Next.js 15 dashboard with 55+ components, mask editor, graph view, gallery view, pricing page, admin settings, blog, about page. Framer Motion v11 animations.apps/api — Fastify REST API with 50+ endpoints, GraphQL subscriptions via WebSocket, PDF/JSON-LD/VC export, pgvector semantic search, Stripe billing, rate limiting, ownership + admin middleware.apps/orchestrator — Node.js worker service with 10 agents, DLQ, task scheduler, GitHub webhook fulfillment.packages/schema — 24 Zod schemas: Identity, Profile, Mask, Stage, Epoch, CV entities (including CustomSection, TimelineEvent), Narrative, Verification, AgentResponse.packages/content-model — Taxonomy (16 masks, 8 epochs), narrative generation, mask selection algorithms, JSON-LD transforms, template bank.packages/core — Mask matching, DID resolvers (did:web, did:key, did:jwk, did:pkh), VC creation/validation, crypto utilities, billing/licensing logic.packages/design-system — Shared UI primitives with React 19 peer dependency.Core Thesis: A CV functions analogously to a blockchain ledger
| Concept | Blockchain | CV System |
|---|---|---|
| Full Record | Complete blockchain ledger | Curriculum Vitae (CV) |
| Derived View | Light client / State snapshot | Résumé |
| Verification | Consensus + signatures | Verifiable Credentials (VCs) |
| Identity | DID / Wallet address | Professional identity + DID |
| Immutability | Append-only chain | Chronological work history |
| Proof | Zero-knowledge proof | Selective disclosure résumé |
Key Insight:
All system outputs must address these invariants:
Status: Implemented subset includes Identity/Profile/Mask/Stage/Epoch schemas in packages/schema and Postgres storage for profiles/masks/epochs/stages in apps/api. Remaining entities are planned.
// Core system entities
IDENTITY_CORE
MASKS[]
EPOCHS[]
CLAIMS[]
CREDENTIALS[]
PROJECTS[]
OUTPUT_TEMPLATES[]
NARRATIVE_RULES[]
VERIFICATION_LOG[]
RELATIONS[]
interface IdentityCore {
thesis: string // Invariant professional essence
invariants: string[] // Core unchanging attributes
master_keywords: string[] // Semantic tags across all contexts
intellectual_lineage: string[] // Influences and traditions
strategic_differentiators: string[] // Unique positioning
tensions: string[] // Productive contradictions
constraints: string[] // Boundaries and non-goals
}
interface Identity {
id: UUID
did?: string // e.g. "did:ethr:0x..."
primaryWalletAddress?: string // Blockchain address
ensName?: string // Name system handle
emailHash?: string // Privacy-protected contact
externalIds?: ExternalId[] // LinkedIn, GitHub, ORCID, etc.
}
interface Profile {
id: UUID
identityId: UUID
slug: string // URL handle
displayName: string
title?: string // Professional headline
headline?: string // Short pitch
summaryMarkdown?: string
avatarUrl?: string
coverImageUrl?: string
locationText?: string
isActive: boolean
settings: ProfileSettings
createdAt: ISODateTime
updatedAt: ISODateTime
}
interface Experience {
id: UUID
profileId: UUID
roleTitle: string
organization: string
organizationUrl?: string
locationText?: string
startDate: ISODate
endDate?: ISODate
isCurrent: boolean
employmentType?: "full_time" | "part_time" | "freelance" | "contract" | "internship" | "self_employed" | "volunteer"
descriptionMarkdown?: string
highlights?: string[]
tags?: string[]
skillsUsed?: SkillRef[]
createdAt: ISODateTime
updatedAt: ISODateTime
}
interface Education {
id: UUID
profileId: UUID
institution: string
institutionUrl?: string
degree?: string
fieldOfStudy?: string
startDate?: ISODate
endDate?: ISODate
isCurrent: boolean
thesisTitle?: string
descriptionMarkdown?: string
createdAt: ISODateTime
updatedAt: ISODateTime
}
interface Project {
id: UUID
profileId: UUID
name: string
subtitle?: string
role?: string
startDate?: ISODate
endDate?: ISODate
isOngoing: boolean
url?: string
repoUrl?: string
mediaGallery?: MediaItem[]
descriptionMarkdown?: string
highlights?: string[]
tags?: string[]
skillsUsed?: SkillRef[]
createdAt: ISODateTime
updatedAt: ISODateTime
}
interface VerifiableCredential {
id: UUID
issuerIdentityId: UUID // Who issued this
subjectProfileId: UUID // Who it's about
types: string[] // e.g. ["VerifiableCredential", "EmploymentCredential"]
issuedAt: ISODateTime
expiresAt?: ISODateTime
credentialSubject: any // W3C VC payload
proof: any // Cryptographic proof
summary?: string // Human-readable
status?: "valid" | "revoked" | "expired" | "unknown"
createdAt: ISODateTime
updatedAt: ISODateTime
}
interface AttestationLink {
id: UUID
credentialId: UUID
entityType: "profile" | "experience" | "education" | "project" | "publication" | "award" | "certification" | "skill"
entityId: UUID
visibility: "public" | "private" | "issuer_only"
labelOverride?: string
createdAt: ISODateTime
updatedAt: ISODateTime
}
Status: Mask list, stage taxonomy, and epoch periods are implemented in packages/content-model with Postgres seeds; settings/relations remain planned.
interface Mask {
id: string
name: string // e.g., "Analyst Mask"
ontology: string // Functional classification
functional_scope: string // What this mask does
stylistic_parameters: {
tone: string // Professional, experimental, etc.
rhetorical_mode: string // Explanatory, persuasive, etc.
compression_ratio: number // How much detail to include
}
activation_rules: {
contexts: string[] // When to activate
triggers: string[] // What activates it
}
filters: {
include_tags: string[] // What content to show
exclude_tags: string[] // What to hide
priority_weights: Record<string, number>
}
}
Location: packages/content-model/src/mask-selection.ts
The mask selection algorithm determines which mask(s) are most appropriate for a given narrative context. It uses a multi-factor scoring system that considers context alignment, tag affinity, stage relevance, and epoch modifiers.
function maskWeight(
mask: Mask,
view: NarrativeViewConfig,
options?: { activeEpochIds?: string[]; stageIds?: string[] }
): number
Scoring Components:
| Component | Points | Description |
|---|---|---|
| Context Match | +2 per match | View contexts matching activation_rules.contexts |
| Trigger Match | +1 per match | View contexts matching activation_rules.triggers |
| Include Tag Match | +2 per match | View tags matching filters.include_tags |
| Exclude Tag Penalty | -1 per match | View tags matching filters.exclude_tags |
| Priority Weight Bonus | +weight value | View tags in filters.priority_weights |
| Stage Affinity | 0–1 per stage | From MASK_STAGE_AFFINITIES lookup table |
| Epoch Modifier | 0–1 per epoch | From EPOCH_MASK_MODIFIERS lookup table |
Total Score = Context + Trigger + IncludeTags - ExcludeTags + PriorityWeights + StageAffinity + EpochModifier
MASK_STAGE_AFFINITIES — How well each mask fits each stage (0–1 scale):
| Mask | inquiry | design | construction | calibration | transmission | reflection | negotiation | archival |
|---|---|---|---|---|---|---|---|---|
| analyst | 1.0 | — | — | 0.75 | — | — | — | 0.5 |
| synthesist | 0.5 | 1.0 | — | — | — | 0.75 | — | — |
| architect | — | 1.0 | 0.75 | 0.5 | — | — | — | — |
| executor | — | — | 1.0 | — | 0.5 | — | — | — |
| narrator | — | — | — | — | 1.0 | 0.75 | — | — |
| … | … | … | … | … | … | … | … | … |
EPOCH_MASK_MODIFIERS — Which masks are most relevant during each career epoch (0–1 scale):
| Epoch | Primary Masks | Secondary Masks |
|---|---|---|
| initiation | observer (1.0) | analyst (0.75), artisan (0.5), synthesist (0.5) |
| expansion | strategist (1.0) | integrator (0.75), mediator (0.5), executor (0.5) |
| mastery | architect (1.0) | calibrator (0.75), custodian (0.5), narrator (0.5) |
| legacy | custodian (1.0) | steward (0.75), narrator (0.5) |
selectMasksForView(view) — Returns masks sorted by relevance:
scoreMaskForView()selectBestMask(view, options) — Returns single best mask:
maskWeight() scoring with epoch/stage context// Given a view with research context and analysis tags
const view: NarrativeViewConfig = {
profile: myProfile,
contexts: ["research", "validation"],
tags: ["analysis", "metrics", "impact"],
availableMasks: MASK_TAXONOMY,
epochs: [EPOCH_TAXONOMY[0]], // initiation
};
// Select best mask
const selected = selectMasksForView(view);
// Result: [Analyst, Observer, Synthesist, ...]
// Analyst scores highest because:
// - contexts: ["analysis", "research", "validation"] → +4 (2 matches × 2)
// - triggers: ["metric", "benchmark"] → +1 (metrics ≈ metric)
// - include_tags: ["analysis", "metrics", "impact"] → +6 (3 matches × 2)
// - priority_weights: { impact: 2, metrics: 2 } → +4
// - epoch (initiation): observer=1.0, analyst=0.75 → +0.75
// Total: ~15+ points
For timeline-based contexts, individual entries are also scored for mask relevance:
function maskWeightForEntry(entry: TimelineEntry, mask: Mask): number
This enables:
Status: Current implementation is a monorepo with a single API and orchestrator service, plus a Next.js web app. Edge/auth gateways, microservices, and specialized data stores are not implemented yet.
┌─────────────────────────────────────────────────────────────┐
│ CLIENT LAYER │
│ ┌──────────┐ ┌──────────┐ ┌────────────────┐ │
│ │ Web App │ │ Mobile │ │ Admin Console │ │
│ │(Next.js) │ │ App │ │ (Internal) │ │
│ └──────────┘ └──────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ EDGE & SECURITY LAYER │
│ CDN + WAF ←→ Auth Gateway (OIDC + DID) ←→ Rate Limiter│
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ API GATEWAY / BFF │
│ (REST + GraphQL) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ SERVICE LAYER │
│ │
│ ┌─────────────────┐ ┌──────────────────┐ │
│ │ Identity Service│ │ Profile Service │ │
│ │ DID Resolver │ │ Career Graph DB │ │
│ └─────────────────┘ │ Timeline Service │ │
│ └──────────────────┘ │
│ ┌─────────────────┐ ┌──────────────────┐ │
│ │ VC Issuance │ │ Search Service │ │
│ │ VC Verification │ │ Vector Search │ │
│ │ SBT Service │ │ Matching Engine │ │
│ └─────────────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ DATA LAYER │
│ Relational DB | Document DB | Graph DB | Vector DB │
│ Search Index | Object Storage | Cache | Message Queue │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ BLOCKCHAIN / WEB3 LAYER │
│ DID Registry | VC Registry | SBT Registry | Wallet Service │
└─────────────────────────────────────────────────────────────┘
Frontend:
Backend:
Data Layer:
Blockchain:
Infrastructure:
Status: Orchestrator service exists with task queue, persistence, webhook parsing, and LLM adapters. CI-triggered cycles, PR creation, and merge governance are not implemented yet.
Treat the repository as a living system with a formal “genome” (seed.yaml) that defines:
Agent Roles:
version: 1
project:
name: "in--midst--my-life"
codename: "interactive-cv"
description: "Interactive mask-based CV/résumé system"
architecture:
style: "modular-monorepo"
tech_stack:
language: "TypeScript"
runtime: ["Node 22"]
frontend: ["Next.js 15"]
backend: ["Fastify"]
database:
primary: "PostgreSQL"
migrations: "raw-sql" # Direct SQL via pg.Pool (see ADR-004)
coding_standards:
language: "TypeScript"
tsconfig:
strict: true
noImplicitAny: true
style:
formatter: "prettier"
linter: "eslint"
quality_gates:
ci_required_checks: ["lint", "typecheck", "test"]
coverage:
global_minimum: 0.75 # 75%
critical_paths:
- path: "packages/schema"
minimum: 0.9 # 90%
- path: "packages/core"
minimum: 0.85 # 85%
growth_objectives:
roadmap_epics:
- id: "schema-v1"
title: "Canonical identity & mask schema"
- id: "editor-v1"
title: "Mask & timeline editor"
- id: "render-v1"
title: "CV/Résumé narrative generator"
constraints:
repo:
max_lines_per_file: 400
max_function_length_loc: 60
dependencies:
max_new_dependencies_per_pr: 1
require_issue_link_for_new_dependency: true
automation_contract:
ai_access:
read_paths: ["apps/*", "packages/*", "docs/*"]
write_paths:
- "packages/schema/**"
- "packages/content-model/**"
- "apps/web/src/**"
- "apps/api/src/**"
disallowed_writes:
- ".github/workflows/**"
- "infra/**"
- "seed.yaml"
merge_policy:
allow_auto_merge: false # Human review required initially
1. SENSE
├─ Read current repo state
├─ Collect metrics (coverage, complexity)
└─ Ingest open issues/tickets
2. PLAN
├─ Architect updates roadmap
└─ Selects tasks for this cycle
3. ACT
├─ Implementer applies changes
└─ Produces clean diff
4. CRITIQUE
├─ Reviewer analyzes diff
└─ Annotates problems
5. TEST
├─ Run tests in sandbox
└─ Tester refines test suite
6. DECIDE
├─ Maintainer + CI gates
└─ Auto-merge or human-review PR
7. LOG
└─ Update growth log and metrics
Total Effort: 37 Energy Units (EU)
| Phase | Focus | Effort (EU) | Key Deliverables |
|---|---|---|---|
| 1 | Foundational Architecture | 4 | Domain model, schema, architecture blueprint |
| 2 | Core Engine & Data Substrate | 6 | Knowledge graph, mask engine, media pipeline |
| 3 | Interaction Layer | 5 | Dynamic rendering, mask transformations, visuals |
| 4 | Authoring Studio | 7 | Creator tools, template generator, media module |
| 5 | Presentation & Export | 4 | Multiple export formats, viewing modes |
| 6 | Intelligence & Autonomy | 8 | AI curation, persona evolution, pattern detection |
| 7 | Deployment & Reliability | 3 | Infrastructure, APIs, security, performance |
Phase 1 → Phase 2 → Phase 3 → Phase 4
↓
Phase 5 ← Phase 6
↓
Phase 7
Phases 5 and 6 can partially overlap after Phase 4 completes.
Tasks:
Deliverables:
packages/schema/ with all TypeScript interfacespackages/identity/ with core identity logicdata/masks/ with mask configurationsTasks:
Deliverables:
Coding Rules (from seed.yaml):
Git Workflow:
mainDocumentation:
For complete details, consult these source documents:
Document Status: Consolidated from 33 conversations Confidence: High (directly extracted from source material) Next Action: Begin Phase 0 implementation following section 7.1