SB-S0 (Foundation) of the second-brain arc: a new TS package scripts/brain/
(structural copy of specifics-bank) establishing the spine later slices hang on.
TDD throughout (failing test first); fold scope = P1+P2 only per operator decision.
- types.ts: one provenance vocab (human|published|ai-draft) + the six-field
ProfileFact record + two-layer ProfileDoc.
- id.ts: slugify + mintEntityId (sha256[:12], kind-namespaced, slug-keyed so the
id is stable across value edits) + normalizeProvenance (throws on unknown). [SC4]
- profile.ts: no-YAML line-grammar parse/serialize (parse∘serialize = identity over
the whole doc; values may contain ]/|/quotes) [SC2] + foldUserProfile: lossless,
idempotent, source-absent-aware fold of config/user-profile.template.md. Pinned
extraction — P1 labeled scalars (group-headers skipped, [placeholder]→empty) + P2
expertise group; stops at "### Research Tooling" so deferred explainer prose can't
leak in as fields. Checkbox-prefs (Goals/Tone/MCPs/Assets) deferred (§8). [SC3]
- dataRoot.ts: inline per-package resolver (repo idiom; no new seam → SC6).
- scaffold.ts/cli.ts: idempotent `brain init` — brain/{index,profile,operations}.md
+ journal/ + ingest/{inbox,published} under the data-dir; compare-then-skip, never
clobbers a user edit. No session-start wiring (SB-S2 owns it). [SC1]
Gate: new BRAIN floor in test-runner.sh (34 tests; trends/specifics/contract floors
unchanged) + anti-erosion floor 74→75. Full gate 90/0/0, tsc --noEmit clean. [SC5/SC6]
No new command/agent/reference → no version bump, no structure-count change.
Refs docs/second-brain/{brief,plan-sb-s0,architecture}.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RigJBiRFNtFZKCz21qNbQ4
82 lines
1.8 KiB
Text
82 lines
1.8 KiB
Text
# Secrets and sensitive files
|
|
.mcp.json
|
|
.env
|
|
.env.*
|
|
|
|
# Local configuration
|
|
*.local.md
|
|
# Real voice profile is personal data — adopters keep theirs local; the tracked
|
|
# authentic-voice-samples.md ships as a sentinel placeholder. (Already matched by
|
|
# *.local.md above; listed explicitly so the intent is unmissable.)
|
|
assets/voice-samples/authentic-voice-samples.local.md
|
|
|
|
# Session state (personal activity, auto-initialized from template)
|
|
REMEMBER.md
|
|
|
|
# Credentials
|
|
credentials.json
|
|
*-secret*
|
|
*.pem
|
|
*.key
|
|
|
|
# OS files
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# IDE
|
|
.idea/
|
|
.vscode/
|
|
*.swp
|
|
*.swo
|
|
|
|
# Temporary files
|
|
*.tmp
|
|
*.bak
|
|
|
|
# Draft content (personal posts)
|
|
assets/drafts/queue.json
|
|
assets/drafts/week-*/
|
|
|
|
# Analytics data (personal performance data)
|
|
assets/analytics/exports/
|
|
assets/analytics/posts/
|
|
assets/analytics/weekly-reports/
|
|
assets/analytics/content-history.md
|
|
|
|
# Internal development files (not for public release)
|
|
BACKLOG.md
|
|
docs/DEVELOPMENT-LOG.md
|
|
|
|
# Generated annotation/review artifacts (regenerable; annotations live in browser localStorage)
|
|
docs/review/
|
|
docs/**/*.html
|
|
# Voyage executor bookmarks (local continuity, not tracked)
|
|
docs/**/.session-state.local.json
|
|
*.local.json
|
|
|
|
# Node.js
|
|
scripts/analytics/node_modules/
|
|
scripts/analytics/build/
|
|
scripts/brain/node_modules/
|
|
scripts/brain/build/
|
|
scripts/contract-gate/node_modules/
|
|
scripts/contract-gate/build/
|
|
scripts/specifics-bank/node_modules/
|
|
scripts/specifics-bank/build/
|
|
scripts/trends/node_modules/
|
|
scripts/trends/build/
|
|
|
|
# --- session/local state ---
|
|
# STATE.md is LOCAL-ONLY (gitignored): no private remote exists and STATE must
|
|
# never reach the public open/ mirror. Deliberate deviation from the global
|
|
# "STATE tracked" rule, justified by the absence of any private remote.
|
|
STATE.md
|
|
REMEMBER.md
|
|
ROADMAP.md
|
|
TODO.md
|
|
NEXT-SESSION-PROMPT*.local.md
|
|
*.local.md
|
|
*.local.json
|
|
*.local.sh
|
|
.DS_Store
|
|
.claude/
|