Skip to content

feat: Digimental özelleştirmeleri -#1

Closed
reservelab wants to merge 1 commit intoaffaan-m:mainfrom
reservelab:digimental-custom
Closed

feat: Digimental özelleştirmeleri -#1
reservelab wants to merge 1 commit intoaffaan-m:mainfrom
reservelab:digimental-custom

Conversation

@reservelab
Copy link
Copy Markdown

@reservelab reservelab commented Jan 19, 2026

Değişiklikler:

  • compliance-reviewer.md: Yeni agent (Türk bankacılık regülasyonları)
  • security-reviewer.md: BDDK/MASAK güvenlik kontrolleri eklendi
  • patterns.md: Supabase RLS pattern eklendi
  • agents.md: Digital Board agent'ları eklendi
  • testing.md: Coverage %80 → %70

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced Compliance Reviewer agent for regulatory alignment and KYC/AML controls.
  • Documentation

    • Added comprehensive compliance documentation for Turkish regulatory requirements.
    • Added Turkey-specific security guidance and checklist.
    • Documented Supabase Row Level Security and client initialization patterns.
  • Updates

    • Adjusted minimum test coverage requirement from 80% to 70%.

✏️ Tip: You can customize this high-level summary in your review settings.

Değişiklikler:
- compliance-reviewer.md: Yeni agent (Türk bankacılık regülasyonları)
- security-reviewer.md: BDDK/MASAK güvenlik kontrolleri eklendi
- patterns.md: Supabase RLS pattern eklendi
- agents.md: Digital Board agent'ları eklendi
- testing.md: Coverage %80 → %70

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Changes introduce Turkish regulatory compliance and security documentation (BDDK, MASAK, KVKK standards), expand agent registry with compliance-reviewer role, add Supabase RLS and client initialization patterns, and lower test coverage requirement from 80% to 70%.

Changes

Cohort / File(s) Summary
Compliance & Security Documentation
agents/compliance-reviewer.md, agents/security-reviewer.md
New 257-line compliance reviewer document defines BDDK/MASAK/KVKK controls, KYC/AML checklists, data retention policies, audit trails, and incident protocols in Turkish. Security reviewer expanded with 52 lines of Turkey-specific security requirements, Supabase RLS guidance, and IP range verification examples.
Agent Registry Updates
rules/agents.md
Added compliance-reviewer to primary agent table. Introduced "Digital Board Agents (Digimental)" section with agent roles table. Expanded immediate agent usage guidelines with enumerated feature categories and added sections for parallel task execution and multi-perspective analysis.
Technical Patterns
rules/patterns.md
Introduced two new pattern sections: Supabase RLS Pattern with SQL policy examples for row-level security on customers table, and Supabase Client Pattern with TypeScript examples for server-side and client-side client initialization with environment variables.
Testing Requirements
rules/testing.md
Reduced minimum test coverage threshold from 80% to 70% in "Minimum Test Coverage" heading and MANDATORY workflow verification step. Updated Test-Driven Development section to align with new coverage expectations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Whiskers twitching with delight,
New rules hop into the light,
Turkish safeguards, patterns spun,
Coverage eased, compliance won!
🌟 Hops ahead with trusty cheer,
Regulations crystal clear. 🏛️

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Digimental özelleştirmeleri - BDDK/MASAK/KVKK' accurately summarizes the main changes: additions of Turkish regulatory compliance features (BDDK/MASAK/KVKK controls) and Digimental customizations across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@reservelab reservelab changed the title feat: Digimental özelleştirmeleri - BDDK/MASAK/KVKK feat: Digimental özelleştirmeleri - Jan 19, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@agents/compliance-reviewer.md`:
- Around line 66-72: Update the "Eşik Değerler" section in
agents/compliance-reviewer.md by replacing the outdated 150.000 TL threshold
under "Nakit işlem bildirimi" with the current 2026 MASAK thresholds: state that
cash and bank transfer declaration obligation applies at 200.000 TL and above,
and add the higher tiers 2.000.000 TL and 20.000.000 TL with notes that these
trigger the Cash Transaction Declaration Form and require additional
documentation; keep the other bullets (Şüpheli işlem, PEP kontrolü, Yaptırım
taraması) unchanged.

In `@agents/security-reviewer.md`:
- Around line 580-593: The current isTurkeyIP / TURKEY_IP_RANGES approach is
unreliable (false positives/negatives, no CIDR support, stale data); replace it
by using a proper geolocation lookup or validated CIDR matching: update the
isTurkeyIP function to call a maintained geolocation library/service (e.g.,
geoip-lite or MaxMind GeoIP2) or load an authoritative CIDR list and perform
robust CIDR matching (with IPv4/IPv6 parsing and validation) instead of
startsWith; ensure calls from the transaction check (the if that calls
requireAdditionalVerification) handle lookup failures and cache results/refresh
CIDRs periodically for maintainability.

In `@rules/agents.md`:
- Around line 20-28: The Digital Board section duplicates and fragments agent
definitions (e.g., compliance-reviewer appears twice and cfo-analyst,
cmo-analyst, cto-analyst only exist in the Digital Board table); fix by merging
into a single unified "Available Agents" table with an added "Category" column
(e.g., Core, Regulatory, Digital Board) and move cfo-analyst, cmo-analyst,
cto-analyst into that table, then remove the duplicate compliance-reviewer entry
from the Digital Board subsection; alternatively, if you prefer a hierarchy, add
a clear note under Digital Board stating those agent names are role-specific
configurations of the base agents (reference agent names: cfo-analyst,
cmo-analyst, cto-analyst, compliance-reviewer).
🧹 Nitpick comments (3)
agents/security-reviewer.md (1)

548-548: Add language specifiers to fenced code blocks.

Markdown best practices require language specifiers for fenced code blocks to enable proper syntax highlighting and improve readability.

Based on static analysis hints.

📝 Proposed fix
-```
+```text
 - [ ] Müşteri verileri AES-256 ile şifrelenmiş
 ...
-```
+```text
 - [ ] Şüpheli işlem logları immutable
 ...

Also applies to: 558-558

rules/patterns.md (1)

47-59: Fix code block language identifier.

The code block is tagged as typescript but contains SQL statements. This prevents proper syntax highlighting.

📝 Proposed fix
-```typescript
+```sql
 // ALWAYS enable RLS on tables with user data
 -- Enable RLS
 ALTER TABLE customers ENABLE ROW LEVEL SECURITY;
agents/compliance-reviewer.md (1)

41-64: Add return type annotations to async functions.

The example functions should include explicit return types for better type safety and documentation.

♻️ Proposed improvement
 // ❌ YANLIŞ: Kontrol yok
-async function transfer(from, to, amount) {
+async function transfer(from: string, to: string, amount: number): Promise<void> {
   await executeTransfer(from, to, amount)
 }

 // ✅ DOĞRU: MASAK kontrolü var
-async function transfer(from, to, amount) {
+async function transfer(from: string, to: string, amount: number): Promise<void> {
   const check = await masakCheck({ from, to, amount })

Comment on lines +66 to +72
### Eşik Değerler
```
- Nakit işlem bildirimi: 150.000 TL ve üzeri
- Şüpheli işlem: Tutar bağımsız, davranış bazlı
- PEP kontrolü: Tüm yeni müşteriler
- Yaptırım taraması: OFAC, UN, EU, Türkiye listeleri
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

MASAK Turkish Financial Crimes Investigation Board cash transaction reporting threshold 2026 TL

💡 Result:

MASAK’s draft communiqué sets a declaration obligation for cash and bank transfers of 200,000 Turkish Lira and above, effective January 1, 2026; higher tiers (2,000,000 TL and 20,000,000 TL) trigger completion of a Cash Transaction Declaration Form and additional documentation/explanations. (hurriyetdailynews.com)

Citations:


Update MASAK cash transaction reporting thresholds to current 2026 regulations.

The 150,000 TL threshold is outdated. Effective January 1, 2026, MASAK's current regulations set the declaration obligation for cash and bank transfers at 200,000 TL and above. Additionally, higher tiers at 2,000,000 TL and 20,000,000 TL trigger the Cash Transaction Declaration Form and additional documentation requirements. Update the documentation to reflect the current regulatory thresholds and include all applicable tiers.

🤖 Prompt for AI Agents
In `@agents/compliance-reviewer.md` around lines 66 - 72, Update the "Eşik
Değerler" section in agents/compliance-reviewer.md by replacing the outdated
150.000 TL threshold under "Nakit işlem bildirimi" with the current 2026 MASAK
thresholds: state that cash and bank transfer declaration obligation applies at
200.000 TL and above, and add the higher tiers 2.000.000 TL and 20.000.000 TL
with notes that these trigger the Cash Transaction Declaration Form and require
additional documentation; keep the other bullets (Şüpheli işlem, PEP kontrolü,
Yaptırım taraması) unchanged.

Comment on lines +580 to +593
### Türkiye IP/Lokasyon Kontrolleri
```typescript
// Yurtdışı erişim kontrolü (gerekirse)
const TURKEY_IP_RANGES = ['78.', '85.', '88.', '95.', '176.', '212.', '213.']

function isTurkeyIP(ip: string): boolean {
return TURKEY_IP_RANGES.some(range => ip.startsWith(range))
}

// Kritik işlemlerde lokasyon doğrulama
if (!isTurkeyIP(userIP) && transaction.amount > 10000) {
await requireAdditionalVerification(userId)
}
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

IP-based geolocation is unreliable and overly simplistic.

The current implementation has several issues:

  1. False negatives: Turkish IPs outside these prefixes (e.g., mobile carriers, newer allocations) will be rejected.
  2. False positives: Some listed prefixes may be allocated to other countries or shared.
  3. No CIDR validation: Prefix matching doesn't account for subnet masks.
  4. Maintainability: IP allocations change; hardcoded ranges become stale.

Consider using a proper IP geolocation service (MaxMind GeoIP2, IP2Location) or at minimum, expanding to full CIDR ranges with regular updates.

🌍 Recommended alternatives

Option 1: Use a geolocation service

import geoip from 'geoip-lite'

function isTurkeyIP(ip: string): boolean {
  const geo = geoip.lookup(ip)
  return geo?.country === 'TR'
}

Option 2: If staying with prefix matching, use comprehensive CIDR ranges

// Maintain updated CIDR blocks from RIPE/ARIN databases
const TURKEY_CIDR_BLOCKS = [
  '78.160.0.0/11',
  '85.96.0.0/13',
  // ... comprehensive list from regional registries
]

import { IpSubnetCalculator } from 'ip-subnet-calculator'

function isTurkeyIP(ip: string): boolean {
  return TURKEY_CIDR_BLOCKS.some(cidr => {
    // Proper CIDR matching logic
  })
}
🤖 Prompt for AI Agents
In `@agents/security-reviewer.md` around lines 580 - 593, The current isTurkeyIP /
TURKEY_IP_RANGES approach is unreliable (false positives/negatives, no CIDR
support, stale data); replace it by using a proper geolocation lookup or
validated CIDR matching: update the isTurkeyIP function to call a maintained
geolocation library/service (e.g., geoip-lite or MaxMind GeoIP2) or load an
authoritative CIDR list and perform robust CIDR matching (with IPv4/IPv6 parsing
and validation) instead of startsWith; ensure calls from the transaction check
(the if that calls requireAdditionalVerification) handle lookup failures and
cache results/refresh CIDRs periodically for maintainability.

Comment on lines +20 to +28
## Digital Board Agents (Digimental)

| Agent | Role | When to Use |
|-------|------|-------------|
| cfo-analyst | CFO - Finansal analiz | Maliyet/ROI hesaplaması |
| cmo-analyst | CMO - Pazarlama | Marketing stratejisi |
| cto-analyst | CTO - Teknik | architect + code-reviewer |
| compliance-reviewer | Legal | BDDK/MASAK/KVKK uyum |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Clarify agent taxonomy and avoid duplication.

The "Digital Board Agents" section creates organizational confusion:

  1. Duplication: compliance-reviewer appears in both the main table (line 14) and the Digital Board table (line 27).
  2. Missing entries: cfo-analyst, cmo-analyst, and cto-analyst are only in the Digital Board table, not in the main "Available Agents" table.
  3. Unclear distinction: It's not clear whether Digital Board agents are a subset, aliases, or separate entities.

Consider one of these approaches:

Option 1: Single unified table - Merge all agents into the main table with a "Category" column.

Option 2: Clear hierarchy - Add a note explaining that Digital Board agents are role-specific configurations of base agents.

Option 3: Separate sections - Clearly document that Digital Board agents are project-specific and reference the main agents where applicable.

💡 Example: Option 1 (unified table)
| Agent | Purpose | Category | When to Use |
|-------|---------|----------|-------------|
| planner | Implementation planning | Core | Complex features, refactoring |
| architect | System design | Core | Architectural decisions |
| ...
| compliance-reviewer | BDDK/MASAK/KVKK uyum | Regulatory | RegTech projelerinde |
| cfo-analyst | Finansal analiz | Digital Board | Maliyet/ROI hesaplaması |
| cmo-analyst | Pazarlama | Digital Board | Marketing stratejisi |
| cto-analyst | Teknik | Digital Board | architect + code-reviewer |
🤖 Prompt for AI Agents
In `@rules/agents.md` around lines 20 - 28, The Digital Board section duplicates
and fragments agent definitions (e.g., compliance-reviewer appears twice and
cfo-analyst, cmo-analyst, cto-analyst only exist in the Digital Board table);
fix by merging into a single unified "Available Agents" table with an added
"Category" column (e.g., Core, Regulatory, Digital Board) and move cfo-analyst,
cmo-analyst, cto-analyst into that table, then remove the duplicate
compliance-reviewer entry from the Digital Board subsection; alternatively, if
you prefer a hierarchy, add a clear note under Digital Board stating those agent
names are role-specific configurations of the base agents (reference agent
names: cfo-analyst, cmo-analyst, cto-analyst, compliance-reviewer).

@affaan-m
Copy link
Copy Markdown
Owner

Teşekkürler! (Thanks!) This PR adds Turkish banking regulations and compliance configs which are very specific to your use case. This repo aims to stay general-purpose. Consider maintaining a fork for your Turkish banking-specific configurations! 🙏

@affaan-m affaan-m closed this Jan 23, 2026
moyueheng added a commit to moyueheng/everything-claude-code that referenced this pull request Jan 29, 2026
675db95 feat: unify commands and skills (v1.2.0)
ca584e2 fix: escape pipe in markdown table for markdownlint
a44a055 fix: resolve ESLint errors and update tests for project-name fallback
c9ef02b docs: add requirements section and hooks field warning
0c53ad8 Revert "docs: update shorthand to shortform terminology"
c3430bd docs: add Traditional Chinese translation
fbe2e56 docs: add simplified Chinese README
7c0bc25 feat: add comprehensive CI/CD pipeline
58a97c8 docs: update shorthand to shortform terminology
04ee208 docs: add plugin manifest validation notes
e3a1306 fix: remove duplicate hooks declaration from plugin.json
81003b1 feat: use project name as session filename fallback
8996303 fix: prevent command injection in Prettier hook (affaan-m#102)
8894e1b docs: update README with skill-create and instinct commands
9bc587a feat: add skill-create and continuous-learning-v2 commands
0ced59a Merge pull request affaan-m#91 from Hor1zonZzz/fix/readme-rules-limitation
2563d1e Merge pull request affaan-m#92 from jhsong-musinsa/fix/plugin-manifest-validation
5dc1edb Merge pull request affaan-m#93 from pangerlkr/patch-3
2aac2d9 Create PLUGIN_SCHEMA_NOTES.md
cdf987d fix: use explicit file paths for agents in plugin.json
384b255 docs: add note about rules limitation in plugin installation
accbb47 feat: add proper header banner to shortform guide
ff67b03 feat: add images and rename guides to the-shortform-guide.md and the-longform-guide.md
7fc5ef1 Merge pull request affaan-m#83 from msyahidin/claude/add-golang-support-frw0Z
779085e fix: add missing agents and hooks declarations to plugin.json
5e1835a Merge pull request affaan-m#81 from pangerlkr/patch-2
2abefe6 Merge pull request affaan-m#79 from pangerlkr/patch-1
4bca615 Merge pull request affaan-m#80 from lichengzhe/fix/stop-hook-shell-error
a1f47f1 Merge pull request affaan-m#85 from roeiba/add-license-file
01ad21b docs: add missing MIT LICENSE file
c6c32cd fix: add language labels to fenced code blocks for MD040 compliance
75e1e46 feat: add comprehensive Golang language support
2feac5a docs: add The Longform Guide to Everything Claude Code
a0b84f7 Fix: Move Stop hook inline code to separate script file
1564213 docs: add The Shorthand Guide to Everything Claude Code
56ff5d4 fix: use correct unscoped agent-browser package name (affaan-m#77)
5c63fa9 feat: v1.1.0 release - session ID tracking, async hooks, new skills
5670fcd Fix plugin manifest validation errors (affaan-m#75)
1c9fa0b Add hooks.md to documentation index (affaan-m#40)
2bfd2fb feat: add cloud infrastructure security skill (affaan-m#44)
fae9716 feat(agents): add database-reviewer agent with Supabase patterns (affaan-m#48)
a2087a8 fix: remove unnecessary .sh hooks (affaan-m#41)
b9b7831 fix: multiple community-reported issues
660e0d3 fix: security and documentation fixes
a7bc5f2 revert: remove hooks declaration - auto-loaded by convention
22ad036 fix: add hooks declaration to plugin.json for proper hook loading
5230892 fix: remove version fields from marketplace.json
970f8bf feat: cross-platform support with Node.js scripts
4ec7a6b fix: remove version field to enable automatic plugin updates
0d438dd style: side-by-side guide layout matching profile README
7f4f622 feat: add star history chart and minimal badge bar
c3f1594 fix: move session-end hooks from Stop to SessionEnd
19345df fix: remove duplicate hooks field from plugin.json
73bda1a fix: use ${CLAUDE_PLUGIN_ROOT} for hook script paths
ecfbbd3 fix: use relative path './' for plugin source instead of GitHub object
ee5affb fix: remove agents field temporarily to debug validation
d362ae6 fix: use string format for repository field in plugin.json
9e8006c fix: use GitHub source object in marketplace.json
5010f82 feat: package as Claude Code plugin with marketplace distribution
4491f15 Clarify README description of the repository
e6440d3 docs: restructure README to flow shorthand → longform guides together
fa0928a Enhance README with update section and resources
2d6fd70 feat: add strategic-compact hook and update hooks.json with all hooks
f96ef1e feat: add memory persistence hooks and context files
7d3ea0f feat: add strategic compact skill
6bf102d feat: add continuous learning skill with session examples
3c1e7d9 Clarify repository purpose and additional resources
62a80df Update README with image and guide link
6eefb41 Update README with guide reading reminder
d7cf890 Fix formatting in README.md for guide link
e57979c Update README with image and guide link
45959c3 Initial release: Complete Claude Code configuration collection
REVERT: 69c0b1a Add link to Agent Skills specification website (affaan-m#160)
REVERT: be229a5 Fix links in agent skills specification (affaan-m#159)
REVERT: f232228 Split agent-skills-spec into separate authoring and client integration guides (affaan-m#148)
REVERT: 0075614 Add doc-coauthoring skill and update example skills (affaan-m#134)
REVERT: ef74077 Move example skills into dedicated folder and create minimal top-level folder structure (affaan-m#129)
REVERT: 0f77e50 Update example skills and rename 'artifacts-builder' (affaan-m#112)
REVERT: e5c6015 Add 'frontend-design' example skill (affaan-m#98)
REVERT: c74d647 Clarify Claude Code installation in README.md (#20)
REVERT: 0877bae Updates to README.md (affaan-m#9)
REVERT: b118d29 Add Claude Claude instructions to the readme (#8)
REVERT: 4d1e3f3 Add Claude Code Marketplace (affaan-m#5)
REVERT: 9b61003 Small tweak to blog link (#7)
REVERT: 10e0fbe Add initial Agent Skills Spec (#2)
REVERT: ec84104 Add 3rd Party notices (affaan-m#4)
REVERT: 67ada86 Adding more details to README (affaan-m#3)
REVERT: 83291af Reorganize the example skills (affaan-m#1)
REVERT: 37292f3 init repo

git-subtree-dir: upstream/anthropics-skills
git-subtree-split: 675db95
affaan-m pushed a commit that referenced this pull request Feb 20, 2026
feat: add cloud infrastructure security skill
pythonstrup added a commit to pythonstrup/everything-claude-code that referenced this pull request Mar 8, 2026
Address 8 PR review issues from cubic-dev-ai and coderabbitai:

- Separate require()/run() try/catch in run-with-flags to prevent
  double-execution on run() errors (affaan-m#1)
- Resolve filePath to absolute in quality-gate (#2)
- Detect prettier key in package.json (affaan-m#3)
- Use `output != null` instead of truthy check (affaan-m#4)
- Add gofmt strict mode logging (affaan-m#5)
- Return null for unknown formatter in resolveFormatterBin (#6)
- Track and cleanup temp dirs in tests (#7)
- Add JSDoc to exported functions (#8)
pythonstrup added a commit to pythonstrup/everything-claude-code that referenced this pull request Mar 10, 2026
Address 8 PR review issues from cubic-dev-ai and coderabbitai:

- Separate require()/run() try/catch in run-with-flags to prevent
  double-execution on run() errors (affaan-m#1)
- Resolve filePath to absolute in quality-gate (#2)
- Detect prettier key in package.json (affaan-m#3)
- Use `output != null` instead of truthy check (affaan-m#4)
- Add gofmt strict mode logging (affaan-m#5)
- Return null for unknown formatter in resolveFormatterBin (#6)
- Track and cleanup temp dirs in tests (#7)
- Add JSDoc to exported functions (#8)
vazidmansuri005 added a commit to vazidmansuri005/everything-claude-code that referenced this pull request Mar 17, 2026
- Fix total overhead: 66,400 → 66,100 to match component table sum
  (12,400 + 6,200 + 2,800 + 43,500 + 1,200 = 66,100)
- Fix MCP savings: ~1,500 → ~27,500 tokens (55 tools × 500 tokens/tool)
  to match the per-tool formula defined in Step 1
- Reorder optimizations by savings (MCP removal is now affaan-m#1)
- Fix total savings and percentage (31,100 / 66,100 = 47.0%)
vazidmansuri005 added a commit to vazidmansuri005/everything-claude-code that referenced this pull request Mar 20, 2026
- Fix total overhead: 66,400 → 66,100 to match component table sum
  (12,400 + 6,200 + 2,800 + 43,500 + 1,200 = 66,100)
- Fix MCP savings: ~1,500 → ~27,500 tokens (55 tools × 500 tokens/tool)
  to match the per-tool formula defined in Step 1
- Reorder optimizations by savings (MCP removal is now affaan-m#1)
- Fix total savings and percentage (31,100 / 66,100 = 47.0%)
affaan-m pushed a commit that referenced this pull request Mar 20, 2026
* feat(commands): add /context-budget optimizer command

Adds a command that audits context window token consumption across
agents, skills, rules, MCP servers, and CLAUDE.md files.

Detects bloated agent descriptions, redundant components, MCP
over-subscription, and CLAUDE.md bloat. Produces a prioritized
report with specific token savings per optimization.

Directly relevant to #434 (agent descriptions too verbose, ~26k
tokens causing performance warnings).

* fix: address review feedback on context-budget command

- Add $ARGUMENTS to enable --verbose flag passthrough
- Fix MCP token estimate: 45 tools × ~500 tokens = ~22,500 (was ~2,200)
- Fix heavy agents example: all 3 now exceed 200-line threshold
- Fix description threshold: warning at >30 words, fail at >50 words
- Add Step 4 instructions (was empty)
- Fix audit cadence: "quarterly" → "regularly" + "monthly" consistently
- Fix Output Format heading level under Step 4
- Replace "Antigravity" with generic "harness versions"
- Recalculate total overhead to match corrected MCP numbers

* fix: correct MCP tool count and savings percentage in sample output

- Fix MCP tool count: table now shows 87 tools matching the issues
  section (was 45 in table vs 87 in issues)
- Fix savings percentage: 5,100 / 66,400 = 7.7% (was 20.6%)
- Recalculate total overhead and effective context to match

* fix: correct sample output arithmetic

- Fix total overhead: 66,400 → 66,100 to match component table sum
  (12,400 + 6,200 + 2,800 + 43,500 + 1,200 = 66,100)
- Fix MCP savings: ~1,500 → ~27,500 tokens (55 tools × 500 tokens/tool)
  to match the per-tool formula defined in Step 1
- Reorder optimizations by savings (MCP removal is now #1)
- Fix total savings and percentage (31,100 / 66,100 = 47.0%)

* fix: distinguish always-on vs on-demand agent overhead

Agent descriptions are always loaded into Task tool routing context,
but the full agent body is only loaded when invoked. The audit now
measures both: description-only tokens as always-on overhead and
full-file tokens as worst-case overhead. This resolves the
contradiction between Step 1 (counting full files) and Tip 1 (saying
only descriptions are loaded per session).

* fix: simplify agent accounting and resolve inconsistencies

- Revert to single agent overhead metric (full file tokens) — simpler
  and matches what the report actually displays
- Add back 200-line threshold for heavy agents in Step 1
- Fix heavy agents action to match issue type (split/trim, not
  description-only)
- Remove .agents/skills/ scan path (doesn't exist in ECC repo)
- Consolidate description threshold to single 30-word check

* fix: add model assumption and verbose mode activation

- Step 4: assume 200K context window by default (Claude has no way to
  introspect its model at runtime)
- Step 4: add explicit instruction to check $ARGUMENTS for --verbose
  flag and include additional output when present

* fix: handle .agents/skills/ duplicates in skill scan

Skills scan now checks .agents/skills/ for Codex harness copies and
skips identical duplicates to avoid double-counting overhead.

* fix: add savings estimate to heavy agents action for consistency

* feat(skills): add context-budget backing skill, slim command to delegator

* fix: use structurally detectable classification criteria instead of session frequency

---------

Co-authored-by: vazidmansuri005 <vazidmansuri005@users.noreply.github.com>
chris-yyau referenced this pull request in chris-yyau/everything-claude-code Mar 20, 2026
- Fix status early return skipping pending instinct warnings (cubic #1)
- Exclude already-expired items from expiring-soon filter (cubic #2)
- Warn on unparseable pending instinct age instead of silent skip (cubic affaan-m#4)
- Log prune failures to observer.log instead of silencing (cubic affaan-m#5)

Co-Authored-By: Claude <noreply@anthropic.com>
affaan-m pushed a commit that referenced this pull request Mar 22, 2026
* feat: add pending instinct TTL pruning and /prune command

Pending instincts generated by the observer accumulate indefinitely
with no cleanup mechanism. This adds lifecycle management:

- `instinct-cli.py prune` — delete pending instincts older than 30 days
  (configurable via --max-age). Supports --dry-run and --quiet flags.
- Enhanced `status` command — shows pending count, warns at 5+,
  highlights instincts expiring within 7 days.
- `observer-loop.sh` — runs prune before each analysis cycle.
- `/prune` slash command — user-facing command for manual pruning.

Design rationale: council consensus (4/4) rejected auto-promote in
favor of TTL-based garbage collection. Frequency of observation does
not establish correctness. Unreviewed pending instincts auto-delete
after 30 days; if the pattern is real, the observer will regenerate it.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: remove duplicate functions, broaden extension filter, fix prune output

- Remove duplicate _collect_pending_dirs and _parse_created_date defs
- Use ALLOWED_INSTINCT_EXTENSIONS (.md/.yaml/.yml) instead of .md-only
- Track actually-deleted items separately from expired for accurate output
- Update README.md and AGENTS.md command counts: 59 → 60

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: address Copilot and CodeRabbit review findings

- Use is_dir() instead of exists() for pending path checks
- Change > to >= for --max-age boundary (--max-age 0 now prunes all)
- Use CLV2_PYTHON_CMD env var in observer-loop.sh prune call
- Remove unused source_dupes variable
- Remove extraneous f-string prefix on static string

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: update AGENTS.md project structure command count 59 → 60

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: address cubic and coderabbit review findings

- Fix status early return skipping pending instinct warnings (cubic #1)
- Exclude already-expired items from expiring-soon filter (cubic #2)
- Warn on unparseable pending instinct age instead of silent skip (cubic #4)
- Log prune failures to observer.log instead of silencing (cubic #5)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: YAML single-quote unescaping, f-string cleanup, add /prune to README

- Fix single-quoted YAML unescaping: use '' doubling (YAML spec) not
  backslash escaping which only applies to double-quoted strings (greptile P1)
- Remove extraneous f-string prefix on static string (coderabbit)
- Add /prune to README command catalog and file tree (cubic)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
mecemis pushed a commit to mecemis/everything-claude-code that referenced this pull request Mar 25, 2026
* feat: add pending instinct TTL pruning and /prune command

Pending instincts generated by the observer accumulate indefinitely
with no cleanup mechanism. This adds lifecycle management:

- `instinct-cli.py prune` — delete pending instincts older than 30 days
  (configurable via --max-age). Supports --dry-run and --quiet flags.
- Enhanced `status` command — shows pending count, warns at 5+,
  highlights instincts expiring within 7 days.
- `observer-loop.sh` — runs prune before each analysis cycle.
- `/prune` slash command — user-facing command for manual pruning.

Design rationale: council consensus (4/4) rejected auto-promote in
favor of TTL-based garbage collection. Frequency of observation does
not establish correctness. Unreviewed pending instincts auto-delete
after 30 days; if the pattern is real, the observer will regenerate it.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: remove duplicate functions, broaden extension filter, fix prune output

- Remove duplicate _collect_pending_dirs and _parse_created_date defs
- Use ALLOWED_INSTINCT_EXTENSIONS (.md/.yaml/.yml) instead of .md-only
- Track actually-deleted items separately from expired for accurate output
- Update README.md and AGENTS.md command counts: 59 → 60

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: address Copilot and CodeRabbit review findings

- Use is_dir() instead of exists() for pending path checks
- Change > to >= for --max-age boundary (--max-age 0 now prunes all)
- Use CLV2_PYTHON_CMD env var in observer-loop.sh prune call
- Remove unused source_dupes variable
- Remove extraneous f-string prefix on static string

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: update AGENTS.md project structure command count 59 → 60

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: address cubic and coderabbit review findings

- Fix status early return skipping pending instinct warnings (cubic affaan-m#1)
- Exclude already-expired items from expiring-soon filter (cubic #2)
- Warn on unparseable pending instinct age instead of silent skip (cubic affaan-m#4)
- Log prune failures to observer.log instead of silencing (cubic affaan-m#5)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: YAML single-quote unescaping, f-string cleanup, add /prune to README

- Fix single-quoted YAML unescaping: use '' doubling (YAML spec) not
  backslash escaping which only applies to double-quoted strings (greptile P1)
- Remove extraneous f-string prefix on static string (coderabbit)
- Add /prune to README command catalog and file tree (cubic)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
KeWang0622 pushed a commit to KeWang0622/everything-claude-code that referenced this pull request Apr 13, 2026
…clone refresh

1. (P1) C/C++ format command: replace find/xargs pipeline with glob
   expansion (`clang-format -i **/*.cpp ...`) — simpler, no permission
   issues, and safe with spaces in filenames.
2. (P1) Unvalidated $TMPDIR: default to /tmp when unset/empty via
   `ECC_TMPDIR="${TMPDIR:-/tmp}"`. Cleanup note clarifies only the
   specific subdirectory is deleted, never the temp root.
3. (P2) C/C++ xargs unsafe with spaces: resolved by fix affaan-m#1 (no xargs).
4. (P2) Pre-existing temp clone not refreshed: pull --ff-only if the
   clone exists; delete and re-clone if pull fails.

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.

2 participants