@bugzy-ai/bugzy 1.19.2 → 1.20.0
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.
- package/LICENSE +21 -21
- package/README.md +273 -273
- package/dist/cli/index.cjs +249 -36
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +248 -35
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +245 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +245 -33
- package/dist/index.js.map +1 -1
- package/dist/subagents/index.cjs +172 -28
- package/dist/subagents/index.cjs.map +1 -1
- package/dist/subagents/index.js +172 -28
- package/dist/subagents/index.js.map +1 -1
- package/dist/subagents/metadata.cjs +2 -1
- package/dist/subagents/metadata.cjs.map +1 -1
- package/dist/subagents/metadata.js +2 -1
- package/dist/subagents/metadata.js.map +1 -1
- package/dist/tasks/index.cjs +27 -4
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.js +27 -4
- package/dist/tasks/index.js.map +1 -1
- package/dist/templates/init/.bugzy/runtime/knowledge-base.md +61 -0
- package/dist/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +97 -0
- package/dist/templates/init/.bugzy/runtime/project-context.md +35 -0
- package/dist/templates/init/.bugzy/runtime/subagent-memory-guide.md +87 -0
- package/dist/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -0
- package/dist/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -0
- package/dist/templates/init/.bugzy/runtime/test-execution-strategy.md +535 -0
- package/dist/templates/init/.bugzy/runtime/testing-best-practices.md +632 -0
- package/dist/templates/init/.gitignore-template +25 -0
- package/package.json +95 -95
- package/templates/init/.bugzy/runtime/hooks/pre-compact.sh +53 -53
- package/templates/init/.bugzy/runtime/hooks/session-start.sh +68 -68
- package/templates/init/.bugzy/runtime/knowledge-base.md +61 -61
- package/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +140 -140
- package/templates/init/.bugzy/runtime/project-context.md +35 -35
- package/templates/init/.bugzy/runtime/subagent-memory-guide.md +122 -122
- package/templates/init/.bugzy/runtime/templates/event-examples.md +194 -194
- package/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -50
- package/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -498
- package/templates/init/.claude/settings.json +49 -49
- package/templates/init/.env.testdata +18 -18
- package/templates/init/.gitignore-template +24 -24
- package/templates/init/AGENTS.md +155 -155
- package/templates/init/CLAUDE.md +157 -157
- package/templates/init/test-runs/README.md +45 -45
- package/templates/init/tests/CLAUDE.md +199 -199
- package/templates/init/tests/docs/test-execution-strategy.md +535 -535
- package/templates/init/tests/docs/testing-best-practices.md +724 -724
- package/templates/playwright/BasePage.template.ts +190 -190
- package/templates/playwright/auth.setup.template.ts +89 -89
- package/templates/playwright/dataGenerators.helper.template.ts +148 -148
- package/templates/playwright/dateUtils.helper.template.ts +96 -96
- package/templates/playwright/pages.fixture.template.ts +50 -50
- package/templates/playwright/playwright.config.template.ts +97 -97
- package/templates/playwright/reporters/__tests__/bugzy-reporter-failure-classification.test.ts +299 -299
- package/templates/playwright/reporters/__tests__/bugzy-reporter-manifest-merge.test.ts +329 -329
- package/templates/playwright/reporters/__tests__/playwright.config.ts +5 -5
- package/templates/playwright/reporters/bugzy-reporter.ts +784 -784
package/package.json
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bugzy-ai/bugzy",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Open-source AI agent configuration for QA automation with Claude Code",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"keywords": [
|
|
9
|
-
"ai",
|
|
10
|
-
"testing",
|
|
11
|
-
"qa",
|
|
12
|
-
"automation",
|
|
13
|
-
"claude",
|
|
14
|
-
"mcp",
|
|
15
|
-
"agent",
|
|
16
|
-
"test-automation",
|
|
17
|
-
"claude-code"
|
|
18
|
-
],
|
|
19
|
-
"homepage": "https://github.com/bugzy-ai/bugzy#readme",
|
|
20
|
-
"bugs": {
|
|
21
|
-
"url": "https://github.com/bugzy-ai/bugzy/issues"
|
|
22
|
-
},
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/bugzy-ai/bugzy.git"
|
|
26
|
-
},
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"author": "Bugzy Team",
|
|
29
|
-
"type": "module",
|
|
30
|
-
"exports": {
|
|
31
|
-
".": {
|
|
32
|
-
"types": "./dist/index.d.ts",
|
|
33
|
-
"import": "./dist/index.js",
|
|
34
|
-
"require": "./dist/index.cjs"
|
|
35
|
-
},
|
|
36
|
-
"./tasks": {
|
|
37
|
-
"types": "./dist/tasks/index.d.ts",
|
|
38
|
-
"import": "./dist/tasks/index.js"
|
|
39
|
-
},
|
|
40
|
-
"./subagents": {
|
|
41
|
-
"types": "./dist/subagents/index.d.ts",
|
|
42
|
-
"import": "./dist/subagents/index.js"
|
|
43
|
-
},
|
|
44
|
-
"./subagents/metadata": {
|
|
45
|
-
"types": "./dist/subagents/metadata.d.ts",
|
|
46
|
-
"import": "./dist/subagents/metadata.js"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"main": "./dist/index.cjs",
|
|
50
|
-
"module": "./dist/index.js",
|
|
51
|
-
"types": "./dist/index.d.ts",
|
|
52
|
-
"bin": {
|
|
53
|
-
"bugzy": "./dist/cli/index.js"
|
|
54
|
-
},
|
|
55
|
-
"files": [
|
|
56
|
-
"dist",
|
|
57
|
-
"templates",
|
|
58
|
-
"README.md",
|
|
59
|
-
"LICENSE"
|
|
60
|
-
],
|
|
61
|
-
"scripts": {
|
|
62
|
-
"build": "tsup",
|
|
63
|
-
"dev": "tsup --watch",
|
|
64
|
-
"test": "vitest run",
|
|
65
|
-
"test:ci": "vitest run",
|
|
66
|
-
"type-check": "tsc --noEmit",
|
|
67
|
-
"lint": "eslint src",
|
|
68
|
-
"prepublishOnly": "pnpm run build && pnpm run test:ci"
|
|
69
|
-
},
|
|
70
|
-
"dependencies": {
|
|
71
|
-
"chalk": "^5.3.0",
|
|
72
|
-
"commander": "^11.1.0",
|
|
73
|
-
"dotenv": "^16.3.1",
|
|
74
|
-
"figlet": "^1.9.3",
|
|
75
|
-
"gradient-string": "^3.0.0",
|
|
76
|
-
"gray-matter": "^4.0.3",
|
|
77
|
-
"inquirer": "^9.2.12",
|
|
78
|
-
"ora": "^7.0.1"
|
|
79
|
-
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"@types/figlet": "^1.7.0",
|
|
82
|
-
"@types/gradient-string": "^1.1.6",
|
|
83
|
-
"@types/inquirer": "^9.0.7",
|
|
84
|
-
"@types/node": "^20.10.5",
|
|
85
|
-
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
86
|
-
"@typescript-eslint/parser": "^6.15.0",
|
|
87
|
-
"eslint": "^8.56.0",
|
|
88
|
-
"tsup": "^8.0.1",
|
|
89
|
-
"typescript": "^5.3.3",
|
|
90
|
-
"vitest": "^1.1.0"
|
|
91
|
-
},
|
|
92
|
-
"engines": {
|
|
93
|
-
"node": ">=18.0.0"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bugzy-ai/bugzy",
|
|
3
|
+
"version": "1.20.0",
|
|
4
|
+
"description": "Open-source AI agent configuration for QA automation with Claude Code",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"ai",
|
|
10
|
+
"testing",
|
|
11
|
+
"qa",
|
|
12
|
+
"automation",
|
|
13
|
+
"claude",
|
|
14
|
+
"mcp",
|
|
15
|
+
"agent",
|
|
16
|
+
"test-automation",
|
|
17
|
+
"claude-code"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/bugzy-ai/bugzy#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/bugzy-ai/bugzy/issues"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/bugzy-ai/bugzy.git"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"author": "Bugzy Team",
|
|
29
|
+
"type": "module",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"require": "./dist/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./tasks": {
|
|
37
|
+
"types": "./dist/tasks/index.d.ts",
|
|
38
|
+
"import": "./dist/tasks/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./subagents": {
|
|
41
|
+
"types": "./dist/subagents/index.d.ts",
|
|
42
|
+
"import": "./dist/subagents/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./subagents/metadata": {
|
|
45
|
+
"types": "./dist/subagents/metadata.d.ts",
|
|
46
|
+
"import": "./dist/subagents/metadata.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"main": "./dist/index.cjs",
|
|
50
|
+
"module": "./dist/index.js",
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"bin": {
|
|
53
|
+
"bugzy": "./dist/cli/index.js"
|
|
54
|
+
},
|
|
55
|
+
"files": [
|
|
56
|
+
"dist",
|
|
57
|
+
"templates",
|
|
58
|
+
"README.md",
|
|
59
|
+
"LICENSE"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "tsup",
|
|
63
|
+
"dev": "tsup --watch",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:ci": "vitest run",
|
|
66
|
+
"type-check": "tsc --noEmit",
|
|
67
|
+
"lint": "eslint src",
|
|
68
|
+
"prepublishOnly": "pnpm run build && pnpm run test:ci"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"chalk": "^5.3.0",
|
|
72
|
+
"commander": "^11.1.0",
|
|
73
|
+
"dotenv": "^16.3.1",
|
|
74
|
+
"figlet": "^1.9.3",
|
|
75
|
+
"gradient-string": "^3.0.0",
|
|
76
|
+
"gray-matter": "^4.0.3",
|
|
77
|
+
"inquirer": "^9.2.12",
|
|
78
|
+
"ora": "^7.0.1"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@types/figlet": "^1.7.0",
|
|
82
|
+
"@types/gradient-string": "^1.1.6",
|
|
83
|
+
"@types/inquirer": "^9.0.7",
|
|
84
|
+
"@types/node": "^20.10.5",
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
86
|
+
"@typescript-eslint/parser": "^6.15.0",
|
|
87
|
+
"eslint": "^8.56.0",
|
|
88
|
+
"tsup": "^8.0.1",
|
|
89
|
+
"typescript": "^5.3.3",
|
|
90
|
+
"vitest": "^1.1.0"
|
|
91
|
+
},
|
|
92
|
+
"engines": {
|
|
93
|
+
"node": ">=18.0.0"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# PreCompact Hook — Flush insights before context compaction
|
|
3
|
-
# This script runs automatically before Claude Code compacts context.
|
|
4
|
-
# Its stdout is injected into the conversation, instructing Claude to save learnings.
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
RUNTIME_DIR=".bugzy/runtime"
|
|
9
|
-
LOGS_DIR="$RUNTIME_DIR/logs"
|
|
10
|
-
TODAY=$(date +%Y-%m-%d)
|
|
11
|
-
LOG_FILE="$LOGS_DIR/$TODAY.md"
|
|
12
|
-
|
|
13
|
-
# Ensure logs directory exists
|
|
14
|
-
mkdir -p "$LOGS_DIR"
|
|
15
|
-
|
|
16
|
-
cat <<'INSTRUCTIONS'
|
|
17
|
-
=== PRE-COMPACTION: Save Your Learnings ===
|
|
18
|
-
|
|
19
|
-
Context compaction is about to happen. Before your context is compressed, extract and save any knowledge from this session that matches the categories below.
|
|
20
|
-
|
|
21
|
-
**Write entries to the daily log file** using the Write tool:
|
|
22
|
-
INSTRUCTIONS
|
|
23
|
-
|
|
24
|
-
echo "**Daily log path:** \`$LOG_FILE\`"
|
|
25
|
-
|
|
26
|
-
cat <<'INSTRUCTIONS'
|
|
27
|
-
|
|
28
|
-
**Format each entry as:**
|
|
29
|
-
```markdown
|
|
30
|
-
### HH:MM — {source-role-or-task}
|
|
31
|
-
<!-- source: {task-or-subagent} -->
|
|
32
|
-
- Insight or pattern learned
|
|
33
|
-
- Another insight
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**Extraction Categories (save only what applies):**
|
|
37
|
-
- **Application patterns** — UI flows, navigation, API response patterns
|
|
38
|
-
- **Test reliability** — Flaky selectors, timing issues, retry patterns
|
|
39
|
-
- **Team preferences** — Communication style, workflow expectations
|
|
40
|
-
- **Technical constraints** — Rate limits, auth lifetimes, deployment gotchas
|
|
41
|
-
- **Environment facts** — URLs, test data patterns, feature flags
|
|
42
|
-
|
|
43
|
-
**Include provenance** on each entry. Only save knowledge that would help in future sessions.
|
|
44
|
-
INSTRUCTIONS
|
|
45
|
-
|
|
46
|
-
# Inject the full maintenance guide for reference
|
|
47
|
-
if [ -f "$RUNTIME_DIR/knowledge-maintenance-guide.md" ]; then
|
|
48
|
-
echo ""
|
|
49
|
-
echo "=== Knowledge Maintenance Guide (Reference) ==="
|
|
50
|
-
cat "$RUNTIME_DIR/knowledge-maintenance-guide.md"
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# PreCompact Hook — Flush insights before context compaction
|
|
3
|
+
# This script runs automatically before Claude Code compacts context.
|
|
4
|
+
# Its stdout is injected into the conversation, instructing Claude to save learnings.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
RUNTIME_DIR=".bugzy/runtime"
|
|
9
|
+
LOGS_DIR="$RUNTIME_DIR/logs"
|
|
10
|
+
TODAY=$(date +%Y-%m-%d)
|
|
11
|
+
LOG_FILE="$LOGS_DIR/$TODAY.md"
|
|
12
|
+
|
|
13
|
+
# Ensure logs directory exists
|
|
14
|
+
mkdir -p "$LOGS_DIR"
|
|
15
|
+
|
|
16
|
+
cat <<'INSTRUCTIONS'
|
|
17
|
+
=== PRE-COMPACTION: Save Your Learnings ===
|
|
18
|
+
|
|
19
|
+
Context compaction is about to happen. Before your context is compressed, extract and save any knowledge from this session that matches the categories below.
|
|
20
|
+
|
|
21
|
+
**Write entries to the daily log file** using the Write tool:
|
|
22
|
+
INSTRUCTIONS
|
|
23
|
+
|
|
24
|
+
echo "**Daily log path:** \`$LOG_FILE\`"
|
|
25
|
+
|
|
26
|
+
cat <<'INSTRUCTIONS'
|
|
27
|
+
|
|
28
|
+
**Format each entry as:**
|
|
29
|
+
```markdown
|
|
30
|
+
### HH:MM — {source-role-or-task}
|
|
31
|
+
<!-- source: {task-or-subagent} -->
|
|
32
|
+
- Insight or pattern learned
|
|
33
|
+
- Another insight
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Extraction Categories (save only what applies):**
|
|
37
|
+
- **Application patterns** — UI flows, navigation, API response patterns
|
|
38
|
+
- **Test reliability** — Flaky selectors, timing issues, retry patterns
|
|
39
|
+
- **Team preferences** — Communication style, workflow expectations
|
|
40
|
+
- **Technical constraints** — Rate limits, auth lifetimes, deployment gotchas
|
|
41
|
+
- **Environment facts** — URLs, test data patterns, feature flags
|
|
42
|
+
|
|
43
|
+
**Include provenance** on each entry. Only save knowledge that would help in future sessions.
|
|
44
|
+
INSTRUCTIONS
|
|
45
|
+
|
|
46
|
+
# Inject the full maintenance guide for reference
|
|
47
|
+
if [ -f "$RUNTIME_DIR/knowledge-maintenance-guide.md" ]; then
|
|
48
|
+
echo ""
|
|
49
|
+
echo "=== Knowledge Maintenance Guide (Reference) ==="
|
|
50
|
+
cat "$RUNTIME_DIR/knowledge-maintenance-guide.md"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
exit 0
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SessionStart Hook — Load knowledge base and recent daily logs into context
|
|
3
|
-
# This script runs automatically at the start of each Claude Code session.
|
|
4
|
-
# Its stdout is injected into the conversation context.
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
RUNTIME_DIR=".bugzy/runtime"
|
|
9
|
-
|
|
10
|
-
# Clean up any stale hook markers from previous sessions
|
|
11
|
-
rm -rf "$RUNTIME_DIR/hooks/.markers" 2>/dev/null || true
|
|
12
|
-
|
|
13
|
-
PROJECT_CONTEXT="$RUNTIME_DIR/project-context.md"
|
|
14
|
-
KB_FILE="$RUNTIME_DIR/knowledge-base.md"
|
|
15
|
-
LOGS_DIR="$RUNTIME_DIR/logs"
|
|
16
|
-
|
|
17
|
-
# --- Memory System Overview ---
|
|
18
|
-
cat <<'OVERVIEW'
|
|
19
|
-
=== Memory System ===
|
|
20
|
-
|
|
21
|
-
This project uses a hooks-based memory system with three layers:
|
|
22
|
-
|
|
23
|
-
1. **Knowledge Base** (`.bugzy/runtime/knowledge-base.md`) — Curated, long-term knowledge. The source of truth.
|
|
24
|
-
2. **Daily Log** (`.bugzy/runtime/logs/YYYY-MM-DD.md`) — Scratch buffer for the current day's insights.
|
|
25
|
-
3. **Subagent Memory** (`.bugzy/runtime/memory/{role}.md`) — Role-specific knowledge per subagent.
|
|
26
|
-
|
|
27
|
-
**Lifecycle:** During work, insights accumulate in context. Before context compaction (PreCompact hook), you flush insights to the daily log. At session end (SessionEnd hook), you consolidate the daily log into the knowledge base. Subagents manage their own memory via SubagentStart/SubagentStop hooks.
|
|
28
|
-
|
|
29
|
-
Below is the current project context, knowledge base, and recent daily logs.
|
|
30
|
-
OVERVIEW
|
|
31
|
-
echo ""
|
|
32
|
-
|
|
33
|
-
# --- Load Project Context ---
|
|
34
|
-
if [ -f "$PROJECT_CONTEXT" ]; then
|
|
35
|
-
echo "=== Project Context ==="
|
|
36
|
-
cat "$PROJECT_CONTEXT"
|
|
37
|
-
echo ""
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# --- Load Knowledge Base ---
|
|
41
|
-
if [ -f "$KB_FILE" ]; then
|
|
42
|
-
echo "=== Knowledge Base ==="
|
|
43
|
-
cat "$KB_FILE"
|
|
44
|
-
echo ""
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
# --- Load Recent Daily Logs ---
|
|
48
|
-
if [ -d "$LOGS_DIR" ]; then
|
|
49
|
-
TODAY=$(date +%Y-%m-%d)
|
|
50
|
-
YESTERDAY=$(date -v-1d +%Y-%m-%d 2>/dev/null || date -d "yesterday" +%Y-%m-%d 2>/dev/null || echo "")
|
|
51
|
-
|
|
52
|
-
if [ -f "$LOGS_DIR/$TODAY.md" ]; then
|
|
53
|
-
echo "=== Daily Log: $TODAY ==="
|
|
54
|
-
cat "$LOGS_DIR/$TODAY.md"
|
|
55
|
-
echo ""
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
if [ -n "$YESTERDAY" ] && [ -f "$LOGS_DIR/$YESTERDAY.md" ]; then
|
|
59
|
-
echo "=== Daily Log: $YESTERDAY ==="
|
|
60
|
-
cat "$LOGS_DIR/$YESTERDAY.md"
|
|
61
|
-
echo ""
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
# --- Prune logs older than 7 days ---
|
|
65
|
-
find "$LOGS_DIR" -name "*.md" -mtime +7 -delete 2>/dev/null || true
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SessionStart Hook — Load knowledge base and recent daily logs into context
|
|
3
|
+
# This script runs automatically at the start of each Claude Code session.
|
|
4
|
+
# Its stdout is injected into the conversation context.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
RUNTIME_DIR=".bugzy/runtime"
|
|
9
|
+
|
|
10
|
+
# Clean up any stale hook markers from previous sessions
|
|
11
|
+
rm -rf "$RUNTIME_DIR/hooks/.markers" 2>/dev/null || true
|
|
12
|
+
|
|
13
|
+
PROJECT_CONTEXT="$RUNTIME_DIR/project-context.md"
|
|
14
|
+
KB_FILE="$RUNTIME_DIR/knowledge-base.md"
|
|
15
|
+
LOGS_DIR="$RUNTIME_DIR/logs"
|
|
16
|
+
|
|
17
|
+
# --- Memory System Overview ---
|
|
18
|
+
cat <<'OVERVIEW'
|
|
19
|
+
=== Memory System ===
|
|
20
|
+
|
|
21
|
+
This project uses a hooks-based memory system with three layers:
|
|
22
|
+
|
|
23
|
+
1. **Knowledge Base** (`.bugzy/runtime/knowledge-base.md`) — Curated, long-term knowledge. The source of truth.
|
|
24
|
+
2. **Daily Log** (`.bugzy/runtime/logs/YYYY-MM-DD.md`) — Scratch buffer for the current day's insights.
|
|
25
|
+
3. **Subagent Memory** (`.bugzy/runtime/memory/{role}.md`) — Role-specific knowledge per subagent.
|
|
26
|
+
|
|
27
|
+
**Lifecycle:** During work, insights accumulate in context. Before context compaction (PreCompact hook), you flush insights to the daily log. At session end (SessionEnd hook), you consolidate the daily log into the knowledge base. Subagents manage their own memory via SubagentStart/SubagentStop hooks.
|
|
28
|
+
|
|
29
|
+
Below is the current project context, knowledge base, and recent daily logs.
|
|
30
|
+
OVERVIEW
|
|
31
|
+
echo ""
|
|
32
|
+
|
|
33
|
+
# --- Load Project Context ---
|
|
34
|
+
if [ -f "$PROJECT_CONTEXT" ]; then
|
|
35
|
+
echo "=== Project Context ==="
|
|
36
|
+
cat "$PROJECT_CONTEXT"
|
|
37
|
+
echo ""
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# --- Load Knowledge Base ---
|
|
41
|
+
if [ -f "$KB_FILE" ]; then
|
|
42
|
+
echo "=== Knowledge Base ==="
|
|
43
|
+
cat "$KB_FILE"
|
|
44
|
+
echo ""
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# --- Load Recent Daily Logs ---
|
|
48
|
+
if [ -d "$LOGS_DIR" ]; then
|
|
49
|
+
TODAY=$(date +%Y-%m-%d)
|
|
50
|
+
YESTERDAY=$(date -v-1d +%Y-%m-%d 2>/dev/null || date -d "yesterday" +%Y-%m-%d 2>/dev/null || echo "")
|
|
51
|
+
|
|
52
|
+
if [ -f "$LOGS_DIR/$TODAY.md" ]; then
|
|
53
|
+
echo "=== Daily Log: $TODAY ==="
|
|
54
|
+
cat "$LOGS_DIR/$TODAY.md"
|
|
55
|
+
echo ""
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
if [ -n "$YESTERDAY" ] && [ -f "$LOGS_DIR/$YESTERDAY.md" ]; then
|
|
59
|
+
echo "=== Daily Log: $YESTERDAY ==="
|
|
60
|
+
cat "$LOGS_DIR/$YESTERDAY.md"
|
|
61
|
+
echo ""
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
# --- Prune logs older than 7 days ---
|
|
65
|
+
find "$LOGS_DIR" -name "*.md" -mtime +7 -delete 2>/dev/null || true
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
exit 0
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
# Knowledge Base
|
|
2
|
-
|
|
3
|
-
> A curated collection of factual knowledge about this project - what we currently know and believe to be true. This is NOT a historical log, but a living reference that evolves as understanding improves.
|
|
4
|
-
|
|
5
|
-
**Maintenance Guide**: See `knowledge-maintenance-guide.md` for instructions on how to maintain this knowledge base.
|
|
6
|
-
|
|
7
|
-
**Core Principle**: This document represents current understanding, not a history. When knowledge evolves, update existing entries rather than appending new ones.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Project Knowledge
|
|
12
|
-
|
|
13
|
-
_This knowledge base will be populated as you work. Add new discoveries, update existing understanding, and remove outdated information following the maintenance guide principles._
|
|
14
|
-
|
|
15
|
-
### When to Update This File
|
|
16
|
-
|
|
17
|
-
- **ADD**: New factual information discovered, new patterns emerge, new areas become relevant
|
|
18
|
-
- **UPDATE**: Facts change, understanding deepens, multiple facts can be consolidated, language can be clarified
|
|
19
|
-
- **REMOVE**: Information becomes irrelevant, facts proven incorrect, entries superseded by better content
|
|
20
|
-
|
|
21
|
-
### Format Guidelines
|
|
22
|
-
|
|
23
|
-
- Use clear, declarative statements in present tense
|
|
24
|
-
- State facts confidently when known; flag uncertainty when it exists
|
|
25
|
-
- Write for someone reading this 6 months from now
|
|
26
|
-
- Keep entries relevant and actionable
|
|
27
|
-
- Favor consolidation over accumulation
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Example Structure
|
|
32
|
-
|
|
33
|
-
Below is an example structure. Feel free to organize knowledge in the way that makes most sense for this project:
|
|
34
|
-
|
|
35
|
-
### Architecture & Infrastructure
|
|
36
|
-
|
|
37
|
-
_System architecture, deployment patterns, infrastructure details_
|
|
38
|
-
|
|
39
|
-
### Testing Patterns
|
|
40
|
-
|
|
41
|
-
_Test strategies, common test scenarios, testing conventions_
|
|
42
|
-
|
|
43
|
-
### UI/UX Patterns
|
|
44
|
-
|
|
45
|
-
_User interface conventions, interaction patterns, design system details_
|
|
46
|
-
|
|
47
|
-
### Data & APIs
|
|
48
|
-
|
|
49
|
-
_Data models, API behaviors, integration patterns_
|
|
50
|
-
|
|
51
|
-
### Known Issues & Workarounds
|
|
52
|
-
|
|
53
|
-
_Current limitations, known bugs, and their workarounds_
|
|
54
|
-
|
|
55
|
-
### Domain Knowledge
|
|
56
|
-
|
|
57
|
-
_Business domain facts, terminology, rules, and context_
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
**Remember**: Every entry should answer "Will this help someone working on this project in 6 months?"
|
|
1
|
+
# Knowledge Base
|
|
2
|
+
|
|
3
|
+
> A curated collection of factual knowledge about this project - what we currently know and believe to be true. This is NOT a historical log, but a living reference that evolves as understanding improves.
|
|
4
|
+
|
|
5
|
+
**Maintenance Guide**: See `knowledge-maintenance-guide.md` for instructions on how to maintain this knowledge base.
|
|
6
|
+
|
|
7
|
+
**Core Principle**: This document represents current understanding, not a history. When knowledge evolves, update existing entries rather than appending new ones.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Project Knowledge
|
|
12
|
+
|
|
13
|
+
_This knowledge base will be populated as you work. Add new discoveries, update existing understanding, and remove outdated information following the maintenance guide principles._
|
|
14
|
+
|
|
15
|
+
### When to Update This File
|
|
16
|
+
|
|
17
|
+
- **ADD**: New factual information discovered, new patterns emerge, new areas become relevant
|
|
18
|
+
- **UPDATE**: Facts change, understanding deepens, multiple facts can be consolidated, language can be clarified
|
|
19
|
+
- **REMOVE**: Information becomes irrelevant, facts proven incorrect, entries superseded by better content
|
|
20
|
+
|
|
21
|
+
### Format Guidelines
|
|
22
|
+
|
|
23
|
+
- Use clear, declarative statements in present tense
|
|
24
|
+
- State facts confidently when known; flag uncertainty when it exists
|
|
25
|
+
- Write for someone reading this 6 months from now
|
|
26
|
+
- Keep entries relevant and actionable
|
|
27
|
+
- Favor consolidation over accumulation
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Example Structure
|
|
32
|
+
|
|
33
|
+
Below is an example structure. Feel free to organize knowledge in the way that makes most sense for this project:
|
|
34
|
+
|
|
35
|
+
### Architecture & Infrastructure
|
|
36
|
+
|
|
37
|
+
_System architecture, deployment patterns, infrastructure details_
|
|
38
|
+
|
|
39
|
+
### Testing Patterns
|
|
40
|
+
|
|
41
|
+
_Test strategies, common test scenarios, testing conventions_
|
|
42
|
+
|
|
43
|
+
### UI/UX Patterns
|
|
44
|
+
|
|
45
|
+
_User interface conventions, interaction patterns, design system details_
|
|
46
|
+
|
|
47
|
+
### Data & APIs
|
|
48
|
+
|
|
49
|
+
_Data models, API behaviors, integration patterns_
|
|
50
|
+
|
|
51
|
+
### Known Issues & Workarounds
|
|
52
|
+
|
|
53
|
+
_Current limitations, known bugs, and their workarounds_
|
|
54
|
+
|
|
55
|
+
### Domain Knowledge
|
|
56
|
+
|
|
57
|
+
_Business domain facts, terminology, rules, and context_
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
**Remember**: Every entry should answer "Will this help someone working on this project in 6 months?"
|