Skip to content

Self-evolving second brain with 35 AI skills, 10 agents, and people CRM. Closed-loop harness: a V-model verification lifecycle where the worker never grades its own homework. Plus paired anti-slop design skills for marketing and product UI. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex.

feat(skills): loop engineering for iterative skills (v3.6.0) (#22)

Huy Tieu5e9851cdeecd
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index a4d62ac..8359685 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "cog-second-brain",
- "version": "3.5.0",
- "description": "Self-evolving second brain with 17 AI agent skills, 6 worker agents, and people CRM. Inspired by Garry Tan's gstack specialist sessions and gbrain knowledge patterns. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex, and any markdown-reading agent.",
+ "version": "3.6.0",
+ "description": "Self-evolving second brain with 19 AI agent skills, 6 worker agents, and people CRM. Iterative skills are loop-engineered (deterministic verifiers, layered termination, in-loop context management). Inspired by Garry Tan's gstack specialist sessions and gbrain knowledge patterns. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex, and any markdown-reading agent.",
"author": {
"name": "Huy Tieu",
"url": "https://github.com/huytieu"
@@ -35,7 +35,9 @@
"self-evolving",
"personal-intelligence",
"note-taking",
- "specialist-sessions"
+ "specialist-sessions",
+ "loop-engineering",
+ "agent-loop"
],
"category": "productivity",
"tags": [
@@ -84,6 +86,11 @@
"path": ".claude/skills/url-dump/SKILL.md",
"description": "Quick capture URLs with automatic content extraction, insights, and categorization into knowledge booklets"
},
+ {
+ "name": "loop-engineering",
+ "path": ".claude/skills/loop-engineering/SKILL.md",
+ "description": "Shared loop-engineering reference for iterative skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns"
+ },
{
"name": "team-brief",
"path": ".claude/skills/team-brief/SKILL.md",
@@ -99,6 +106,11 @@
"path": ".claude/skills/comprehensive-analysis/SKILL.md",
"description": "Deep 7-day analysis for weekly reviews, board prep, or strategic planning"
},
+ {
+ "name": "scout",
+ "path": ".claude/skills/scout/SKILL.md",
+ "description": "Triage a URL or tool (verify, classify, and check fit) before deciding whether to save it"
+ },
{
"name": "update-cog",
"path": ".claude/skills/update-cog/SKILL.md",
@@ -158,7 +170,7 @@
"requirements": {
"obsidian": "Recommended for markdown file management",
"git": "Optional but recommended for version control and safe updates",
- "claudeCode": "Recommended for the full 17-skill native experience",
+ "claudeCode": "Recommended for the full 19-skill native experience",
"kiro": "Optional - ships 7 native core powers",
"geminiCli": "Optional - ships 7 native core commands",
"agentsMd": "Universal fallback surface for Codex and other markdown-reading agents"
@@ -170,7 +182,7 @@
"validation": "Run ./scripts/validate-agent-surface.sh before publishing or after framework updates"
},
"directoryStructure": {
- ".claude/skills": "17 Claude Code skills (full surface)",
+ ".claude/skills": "19 Claude Code skills (full surface)",
".claude/agents": "6 worker agent definitions for specialist sessions",
".claude/roles": "7 role packs for personalized skill and integration recommendations",
".kiro/powers": "7 Kiro powers (core workflows)",
@@ -186,16 +198,16 @@
},
"skillArchitecture": {
"type": "agent-skills",
- "skills": 17,
+ "skills": 19,
"workerAgents": 6,
"rolePacks": 7,
"invocation": "model-invoked",
"progressiveDisclosure": true,
"nativeSurfaces": {
- "claudeCode": 17,
+ "claudeCode": 19,
"kiro": 7,
"geminiCli": 7,
- "agentsMd": 17
+ "agentsMd": 19
},
"description": "Self-contained skills with worker agent delegation, full Claude Code surface, core native Kiro/Gemini surfaces, and AGENTS.md as the universal fallback"
}
diff --git a/.claude/skills/daily-brief/SKILL.md b/.claude/skills/daily-brief/SKILL.md
index eabc285..8dfe560 100644
--- a/.claude/skills/daily-brief/SKILL.md
+++ b/.claude/skills/daily-brief/SKILL.md
@@ -422,6 +422,30 @@ Last significant development was [date if known] regarding [topic if known].
- Optionally show executive summary
- Ask if they want to explore any topic deeper or capture thoughts via braindump skill
+## Loop Engineering
+
+Daily brief is a **verify-retry loop**, not a single search. See `.claude/skills/loop-engineering/SKILL.md` for the shared vocabulary.
+
+**The loop (per interest area):** search → fetch a candidate → run the verifier → keep it or discard and re-search with an adjusted query → repeat until enough verified items or a stop condition fires. In `agent_mode: team`, run one loop per interest cluster as isolated workers (orchestrator-workers), then synthesize.
+
+**The verifier (deterministic, runs every candidate):**
+- Publication date is within the last 7 days. Mechanical date check, not a guess.
+- At least 2 independent credible sources for the claim.
+- Source tier is identified (1 / 2 / 3). Tier 3 needs cross-reference before it survives.
+- Not already seen (story dedup): a candidate whose URL or headline is already in the brief is dropped.
+
+A candidate that fails any check is discarded, not softened. This is COG's verification-first rule applied inside the loop: never let an item in on the agent's own "this looks recent enough."
+
+**Termination conditions (layered):**
+- **Goal met:** target item count reached for the interest area.
+- **Hard cap:** stop after ~5 searches per interest area.
+- **No-progress:** 2 consecutive searches surface nothing new (after dedup) → emit the "No significant news found" block (see Handle Special Cases) and move on. Never backfill with older or fabricated news.
+- **Budget guard:** overall fetch budget across all areas.
+
+**Patterns:** evaluator-optimizer (each item scored against the verifier) + reflect-retry (a failed search informs the next query) + orchestrator-workers (team mode).
+
+**In-loop context:** write verified items straight into the brief file as they pass; drop raw fetched page text once the summary and sources are extracted.
+
## Integration with Other Skills
### Follow-up Actions
diff --git a/.claude/skills/knowledge-consolidation/SKILL.md b/.claude/skills/knowledge-consolidation/SKILL.md
index 66cabff..916737c 100644
--- a/.claude/skills/knowledge-consolidation/SKILL.md
+++ b/.claude/skills/knowledge-consolidation/SKILL.md
@@ -775,6 +775,27 @@ After consolidation:
- Suggest reviewing key frameworks created/updated
- Offer to explain any specific framework in detail
+## Loop Engineering
+
+Consolidation is a **loop-until-dry extraction with a completeness critic**, not a single scan. See `.claude/skills/loop-engineering/SKILL.md` for the shared vocabulary.
+
+**The loop:** scan a batch of in-scope documents → extract themes, patterns, and candidate framework principles → run the completeness critic ("any in-scope doc not yet read? any theme recurring across N+ docs that no framework captures yet?") → if the critic surfaces something new, run another extraction pass → stop when 2 passes in a row surface nothing new (dry). In `agent_mode: team`, the first scan fans out as one worker per domain (personal / professional / per-project / briefs); each returns its conclusions only, and a synthesis pass merges them.
+
+**The verifier (deterministic where it can be):**
+- **Traceability:** every framework principle links at least one source document. A principle with no `[[source]]` is dropped, not published. This is mechanical and is COG's verification-first rule for consolidation.
+- **Coverage:** every in-scope document ends marked `status: "consolidated"` with a `consolidated_in` backlink.
+- **Dedup:** before creating a framework, check `05-knowledge/consolidated/` so an existing framework is updated, not duplicated.
+- The completeness critic ("did we miss a theme?") is the one judgment-based check; keep it explicit and evidence-linked.
+
+**Termination conditions (layered):**
+- **Dry:** K=2 consecutive passes find no new theme or document.
+- **Coverage complete:** all in-scope documents marked consolidated.
+- **Hard cap:** a max number of extraction passes, so a noisy corpus cannot loop forever.
+
+**Patterns:** loop-until-dry (the spine) + plan-execute-verify (each pass) + orchestrator-workers (team-mode domain scans) + completeness critic.
+
+**In-loop context:** write the consolidation report incrementally and dedup new themes against the running set, not against the conversation. Externalizing to the report file is what keeps a large corpus from overflowing the window.
+
## Consolidation Guidelines
### Quality Over Quantity
diff --git a/.claude/skills/loop-engineering/SKILL.md b/.claude/skills/loop-engineering/SKILL.md
new file mode 100644
index 0000000..e01f0ff
--- /dev/null
+++ b/.claude/skills/loop-engineering/SKILL.md
@@ -0,0 +1,96 @@
+---
+name: loop-engineering
+description: Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).
+roles: [all]
+integrations: []
+---
+
+# COG Loop Engineering
+
+> **TL;DR:** Some COG skills are not one-shot prompts. They are loops: act, observe, verify, decide whether to continue. This skill is the shared vocabulary those skills use. The iron rule: **trust deterministic checks, never the agent's own "looks done" self-report.** Every loop must declare its verifier, its stopping conditions, and which pattern it follows.
+
+This is a reference and design aid, not a content-generating workflow. Skills that loop (daily-brief, knowledge-consolidation, url-dump, weekly-checkin, and research/triage skills like auto-research and scout) link here instead of restating the rules. Invoke it directly when you are building or fixing an iterative skill.
+
+## Why loops
+
+A chain runs fixed steps: A then B then C. A loop is dynamic: the agent takes an action, reads real feedback (a fetched page, a date stamp, a file count), reasons about it, and repeats until a goal is met or a stop condition fires. Most knowledge-work that "keeps going until good enough" is a loop, and COG benefits from naming the loop explicitly rather than hoping a single prompt nails it.
+
+## The COG loop
+
+```
+ ┌──────────────────────────────────────────────┐
+ │ 1. Gather pull context (vault + sources) │
+ │ 2. Act one step: search / fetch / scan │
+ │ 3. Observe read the real result │
+ │ 4. Verify run the deterministic check │
+ │ 5. Update write progress to a vault file │
+ │ 6. Decide continue? → loop │
+ │ stop? → finish + report │
+ └──────────────────────────────────────────────┘
+```
+
+Step 4 is the load-bearing one. A loop without a verifier is just a chain that repeats.
+
+## Termination conditions (use layers, never one)
+
+A robust loop needs several exits so it always halts:
+
+| Exit | What it is | Example |
+|------|-----------|---------|
+| **Deterministic verifier** | A mechanical pass/fail that confirms the goal | "Publication date is within 7 days" |
+| **Hard iteration cap** | Max passes, no matter what | "Stop after 5 searches per topic" |
+| **Budget guard** | Max time / tool calls / tokens | "Stop after 20 fetches total" |
+| **No-progress detection** | Recent passes changed nothing | "2 searches in a row found nothing new" |
+| **Human escalation** | Hand a stuck loop back to the user | "Asked twice, still unclear: ask the user" |
+
+Pick the verifier plus at least one safety exit (cap or budget) for every loop. No-progress detection is what stops the quiet infinite loops that a cap alone misses.
+
+## Verification first (COG's rule, applied to loops)
+
+COG is verification-first: no hallucinations, sources required. Inside a loop that means:
+
+- **Prefer mechanical checks.** A date comparison, a source count, a "required field is non-empty", a "file marked consolidated" check cannot be gamed and cannot be hallucinated.
+- **Reserve judgment-based checks for the genuinely unquantifiable** (is this theme actually new? is this summary faithful?). When you must use judgment, state confidence and link evidence.
+- **Never accept the agent's own "I think this is complete."** That is the single most common way loops produce confident garbage.
+
+## In-loop context management
+
+Long loops fill the window with old tool output and start to drift ("context rot"). Counter it:
+
+- **Externalize state to the vault.** Write progress to the output file as you go. The vault file is the memory; the conversation is scratch.
+- **Compact and prune.** Summarize finished passes into a line or two. Drop raw page text once you have extracted what you need.
+- **Isolate sub-agents.** In `agent_mode: team`, give each worker only the slice it needs and take back only its conclusion, so one subtask runs in a clean window. Never paste one worker's raw output into the next worker's prompt.
+
+## Named patterns
+
+| Pattern | Shape | Where COG uses it |
+|---------|-------|-------------------|
+| **Act-observe (ReAct)** | reason → act → observe → repeat | base of every COG loop |
+| **Reflect-retry (Reflexion)** | on failure, write the lesson, retry differently | url-dump / scout fetch retries, daily-brief re-search |
+| **Plan-execute-verify** | plan steps, run them, verify each | knowledge-consolidation passes |
+| **Evaluator-optimizer** | generate, score against criteria, repeat until it passes | daily-brief item verify, url-dump quality gate |
+| **Orchestrator-workers** | split into subtasks, run in fresh windows, synthesize | team-mode scans, auto-research threads, team-brief |
+| **Loop-until-dry** | keep going until K passes in a row surface nothing new | knowledge-consolidation theme extraction |
+| **Human-in-the-loop** | escalate or ask when the loop is stuck or the call is the user's | weekly-checkin reflection, onboarding |
+
+## Failure modes and fixes
+
+| Failure | Fix |
+|---------|-----|
+| Context overflow / drift | compact, prune, externalize to vault, isolate sub-agents |
+| Silent infinite loop | no-progress detection plus a hard cap |
+| Hallucinated success | trust the deterministic verifier, never self-report |
+| Compounding errors | verify early and every pass, not only at the end |
+| Cost blowup | budget guard, and stop at "good enough", not "perfect" |
+| Goal drift | keep the goal and stop conditions written at the top of the loop's state |
+
+## How skills use this
+
+A skill's `## Loop Engineering` section should be short and concrete. It names:
+
+1. **The loop** in one or two lines (what repeats).
+2. **The verifier** (the mechanical pass/fail).
+3. **The termination conditions** (verifier plus safety exits).
+4. **The pattern(s)** from the table above.
+
+It does not restate this skill. It points here.
diff --git a/.claude/skills/url-dump/SKILL.md b/.claude/skills/url-dump/SKILL.md
index e0a93b3..068817c 100644
--- a/.claude/skills/url-dump/SKILL.md
+++ b/.claude/skills/url-dump/SKILL.md
@@ -399,6 +399,28 @@ reviewed: "false"
Always explicitly state confidence levels and reasoning in processing notes.
+## Loop Engineering
+
+URL capture is a **fetch-retry loop with a quality gate**, not a single fetch-and-file. See `.claude/skills/loop-engineering/SKILL.md` for the shared vocabulary.
+
+**The loop (per URL):** fetch → if the fetch fails or returns an empty/blocked body, retry a different way (https vs http, reader mode, an archive snapshot) → once content is present, run the quality gate → file it, or escalate to the user / save to inbox with a Review Needed flag.
+
+**The verifier (deterministic):**
+- Fetch returned a non-empty body (not a paywall stub or error page).
+- Required fields are populated: title, at least one key insight, a category.
+- YAML frontmatter is valid (see YAML Formatting Requirements).
+- Category confidence clears the threshold. Below ~70%, the loop does not silently guess.
+
+**Termination conditions (layered):**
+- **Goal met:** content extracted and the quality gate passes → save to the category folder.
+- **Retry cap:** stop after ~3 fetch attempts → save what was extracted with a low-confidence flag (see Uncertainty Handling), do not invent missing fields.
+- **Hard stop on paywall / login wall:** note the limitation, capture the available preview, do not loop forever.
+- **Human escalation:** confidence below threshold → present the best guess and ask the user to confirm category, rather than filing it wrong.
+
+**Patterns:** reflect-retry (each failed fetch picks a different method) + evaluator (the quality gate) + human-in-the-loop (low-confidence escalation).
+
+**In-loop context:** once insights and metadata are extracted, drop the raw page body. For batch input, process each URL as its own independent loop so one bad URL never stalls the rest.
+
## Integration with Other Skills
### Immediate Follow-up
diff --git a/.claude/skills/weekly-checkin/SKILL.md b/.claude/skills/weekly-checkin/SKILL.md
index 898a040..ed816e6 100644
--- a/.claude/skills/weekly-checkin/SKILL.md
+++ b/.claude/skills/weekly-checkin/SKILL.md
@@ -332,6 +332,28 @@ After creating the check-in:
- Offer to review patterns across multiple weeks if helpful
- Ask if they want to capture any follow-up thoughts via braindump skill
+## Loop Engineering
+
+The weekly check-in pairs a **per-domain scan loop** with a **human-in-the-loop reflection**, gated by a coverage checklist. See `.claude/skills/loop-engineering/SKILL.md` for the shared vocabulary.
+
+**The scan loop (gather phase):** scan each domain's recent files → aggregate candidate themes → run the coverage check → if a domain or active project is thin, scan it more deeply before moving on. In `agent_mode: team`, fan this out as one worker per domain (orchestrator-workers); each returns its themes only.
+
+**The reflection loop (guided phase):** this is human-in-the-loop by design. Ask, listen, reflect back, ask the targeted follow-up. The loop continues until the coverage checklist is satisfied or the user signals they are done. Do not rush it and do not force positivity.
+
+**The verifier (deterministic checklist):**
+- Every active project in `MY-PROFILE.md` has a Projects section addressed.
+- Each domain (personal / professional / projects) was actually covered, not skipped.
+- At least the recurring themes the scan surfaced were raised with the user.
+
+**Termination conditions (layered):**
+- **Coverage complete:** checklist satisfied → generate the check-in document.
+- **User signals done:** respect it; generate with what you have and note any thin spots.
+- **No-progress / terse answers:** if follow-ups keep returning little, stop probing that thread and offer to skip it rather than grinding. Escalation here means handing the choice back to the user.
+
+**Patterns:** orchestrator-workers (team-mode domain scans) + human-in-the-loop (reflection) + completeness checklist (the verifier).
+
+**In-loop context:** capture answers into the check-in structure as the conversation goes, so a long reflection does not lose early answers.
+
## Conversational Guidelines
### Do:
diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json
index aebfff3..d57da68 100644
--- a/.cursor-plugin/plugin.json
+++ b/.cursor-plugin/plugin.json
@@ -1,8 +1,8 @@
{
"name": "cog-second-brain",
"displayName": "COG: Agentic Second Brain",
- "version": "3.5.0",
- "description": "Self-evolving second brain powered by AI agents, Obsidian markdown, and Git. 17 skills, 6 worker agents, people CRM with tiered enrichment. Inspired by Garry Tan's gstack and gbrain patterns. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex, and any markdown-reading agent.",
+ "version": "3.6.0",
+ "description": "Self-evolving second brain powered by AI agents, Obsidian markdown, and Git. 19 skills, 6 worker agents, people CRM with tiered enrichment. Iterative skills are loop-engineered with deterministic verifiers and layered termination. Inspired by Garry Tan's gstack and gbrain patterns. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex, and any markdown-reading agent.",
"author": {
"name": "Huy Tieu",
"email": "[email protected]",
@@ -47,6 +47,8 @@
"weekly-checkin",
"knowledge-consolidation",
"url-dump",
+ "loop-engineering",
+ "scout",
"update-cog",
"team-brief",
"meeting-transcript",
diff --git a/.github/MARKETPLACE.md b/.github/MARKETPLACE.md
index f0cb93d..f310c99 100644
--- a/.github/MARKETPLACE.md
+++ b/.github/MARKETPLACE.md
@@ -18,13 +18,13 @@ COG ships marketplace metadata in multiple formats:
| File | Platform | Purpose |
|---|---|---|
-| `.claude-plugin/plugin.json` | Claude Code marketplace | Canonical skill manifest (17 skills, 6 agents) |
+| `.claude-plugin/plugin.json` | Claude Code marketplace | Canonical skill manifest (19 skills, 6 agents) |
| `.cursor-plugin/plugin.json` | cursor.directory | Cursor-compatible manifest |
| `.cursorrules` | Cursor | Editor rules for Cursor users |
| `marketplace-entry.json` | General marketplaces | Lightweight catalog entry |
| `AGENTS.md` | Universal | Command reference for any markdown-reading agent |
-Current packaged version: **3.5.0**
+Current packaged version: **3.6.0**
## Surface Model
@@ -32,9 +32,9 @@ COG is a **multi-agent package**, not a single-surface plugin:
| Surface | Coverage |
|---|---:|
-| Claude Code (`.claude/skills/`) | 17 native skills + 6 worker agents |
+| Claude Code (`.claude/skills/`) | 19 native skills + 6 worker agents |
| Cursor (`.cursor-plugin/`) | Plugin manifest + rules |
-| Universal docs (`AGENTS.md`) | 17+ documented commands |
+| Universal docs (`AGENTS.md`) | 19+ documented commands |
| Kiro (`.kiro/powers/`) | 7 core powers |
| Gemini CLI (`.gemini/commands/`) | 7 core commands |
@@ -44,7 +44,7 @@ For the detailed contract, see [`docs/AGENT-SUPPORT.md`](../docs/AGENT-SUPPORT.m
These keywords are set across all manifests and the GitHub repo for discoverability:
-`second-brain`, `garry-tan`, `gstack`, `gbrain`, `ai-agents`, `obsidian`, `claude-code`, `cursor`, `kiro`, `gemini-cli`, `codex`, `worker-agents`, `people-crm`, `knowledge-management`, `specialist-sessions`, `agentic`, `self-evolving`, `productivity`
+`second-brain`, `garry-tan`, `gstack`, `gbrain`, `ai-agents`, `obsidian`, `claude-code`, `cursor`, `kiro`, `gemini-cli`, `codex`, `worker-agents`, `people-crm`, `knowledge-management`, `specialist-sessions`, `agentic`, `self-evolving`, `loop-engineering`, `productivity`
## Before You Publish
diff --git a/AGENTS.md b/AGENTS.md
index 39f2db3..31aa0fa 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -210,6 +210,28 @@ This document defines the available commands/skills for AI agents interacting wi
---
+### /loop-engineering
+
+**Description:** Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns.
+
+**Triggers:**
+- `/loop-engineering`
+- "loop engineering"
+- Designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate)
+
+**Purpose:** Give every iterative COG skill one vocabulary for the act-observe-verify loop, so each one declares its verifier, its termination conditions, and its pattern instead of repeating the rules.
+
+**What it provides:**
+1. The COG loop cycle (gather, act, observe, verify, update, decide)
+2. The five termination conditions (deterministic verifier, hard cap, budget guard, no-progress detection, human escalation)
+3. The verification-first rule applied to loops (trust mechanical checks, never agent self-report)
+4. In-loop context management (compaction, pruning, externalize-to-vault, sub-agent isolation)
+5. A named-pattern table (ReAct, Reflexion, plan-execute-verify, evaluator-optimizer, orchestrator-workers, loop-until-dry, human-in-the-loop) and failure modes
+
+**Used by:** daily-brief, knowledge-consolidation, url-dump, weekly-checkin (and applies to auto-research, scout, team-brief).
+
+---
+
### /team-brief
**Description:** Generate a daily team intelligence brief by cross-referencing Linear, Slack, GitHub, PostHog, meetings, and braindumps — then sync the resulting intelligence back into Linear.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e57a07..b197024 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,37 @@
All notable changes to COG (Cognition + Obsidian + Git) will be documented in this file.
+## [3.6.0] - 2026-06-22
+
+### Loop Engineering for Iterative Skills
+
+Skills whose work is genuinely iterative now carry explicit loop-engineering structure: a named loop, a deterministic verifier, layered termination conditions, and in-loop context management. This extends COG's verification-first philosophy from "sources required" to "trust mechanical checks, never the agent's own self-report."
+
+### Added
+
+#### New Skill
+- **`loop-engineering`** (`.claude/skills/loop-engineering/SKILL.md`) — canonical COG loop vocabulary and design aid: the act-observe-verify cycle, the five termination conditions (deterministic verifier, hard cap, budget guard, no-progress detection, human escalation), in-loop context management (compaction, pruning, externalize-to-vault, sub-agent isolation), a named-pattern table, and failure modes. Documented in AGENTS.md and registered across all marketplace manifests.
+
+#### Per-Skill Loop Sections
+- **daily-brief**: verify-retry loop. Search → fetch → deterministic verify (7-day window + source tier + 2-source minimum + dedup) → re-search until enough verified items or stop condition. No-progress detection replaces backfilling with stale news.
+- **knowledge-consolidation**: loop-until-dry extraction with a completeness critic. Traceability and coverage are mechanical checks; per-domain worker isolation in team mode.
+- **url-dump**: fetch-retry loop with a quality gate. Retry failed fetches a different way, gate on extraction quality and confidence, escalate to the user instead of filing low-confidence guesses.
+- **weekly-checkin**: per-domain scan loop plus human-in-the-loop reflection, gated by a coverage checklist over active projects and domains.
+
+### Fixed
+
+#### Marketplace Manifest Consistency
+- **`scout`** skill is now registered in `.claude-plugin/plugin.json`, `.cursor-plugin/plugin.json`, and `cog-update.sh` (it shipped as a skill but was missing from the manifests, which failed `scripts/validate-agent-surface.sh`).
+- Skill count corrected to **19** across plugin.json, cursor manifest, MARKETPLACE.md, and architecture metadata.
+- `marketplace-entry.json` version realigned with `plugin.json` and `COG-VERSION`.
+
+### Changed
+- Version bumped to **3.6.0** across `COG-VERSION`, `.claude-plugin/plugin.json`, `.cursor-plugin/plugin.json`, and `marketplace-entry.json`.
+- Added `loop-engineering` / `agent-loop` keywords to manifests for marketplace discoverability (skills.sh, agentskill.sh, cursor.directory).
+
+### Skills Skipped (loops add little)
+- **braindump** (linear capture), **onboarding** (already conversational human-in-the-loop).
+
## [3.5.0] - 2026-04-16
### Specialist Sessions, People CRM & Worker Agents
diff --git a/COG-VERSION b/COG-VERSION
index 1545d96..40c341b 100644
--- a/COG-VERSION
+++ b/COG-VERSION
@@ -1 +1 @@
-3.5.0
+3.6.0
diff --git a/README.md b/README.md
index cc1eb5e..8331dbe 100644
--- a/README.md
+++ b/README.md
@@ -54,11 +54,11 @@ COG ships a **full Claude Code surface** plus **core native surfaces** for Kiro
| Surface | Current support | Notes |
|---|---|---|
-| Claude Code | 17 native skills + 6 worker agents | Full first-class surface |
+| Claude Code | 19 native skills + 6 worker agents | Full first-class surface |
| Cursor | Plugin manifest + rules | `.cursor-plugin/plugin.json` + `.cursorrules` |
| Kiro | 7 native powers | Core workflows today |
| Gemini CLI | 7 native commands | Core workflows today |
-| `AGENTS.md` | 17 documented commands | Universal fallback for Codex and other agents |
+| `AGENTS.md` | 19 documented commands | Universal fallback for Codex and other agents |
Before 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.
@@ -175,7 +175,7 @@ graph TD
```
COG-second-brain/
-├── .claude/skills/ # Claude Code skills (17)
+├── .claude/skills/ # Claude Code skills (19)
├── .claude/agents/ # Worker agent definitions (6)
├── .claude/roles/ # Role packs (7) — personalized recommendations
├── .kiro/powers/ # Kiro powers
diff --git a/SETUP.md b/SETUP.md
index 0d15bcb..73d8550 100644
--- a/SETUP.md
+++ b/SETUP.md
@@ -44,10 +44,10 @@ That's it! You now have a working second brain.
**What just happened?**
- The cloned `COG-second-brain` folder IS your second brain
- COG now exposes a clear multi-agent support matrix:
- - `.claude/skills/` - 17 Claude Code skills (full surface)
+ - `.claude/skills/` - 19 Claude Code skills (full surface)
- `.kiro/powers/` - 7 Kiro powers (core workflows)
- `.gemini/commands/` + `.gemini/skills/` - 7 Gemini CLI commands (core workflows)
- - `AGENTS.md` - 17 documented commands for Codex and other agents
+ - `AGENTS.md` - 19 documented commands for Codex and other agents
- Onboarding will create your personalized directory structure
- You can validate the packaged agent surfaces anytime with `./scripts/validate-agent-surface.sh`
@@ -131,7 +131,7 @@ COG-second-brain/ # This is your second brain folder
├── .claude/
│ ├── agents/ # 6 worker agent definitions
│ ├── roles/ # 7 role packs for personalized recommendations
-│ └── skills/ # 17 Claude Code skills
+│ └── skills/ # 19 Claude Code skills
│ ├── onboarding/
│ ├── braindump/
│ ├── daily-brief/
diff --git a/cog-update.sh b/cog-update.sh
index 9ea4ea7..601d0d9 100755
--- a/cog-update.sh
+++ b/cog-update.sh
@@ -42,6 +42,8 @@ FRAMEWORK_FILES=(
".claude/skills/weekly-checkin/SKILL.md"
".claude/skills/knowledge-consolidation/SKILL.md"
".claude/skills/url-dump/SKILL.md"
+ ".claude/skills/loop-engineering/SKILL.md"
+ ".claude/skills/scout/SKILL.md"
".claude/skills/update-cog/SKILL.md"
".claude/skills/team-brief/SKILL.md"
".claude/skills/comprehensive-analysis/SKILL.md"
diff --git a/docs/AGENT-SUPPORT.md b/docs/AGENT-SUPPORT.md
index dc7325e..2f9db44 100644
--- a/docs/AGENT-SUPPORT.md
+++ b/docs/AGENT-SUPPORT.md
@@ -8,7 +8,7 @@ This document is the packaging contract: it tells contributors and maintainers w
| Surface | Shipped format | Coverage | Status |
|---|---|---:|---|
-| Claude Code | `.claude/skills/*/SKILL.md` | 17 skills | Full native surface |
+| Claude Code | `.claude/skills/*/SKILL.md` | 19 skills | Full native surface |
| Universal agent docs | `AGENTS.md` | 17 commands | Full documented fallback |
| Kiro | `.kiro/powers/*/POWER.md` | 7 powers | Core workflows only |
| Gemini CLI | `.gemini/commands/*.toml` + `.gemini/skills/*.md` | 7 commands | Core workflows only |
diff --git a/marketplace-entry.json b/marketplace-entry.json
index 58941ca..3801c89 100644
--- a/marketplace-entry.json
+++ b/marketplace-entry.json
@@ -6,8 +6,8 @@
"email": "[email protected]",
"url": "https://github.com/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.",
- "version": "3.5.0",
+ "description": "Self-evolving second brain with 19 AI skills, 6 worker agents, and people CRM. Iterative skills are loop-engineered with deterministic verifiers and layered termination. Inspired by Garry Tan's gstack and gbrain. Works with Claude Code, Cursor, Kiro, Gemini CLI, Codex.",
+ "version": "3.6.0",
"keywords": [
"second-brain",
"garry-tan",
@@ -20,7 +20,8 @@
"worker-agents",
"people-crm",
"knowledge-management",
- "specialist-sessions"
+ "specialist-sessions",
+ "loop-engineering"
],
"category": "productivity",
"homepage": "https://github.com/huytieu/COG-second-brain"