[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CQXQ0CZMHR6SSHEMAYDWRX":3,"skill-same:01M6CQXQ0CZMHR6SSHEMAYDWRX":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6CQXQ0CZMHR6SSHEMAYDWRX","pattern-extractor",null,"Automatically analyze transcripts to extract error patterns, success patterns, and decision patterns. Updates technical-patterns.md and suggests code-level improvements.","dundas\u002Fagentbootup-public","dundas","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F627426?v=4","01M6CQVP2KHXEP7JH9WKKF59S7","David K. Dundas","01M6CQVP76D48NCMMXYDK9CBA8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fpattern-extractor\u002FSKILL.md",[],[19,20,21,22,23,24,25,26],"pattern extractor","code","learning","analyze","decision","technical","extract","patterns","2026-11-10 10:12:30",false,"---\nname: pattern-extractor\ndescription: Automatically analyze transcripts to extract error patterns, success patterns, and decision patterns. Updates technical-patterns.md and suggests code-level improvements.\ncategory: learning\n---\n\n# Pattern Extractor\n\n## Purpose\nClose the learning loop by automatically analyzing transcript history to extract patterns, update technical knowledge, and suggest preventive measures.\n\n## Goal\nTransform experience into actionable knowledge without manual intervention.\n\n## Use Cases\n\n1. **Automated Learning**: Extract lessons from recent work\n2. **Error Prevention**: Find repeated mistakes and suggest pre-flight checks\n3. **Best Practices**: Identify successful patterns to replicate\n4. **Decision Documentation**: Capture decision rationale for future reference\n5. **Cross-Brain Knowledge**: Generate insights for sharing with other brains\n\n## When to Use\n\n**Trigger automatically**:\n- Daily (via cron): Extract patterns from last 24 hours\n- Weekly: Extract patterns from last 7 days\n- After major work: Extract patterns from specific session\n\n**Trigger manually**:\n- After encountering repeated errors\n- Before starting similar work (learn from past attempts)\n- When updating technical-patterns.md\n\n## Usage\n\n```bash\n# Extract patterns from recent transcripts\n\u002Fpattern-extractor --last 7\n\n# Extract specific pattern types\n\u002Fpattern-extractor --errors-only --last 30\n\u002Fpattern-extractor --decisions-only --since \"2026-02-01\"\n\u002Fpattern-extractor --successes-only --last 14\n\n# Update technical patterns file\n\u002Fpattern-extractor --last 30 --update-file memory\u002Ftechnical-patterns.md\n\n# Generate pre-flight checks from errors\n\u002Fpattern-extractor --generate-checks --last 90\n\n# Export for cross-brain sharing\n\u002Fpattern-extractor --last 7 --format json --output patterns.json\n```\n\n## Process\n\n### 1. Transcript Analysis\n- Load transcripts from specified time range (uses transcript-query)\n- Parse tool uses, errors, user feedback, outcomes\n- Build timeline of activities\n\n### 2. Pattern Detection\n\n**Error Patterns**:\n```\nAnalyze for:\n- Tool errors (Read failed, Edit failed, Bash failed)\n- Repeated mistakes (same error multiple times)\n- Error sequences (Error A → leads to → Error B)\n- Root causes (what triggered the error chain)\n```\n\n**Success Patterns**:\n```\nAnalyze for:\n- Successful completions (task done, tests pass, user approves)\n- Techniques that worked (tool sequences, approaches)\n- Fast resolutions (problem → solution quickly)\n- User praise (positive feedback patterns)\n```\n\n**Decision Patterns**:\n```\nAnalyze for:\n- Architecture decisions (chose X over Y because Z)\n- Trade-offs considered (pros\u002Fcons lists)\n- Rationale documented (why this approach)\n- Alternatives rejected (what was considered but not chosen)\n```\n\n### 3. Pattern Categorization\n\n**Anti-Patterns** (things to avoid):\n- Frequency: How often does this mistake occur?\n- Impact: What's the cost (time lost, bugs introduced)?\n- Root cause: Why does this happen?\n- Prevention: How to stop it?\n\n**Best Practices** (things to replicate):\n- Success rate: How reliably does this work?\n- Context: When is this applicable?\n- Steps: What's the procedure?\n- Metrics: How to measure success?\n\n**Decisions** (for future reference):\n- Problem: What was being solved?\n- Solution: What was chosen?\n- Reasoning: Why was this the best option?\n- Outcome: Did it work?\n\n### 4. Knowledge Base Update\n\n**Update technical-patterns.md**:\n```markdown\n## Anti-Patterns (Last Updated: 2026-02-06)\n\n### Pattern: Always Read before Write\u002FEdit\n**Frequency**: 22 occurrences (last 90 days)\n**Impact**: File operations fail, wasted time\n**Root Cause**: Assumption file exists without verification\n**Prevention**:\n- Pre-flight check: Has this file been read in session?\n- Auto-suggest: \"File not read yet - would you like to read it first?\"\n**Last Seen**: 2026-02-05 (session abc123...)\n\n### Pattern: Verify paths when switching repos\n**Frequency**: 21 occurrences (last 90 days)\n**Impact**: Operations on wrong files, potential data loss\n**Root Cause**: Context switching without path verification\n**Prevention**:\n- Pre-flight check: Verify cwd matches expected repo\n- Prompt pattern: \"Working in {repo} - is this correct?\"\n**Last Seen**: 2026-02-04 (session def456...)\n```\n\n**Update best-practices.md** (if exists):\n```markdown\n## Best Practices (Last Updated: 2026-02-06)\n\n### Pattern: Use native FormData for file uploads\n**Success Rate**: 100% (5\u002F5 attempts)\n**Context**: Uploading files to APIs requiring multipart\u002Fform-data\n**Steps**:\n1. Create FormData instance\n2. Append file as Blob (not Buffer)\n3. Let fetch auto-set Content-Type boundary\n4. Don't manually set Content-Type header\n**Metrics**: Zero upload failures after adopting this pattern\n**First Success**: 2026-02-05 (mech-llms audio upload)\n```\n\n### 5. Generate Preventive Measures\n\n**Pre-flight Checks** (code suggestions):\n```javascript\n\u002F\u002F Suggested pre-flight check for Write\u002FEdit tools\nfunction preWriteCheck(filePath, sessionContext) {\n  const hasBeenRead = sessionContext.filesRead.includes(filePath);\n\n  if (!hasBeenRead) {\n    return {\n      warning: true,\n      message: `File ${filePath} has not been read in this session. Read it first?`,\n      suggestion: `Read(${filePath})`\n    };\n  }\n\n  return { warning: false };\n}\n```\n\n**Tool Wrappers** (safety layer):\n```javascript\n\u002F\u002F Suggested wrapper for Bash tool when switching repos\nasync function safeBash(command, expectedRepo) {\n  const cwd = process.cwd();\n\n  if (!cwd.includes(expectedRepo)) {\n    const userConfirm = await askUser(\n      `Command will run in ${cwd}. Expected ${expectedRepo}. Continue?`\n    );\n    if (!userConfirm) return { cancelled: true };\n  }\n\n  return await Bash(command);\n}\n```\n\n### 6. Output Formats\n\n**Markdown** (human-readable, for memory files):\n```markdown\n# Pattern Analysis: 2026-02-06\n\n## Summary\n- Transcripts analyzed: 42 (last 30 days)\n- Error patterns found: 8\n- Success patterns found: 12\n- Decisions documented: 6\n\n## New Insights\n...\n```\n\n**JSON** (machine-readable, for cross-brain sharing):\n```json\n{\n  \"generated\": \"2026-02-06T14:30:00Z\",\n  \"period\": {\n    \"days\": 30,\n    \"transcripts\": 42,\n    \"sessions\": 38\n  },\n  \"patterns\": {\n    \"errors\": [\n      {\n        \"pattern\": \"Read before Write violation\",\n        \"frequency\": 22,\n        \"impact\": \"high\",\n        \"prevention\": \"pre-flight check\",\n        \"code\": \"function preWriteCheck() { ... }\"\n      }\n    ],\n    \"successes\": [...],\n    \"decisions\": [...]\n  }\n}\n```\n\n## Integration Points\n\n### 1. Daily Automation (cron)\n```bash\n# Run daily at 6am, update technical patterns\n0 6 * * * cd ~\u002Fdev_env\u002Fdecisive_redux && \u002Fpattern-extractor --last 1 --update-file memory\u002Ftechnical-patterns.md\n```\n\n### 2. Session Start Hook\n```javascript\n\u002F\u002F Load recent patterns at session start\nimport { exec } from 'child_process';\n\nconst patterns = await exec('pattern-extractor --last 7 --format json');\nconsole.log(`? Recent patterns: ${patterns.errors.length} errors, ${patterns.successes.length} wins`);\n```\n\n### 3. Pre-Tool Execution Hooks\n```javascript\n\u002F\u002F Before Write tool\nconst writeCheck = await exec(`pattern-extractor --check Write --file ${filePath}`);\nif (writeCheck.warnings.length > 0) {\n  \u002F\u002F Show warnings to user\n}\n```\n\n### 4. Cross-Brain Knowledge Sharing\n```javascript\n\u002F\u002F Extract patterns and broadcast to AgentDispatch hub\nconst patterns = await exec('pattern-extractor --last 7 --format json');\n\nawait agentDispatch.broadcast({\n  type: 'knowledge_share',\n  from: 'decisive-gm',\n  patterns: patterns,\n  timestamp: new Date().toISOString()\n});\n```\n\n## Architecture\n\n### Dependencies\n- `transcript-query` skill (transcript parsing)\n- Node.js fs\u002Fpromises (file I\u002FO)\n- Optional: `mech-llms` (Claude API for pattern summarization)\n\n### File Structure\n```\n.claude\u002Fskills\u002Fpattern-extractor\u002F\n├── SKILL.md                   # This file\n├── pattern-extractor.mjs      # CLI entry point\n├── lib\u002F\n│   ├── pattern-detector.js    # Core pattern detection logic\n│   ├── error-analyzer.js      # Error pattern analysis\n│   ├── success-analyzer.js    # Success pattern analysis\n│   ├── decision-analyzer.js   # Decision pattern analysis\n│   └── check-generator.js     # Pre-flight check code generation\n└── templates\u002F\n    ├── technical-patterns.md  # Template for pattern doc\n    └── pre-flight-checks.js   # Template for checks\n```\n\n## Key Algorithms\n\n### Pattern Detection Algorithm\n```\nFor each transcript in time range:\n  1. Parse tool uses and outcomes\n  2. Identify error sequences\n  3. Detect repeated patterns (same error multiple times)\n  4. Find successful completions\n  5. Extract decision points\n\nGroup similar patterns:\n  - Cluster by error message similarity\n  - Cluster by tool sequence similarity\n  - Cluster by decision context\n\nRank by importance:\n  - Frequency × Impact = Priority\n  - High priority patterns bubble up\n```\n\n### Prevention Suggestion Algorithm\n```\nFor each error pattern:\n  1. Identify trigger condition\n  2. Determine detection point (when can we catch this?)\n  3. Generate pre-flight check code\n  4. Suggest integration point (which tool hook?)\n\nExample:\n  Error: \"Write failed - file not read\"\n  Trigger: Write tool called without prior Read\n  Detection: Before Write execution\n  Check: Has file been read in session?\n  Integration: Pre-Write hook\n```\n\n## Output Example\n\n```markdown\n# Pattern Analysis Report\n**Generated**: 2026-02-06 14:30 UTC\n**Period**: Last 30 days (42 transcripts)\n\n---\n\n## ? High-Priority Anti-Patterns\n\n### 1. Read-Before-Write Violation\n**Occurrences**: 22 times (0.73\u002Fday)\n**Impact**: High (causes file operation failures)\n**Cost**: ~15 min\u002Foccurrence = 5.5 hours wasted\n\n**Pattern**:\n```\nWrite(file.ts) → Error: \"File not read\"\n→ Read(file.ts)\n→ Write(file.ts) → Success\n```\n\n**Root Cause**: Assumption that file context is available without reading\n\n**Prevention**:\n```javascript\n\u002F\u002F Suggested pre-Write hook\nif (!session.filesRead.includes(targetFile)) {\n  warn(\"File not read. Reading automatically...\");\n  await Read(targetFile);\n}\n```\n\n**Recommendation**: Implement pre-flight check ✅ HIGH PRIORITY\n\n---\n\n## ✅ Successful Patterns to Replicate\n\n### 1. Native FormData for Uploads\n**Success Rate**: 100% (5\u002F5)\n**Context**: File uploads to external APIs\n\n**Pattern**:\n```javascript\nconst formData = new FormData();\nformData.append('file', new Blob([fileBuffer]), filename);\n\u002F\u002F Let fetch auto-set Content-Type - don't set manually\nconst response = await fetch(url, { method: 'POST', body: formData });\n```\n\n**Why it works**: APIs like Together.ai need proper boundary in Content-Type\n\n**When to use**: Any external API requiring multipart\u002Fform-data\n\n---\n\n## ? Recent Decisions\n\n### 1. Agent Teams Integration in dev-workflow-orchestrator\n**Date**: 2026-02-06\n**Context**: Should workflow offer agent teams automatically?\n**Decision**: Yes, with analysis phase\n**Reasoning**:\n- Intelligent automation - offers when beneficial\n- User maintains control - can decline\n- Clear cost\u002Fbenefit - shows 3-5x token cost vs 2-3x speed\n**Alternatives Considered**:\n- ❌ Always use teams (too expensive)\n- ❌ Never suggest teams (misses opportunities)\n- ✅ Analyze and suggest (balanced approach)\n**Outcome**: Implemented in phase 3 of workflow\n\n---\n\n## ? Recommendations\n\n1. **Implement pre-flight checks** (code provided above) - prevents 22 errors\u002Fmonth\n2. **Replicate FormData pattern** - 100% success rate for uploads\n3. **Document decision pattern** - agent teams suggestion logic is reusable\n\n---\n\n**Next Pattern Extraction**: 2026-02-07 06:00 UTC (automated)\n```\n\n## Limitations\n\n- Pattern detection requires clean transcript data\n- Code generation is suggestions only (needs review)\n- Cross-brain patterns need standardized format\n- May miss subtle patterns that humans would catch\n\n## Future Enhancements\n\n1. **ML-based pattern detection**: Use embeddings to find semantic patterns\n2. **Auto-fix suggestions**: Generate full PR for common fixes\n3. **Pattern prediction**: \"You're about to make error X based on context\"\n4. **Cross-repo patterns**: Find patterns across portfolio projects\n5. **User feedback loop**: Track if suggested patterns actually help\n\n## Security & Privacy\n\n- Patterns may contain sensitive information from transcripts\n- Filter out credentials, API keys, personal data\n- Sanitize before cross-brain sharing\n- Respect transcript privacy settings\n\n---\n\n**Created**: 2026-02-06\n**Dependencies**: transcript-query, Node.js 18+\n**Related Skills**: brain-briefing, transcript-query, memory-manager\n**Status**: Ready to implement\n","# Pattern Extractor\n\n## Purpose\nClose the learning loop by automatically analyzing transcript history to extract patterns, update technical knowledge, and suggest preventive measures.\n\n## Goal\nTransform experience into actionable knowledge without manual intervention.\n\n## Use Cases\n\n1. **Automated Learning**: Extract lessons from recent work\n2. **Error Prevention**: Find repeated mistakes and suggest pre-flight checks\n3. **Best Practices**: Identify successful patterns to replicate\n4. **Decision Documentation**: Capture decision rationale for future reference\n5. **Cross-Brain Knowledge**: Generate insights for sharing with other brains\n\n## When to Use\n\n**Trigger automatically**:\n- Daily (via cron): Extract patterns from last 24 hours\n- Weekly: Extract patterns from last 7 days\n- After major work: Extract patterns from specific session\n\n**Trigger manually**:\n- After encountering repeated errors\n- Before starting similar work (learn from past attempts)\n- When updating technical-patterns.md\n\n## Usage\n\n```bash\n# Extract patterns from recent transcripts\n\u002Fpattern-extractor --last 7\n\n# Extract specific pattern types\n\u002Fpattern-extractor --errors-only --last 30\n\u002Fpattern-extractor --decisions-only --since \"2026-02-01\"\n\u002Fpattern-extractor --successes-only --last 14\n\n# Update technical patterns file\n\u002Fpattern-extractor --last 30 --update-file memory\u002Ftechnical-patterns.md\n\n# Generate pre-flight checks from errors\n\u002Fpattern-extractor --generate-checks --last 90\n\n# Export for cross-brain sharing\n\u002Fpattern-extractor --last 7 --format json --output patterns.json\n```\n\n## Process\n\n### 1. Transcript Analysis\n- Load transcripts from specified time range (uses transcript-query)\n- Parse tool uses, errors, user feedback, outcomes\n- Build timeline of activities\n\n### 2. Pattern Detection\n\n**Error Patterns**:\n```\nAnalyze for:\n- Tool errors (Read failed, Edit failed, Bash failed)\n- Repeated mistakes (same error multiple times)\n- Error sequences (Error A → leads to → Error B)\n- Root causes (what triggered the error chain)\n```\n\n**Success Patterns**:\n```\nAnalyze for:\n- Successful completions (task done, tests pass, user approves)\n- Techniques that worked (tool sequences, approaches)\n- Fast resolutions (problem → solution quickly)\n- User praise (positive feedback patterns)\n```\n\n**Decision Patterns**:\n```\nAnalyze for:\n- Architecture decisions (chose X over Y because Z)\n- Trade-offs considered (pros\u002Fcons lists)\n- Rationale documented (why this approach)\n- Alternatives rejected (what was considered but not chosen)\n```\n\n### 3. Pattern Categorization\n\n**Anti-Patterns** (things to avoid):\n- Frequency: How often does this mistake occur?\n- Impact: What's the cost (time lost, bugs introduced)?\n- Root cause: Why does this happen?\n- Prevention: How to stop it?\n\n**Best Practices** (things to replicate):\n- Success rate: How reliably does this work?\n- Context: When is this applicable?\n- Steps: What's the procedure?\n- Metrics: How to measure success?\n\n**Decisions** (for future reference):\n- Problem: What was being solved?\n- Solution: What was chosen?\n- Reasoning: Why was this the best option?\n- Outcome: Did it work?\n\n### 4. Knowledge Base Update\n\n**Update technical-patterns.md**:\n```markdown\n## Anti-Patterns (Last Updated: 2026-02-06)\n\n### Pattern: Always Read before Write\u002FEdit\n**Frequency**: 22 occurrences (last 90 days)\n**Impact**: File operations fail, wasted time\n**Root Cause**: Assumption file exists without verification\n**Prevention**:\n- Pre-flight check: Has this file been read in session?\n- Auto-suggest: \"File not read yet - would you like to read it first?\"\n**Last Seen**: 2026-02-05 (session abc123...)\n\n### Pattern: Verify paths when switching repos\n**Frequency**: 21 occurrences (last 90 days)\n**Impact**: Operations on wrong files, potential data loss\n**Root Cause**: Context switching without path verification\n**Prevention**:\n- Pre-flight check: Verify cwd matches expected repo\n- Prompt pattern: \"Working in {repo} - is this correct?\"\n**Last Seen**: 2026-02-04 (session def456...)\n```\n\n**Update best-practices.md** (if exists):\n```markdown\n## Best Practices (Last Updated: 2026-02-06)\n\n### Pattern: Use native FormData for file uploads\n**Success Rate**: 100% (5\u002F5 attempts)\n**Context**: Uploading files to APIs requiring multipart\u002Fform-data\n**Steps**:\n1. Create FormData instance\n2. Append file as Blob (not Buffer)\n3. Let fetch auto-set Content-Type boundary\n4. Don't manually set Content-Type header\n**Metrics**: Zero upload failures after adopting this pattern\n**First Success**: 2026-02-05 (mech-llms audio upload)\n```\n\n### 5. Generate Preventive Measures\n\n**Pre-flight Checks** (code suggestions):\n```javascript\n\u002F\u002F Suggested pre-flight check for Write\u002FEdit tools\nfunction preWriteCheck(filePath, sessionContext) {\n  const hasBeenRead = sessionContext.filesRead.includes(filePath);\n\n  if (!hasBeenRead) {\n    return {\n      warning: true,\n      message: `File ${filePath} has not been read in this session. Read it first?`,\n      suggestion: `Read(${filePath})`\n    };\n  }\n\n  return { warning: false };\n}\n```\n\n**Tool Wrappers** (safety layer):\n```javascript\n\u002F\u002F Suggested wrapper for Bash tool when switching repos\nasync function safeBash(command, expectedRepo) {\n  const cwd = process.cwd();\n\n  if (!cwd.includes(expectedRepo)) {\n    const userConfirm = await askUser(\n      `Command will run in ${cwd}. Expected ${expectedRepo}. Continue?`\n    );\n    if (!userConfirm) return { cancelled: true };\n  }\n\n  return await Bash(command);\n}\n```\n\n### 6. Output Formats\n\n**Markdown** (human-readable, for memory files):\n```markdown\n# Pattern Analysis: 2026-02-06\n\n## Summary\n- Transcripts analyzed: 42 (last 30 days)\n- Error patterns found: 8\n- Success patterns found: 12\n- Decisions documented: 6\n\n## New Insights\n...\n```\n\n**JSON** (machine-readable, for cross-brain sharing):\n```json\n{\n  \"generated\": \"2026-02-06T14:30:00Z\",\n  \"period\": {\n    \"days\": 30,\n    \"transcripts\": 42,\n    \"sessions\": 38\n  },\n  \"patterns\": {\n    \"errors\": [\n      {\n        \"pattern\": \"Read before Write violation\",\n        \"frequency\": 22,\n        \"impact\": \"high\",\n        \"prevention\": \"pre-flight check\",\n        \"code\": \"function preWriteCheck() { ... }\"\n      }\n    ],\n    \"successes\": [...],\n    \"decisions\": [...]\n  }\n}\n```\n\n## Integration Points\n\n### 1. Daily Automation (cron)\n```bash\n# Run daily at 6am, update technical patterns\n0 6 * * * cd ~\u002Fdev_env\u002Fdecisive_redux && \u002Fpattern-extractor --last 1 --update-file memory\u002Ftechnical-patterns.md\n```\n\n### 2. Session Start Hook\n```javascript\n\u002F\u002F Load recent patterns at session start\nimport { exec } from 'child_process';\n\nconst patterns = await exec('pattern-extractor --last 7 --format json');\nconsole.log(`? Recent patterns: ${patterns.errors.length} errors, ${patterns.successes.length} wins`);\n```\n\n### 3. Pre-Tool Execution Hooks\n```javascript\n\u002F\u002F Before Write tool\nconst writeCheck = await exec(`pattern-extractor --check Write --file ${filePath}`);\nif (writeCheck.warnings.length > 0) {\n  \u002F\u002F Show warnings to user\n}\n```\n\n### 4. Cross-Brain Knowledge Sharing\n```javascript\n\u002F\u002F Extract patterns and broadcast to AgentDispatch hub\nconst patterns = await exec('pattern-extractor --last 7 --format json');\n\nawait agentDispatch.broadcast({\n  type: 'knowledge_share',\n  from: 'decisive-gm',\n  patterns: patterns,\n  timestamp: new Date().toISOString()\n});\n```\n\n## Architecture\n\n### Dependencies\n- `transcript-query` skill (transcript parsing)\n- Node.js fs\u002Fpromises (file I\u002FO)\n- Optional: `mech-llms` (Claude API for pattern summarization)\n\n### File Structure\n```\n.claude\u002Fskills\u002Fpattern-extractor\u002F\n├── SKILL.md                   # This file\n├── pattern-extractor.mjs      # CLI entry point\n├── lib\u002F\n│   ├── pattern-detector.js    # Core pattern detection logic\n│   ├── error-analyzer.js      # Error pattern analysis\n│   ├── success-analyzer.js    # Success pattern analysis\n│   ├── decision-analyzer.js   # Decision pattern analysis\n│   └── check-generator.js     # Pre-flight check code generation\n└── templates\u002F\n    ├── technical-patterns.md  # Template for pattern doc\n    └── pre-flight-checks.js   # Template for checks\n```\n\n## Key Algorithms\n\n### Pattern Detection Algorithm\n```\nFor each transcript in time range:\n  1. Parse tool uses and outcomes\n  2. Identify error sequences\n  3. Detect repeated patterns (same error multiple times)\n  4. Find successful completions\n  5. Extract decision points\n\nGroup similar patterns:\n  - Cluster by error message similarity\n  - Cluster by tool sequence similarity\n  - Cluster by decision context\n\nRank by importance:\n  - Frequency × Impact = Priority\n  - High priority patterns bubble up\n```\n\n### Prevention Suggestion Algorithm\n```\nFor each error pattern:\n  1. Identify trigger condition\n  2. Determine detection point (when can we catch this?)\n  3. Generate pre-flight check code\n  4. Suggest integration point (which tool hook?)\n\nExample:\n  Error: \"Write failed - file not read\"\n  Trigger: Write tool called without prior Read\n  Detection: Before Write execution\n  Check: Has file been read in session?\n  Integration: Pre-Write hook\n```\n\n## Output Example\n\n```markdown\n# Pattern Analysis Report\n**Generated**: 2026-02-06 14:30 UTC\n**Period**: Last 30 days (42 transcripts)\n\n---\n\n## ? High-Priority Anti-Patterns\n\n### 1. Read-Before-Write Violation\n**Occurrences**: 22 times (0.73\u002Fday)\n**Impact**: High (causes file operation failures)\n**Cost**: ~15 min\u002Foccurrence = 5.5 hours wasted\n\n**Pattern**:\n```\nWrite(file.ts) → Error: \"File not read\"\n→ Read(file.ts)\n→ Write(file.ts) → Success\n```\n\n**Root Cause**: Assumption that file context is available without reading\n\n**Prevention**:\n```javascript\n\u002F\u002F Suggested pre-Write hook\nif (!session.filesRead.includes(targetFile)) {\n  warn(\"File not read. Reading automatically...\");\n  await Read(targetFile);\n}\n```\n\n**Recommendation**: Implement pre-flight check ✅ HIGH PRIORITY\n\n---\n\n## ✅ Successful Patterns to Replicate\n\n### 1. Native FormData for Uploads\n**Success Rate**: 100% (5\u002F5)\n**Context**: File uploads to external APIs\n\n**Pattern**:\n```javascript\nconst formData = new FormData();\nformData.append('file', new Blob([fileBuffer]), filename);\n\u002F\u002F Let fetch auto-set Content-Type - don't set manually\nconst response = await fetch(url, { method: 'POST', body: formData });\n```\n\n**Why it works**: APIs like Together.ai need proper boundary in Content-Type\n\n**When to use**: Any external API requiring multipart\u002Fform-data\n\n---\n\n## ? Recent Decisions\n\n### 1. Agent Teams Integration in dev-workflow-orchestrator\n**Date**: 2026-02-06\n**Context**: Should workflow offer agent teams automatically?\n**Decision**: Yes, with analysis phase\n**Reasoning**:\n- Intelligent automation - offers when beneficial\n- User maintains control - can decline\n- Clear cost\u002Fbenefit - shows 3-5x token cost vs 2-3x speed\n**Alternatives Considered**:\n- ❌ Always use teams (too expensive)\n- ❌ Never suggest teams (misses opportunities)\n- ✅ Analyze and suggest (balanced approach)\n**Outcome**: Implemented in phase 3 of workflow\n\n---\n\n## ? Recommendations\n\n1. **Implement pre-flight checks** (code provided above) - prevents 22 errors\u002Fmonth\n2. **Replicate FormData pattern** - 100% success rate for uploads\n3. **Document decision pattern** - agent teams suggestion logic is reusable\n\n---\n\n**Next Pattern Extraction**: 2026-02-07 06:00 UTC (automated)\n```\n\n## Limitations\n\n- Pattern detection requires clean transcript data\n- Code generation is suggestions only (needs review)\n- Cross-brain patterns need standardized format\n- May miss subtle patterns that humans would catch\n\n## Future Enhancements\n\n1. **ML-based pattern detection**: Use embeddings to find semantic patterns\n2. **Auto-fix suggestions**: Generate full PR for common fixes\n3. **Pattern prediction**: \"You're about to make error X based on context\"\n4. **Cross-repo patterns**: Find patterns across portfolio projects\n5. **User feedback loop**: Track if suggested patterns actually help\n\n## Security & Privacy\n\n- Patterns may contain sensitive information from transcripts\n- Filter out credentials, API keys, personal data\n- Sanitize before cross-brain sharing\n- Respect transcript privacy settings\n\n---\n\n**Created**: 2026-02-06\n**Dependencies**: transcript-query, Node.js 18+\n**Related Skills**: brain-briefing, transcript-query, memory-manager\n**Status**: Ready to implement\n",{"name":5,"category":21,"description":7},"main","47b89745588c3057f0ccd0517a2eb8967df27054","templates\u002F.claude\u002Fskills\u002Fpattern-extractor","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public","https:\u002F\u002Fgithub.com\u002Fdundas","derivative.io","2026-09-02 20:12:15",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add dundas\u002Fagentbootup-public --skill pattern-extractor",{"tool":45,"command":46},"bunx","bunx skills add dundas\u002Fagentbootup-public --skill pattern-extractor",{"tool":48,"command":49},"pnpm","pnpm dlx skills add dundas\u002Fagentbootup-public --skill pattern-extractor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fpattern-extractor\u002FSKILL.md",true,[53,59,63],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"lib\u002Fpattern-detector.js","SCRIPT","脚本",16424,"https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fpattern-extractor\u002Flib\u002Fpattern-detector.js",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"pattern-extractor.mjs",4516,"https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fpattern-extractor\u002Fpattern-extractor.mjs",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-bundle-manifest.json","REFERENCE","参考文档",1284,"https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fpattern-extractor\u002Fskill-bundle-manifest.json",[70,84,104,124,133,155],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":81,"publishedAt":27},"01M6CQZ7DFJB965BJJ5ZZ54CXY","fixture-skill","Secret-free recovery fixture skill.","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftests\u002Fruntime-adapters\u002Ffixtures\u002Fhermes\u002F0.18.2-darwin-arm64-real\u002Froot\u002Fskills\u002Ffixture-skill\u002FSKILL.md",[76],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[82,83],"fixture skill","recovery",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":95,"publishedAt":27},"01M6CQZ4NN0KVH1Z4E1Y1GJ3X9","user-story-generator","Generate standalone user stories for features without creating a full PRD. Perfect for backlog grooming and story refinement.","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fuser-story-generator\u002FSKILL.md",[90],{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000031","产品经理","PROFESSION","适用职业",[96,97,98,99,100,101,102,103],"user story generator","Story","user story","user","prd","documentation","generate","backlog",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":116,"publishedAt":27},"01M6CQZ16VC27HMWM31CCKK6BC","user-journey-mapper","Map user flows and journeys through your application for UX design and workflow visualization, independent of testing.","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Fuser-journey-mapper\u002FSKILL.md",[110,113],{"categoryNo":111,"categoryName":112,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":114,"categoryName":115,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000032","设计师",[117,118,99,101,119,120,121,122,123],"user journey mapper","journey","ux","visualization","workflow","design","testing",{"skillNo":125,"name":126,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":27},"01M6CQYXSQQJ4Z5CRAX2SSMHW1","transcript-query","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Ftranscript-query\u002FSKILL.md",[],[130,131,132],"transcript","transcript query","query",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":143,"publishedAt":27},"01M6CQYT7A1G4CPQTZKXR5TCK9","test-plan-generator","Generate comprehensive E2E test plans from PRDs, task lists, or descriptions with environment-aware prerequisites and issue tracking.","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Ftest-plan-generator\u002FSKILL.md",[139,140],{"categoryNo":111,"categoryName":112,"taxonomyType":79,"taxonomyTypeDesc":80},{"categoryNo":141,"categoryName":142,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000010","后端与接口",[144,145,146,147,148,149,150,151,152,153,102,154],"plan","test plan generator","test plan","test","task","issue","e2e test","environment","tracking","quality","e2e",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":162,"publishedAt":27},"01M6CQYQAWFSPTYE2VTJJVW72G","tasklist-generator","Generate high-level tasks and gated sub-tasks from a PRD, with agent assignments, commit\u002FPR strategy, and relevant files.","https:\u002F\u002Fgithub.com\u002Fdundas\u002Fagentbootup-public\u002Fblob\u002Fmain\u002Ftemplates\u002F.claude\u002Fskills\u002Ftasklist-generator\u002FSKILL.md",[161],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},[163,164,165,166,100,102,167,168,169,121],"tasklist generator","gated","files","strategy","tasks","pr","commit"]