Skip to content

Customized domain spec: VC to developer knowledge brain#4

Open
chapter37haptics wants to merge 10 commits into
masterfrom
chapter37haptics/customized-domain
Open

Customized domain spec: VC to developer knowledge brain#4
chapter37haptics wants to merge 10 commits into
masterfrom
chapter37haptics/customized-domain

Conversation

@chapter37haptics
Copy link
Copy Markdown
Owner

Summary

  • Spec for customizing gbrain from VC/executive use case (people, companies, deals) to developer use case (goals, decisions, processes, concepts)
  • 4 entity types with hard MECE boundaries, mapped 1:1 to the /goal development workflow
  • 12-file change manifest (3 skill rewrites, 3 skill patches, 4 code patches, 2 unchanged) with execution order
  • Page templates for all 4 types plus structured debug-trail timeline entries
  • Architecture compliance audited against all 4 docs in docs/architecture/
  • 5 Codex cross-model reviews incorporated (retrieval gap, architecture, infra impact, scope narrowing, MECE)

Test plan

  • Read the spec at docs/specs/customized-domain.md (Context section first)
  • Verify the 12-file change manifest covers the full closed-loop (detect, write, store, retrieve, present, enrich)
  • Confirm MECE boundaries table has hard rules for all 6 entity pairs
  • Implementation is a follow-up — this PR is spec only (1 new file, 0 code changes)

🤖 Generated with Claude Code

chapter37haptics and others added 8 commits May 14, 2026 20:35
…veloper rewrite

10-file change manifest for customizing gbrain from VC/executive use case to
developer knowledge base. Three rounds of analysis (write-side only, Codex
read-side audit, closed-loop full audit) expanded scope from 3 files to 10.
Key finding: quality.md Iron Law is the delegation root that all other files
inherit from — must be patched first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ce, Codex reviews

Adds intro, important files layered diagram, closed-loop 6-phase audit
(quality.md delegation chain, brain-ops 8-site patch, types.ts compile gate),
architecture compliance section with fixes from Codex (FS-canonical framing,
brain-routing.md retained, PageType union blocker, inferType ordering).
File count: 3 rewrites + 3 skill patches + 4 code patches + 1 entrypoint = 13.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…iew 4

Narrowed from 10 developer entity types to 4: projects (hub), decisions
(ADRs), processes (repeatable workflows), concepts (tools + patterns +
mental models). project and concept already exist in PageType; only
decision and process are new. Halves the code surface: 2 new PageType
entries, 2 DIR_PATTERN additions.

Added page templates for all 4 types + structured debug-trail timeline
entry format. Added concepts/ notability criteria (junk-drawer prevention).
Updated change manifest, architecture compliance, and file counts throughout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t sections

Adds comprehensive Context section covering: what gbrain is, how the agent
learns to use the brain (boot sequence), what this spec changes, the two
repos involved, the user's workflow, what the agent watches for after
implementation, existing PageType values, and key architectural constraints.

Removes Goal section (absorbed into Intro + Context) and "What was missed"
section (covered by Analysis History + Reviews). Net: +120 lines of context,
-30 lines of overlap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
goals/ maps 1:1 to /goal invocations and is cleanly ME with the other 3
types (context-bound episode vs reusable artifact). projects/ had HIGH
overlap with decisions/, processes/, concepts/ because the "does it
transfer?" test was a judgment call. goals/ eliminates that: capture in
goals/ first, promote out when reusable.

New PageType additions: 3 (goal, decision, process). DIR_PATTERN: 3.
Added MECE boundary table with hard rules for all 6 entity pairs.
Goal page template replaces project page template. Codex review 5 added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 rules codified from recurring manual requests during this session:
commit after every update, Codex second opinion before decisions,
architecture compliance checks, Reviews section maintenance, MECE
verification on entity changes, Context section kept current.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rules are meta-instructions for working on the spec. A new session should
see them before the content they'll be modifying.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep the original as CLAUDE-original-read-only.md for reference
when making improvements, but the full 1445-line / 226KB file is
too large to use as the active system prompt for implementing the
customized-domain spec. The new CLAUDE.md (192 lines / 14KB) preserves
exact text from the original for sections relevant to the spec work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chapter37haptics
Copy link
Copy Markdown
Owner Author

Codex Review (gpt-5.3-codex) — PR #4

Gate: PASS | Tokens: 68,137

Findings (3 fixed, 2 noted)

1. Tier inconsistency — types.ts and markdown.ts placement (FIXED)

types.ts and markdown.ts were listed under Tier 2 in the manifest table but marked **HIGH (Tier 1)** in the Priority column. An implementer following the spec top-to-bottom would see them in Tier 2 and defer them, but they are compile-time prerequisites — inferType() returns goal/decision/process, which must exist in the PageType union or TypeScript rejects the build.

Fix applied: Moved both to the Tier 1 "Code/config files to PATCH" section (items garrytan#9 and garrytan#10). Removed from Tier 2 table.


2. Execution order — code-layer must precede skill-layer (FIXED)

The original execution order put quality.md first (delegation root reasoning), with code changes at steps 7-9. This is correct for the delegation chain but risky for incremental testing: if you implement signal-detector/SKILL.md (step 3) and test it before types.ts (step 8), the agent tries to write a page with type: goal and hits a runtime/compile error because the type doesn't exist yet.

Fix applied: Reordered to code-first:

  1. types.ts (compile-time prerequisite)
  2. markdown.ts (type inference)
  3. link-extraction.ts (auto-link)
  4. quality.md (delegation root)
  5. brain-ops/SKILL.md → ... → brain-first.md

3. Missing PageType audit step (FIXED)

The spec names 10 specific files but doesn't require a grep pass to find all PageType consumers — switches, whitelists, and filters in diagnostics, tests, and secondary paths could silently reject developer types.

Fix applied: Added verification step 10: grep -rn 'PageType\|ALL_PAGE_TYPES' src/ --include='*.ts' to catch hidden consumers not named in the manifest.


4. CE weakness — scope boundary implicit (NOTED)

The 4-way MECE is strong on mutual exclusivity but collective exhaustiveness only holds under the assumption of "goal-driven developer memory." External references, long-lived project containers, and documentation artifacts are implicitly forced into goals/ or concepts/. Acceptable for v1 scope. If scope expands later, an explicit boundary statement or a 5th type would be needed.


5. CLAUDE.md surface area (NOTED)

For a spec-only PR, replacing CLAUDE.md (1312 deletions) and adding CLAUDE-original-read-only.md (1445 additions) is review noise. The spec itself is the deliverable — consider splitting the CLAUDE.md changes into a separate commit or PR to keep this PR focused.


Recommendation: Address finding #1 (tier inconsistency) before implementation because an implementer following the spec literally could defer compile-time prerequisites, causing type errors that block all downstream changes. Findings #4 and #5 are cosmetic for v1 scope.

🤖 Reviewed by Codex (gpt-5.3-codex) via /gstack-codex review

chapter37haptics and others added 2 commits May 15, 2026 02:27
…p (Codex review 6)

- Moved types.ts and markdown.ts from Tier 2 to Tier 1 code/config (items garrytan#9, garrytan#10)
- Reordered execution: code-layer first (types→markdown→link-extraction), then skills
- Added verification step 10: grep for hidden PageType consumers
- Added Codex review 6 (gpt-5.3-codex PR review, 5 findings, 3 fixed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… test 1)

Same exemption as CLAUDE.md — it's a read-only backup of the original
project instructions that references the banned name in meta-rule docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chapter37haptics chapter37haptics force-pushed the chapter37haptics/customized-domain branch from 63b880a to 11dc2cf Compare May 15, 2026 02:34
chapter37haptics added a commit that referenced this pull request May 16, 2026
Experiment 1: tested whether gbrain fires during a /goal session with
customized-domain skills loaded. Result: zero brain interactions across
288 session log lines. Root cause: advisory instructions ignored under
task execution pressure. Includes cross-model analysis (Claude + Codex),
ideal session flow, fix priority, and CLAUDE.md patch for fix #4.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant