{"id":51215810,"url":"https://github.com/huytieu/COG-second-brain","last_synced_at":"2026-06-28T07:00:58.689Z","repository":{"id":318807919,"uuid":"1076571787","full_name":"huytieu/COG-second-brain","owner":"huytieu","description":"Self-evolving second brain with 17 AI skills, 6 worker agents, and people CRM — inspired by Garry Tan's gstack and gbrain. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex.","archived":false,"fork":false,"pushed_at":"2026-04-16T08:48:47.000Z","size":201,"stargazers_count":332,"open_issues_count":2,"forks_count":39,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-16T10:32:24.022Z","etag":null,"topics":["agentic","ai-agents","claude-code","cursor","garry-tan","gbrain","gstack","knowledge-management","obsidian","people-crm","productivity","second-brain","self-evolving","specialist-sessions","worker-agents"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huytieu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["huytieu"],"buy_me_a_coffee":"0xlight"}},"created_at":"2025-10-15T03:50:52.000Z","updated_at":"2026-04-16T08:48:51.000Z","dependencies_parsed_at":"2025-10-16T04:37:51.164Z","dependency_job_id":"7a608379-d6c5-4852-a4e7-fd2592993745","html_url":"https://github.com/huytieu/COG-second-brain","commit_stats":null,"previous_names":["huytieu/cog-second-brain"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/huytieu/COG-second-brain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytieu%2FCOG-second-brain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytieu%2FCOG-second-brain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytieu%2FCOG-second-brain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytieu%2FCOG-second-brain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huytieu","download_url":"https://codeload.github.com/huytieu/COG-second-brain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huytieu%2FCOG-second-brain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34880189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","ai-agents","claude-code","cursor","garry-tan","gbrain","gstack","knowledge-management","obsidian","people-crm","productivity","second-brain","self-evolving","specialist-sessions","worker-agents"],"created_at":"2026-06-28T04:01:00.194Z","updated_at":"2026-06-28T07:00:58.681Z","avatar_url":"https://github.com/huytieu.png","language":"Shell","funding_links":["https://github.com/sponsors/huytieu","https://buymeacoffee.com/0xlight"],"categories":["⭐ 精选第三方技能","🧠 Agent Skills"],"sub_categories":["📣 平台运营 / 自媒体 / 办公流量"],"readme":"# COG: The Agentic Second Brain That Actually Self-Evolves\n\n**Cognition + Obsidian + Git** — A self-evolving second brain powered by AI agents, markdown files, and version control. No database, no vendor lock-in — just `.md` files that think.\n\n[Quick Start](#quick-start) | [Skills](#skills) | [Features](#features-at-a-glance) | [FAQ](#faq) | [SETUP.md](SETUP.md)\n\n\u003e Works with [Claude Code](https://claude.ai/download) \u0026bull; [Cursor](https://cursor.com/) \u0026bull; [Kiro](https://kiro.dev/) \u0026bull; [Gemini CLI](https://github.com/google-gemini/gemini-cli) \u0026bull; [OpenAI Codex](https://github.com/openai/codex) \u0026bull; any AI that reads markdown\n\u003e\n\u003e Inspired by [Garry Tan's gstack](https://github.com/garrytan/gstack) and [gbrain](https://github.com/garrytan/gbrain)\n\n```mermaid\ngraph LR\n    A[You] -- natural language --\u003e B[AI Agent]\n    B -- runs --\u003e C[17 Skills]\n    C -- delegates to --\u003e W[6 Worker Agents]\n    C -- reads \u0026 writes --\u003e D[.md Files]\n    W -- reads \u0026 writes --\u003e D\n    C -- syncs with --\u003e G[GitHub / Linear / Slack / PostHog]\n    D --\u003e E[Git]\n    D --\u003e F[iCloud]\n```\n\n\u003e **New to COG?** Watch the [2-minute walkthrough](https://youtube.com/PLACEHOLDER) to see it in action.\n\n## Quick Start\n\n**1. Clone \u0026 enter the repo:**\n```bash\ngit clone https://github.com/huytieu/COG-second-brain.git\ncd COG-second-brain\n```\n\n**2. Run onboarding in your agent:**\n\n| Agent | Command | How it finds skills |\n|---|---|---|\n| Claude Code | `code .` → \"Run onboarding\" | `.claude/skills/` |\n| Cursor | Open folder → \"Run onboarding\" | `.cursor-plugin/` + `.cursorrules` |\n| Kiro | Open folder → \"setup COG\" | `.kiro/powers/` |\n| Gemini CLI | `gemini` → `/onboarding` | `GEMINI.md` + `.gemini/commands/` |\n| OpenAI Codex | `codex` → \"Run onboarding\" | `AGENTS.md` |\n| Other agents | Point at `AGENTS.md` → \"Run onboarding\" | `AGENTS.md` |\n\n**Or install via [skills.sh](https://skills.sh):**\n```bash\nnpx skills add huytieu/COG-second-brain\n```\n\nDone — COG is personalized and ready in ~2 minutes. See [SETUP.md](SETUP.md) for optional config (Git sync, iCloud, Obsidian Tasks, etc.).\n\n## Agent Support Matrix\n\nCOG ships a **full Claude Code surface** plus **core native surfaces** for Kiro and Gemini CLI, with `AGENTS.md` as the universal fallback for Codex and other markdown-reading agents.\n\n| Surface | Current support | Notes |\n|---|---|---|\n| Claude Code | 19 native skills + 6 worker agents | Full first-class surface |\n| Cursor | Plugin manifest + rules | `.cursor-plugin/plugin.json` + `.cursorrules` |\n| Kiro | 7 native powers | Core workflows today |\n| Gemini CLI | 7 native commands | Core workflows today |\n| `AGENTS.md` | 19 documented commands | Universal fallback for Codex and other agents |\n\nBefore publishing or updating framework files, run `./scripts/validate-agent-surface.sh` to catch drift between manifests, docs, and shipped files. See [docs/AGENT-SUPPORT.md](docs/AGENT-SUPPORT.md) for the detailed support matrix and contributor rules.\n\n## Skills\n\n### Core Skills (Personal Knowledge)\n\n| Skill | What it does | Try saying... |\n|---|---|---|\n| **onboarding** | Personalize COG for your workflow (run first!) | \"Run onboarding\" |\n| **braindump** | Capture raw thoughts with intelligent classification | \"I need to braindump\" |\n| **daily-brief** | Verified news intelligence (7-day freshness) | \"Give me my daily brief\" |\n| **url-dump** | Save URLs with auto-extracted insights | \"Save this URL\" |\n| **weekly-checkin** | Cross-domain pattern analysis | \"Weekly review\" |\n| **knowledge-consolidation** | Build frameworks from scattered notes | \"Consolidate my knowledge\" |\n| **update-cog** | Update framework files without touching your content | \"Update COG\" |\n\n### Team Intelligence Skills (for Product \u0026 Engineering Leads)\n\n| Skill | What it does | Try saying... |\n|---|---|---|\n| **team-brief** | Cross-reference GitHub + Linear + Slack + PostHog into a daily team intelligence brief with two-way Linear sync-back | \"Team brief\" / \"What did we ship?\" |\n| **meeting-transcript** | Process meeting recordings into structured decisions, action items, and team dynamics | \"Process this meeting\" |\n| **comprehensive-analysis** | Deep 7-day analysis for weekly reviews, board prep, or strategic planning (~8-12 min) | \"Weekly analysis\" / \"Board prep\" |\n\n### PM Workflow Skills (for Product Managers)\n\n| Skill | What it does | Try saying... |\n|---|---|---|\n| **create-user-story** | Create user stories with duplicate checking across Linear, GitHub Issues, or Jira | \"Create a user story for...\" |\n| **generate-prd** | Draft PRDs with approval gate before publishing to Confluence/Notion | \"Generate a PRD for...\" |\n| **generate-release-notes** | Generate release notes from GitHub milestones, Linear cycles, or manual input | \"Generate release notes for v2.1\" |\n| **export-open-issues** | Audit and export open issues from any tracker into a structured vault summary | \"Export open issues\" |\n| **publish-to-confluence** | Publish any vault markdown file to Confluence | \"Publish this to Confluence\" |\n| **update-knowledge-base** | Maintain product knowledge base from releases, features, and project changes | \"Update the knowledge base with v2.1 changes\" |\n\n\u003e **PM Workflow:** These skills form a complete product management lifecycle: **Research** (`/auto-research`) → **PRD** (`/generate-prd`) → **Stories** (`/create-user-story`) → Development → **Release Notes** (`/generate-release-notes`) → **Knowledge Base** (`/update-knowledge-base`). Use `/export-open-issues` for audits and `/publish-to-confluence` to share externally.\n\n### Strategic Research\n\n| Skill | What it does | Try saying... |\n|---|---|---|\n| **auto-research** | Deep strategic research engine — decomposes questions into parallel research threads with multiple agents | \"Research the future of AI testing tools\" |\n\n### Worker Agents (Specialist Sessions)\n\nCOG uses a worker agent architecture inspired by [garrytan/gstack](https://github.com/garrytan/gstack) specialist sessions and [garrytan/gbrain](https://github.com/garrytan/gbrain) knowledge patterns. Workers handle data-heavy tasks cheaply (Sonnet) while the lead session does reasoning (Opus).\n\n| Agent | What it does | Model |\n|---|---|---|\n| **worker-data-collector** | Structured extraction from GitHub, Slack, Jira, Linear | Sonnet |\n| **worker-researcher** | Web research with source citations | Sonnet |\n| **worker-file-ops** | Vault file operations, metadata, profiles | Sonnet |\n| **worker-executor** | Pre-approved mutations (Jira, Linear, APIs) | Sonnet |\n| **worker-publisher** | Publishing to Slack, Confluence, Notion | Sonnet |\n| **brief-people-updater** | Batch-update people profiles from meetings/briefs | Sonnet |\n\n\u003e Workers write results to `/tmp/` files and return only a status + path. The lead reads the file for synthesis. This eliminates slow token generation in agent output.\n\n### People CRM (Knowledge-Based Team Profiles)\n\nTrack the people you work with using progressive, evidence-based profiles in `05-knowledge/people/`. Profiles auto-escalate via tiered enrichment:\n\n- **Tier 3 (Stub)** — 1 mention: name, role, one-line context\n- **Tier 2 (Moderate)** — 3+ mentions: executive snapshot, working style, strengths\n- **Tier 1 (Full)** — 8+ mentions or direct meeting: complete profile with all sections\n\nEvery observation includes a source citation with confidence level. See `05-knowledge/people/README.md` for details.\n\n### Role Packs (Personalized Recommendations)\n\nCOG matches your role during onboarding to a **role pack** that prioritizes the most relevant skills and integrations for you. Available role packs: Product Manager, Engineering Lead, Engineer, Designer, Founder, Marketer — or create your own from the template.\n\n\u003e **New to team skills?** These require GitHub CLI (`gh`) and work best with Linear, Slack, and PostHog MCP integrations. They degrade gracefully — start with just GitHub and add integrations over time. See [SETUP.md](SETUP.md) for configuration.\n\n## The Evolution Cycle\n\n```mermaid\ngraph TD\n    A[Daily: Braindump thoughts] --\u003e B[Daily: News intelligence]\n    A --\u003e T[Daily: Team intelligence brief]\n    M[Meetings: Process transcripts] --\u003e T\n    T -- syncs back to --\u003e L[Linear / GitHub]\n    B --\u003e C[Weekly: Pattern analysis]\n    T --\u003e CA[Weekly: Comprehensive analysis]\n    C --\u003e D[Monthly: Knowledge consolidation]\n    CA --\u003e D\n    D -- COG learns your patterns --\u003e A\n    R[Strategic: Auto-research] --\u003e P[PM: Generate PRD]\n    P --\u003e S[PM: Create user stories]\n    S -- after development --\u003e RN[PM: Release notes]\n    RN --\u003e KB[PM: Update knowledge base]\n```\n\n- **Daily capture** — braindump raw thoughts; COG classifies by domain and extracts action items\n- **Daily intelligence** — personalized news briefings with verified, sourced news\n- **Daily team brief** — cross-reference GitHub, Linear, Slack, PostHog, meetings into one brief with two-way sync\n- **Meeting processing** — extract decisions, action items, and team dynamics from transcripts\n- **Weekly reflection** — pattern analysis across all domains surfaces insights you'd miss\n- **Weekly deep dive** — comprehensive analysis for board prep, retros, and strategic planning\n- **Monthly synthesis** — scattered notes become consolidated frameworks and a knowledge base\n- **Strategic research** — deep multi-agent investigation of strategic questions with real sources\n- **PM workflow** — full product lifecycle from PRD to release notes to knowledge base updates\n\n## Features at a Glance\n\n| | | |\n|---|---|---|\n| **Self-Evolving** — Learns your patterns, auto-organizes content, builds frameworks | **Self-Healing** — Rename files or restructure; cross-references update automatically | **Verification-First** — Sources required, 7-day freshness, confidence levels on all analysis |\n| **Privacy-First** — Local `.md` files, strict domain separation, no external servers | **Multi-Device** — iCloud sync to iPhone/iPad/Mac; Git for version history | **Obsidian Tasks** — `📅 YYYY-MM-DD` emoji format works with Tasks plugin dashboards |\n| **Garry Tan Inspired** — gstack specialist sessions + gbrain knowledge patterns | **Multi-Platform** — Listed on [skills.sh](https://skills.sh), [agentskill.sh](https://agentskill.sh), [cursor.directory](https://cursor.directory) | **Worker Agents** — Sonnet handles I/O, Opus handles thinking |\n\n## Your Vault\n\n```\nCOG-second-brain/\n├── .claude/skills/          # Claude Code skills (19)\n├── .claude/agents/          # Worker agent definitions (6)\n├── .claude/roles/           # Role packs (7) — personalized recommendations\n├── .kiro/powers/            # Kiro powers\n├── .gemini/commands/        # Gemini CLI commands\n├── AGENTS.md                # Universal agent docs\n├── CLAUDE.md                # Framework instructions\n├── 00-inbox/                # Profiles, interests, integrations\n├── 01-daily/                # Briefs \u0026 check-ins\n├── 02-personal/             # Personal braindumps (private)\n├── 03-professional/         # Professional braindumps \u0026 strategy\n├── 04-projects/             # Per-project tracking\n├── 05-knowledge/            # Consolidated insights \u0026 patterns\n│   └── people/              # People CRM profiles\n└── 06-templates/            # Document templates\n```\n\n\u003e **Real-world results:** 120+ braindumps processed, daily briefs with 95%+ source accuracy, 5 major strategic insights discovered — zero maintenance required.\n\n## Keeping COG Updated\n\nCOG separates **framework files** (skills, docs, scripts) from **your content** (braindumps, profiles, notes). Updates never touch your personal data.\n\n| Method | Command |\n|---|---|\n| AI Agent (any) | \"Update COG\" or `/update-cog` |\n| Shell script | `./cog-update.sh` (interactive) \u0026bull; `--check` \u0026bull; `--dry-run` \u0026bull; `--force` |\n| Manual Git | `git fetch cog-upstream main` then checkout specific files |\n\nCheck your version: `cat COG-VERSION`  \nValidate packaged surfaces: `./scripts/validate-agent-surface.sh`\n\n## FAQ\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eWhy not just use Notion / Roam / Obsidian alone?\u003c/strong\u003e\u003c/summary\u003e\n\nCOG adds self-evolving intelligence on top. It doesn't just store — it learns, analyzes, and synthesizes insights automatically.\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eHow much does it cost?\u003c/strong\u003e\u003c/summary\u003e\n\nCOG is free and open-source (MIT). You only pay for your AI agent's API usage.\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eIs my data private?\u003c/strong\u003e\u003c/summary\u003e\n\nYes. Everything is local markdown files. The AI agent's API is only called when you invoke a skill. No data stored on external servers.\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eCan I customize or add skills?\u003c/strong\u003e\u003c/summary\u003e\n\nYes — edit any `SKILL.md` / `POWER.md` / `AGENTS.md` file. See [SETUP.md](SETUP.md) for details on creating new skills.\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eWill updating overwrite my customizations?\u003c/strong\u003e\u003c/summary\u003e\n\nNo. The update process detects customized files and lets you choose per-file: keep yours, use upstream, or backup + update. Nothing is overwritten without approval.\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eWhat if I don't use Git?\u003c/strong\u003e\u003c/summary\u003e\n\nGit is optional but recommended for version history. COG works fine with just iCloud sync.\n\u003c/details\u003e\n\n## Roadmap\n\n- [x] ~~Gemini CLI + OpenAI Codex support~~ (shipped in v3.1)\n- [x] ~~Upstream update system~~ (shipped in v3.2)\n- [x] ~~Role packs \u0026 integration discovery~~ (shipped in v3.3)\n- [x] ~~PM workflow skills \u0026 auto-research~~ (shipped in v3.4)\n- [x] ~~Worker agents, people CRM \u0026 specialist sessions~~ (shipped in v3.5)\n- [ ] Web interface for knowledge graph visualization\n- [ ] Mobile-first commands (optimized for Obsidian mobile)\n- [ ] Team collaboration features (with privacy preservation)\n- [ ] Integration with calendar/task management tools\n\n## Contributing \u0026 Support\n\n| | | |\n|---|---|---|\n| [Contribute](CONTRIBUTING.md) | [Report bugs](https://github.com/huytieu/COG-second-brain/issues) | [Discussions](https://github.com/huytieu/COG-second-brain/discussions) |\n| [Sponsor on GitHub](https://github.com/sponsors/huytieu) | [Buy me a coffee](https://buymeacoffee.com/0xlight) | [MIT License](LICENSE) |\n\n## Acknowledgments \u0026 Inspiration\n\nBuilt with [Claude Code](https://claude.ai/code), [Cursor](https://cursor.com/), [Kiro](https://kiro.dev/), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [OpenAI Codex](https://github.com/openai/codex), and [Obsidian](https://obsidian.md/).\n\n**Key inspirations:**\n- [**Garry Tan's gstack**](https://github.com/garrytan/gstack) — specialist sessions, clear operating gears, repo-local skill distribution. COG's worker agent architecture and model routing borrow directly from gstack's explicit mode separation.\n- [**Garry Tan's gbrain**](https://github.com/garrytan/gbrain) — Compiled Truth + Timeline pattern, tiered enrichment for people profiles, brain-first lookup protocol. COG's people CRM and knowledge-first approach are adapted from gbrain's design.\n- **Zettelkasten** — atomic, interlinked notes as the foundation of knowledge\n- **Building a Second Brain (Tiago Forte)** — PARA organization, progressive summarization\n- **GTD (David Allen)** — capture everything, process systematically\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=huytieu/COG-second-brain\u0026type=date\u0026legend=top-left)](https://www.star-history.com/#huytieu/COG-second-brain\u0026type=date\u0026legend=top-left)\n\n---\n\n**TL;DR:** Clone, run onboarding, braindump daily. COG evolves with you — just `.md` files, any AI agent, zero maintenance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuytieu%2FCOG-second-brain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuytieu%2FCOG-second-brain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuytieu%2FCOG-second-brain/lists"}