openwolf-enhanced 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +386 -0
  2. package/LICENSE +663 -0
  3. package/NOTICE +48 -0
  4. package/README.md +283 -0
  5. package/dist/bin/openwolf.js +10 -0
  6. package/dist/bin/openwolf.js.map +1 -0
  7. package/dist/dashboard/assets/AISuggestions-DHXOgHMM.js +9 -0
  8. package/dist/dashboard/assets/ActivityTimeline-BXLwacZV.js +1 -0
  9. package/dist/dashboard/assets/AnatomyBrowser-CUyC8M2I.js +1 -0
  10. package/dist/dashboard/assets/BugLog-Bxvy1sPW.js +1 -0
  11. package/dist/dashboard/assets/CerebrumViewer-DCySVmzA.js +1 -0
  12. package/dist/dashboard/assets/CronStatus-BA4fmQX3.js +1 -0
  13. package/dist/dashboard/assets/DesignQC-BhNEKryS.js +1 -0
  14. package/dist/dashboard/assets/MemoryViewer-0y9lsDUO.js +1 -0
  15. package/dist/dashboard/assets/ProjectOverview-CC51rVRe.js +1 -0
  16. package/dist/dashboard/assets/StatusBadge-4NJI_F2G.js +1 -0
  17. package/dist/dashboard/assets/TokenUsage-7pCxlnCX.js +55 -0
  18. package/dist/dashboard/assets/index-4O5rk-qB.css +2 -0
  19. package/dist/dashboard/assets/index-jfgWxxsn.js +13 -0
  20. package/dist/dashboard/assets/utils-BqE_aDxV.js +1 -0
  21. package/dist/dashboard/index.html +16 -0
  22. package/dist/hooks/post-read.js +85 -0
  23. package/dist/hooks/post-write.js +520 -0
  24. package/dist/hooks/pre-read.js +107 -0
  25. package/dist/hooks/pre-write.js +120 -0
  26. package/dist/hooks/session-start.js +76 -0
  27. package/dist/hooks/shared.js +0 -0
  28. package/dist/hooks/stop.js +219 -0
  29. package/dist/src/buglog/bug-matcher.js +3 -0
  30. package/dist/src/buglog/bug-matcher.js.map +1 -0
  31. package/dist/src/buglog/bug-tracker.js +89 -0
  32. package/dist/src/buglog/bug-tracker.js.map +1 -0
  33. package/dist/src/cli/bug-cmd.js +31 -0
  34. package/dist/src/cli/bug-cmd.js.map +1 -0
  35. package/dist/src/cli/cron-cmd.js +107 -0
  36. package/dist/src/cli/cron-cmd.js.map +1 -0
  37. package/dist/src/cli/daemon-cmd.js +180 -0
  38. package/dist/src/cli/daemon-cmd.js.map +1 -0
  39. package/dist/src/cli/dashboard.js +88 -0
  40. package/dist/src/cli/dashboard.js.map +1 -0
  41. package/dist/src/cli/designqc-cmd.js +31 -0
  42. package/dist/src/cli/designqc-cmd.js.map +1 -0
  43. package/dist/src/cli/doctor-cmd.js +94 -0
  44. package/dist/src/cli/doctor-cmd.js.map +1 -0
  45. package/dist/src/cli/index.js +158 -0
  46. package/dist/src/cli/index.js.map +1 -0
  47. package/dist/src/cli/init.js +493 -0
  48. package/dist/src/cli/init.js.map +1 -0
  49. package/dist/src/cli/registry.js +93 -0
  50. package/dist/src/cli/registry.js.map +1 -0
  51. package/dist/src/cli/scan.js +39 -0
  52. package/dist/src/cli/scan.js.map +1 -0
  53. package/dist/src/cli/status.js +98 -0
  54. package/dist/src/cli/status.js.map +1 -0
  55. package/dist/src/cli/update.js +435 -0
  56. package/dist/src/cli/update.js.map +1 -0
  57. package/dist/src/daemon/cron-engine.js +321 -0
  58. package/dist/src/daemon/cron-engine.js.map +1 -0
  59. package/dist/src/daemon/file-watcher.js +64 -0
  60. package/dist/src/daemon/file-watcher.js.map +1 -0
  61. package/dist/src/daemon/health.js +23 -0
  62. package/dist/src/daemon/health.js.map +1 -0
  63. package/dist/src/daemon/wolf-daemon.js +440 -0
  64. package/dist/src/daemon/wolf-daemon.js.map +1 -0
  65. package/dist/src/designqc/designqc-capture.js +278 -0
  66. package/dist/src/designqc/designqc-capture.js.map +1 -0
  67. package/dist/src/designqc/designqc-engine.js +159 -0
  68. package/dist/src/designqc/designqc-engine.js.map +1 -0
  69. package/dist/src/designqc/designqc-types.js +5 -0
  70. package/dist/src/designqc/designqc-types.js.map +1 -0
  71. package/dist/src/hooks/post-read.js +86 -0
  72. package/dist/src/hooks/post-read.js.map +1 -0
  73. package/dist/src/hooks/post-write.js +521 -0
  74. package/dist/src/hooks/post-write.js.map +1 -0
  75. package/dist/src/hooks/pre-read.js +108 -0
  76. package/dist/src/hooks/pre-read.js.map +1 -0
  77. package/dist/src/hooks/pre-write.js +121 -0
  78. package/dist/src/hooks/pre-write.js.map +1 -0
  79. package/dist/src/hooks/session-start.js +77 -0
  80. package/dist/src/hooks/session-start.js.map +1 -0
  81. package/dist/src/hooks/shared.js +0 -0
  82. package/dist/src/hooks/shared.js.map +1 -0
  83. package/dist/src/hooks/stop.js +220 -0
  84. package/dist/src/hooks/stop.js.map +1 -0
  85. package/dist/src/scanner/anatomy-scanner.js +278 -0
  86. package/dist/src/scanner/anatomy-scanner.js.map +1 -0
  87. package/dist/src/scanner/description-extractor.js +1007 -0
  88. package/dist/src/scanner/description-extractor.js.map +1 -0
  89. package/dist/src/scanner/project-root.js +52 -0
  90. package/dist/src/scanner/project-root.js.map +1 -0
  91. package/dist/src/tracker/token-estimator.js +20 -0
  92. package/dist/src/tracker/token-estimator.js.map +1 -0
  93. package/dist/src/tracker/token-ledger.js +55 -0
  94. package/dist/src/tracker/token-ledger.js.map +1 -0
  95. package/dist/src/tracker/waste-detector.js +101 -0
  96. package/dist/src/tracker/waste-detector.js.map +1 -0
  97. package/dist/src/utils/dashboard-auth.js +50 -0
  98. package/dist/src/utils/dashboard-auth.js.map +1 -0
  99. package/dist/src/utils/fs-safe.js +135 -0
  100. package/dist/src/utils/fs-safe.js.map +1 -0
  101. package/dist/src/utils/hooks-deploy.js +70 -0
  102. package/dist/src/utils/hooks-deploy.js.map +1 -0
  103. package/dist/src/utils/logger.js +48 -0
  104. package/dist/src/utils/logger.js.map +1 -0
  105. package/dist/src/utils/maintenance.js +385 -0
  106. package/dist/src/utils/maintenance.js.map +1 -0
  107. package/dist/src/utils/paths.js +23 -0
  108. package/dist/src/utils/paths.js.map +1 -0
  109. package/dist/src/utils/platform.js +14 -0
  110. package/dist/src/utils/platform.js.map +1 -0
  111. package/dist/src/utils/seed.js +61 -0
  112. package/dist/src/utils/seed.js.map +1 -0
  113. package/package.json +82 -0
  114. package/src/templates/OPENWOLF.md +147 -0
  115. package/src/templates/STATUS.md +48 -0
  116. package/src/templates/anatomy.md +5 -0
  117. package/src/templates/buglog.json +4 -0
  118. package/src/templates/cerebrum.md +22 -0
  119. package/src/templates/claude-md-snippet.md +5 -0
  120. package/src/templates/claude-rules-openwolf.md +17 -0
  121. package/src/templates/config.json +83 -0
  122. package/src/templates/cron-manifest.json +97 -0
  123. package/src/templates/cron-state.json +7 -0
  124. package/src/templates/identity.md +9 -0
  125. package/src/templates/memory.md +4 -0
  126. package/src/templates/reframe-frameworks.md +597 -0
  127. package/src/templates/token-ledger.json +21 -0
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "openwolf-enhanced",
3
+ "version": "1.9.3",
4
+ "description": "Token-conscious AI brain for Claude Code projects — enhanced fork with bounded storage, self-maintenance (openwolf doctor), .wolfignore scoping, and tunable retention.",
5
+ "type": "module",
6
+ "bin": {
7
+ "openwolf": "./dist/bin/openwolf.js"
8
+ },
9
+ "scripts": {
10
+ "prebuild": "node -e \"const fs=require('fs');if(fs.existsSync('dist'))fs.rmSync('dist',{recursive:true})\"",
11
+ "build": "tsc && pnpm build:hooks && pnpm build:dashboard && chmod +x dist/bin/openwolf.js",
12
+ "postinstall": "chmod +x dist/bin/openwolf.js 2>/dev/null || true",
13
+ "build:hooks": "tsc -p tsconfig.hooks.json",
14
+ "build:dashboard": "cd src/dashboard/app && npx vite build --outDir ../../../dist/dashboard",
15
+ "dev": "tsc --watch",
16
+ "pretest": "tsc && tsc -p tsconfig.hooks.json",
17
+ "test": "node --test test/*.test.js",
18
+ "docs:dev": "vitepress dev docs",
19
+ "docs:build": "vitepress build docs",
20
+ "prepublishOnly": "node scripts/prepublish-guard.mjs"
21
+ },
22
+ "dependencies": {
23
+ "chokidar": "^5.0.0",
24
+ "commander": "^15.0.0",
25
+ "express": "^5.2.1",
26
+ "node-cron": "^4.0.0",
27
+ "open": "^11.0.0",
28
+ "ws": "^8.21.0"
29
+ },
30
+ "optionalDependencies": {
31
+ "puppeteer-core": "^25.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "@tailwindcss/vite": "^4.3.0",
35
+ "@types/express": "^5.0.0",
36
+ "@types/node": "^26.0.0",
37
+ "@types/react": "^19.0.0",
38
+ "@types/react-dom": "^19.0.0",
39
+ "@types/ws": "^8.5.12",
40
+ "@vitejs/plugin-react": "^6.0.0",
41
+ "react": "^19.0.0",
42
+ "react-dom": "^19.0.0",
43
+ "recharts": "^3.9.0",
44
+ "tailwindcss": "^4.0.0",
45
+ "typescript": "^7.0.0",
46
+ "vite": "^8.0.0",
47
+ "vitepress": "^1.6.4"
48
+ },
49
+ "engines": {
50
+ "node": ">=20.0.0"
51
+ },
52
+ "license": "AGPL-3.0-only",
53
+ "author": "Krynex Labs <info@krynexlabs.de> (https://krynexlabs.de)",
54
+ "contributors": [
55
+ "Cytostack Pvt Ltd (original OpenWolf)"
56
+ ],
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/bassprofressor-lab/openwolf-enhanced.git"
60
+ },
61
+ "homepage": "https://github.com/bassprofressor-lab/openwolf-enhanced#readme",
62
+ "bugs": {
63
+ "url": "https://github.com/bassprofressor-lab/openwolf-enhanced/issues"
64
+ },
65
+ "keywords": [
66
+ "claude",
67
+ "ai",
68
+ "context",
69
+ "token",
70
+ "openwolf",
71
+ "claude-code",
72
+ "developer-tools"
73
+ ],
74
+ "files": [
75
+ "dist/",
76
+ "src/templates/",
77
+ "LICENSE",
78
+ "NOTICE",
79
+ "CHANGELOG.md",
80
+ "README.md"
81
+ ]
82
+ }
@@ -0,0 +1,147 @@
1
+ # OpenWolf Operating Protocol
2
+
3
+ You are working in an OpenWolf-managed project. These rules apply every turn.
4
+
5
+ ## STATUS.md — Single Source of Truth (READ FIRST)
6
+
7
+ `.wolf/STATUS.md` is the **first file** you read when resuming a session. It captures, in one
8
+ place: what's already done (✅), the current/next quest with acceptance criteria (🚀), the active
9
+ architecture (📁), open pendencies (⚠️), and useful commands (🔧).
10
+
11
+ 1. **On session start / after `/clear`:** read `.wolf/STATUS.md` before anything else — it restores
12
+ context in ~1 read instead of stitching it together from memory.md, cerebrum.md and code.
13
+ 2. **When a quest finishes (or before you suggest `/clear`):** move completed items to ✅ and write
14
+ the next quest under 🚀, so the next session resumes cheaply.
15
+ 3. Keep it short and current — it is a handoff note, not a log (that's `memory.md`).
16
+
17
+ ## File Navigation
18
+
19
+ 1. Check `.wolf/anatomy.md` BEFORE reading any file. It has a 2-3 line description and token estimate for every file in the project.
20
+ 2. If the description in anatomy.md is sufficient for your task, do NOT read the full file.
21
+ 3. If a file is not in anatomy.md, search with Grep/Glob, then update anatomy.md with the new entry.
22
+
23
+ ## Code Generation
24
+
25
+ 1. Before generating code, read `.wolf/cerebrum.md` and respect every entry.
26
+ 2. Check the `## Do-Not-Repeat` section — these are past mistakes that must not recur.
27
+ 3. Follow all conventions in `## Key Learnings` and `## User Preferences`.
28
+
29
+ ## After Actions
30
+
31
+ 1. After every significant action, append a one-line entry to `.wolf/memory.md`:
32
+ `| HH:MM | description | file(s) | outcome | ~tokens |`
33
+ 2. After creating, deleting, or renaming files: update `.wolf/anatomy.md`.
34
+
35
+ ## Cerebrum Learning (MANDATORY — every session)
36
+
37
+ OpenWolf's value comes from learning across sessions. You MUST update `.wolf/cerebrum.md` whenever you learn something useful. This is not optional.
38
+
39
+ **Update `## User Preferences` when the user:**
40
+ - Corrects your approach ("no, do it this way instead")
41
+ - Expresses a style preference (naming, structure, formatting)
42
+ - Shows a preferred workflow or tool choice
43
+ - Rejects a suggestion — record what they preferred instead
44
+ - Asks for more/less detail, verbosity, explanation
45
+
46
+ **Update `## Key Learnings` when you discover:**
47
+ - A project convention not obvious from the code (e.g., "tests go in __tests__/ not test/")
48
+ - A framework-specific pattern this project uses
49
+ - An API behavior that surprised you
50
+ - A dependency quirk or version constraint
51
+ - How modules connect or data flows through the system
52
+
53
+ **Update `## Do-Not-Repeat` (with date) when:**
54
+ - The user corrects a mistake you made
55
+ - You try something that fails and find the right approach
56
+ - You discover a gotcha that would trip up a fresh session
57
+
58
+ **Update `## Decision Log` when:**
59
+ - A significant architectural or technical choice is made
60
+ - The user explains why they chose approach A over B
61
+ - A trade-off is explicitly discussed
62
+
63
+ **The bar is LOW.** If in doubt, add it. A cerebrum entry that's slightly redundant costs nothing. A missing entry means the next session repeats the same discovery process.
64
+
65
+ ## Bug Logging (MANDATORY)
66
+
67
+ **Log a bug to `.wolf/buglog.json` whenever ANY of these happen:**
68
+ - The user reports an error, bug, or problem
69
+ - A test fails or a command produces an error
70
+ - You fix something that was broken
71
+ - You edit a file more than twice to get it right
72
+ - An import, module, or dependency is missing or wrong
73
+ - A runtime error, type error, or syntax error occurs
74
+ - A build or lint command fails
75
+ - A feature doesn't work as expected
76
+ - You change error handling, try/catch blocks, or validation logic
77
+ - The user says something "doesn't work", "is broken", or "shows wrong X"
78
+
79
+ **Before fixing:** Read `.wolf/buglog.json` first — the fix may already be known.
80
+
81
+ **After fixing:** ALWAYS append to `.wolf/buglog.json` with this structure:
82
+ ```json
83
+ {
84
+ "id": "bug-NNN",
85
+ "timestamp": "ISO date",
86
+ "error_message": "exact error or user complaint",
87
+ "file": "file that was fixed",
88
+ "root_cause": "why it broke",
89
+ "fix": "what you changed to fix it",
90
+ "tags": ["relevant", "keywords"],
91
+ "related_bugs": [],
92
+ "occurrences": 1,
93
+ "last_seen": "ISO date"
94
+ }
95
+ ```
96
+
97
+ **The threshold is LOW.** When in doubt, log it. A false positive in the bug log costs nothing. A missed bug means repeating the same mistake later.
98
+
99
+ ## Token Discipline
100
+
101
+ - Never re-read a file already read this session unless it was modified since.
102
+ - Prefer anatomy.md descriptions over full file reads when possible.
103
+ - Prefer targeted Grep over full file reads when searching for specific code.
104
+ - If appending to a file, do not read the entire file first.
105
+
106
+ ## Design QC
107
+
108
+ When the user asks you to check, evaluate, or improve the design/UI of their app:
109
+
110
+ 1. Run `openwolf designqc` via Bash to capture screenshots.
111
+ - The command auto-detects a running dev server, or starts one from package.json if needed
112
+ - Use `--url <url>` only if auto-detection fails
113
+ - The command saves compressed JPEG screenshots to `.wolf/designqc-captures/`
114
+ - Full pages are captured as sectioned viewport-height images (top, section2, ..., bottom)
115
+ 2. Read the captured screenshot images from `.wolf/designqc-captures/` using the Read tool.
116
+ 3. Evaluate the design against modern standards (Shadcn UI, Tailwind, clean React patterns):
117
+ - Spacing and whitespace consistency
118
+ - Typography hierarchy and readability
119
+ - Color contrast and accessibility (WCAG)
120
+ - Visual hierarchy and focal points
121
+ - Component consistency
122
+ - Whether the design looks "dull" or "white-coded" (generic, no personality)
123
+ 4. Provide specific, actionable feedback with fix suggestions.
124
+ 5. If the user approves, implement the fixes directly in their code.
125
+ 6. After fixes, re-run `openwolf designqc` to capture new screenshots and verify improvement.
126
+
127
+ **Token awareness:** Each screenshot costs ~2500 tokens. The command compresses images (JPEG quality 70, max width 1200px) to minimize cost. For large apps, use `--routes / /specific-page` to limit captures.
128
+
129
+ ## Reframe — UI Framework Selection
130
+
131
+ When the user asks to change, pick, migrate, or "reframe" their project's UI framework:
132
+
133
+ 1. Read `.wolf/reframe-frameworks.md` for the full framework knowledge base.
134
+ 2. Ask the user the decision questions from the file (current stack, priority, Tailwind usage, theme preference, app type). Stop early once the choice narrows to 1-2 options.
135
+ 3. Present a recommendation with reasoning based on the comparison matrix.
136
+ 4. Once the user confirms, use the selected framework's prompt from the file — **adapted to the actual project** using `.wolf/anatomy.md` for real file paths, routes, and components.
137
+ 5. Execute the migration: install dependencies, update config, refactor components.
138
+ 6. After migration, run `openwolf designqc` to verify the new look.
139
+
140
+ **Do NOT read the entire reframe-frameworks.md into context upfront.** Read the decision questions and comparison matrix first (~50 lines). Only read the specific framework's prompt section after the user chooses.
141
+
142
+ ## Session End
143
+
144
+ Before ending or when asked to wrap up:
145
+
146
+ 1. Write a session summary to `.wolf/memory.md`.
147
+ 2. Review the session: did you learn anything? Did the user correct you? Did you fix a bug? If yes, update `.wolf/cerebrum.md` and/or `.wolf/buglog.json`.
@@ -0,0 +1,48 @@
1
+ # STATUS — {{PROJECT_NAME}}
2
+
3
+ > Single source of truth for resuming work. **Read this FIRST** when starting a session.
4
+ > Update it at the end of every quest so the next `/clear` resumes in a single read.
5
+ >
6
+ > Last updated: {{DATE}}
7
+
8
+ ---
9
+
10
+ ## ✅ Done
11
+
12
+ - (nothing yet — move items here as quests complete)
13
+
14
+ ---
15
+
16
+ ## 🚀 Next phase
17
+
18
+ **Goal:** _<what we're building next>_
19
+
20
+ ### Acceptance criteria
21
+ 1. _<concrete, user-visible outcome>_
22
+
23
+ ### Files to create / edit
24
+ - _<path — purpose>_
25
+
26
+ ### Open decisions
27
+ - _<question to resolve before coding>_
28
+
29
+ ---
30
+
31
+ ## 📁 Active architecture
32
+
33
+ - **Stack:** _<frameworks / languages>_
34
+ - **Entry points:** _<main files>_
35
+
36
+ ---
37
+
38
+ ## ⚠️ Pending / gotchas
39
+
40
+ - _<known issues, blockers, things to remember>_
41
+
42
+ ---
43
+
44
+ ## 🔧 Useful commands
45
+
46
+ ```bash
47
+ # add the commands you run most often here
48
+ ```
@@ -0,0 +1,5 @@
1
+ # anatomy.md
2
+
3
+ > Project structure index. Auto-maintained by OpenWolf hooks and daemon.
4
+ > Run `openwolf scan` to generate, or wait for the first Claude Code session.
5
+ > Status: Pending initial scan
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": 1,
3
+ "bugs": []
4
+ }
@@ -0,0 +1,22 @@
1
+ # Cerebrum
2
+
3
+ > OpenWolf's learning memory. Updated automatically as the AI learns from interactions.
4
+ > Do not edit manually unless correcting an error.
5
+ > Last updated: —
6
+
7
+ ## User Preferences
8
+
9
+ <!-- How the user likes things done. Code style, tools, patterns, communication. -->
10
+
11
+ ## Key Learnings
12
+
13
+ <!-- Project-specific conventions discovered during development. -->
14
+
15
+ ## Do-Not-Repeat
16
+
17
+ <!-- Mistakes made and corrected. Each entry prevents the same mistake recurring. -->
18
+ <!-- Format: [YYYY-MM-DD] Description of what went wrong and what to do instead. -->
19
+
20
+ ## Decision Log
21
+
22
+ <!-- Significant technical decisions with rationale. Why X was chosen over Y. -->
@@ -0,0 +1,5 @@
1
+ # OpenWolf
2
+
3
+ @.wolf/OPENWOLF.md
4
+
5
+ This project uses OpenWolf for context management. Read and follow .wolf/OPENWOLF.md every session. Check .wolf/cerebrum.md before generating code. Check .wolf/anatomy.md before reading files.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: OpenWolf protocol enforcement — active on all files
3
+ globs: **/*
4
+ ---
5
+
6
+ - Read .wolf/STATUS.md FIRST when resuming a session — it holds the current quest, next steps, and decisions
7
+ - Update .wolf/STATUS.md (✅ done / 🚀 next quest) when a quest finishes or before suggesting /clear
8
+ - Check .wolf/anatomy.md before reading any project file
9
+ - Check .wolf/cerebrum.md Do-Not-Repeat list before generating code
10
+ - After writing or editing files, update .wolf/anatomy.md and append to .wolf/memory.md
11
+ - After receiving a user correction, update .wolf/cerebrum.md immediately (Preferences, Learnings, or Do-Not-Repeat)
12
+ - LEARN from every interaction: if you discover a convention, user preference, or project pattern, add it to .wolf/cerebrum.md. Low threshold — when in doubt, log it.
13
+ - BEFORE fixing any bug or error: read .wolf/buglog.json for known fixes
14
+ - AFTER fixing any bug, error, failed test, failed build, or user-reported problem: ALWAYS log to .wolf/buglog.json with error_message, root_cause, fix, and tags
15
+ - If you edit a file more than twice in a session, that likely indicates a bug — log it to .wolf/buglog.json
16
+ - When the user asks to check/evaluate UI design: run `openwolf designqc` to capture screenshots, then read them from .wolf/designqc-captures/
17
+ - When the user asks to change/pick/migrate UI framework: read .wolf/reframe-frameworks.md, ask decision questions, recommend a framework, then execute with the framework's prompt
@@ -0,0 +1,83 @@
1
+ {
2
+ "version": 1,
3
+ "openwolf": {
4
+ "enabled": true,
5
+ "anatomy": {
6
+ "auto_scan_on_init": true,
7
+ "rescan_interval_hours": 6,
8
+ "max_description_length": 100,
9
+ "max_files": 500,
10
+ "exclude_patterns": [
11
+ "node_modules",
12
+ ".git",
13
+ "dist",
14
+ "build",
15
+ ".wolf",
16
+ ".next",
17
+ ".nuxt",
18
+ "coverage",
19
+ "__pycache__",
20
+ ".cache",
21
+ "target",
22
+ ".vscode",
23
+ ".idea",
24
+ ".turbo",
25
+ ".vercel",
26
+ ".netlify",
27
+ ".output",
28
+ "*.min.js",
29
+ "*.min.css"
30
+ ]
31
+ },
32
+ "token_audit": {
33
+ "enabled": true,
34
+ "report_frequency": "weekly",
35
+ "waste_threshold_percent": 15,
36
+ "chars_per_token_code": 3.5,
37
+ "chars_per_token_prose": 4.0
38
+ },
39
+ "cron": {
40
+ "enabled": true,
41
+ "max_retry_attempts": 3,
42
+ "dead_letter_enabled": true,
43
+ "heartbeat_interval_minutes": 30,
44
+ "use_claude_p": true,
45
+ "api_key_env": null
46
+ },
47
+ "memory": {
48
+ "consolidation_after_days": 7,
49
+ "max_entries_before_consolidation": 200
50
+ },
51
+ "retention": {
52
+ "token_ledger_max_sessions": 200,
53
+ "session_io_max": 100,
54
+ "buglog_max_entries": 200,
55
+ "backups_keep": 10,
56
+ "memory_consolidate_after_days": 7,
57
+ "memory_max_bytes": 262144,
58
+ "daemon_log_max_bytes": 524288
59
+ },
60
+ "cerebrum": {
61
+ "max_tokens": 2000,
62
+ "reflection_frequency": "weekly"
63
+ },
64
+ "daemon": {
65
+ "port": 18790,
66
+ "log_level": "info"
67
+ },
68
+ "dashboard": {
69
+ "enabled": true,
70
+ "port": 18791,
71
+ "host": "127.0.0.1"
72
+ },
73
+ "designqc": {
74
+ "enabled": true,
75
+ "viewports": [
76
+ { "name": "desktop", "width": 1440, "height": 900 },
77
+ { "name": "mobile", "width": 375, "height": 812 }
78
+ ],
79
+ "max_screenshots": 6,
80
+ "chrome_path": null
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "version": 1,
3
+ "tasks": [
4
+ {
5
+ "id": "anatomy-rescan",
6
+ "name": "Full anatomy rescan",
7
+ "schedule": "0 */6 * * *",
8
+ "description": "Re-scans project filesystem and reconciles anatomy.md",
9
+ "action": { "type": "scan_project" },
10
+ "retry": {
11
+ "max_attempts": 3,
12
+ "backoff": "exponential",
13
+ "base_delay_seconds": 30
14
+ },
15
+ "failsafe": {
16
+ "on_failure": "log_and_continue",
17
+ "alert_after_consecutive_failures": 2,
18
+ "dead_letter": true
19
+ },
20
+ "enabled": true
21
+ },
22
+ {
23
+ "id": "memory-consolidation",
24
+ "name": "Consolidate old memory",
25
+ "schedule": "0 2 * * *",
26
+ "description": "Compress memory.md entries older than 7 days",
27
+ "action": {
28
+ "type": "consolidate_memory",
29
+ "params": { "older_than_days": 7 }
30
+ },
31
+ "retry": {
32
+ "max_attempts": 2,
33
+ "backoff": "exponential",
34
+ "base_delay_seconds": 60
35
+ },
36
+ "failsafe": {
37
+ "on_failure": "skip_and_retry_next_cycle",
38
+ "dead_letter": false
39
+ },
40
+ "enabled": true
41
+ },
42
+ {
43
+ "id": "token-audit",
44
+ "name": "Token audit report",
45
+ "schedule": "0 0 * * 1",
46
+ "description": "Weekly waste pattern detection",
47
+ "action": { "type": "generate_token_report" },
48
+ "retry": {
49
+ "max_attempts": 2,
50
+ "backoff": "linear",
51
+ "base_delay_seconds": 60
52
+ },
53
+ "failsafe": { "on_failure": "log_and_continue", "dead_letter": true },
54
+ "enabled": true
55
+ },
56
+ {
57
+ "id": "cerebrum-reflection",
58
+ "name": "Cerebrum reflection",
59
+ "schedule": "0 3 * * 0",
60
+ "description": "Weekly AI review of cerebrum.md — prune stale entries, consolidate duplicates",
61
+ "action": {
62
+ "type": "ai_task",
63
+ "params": {
64
+ "prompt": "Review this cerebrum.md. Remove duplicate preferences (keep newer). Remove Do-Not-Repeat entries older than 90 days if no longer relevant. Consolidate Key Learnings that overlap. Keep the file under 2000 tokens. Return the cleaned file content only.",
65
+ "context_files": [".wolf/cerebrum.md"]
66
+ }
67
+ },
68
+ "retry": {
69
+ "max_attempts": 1,
70
+ "backoff": "none",
71
+ "base_delay_seconds": 0
72
+ },
73
+ "failsafe": { "on_failure": "log_and_continue", "dead_letter": false },
74
+ "enabled": true
75
+ },
76
+ {
77
+ "id": "project-suggestions",
78
+ "name": "AI suggestions",
79
+ "schedule": "0 4 * * 1",
80
+ "description": "Weekly AI analysis with project improvement suggestions",
81
+ "action": {
82
+ "type": "ai_task",
83
+ "params": {
84
+ "prompt": "Based on the recent memory entries and current project structure, provide: 1) Key achievements this week, 2) Code improvements to consider, 3) Logical next tasks, 4) Technical debt or risks. Be specific and actionable. Return as JSON: {achievements:[], improvements:[], next_tasks:[], risks:[]}",
85
+ "context_files": [".wolf/memory.md", ".wolf/anatomy.md"]
86
+ }
87
+ },
88
+ "retry": {
89
+ "max_attempts": 1,
90
+ "backoff": "none",
91
+ "base_delay_seconds": 0
92
+ },
93
+ "failsafe": { "on_failure": "log_and_continue", "dead_letter": false },
94
+ "enabled": true
95
+ }
96
+ ]
97
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "last_heartbeat": null,
3
+ "engine_status": "initialized",
4
+ "execution_log": [],
5
+ "dead_letter_queue": [],
6
+ "upcoming": []
7
+ }
@@ -0,0 +1,9 @@
1
+ # Identity
2
+
3
+ - **Name:** Wolf
4
+ - **Role:** AI development assistant for this project
5
+ - **Tone:** Direct, concise, technically precise
6
+ - **Constraints:**
7
+ - Never modify .env or secret files without explicit user confirmation
8
+ - Never delete files without explicit user confirmation
9
+ - Always explain why before making architectural changes
@@ -0,0 +1,4 @@
1
+ # Memory
2
+
3
+ > Chronological action log. Hooks and AI append to this file automatically.
4
+ > Old sessions are consolidated by the daemon weekly.