Skip to content

feat: extract-takes as first-class gbrain command (spec)#858

Closed
garrytan-agents wants to merge 1 commit into
garrytan:masterfrom
garrytan-agents:feat/extract-takes-command
Closed

feat: extract-takes as first-class gbrain command (spec)#858
garrytan-agents wants to merge 1 commit into
garrytan:masterfrom
garrytan-agents:feat/extract-takes-command

Conversation

@garrytan-agents

@garrytan-agents garrytan-agents commented May 11, 2026

Copy link
Copy Markdown
Contributor

What

Adds REFACTOR-PROMPT.md — the full spec for building gbrain extract-takes as a first-class CLI command.

Architecture

Repo-first. Takes are extracted by LLM and written as markdown table sections (gbrain:takes:begin/end markers) directly into brain page .md files. DB is a read cache populated by gbrain sync. DB can be nuked and rebuilt from repo at any time.

Spec includes

  • CLI interface: --slug, --type, --force, --concurrency, --dry-run
  • Full extraction prompt (proven on 100K+ takes in production)
  • Marker format, holder attribution rules, weight calibration
  • Real examples from production brain pages
  • gbrain sync integration (markdown → DB)
  • Extension pattern for facts/hunches/bets (same gbrain:X:begin/end markers)

Context

~3,910 brain pages already have takes in this format. ~24K more need extraction. The previous approach wrote directly to DB which got purged during a schema migration. This spec ensures the repo is always the system of record.

Next step

Feed this spec to Claude Code to implement the actual command.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Adds REFACTOR-PROMPT.md — full spec for building `gbrain extract-takes` as a first-class CLI command.

Architecture: repo-first. Takes are extracted by LLM and written as markdown table sections (gbrain:takes:begin/end markers) directly into brain page .md files. DB is a read cache populated by gbrain sync. DB can be nuked and rebuilt from repo at any time.

Includes:
- CLI interface spec (--slug, --type, --force, --concurrency, --dry-run)
- Full extraction prompt (proven on 100K+ takes)
- Marker format, holder attribution rules, weight calibration
- Real examples from production brain pages
- Sync integration spec (markdown → DB)
- Extension pattern for facts/hunches/bets (same gbrain:X:begin/end markers)
@garrytan

Copy link
Copy Markdown
Owner

Closing — shipped in v0.28.0.\n\nextract-takes shipped as src/core/cycle/extract-takes.ts + migration v0_28_0.ts. The spec doc became the implementation.\n\nThanks for the agent-fork PR. Closing because the work is already on master.

@garrytan garrytan closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants