Repo Architecture repo-architecture
Where new brain files go. Decision protocol for filing brain pages by primary subject, not by format or source. Reference for all brain-writing skills.
Works in Claude, ChatGPT, Codex and more
- Our test
- 6/10
- tested Dec 6, 2026
- GitHub stars
- 34k
- garrytan/gbrain
- Added by
- 0
- members
- Updated
- Dec 6
- commit bd4d7bb
- Content
- 1 file
- no scripts · 2 KB
- License
- MIT
- free to use
What our test found
The core subject-based filing guidance is clear and practical, but the referenced full rules and quality conventions are not included.
Request we tested it on“I have notes from a meeting about a product idea for Acme. Where should I file them?”
Limits spotted
- The full filing rules and notability criteria are external references, so ambiguous cases cannot be resolved from this skill alone.
- It names project-specific directories and a gbrain-base-v2 convention without defining the complete schema.
- The answer depends on determining whether the page is primarily meeting notes or a standalone idea.
name: repo-architecture version: 1.0.0 description: | Where new brain files go. Decision protocol for filing brain pages by primary subject, not by format or source. Reference for all brain-writing skills. triggers: - "where does this go" - "filing rules" - "create new page" - "which directory" tools: - search - get_page - list_pages mutating: false when_to_use: "Use when the user asks: \"where does this go\", \"filing rules\", \"create new page\", \"which directory\"."
Repo Architecture — Filing Rules
Full filing rules: See skills/_brain-filing-rules.mdContract
This skill guarantees:
- Every new page is filed by primary subject (not format, not source)
- The decision protocol is followed for ambiguous cases
- Common misfiling patterns are caught
Phases
- Identify the primary subject. What would you search for to find this page?
- Walk the decision tree:
- About a person →
people/{name-slug}.md - About a company →
companies/{name-slug}.md - A reusable concept/framework →
concepts/{slug}.md - Original thinking →
originals/{slug}.md; product or business idea →ideas/{slug}.md. Ongbrain-base-v2, writetype: conceptwithsubtype: originalorsubtype: idea, respectively. - A meeting →
meetings/{slug}.md - Media content →
media/{type}/{slug}.md - Raw data import →
sources/{slug}.md - Cross-link. Link from related directories.
- Check notability. See
skills/conventions/quality.mdnotability gate.
Output Format
Advisory: "File this at {type}/{slug}.md because the primary subject is {reason}."
When it fails
Follow the for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:
list_pages/searchcannot find a matching directory or the brain is unreachable: fall back toskills/_brain-filing-rules.mdand say the placement came from the rules, not the live brain.get_pagereturnspage_not_foundfor the page being filed: confirm the slug with the user before choosing a directory.
Anti-Patterns
- Filing by format ("it's a PDF so it goes in sources/")
- Filing by source ("it came from email so it goes in sources/")
- Creating pages without checking if one already exists
- Using
sources/for anything except raw data dumps