oh-my-claude-sisyphus 3.4.2 → 3.5.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/README.md +45 -0
- package/commands/cancel-ultraqa.md +1 -1
- package/dist/__tests__/analytics/analytics-summary.test.d.ts +2 -0
- package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/analytics-summary.test.js +267 -0
- package/dist/__tests__/analytics/analytics-summary.test.js.map +1 -0
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts +2 -0
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/backfill-dedup.test.js +179 -0
- package/dist/__tests__/analytics/backfill-dedup.test.js.map +1 -0
- package/dist/__tests__/analytics/backfill-engine.test.d.ts +2 -0
- package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/backfill-engine.test.js +362 -0
- package/dist/__tests__/analytics/backfill-engine.test.js.map +1 -0
- package/dist/__tests__/analytics/cost-estimator.test.d.ts +2 -0
- package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/cost-estimator.test.js +212 -0
- package/dist/__tests__/analytics/cost-estimator.test.js.map +1 -0
- package/dist/__tests__/analytics/output-estimator.test.d.ts +2 -0
- package/dist/__tests__/analytics/output-estimator.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/output-estimator.test.js +106 -0
- package/dist/__tests__/analytics/output-estimator.test.js.map +1 -0
- package/dist/__tests__/analytics/token-extractor.test.d.ts +2 -0
- package/dist/__tests__/analytics/token-extractor.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/token-extractor.test.js +121 -0
- package/dist/__tests__/analytics/token-extractor.test.js.map +1 -0
- package/dist/__tests__/analytics/transcript-parser.test.d.ts +2 -0
- package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/transcript-parser.test.js +285 -0
- package/dist/__tests__/analytics/transcript-parser.test.js.map +1 -0
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts +2 -0
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/transcript-scanner.test.js +401 -0
- package/dist/__tests__/analytics/transcript-scanner.test.js.map +1 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +2 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.js +175 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +1 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +2 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +1 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.js +12 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.js.map +1 -0
- package/dist/__tests__/learner/auto-learner.test.d.ts +7 -0
- package/dist/__tests__/learner/auto-learner.test.d.ts.map +1 -0
- package/dist/__tests__/learner/auto-learner.test.js +507 -0
- package/dist/__tests__/learner/auto-learner.test.js.map +1 -0
- package/dist/__tests__/learner/matcher.test.d.ts +2 -0
- package/dist/__tests__/learner/matcher.test.d.ts.map +1 -0
- package/dist/__tests__/learner/matcher.test.js +330 -0
- package/dist/__tests__/learner/matcher.test.js.map +1 -0
- package/dist/analytics/analytics-summary.d.ts +47 -0
- package/dist/analytics/analytics-summary.d.ts.map +1 -0
- package/dist/analytics/analytics-summary.js +171 -0
- package/dist/analytics/analytics-summary.js.map +1 -0
- package/dist/analytics/backfill-dedup.d.ts +49 -0
- package/dist/analytics/backfill-dedup.d.ts.map +1 -0
- package/dist/analytics/backfill-dedup.js +115 -0
- package/dist/analytics/backfill-dedup.js.map +1 -0
- package/dist/analytics/backfill-engine.d.ts +59 -0
- package/dist/analytics/backfill-engine.d.ts.map +1 -0
- package/dist/analytics/backfill-engine.js +172 -0
- package/dist/analytics/backfill-engine.js.map +1 -0
- package/dist/analytics/index.d.ts +8 -0
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +10 -0
- package/dist/analytics/index.js.map +1 -1
- package/dist/analytics/output-estimator.d.ts +26 -0
- package/dist/analytics/output-estimator.d.ts.map +1 -0
- package/dist/analytics/output-estimator.js +61 -0
- package/dist/analytics/output-estimator.js.map +1 -0
- package/dist/analytics/query-engine.d.ts.map +1 -1
- package/dist/analytics/query-engine.js +3 -2
- package/dist/analytics/query-engine.js.map +1 -1
- package/dist/analytics/token-extractor.d.ts +31 -0
- package/dist/analytics/token-extractor.d.ts.map +1 -0
- package/dist/analytics/token-extractor.js +57 -0
- package/dist/analytics/token-extractor.js.map +1 -0
- package/dist/analytics/token-tracker.d.ts +7 -1
- package/dist/analytics/token-tracker.d.ts.map +1 -1
- package/dist/analytics/token-tracker.js +94 -18
- package/dist/analytics/token-tracker.js.map +1 -1
- package/dist/analytics/transcript-parser.d.ts +42 -0
- package/dist/analytics/transcript-parser.d.ts.map +1 -0
- package/dist/analytics/transcript-parser.js +90 -0
- package/dist/analytics/transcript-parser.js.map +1 -0
- package/dist/analytics/transcript-scanner.d.ts +50 -0
- package/dist/analytics/transcript-scanner.d.ts.map +1 -0
- package/dist/analytics/transcript-scanner.js +149 -0
- package/dist/analytics/transcript-scanner.js.map +1 -0
- package/dist/analytics/transcript-token-extractor.d.ts +35 -0
- package/dist/analytics/transcript-token-extractor.d.ts.map +1 -0
- package/dist/analytics/transcript-token-extractor.js +136 -0
- package/dist/analytics/transcript-token-extractor.js.map +1 -0
- package/dist/analytics/types.d.ts +65 -0
- package/dist/analytics/types.d.ts.map +1 -1
- package/dist/analytics/types.js.map +1 -1
- package/dist/cli/analytics.js +26 -1
- package/dist/cli/analytics.js.map +1 -1
- package/dist/cli/commands/backfill.d.ts +15 -0
- package/dist/cli/commands/backfill.d.ts.map +1 -0
- package/dist/cli/commands/backfill.js +146 -0
- package/dist/cli/commands/backfill.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +1 -0
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +67 -31
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/components/CostDashboard.d.ts +15 -0
- package/dist/cli/components/CostDashboard.d.ts.map +1 -0
- package/dist/cli/components/CostDashboard.js +15 -0
- package/dist/cli/components/CostDashboard.js.map +1 -0
- package/dist/cli/components/LiveStats.d.ts +16 -0
- package/dist/cli/components/LiveStats.d.ts.map +1 -0
- package/dist/cli/components/LiveStats.js +16 -0
- package/dist/cli/components/LiveStats.js.map +1 -0
- package/dist/cli/components/SessionBrowser.d.ts +14 -0
- package/dist/cli/components/SessionBrowser.d.ts.map +1 -0
- package/dist/cli/components/SessionBrowser.js +14 -0
- package/dist/cli/components/SessionBrowser.js.map +1 -0
- package/dist/cli/index.js +159 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui.d.ts +21 -0
- package/dist/cli/tui.d.ts.map +1 -0
- package/dist/cli/tui.js +21 -0
- package/dist/cli/tui.js.map +1 -0
- package/dist/hooks/learner/auto-invoke.d.ts +82 -0
- package/dist/hooks/learner/auto-invoke.d.ts.map +1 -0
- package/dist/hooks/learner/auto-invoke.js +234 -0
- package/dist/hooks/learner/auto-invoke.js.map +1 -0
- package/dist/hooks/learner/auto-learner.d.ts +55 -0
- package/dist/hooks/learner/auto-learner.d.ts.map +1 -0
- package/dist/hooks/learner/auto-learner.js +361 -0
- package/dist/hooks/learner/auto-learner.js.map +1 -0
- package/dist/hooks/learner/index.d.ts +3 -0
- package/dist/hooks/learner/index.d.ts.map +1 -1
- package/dist/hooks/learner/index.js +4 -0
- package/dist/hooks/learner/index.js.map +1 -1
- package/dist/hooks/learner/matcher.d.ts +40 -0
- package/dist/hooks/learner/matcher.d.ts.map +1 -0
- package/dist/hooks/learner/matcher.js +230 -0
- package/dist/hooks/learner/matcher.js.map +1 -0
- package/dist/hud/analytics-display.d.ts +16 -0
- package/dist/hud/analytics-display.d.ts.map +1 -1
- package/dist/hud/analytics-display.js +42 -0
- package/dist/hud/analytics-display.js.map +1 -1
- package/dist/hud/index.js +90 -3
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +27 -1
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/types.d.ts +2 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js.map +1 -1
- package/docs/ANALYTICS-SYSTEM.md +150 -0
- package/hooks/keyword-detector.sh +1 -1
- package/package.json +1 -1
- package/scripts/keyword-detector.mjs +1 -1
- package/scripts/persistent-mode.mjs +1 -1
- package/scripts/test-mutual-exclusion.ts +4 -4
- package/scripts/test-remember-tags.ts +6 -6
- package/scripts/test-session-injection.ts +4 -4
- package/skills/cancel-ultraqa/SKILL.md +1 -1
- package/skills/local-skills-setup/SKILL.md +465 -0
- package/skills/omc-setup/SKILL.md +30 -5
- package/skills/skill/SKILL.md +406 -0
package/dist/hud/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/hud/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/hud/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoQH,MAAM,CAAC,MAAM,kBAAkB,GAAc;IAC3C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI,EAAG,8BAA8B;QACjD,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE,WAAW,EAAE,0CAA0C;QACrE,cAAc,EAAE,CAAC,EAAE,kCAAkC;QACrD,eAAe,EAAE,IAAI;QACrB,KAAK,EAAE,IA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,EAAE,IAAI;QACX,gBAAgB,EAAE,KAAK,EAAG,iCAAiC;QAC3D,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,KAAK;KACf;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE,WAAW;QACzB,cAAc,EAAE,CAAC;QACjB,eAAe,EAAE,IAAI;QACrB,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,KAAK,EAAG,iCAAiC;QAC3D,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,IAAI;KACd;CACF,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# OMC Analytics System
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Automatic token tracking and cost estimation for Claude API usage in oh-my-claudecode.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Automatic Token Tracking**: Zero manual recording - tracks every HUD render
|
|
10
|
+
- **Cost Estimation**: Model-specific pricing with cache economics
|
|
11
|
+
- **Session Management**: Track costs across multiple sessions
|
|
12
|
+
- **Beautiful CLI**: Enhanced analytics visualization
|
|
13
|
+
- **HUD Integration**: Real-time cost display in statusline
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
StatuslineStdin → TokenExtractor → TokenTracker → Analytics Summary
|
|
19
|
+
↓
|
|
20
|
+
HUD Display
|
|
21
|
+
↓
|
|
22
|
+
CLI Reports
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Auto-Tracking
|
|
26
|
+
|
|
27
|
+
Token usage is automatically captured on every HUD render:
|
|
28
|
+
|
|
29
|
+
1. **TokenExtractor** parses StatuslineStdin for token data
|
|
30
|
+
2. **Delta Calculation** computes change from previous render
|
|
31
|
+
3. **Agent Correlation** associates tokens with running agents
|
|
32
|
+
4. **TokenTracker** records usage to JSONL log
|
|
33
|
+
5. **Summary Files** provide fast <10ms session loading
|
|
34
|
+
|
|
35
|
+
## Output Token Estimation
|
|
36
|
+
|
|
37
|
+
Since StatuslineStdin only provides input tokens, output tokens are estimated:
|
|
38
|
+
|
|
39
|
+
- **Haiku**: 30% of input tokens
|
|
40
|
+
- **Sonnet**: 40% of input tokens
|
|
41
|
+
- **Opus**: 50% of input tokens
|
|
42
|
+
|
|
43
|
+
All costs displayed with "~" prefix to indicate estimation.
|
|
44
|
+
|
|
45
|
+
## HUD Integration
|
|
46
|
+
|
|
47
|
+
Real-time analytics in statusline:
|
|
48
|
+
|
|
49
|
+
- Session cost and tokens
|
|
50
|
+
- Cost per hour
|
|
51
|
+
- Cache efficiency
|
|
52
|
+
- Budget warnings (>$2 warning, >$5 critical)
|
|
53
|
+
|
|
54
|
+
Use `analytics` preset for detailed display.
|
|
55
|
+
|
|
56
|
+
## CLI Usage
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# View everything (default dashboard)
|
|
60
|
+
omc
|
|
61
|
+
|
|
62
|
+
# View current session stats
|
|
63
|
+
omc stats
|
|
64
|
+
|
|
65
|
+
# Cost reports
|
|
66
|
+
omc cost daily
|
|
67
|
+
omc cost weekly
|
|
68
|
+
omc cost monthly
|
|
69
|
+
|
|
70
|
+
# Session history
|
|
71
|
+
omc sessions
|
|
72
|
+
|
|
73
|
+
# Agent breakdown
|
|
74
|
+
omc agents
|
|
75
|
+
|
|
76
|
+
# Export data
|
|
77
|
+
omc export cost csv ./costs.csv
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Performance
|
|
81
|
+
|
|
82
|
+
- **HUD Render**: <100ms total (including analytics)
|
|
83
|
+
- **Token Extraction**: <5ms per render
|
|
84
|
+
- **Summary Loading**: <10ms (mtime-cached)
|
|
85
|
+
- **CLI Startup**: <500ms
|
|
86
|
+
|
|
87
|
+
## Files
|
|
88
|
+
|
|
89
|
+
- `src/analytics/token-extractor.ts` - Token extraction
|
|
90
|
+
- `src/analytics/output-estimator.ts` - Output estimation & session ID
|
|
91
|
+
- `src/analytics/analytics-summary.ts` - Fast summary loading
|
|
92
|
+
- `src/hud/index.ts` - Auto-recording integration
|
|
93
|
+
- `.omc/state/token-tracking.jsonl` - Append-only token log
|
|
94
|
+
- `.omc/state/analytics-summary-{sessionId}.json` - Cached summaries
|
|
95
|
+
|
|
96
|
+
## Offline Transcript Analysis
|
|
97
|
+
|
|
98
|
+
### Overview
|
|
99
|
+
|
|
100
|
+
The analytics system can analyze historical Claude Code session transcripts from `~/.claude/projects/` to backfill token usage data.
|
|
101
|
+
|
|
102
|
+
### The `omc backfill` Command
|
|
103
|
+
|
|
104
|
+
Extracts actual token usage from Claude Code transcripts and adds them to the analytics database.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
omc backfill [options]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Options
|
|
111
|
+
|
|
112
|
+
| Option | Description |
|
|
113
|
+
|--------|-------------|
|
|
114
|
+
| `--project <glob>` | Filter to specific project paths |
|
|
115
|
+
| `--from <date>` | Only process transcripts modified after date (ISO format) |
|
|
116
|
+
| `--to <date>` | Only process transcripts modified before date |
|
|
117
|
+
| `--dry-run` | Preview without writing to database |
|
|
118
|
+
| `--reset` | Clear deduplication index and re-process all |
|
|
119
|
+
| `--verbose` | Show detailed per-file progress |
|
|
120
|
+
| `--json` | Output as JSON |
|
|
121
|
+
|
|
122
|
+
#### Examples
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Preview all available transcripts
|
|
126
|
+
omc backfill --dry-run
|
|
127
|
+
|
|
128
|
+
# Backfill specific project
|
|
129
|
+
omc backfill --project "*VibeQuant*"
|
|
130
|
+
|
|
131
|
+
# Backfill recent transcripts only
|
|
132
|
+
omc backfill --from "2026-01-01"
|
|
133
|
+
|
|
134
|
+
# Re-process everything
|
|
135
|
+
omc backfill --reset
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Auto-Backfill
|
|
139
|
+
|
|
140
|
+
The `omc` CLI automatically runs a silent backfill on startup if more than 24 hours have passed since the last backfill. This ensures your analytics stay up-to-date without manual intervention.
|
|
141
|
+
|
|
142
|
+
### Data Sources
|
|
143
|
+
|
|
144
|
+
- **Transcript Location**: `~/.claude/projects/<encoded-path>/<uuid>.jsonl`
|
|
145
|
+
- **Token Data**: Actual `output_tokens` from API responses (not estimates)
|
|
146
|
+
- **Agent Detection**: Extracted from `tool_use` blocks with Task tool
|
|
147
|
+
|
|
148
|
+
### Deduplication
|
|
149
|
+
|
|
150
|
+
Entries are deduplicated using a hash of `sessionId + timestamp + model`. Safe to run multiple times.
|
|
@@ -48,7 +48,7 @@ PROMPT_LOWER=$(echo "$PROMPT_NO_CODE" | tr '[:upper:]' '[:lower:]')
|
|
|
48
48
|
# Check for ultrawork keywords (highest priority)
|
|
49
49
|
if echo "$PROMPT_LOWER" | grep -qE '\b(ultrawork|ulw|uw)\b'; then
|
|
50
50
|
# Create persistent ultrawork state
|
|
51
|
-
mkdir -p "$DIRECTORY/.
|
|
51
|
+
mkdir -p "$DIRECTORY/.omc" 2>/dev/null
|
|
52
52
|
mkdir -p "$HOME/.claude" 2>/dev/null
|
|
53
53
|
|
|
54
54
|
# Escape prompt for JSON
|
package/package.json
CHANGED
|
@@ -137,7 +137,7 @@ function activateUltraworkState(directory, prompt) {
|
|
|
137
137
|
last_checked_at: new Date().toISOString()
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
// Write to local .
|
|
140
|
+
// Write to local .omc directory
|
|
141
141
|
const localDir = join(directory, '.omc');
|
|
142
142
|
if (!existsSync(localDir)) {
|
|
143
143
|
try { mkdirSync(localDir, { recursive: true }); } catch {}
|
|
@@ -55,7 +55,7 @@ function writeJsonFile(path, data) {
|
|
|
55
55
|
|
|
56
56
|
// Read PRD and get status
|
|
57
57
|
function getPrdStatus(projectDir) {
|
|
58
|
-
// Check both root and .
|
|
58
|
+
// Check both root and .omc for prd.json
|
|
59
59
|
const paths = [
|
|
60
60
|
join(projectDir, 'prd.json'),
|
|
61
61
|
join(projectDir, '.omc', 'prd.json')
|
|
@@ -18,10 +18,10 @@ function printTest(testName: string, passed: boolean) {
|
|
|
18
18
|
async function runTests() {
|
|
19
19
|
console.log('\n=== Testing Mutual Exclusion Between UltraQA and Ralph Loop ===\n');
|
|
20
20
|
|
|
21
|
-
// Create temp directory with .
|
|
22
|
-
const tempDir = mkdtempSync(join(tmpdir(), '
|
|
23
|
-
const
|
|
24
|
-
mkdirSync(
|
|
21
|
+
// Create temp directory with .omc subfolder
|
|
22
|
+
const tempDir = mkdtempSync(join(tmpdir(), 'omc-test-'));
|
|
23
|
+
const omcDir = join(tempDir, '.omc');
|
|
24
|
+
mkdirSync(omcDir, { recursive: true });
|
|
25
25
|
|
|
26
26
|
console.log(`Using temp directory: ${tempDir}\n`);
|
|
27
27
|
|
|
@@ -5,8 +5,8 @@ import { spawn } from 'child_process';
|
|
|
5
5
|
|
|
6
6
|
// Create test directory
|
|
7
7
|
const testDir = join(tmpdir(), `remember-tag-test-${Date.now()}`);
|
|
8
|
-
const
|
|
9
|
-
mkdirSync(
|
|
8
|
+
const omcDir = join(testDir, '.omc');
|
|
9
|
+
mkdirSync(omcDir, { recursive: true });
|
|
10
10
|
|
|
11
11
|
console.log('Testing remember tag processing in post-tool-verifier.mjs\n');
|
|
12
12
|
|
|
@@ -50,7 +50,7 @@ try {
|
|
|
50
50
|
|
|
51
51
|
await runHook(input1);
|
|
52
52
|
|
|
53
|
-
const notepadPath = join(
|
|
53
|
+
const notepadPath = join(omcDir, 'notepad.md');
|
|
54
54
|
if (existsSync(notepadPath)) {
|
|
55
55
|
const content = readFileSync(notepadPath, 'utf-8');
|
|
56
56
|
if (content.includes('pnpm') && content.includes('Working Memory')) {
|
|
@@ -78,7 +78,7 @@ try {
|
|
|
78
78
|
|
|
79
79
|
await runHook(input2);
|
|
80
80
|
|
|
81
|
-
const notepadPath = join(
|
|
81
|
+
const notepadPath = join(omcDir, 'notepad.md');
|
|
82
82
|
const content = readFileSync(notepadPath, 'utf-8');
|
|
83
83
|
if (content.includes('API endpoint') && content.includes('Priority Context')) {
|
|
84
84
|
console.log('✓ PASS: Priority remember tag saved to Priority Context\n');
|
|
@@ -95,7 +95,7 @@ console.log('Test 3: Non-Task tool should not process tags');
|
|
|
95
95
|
try {
|
|
96
96
|
// Clean up first
|
|
97
97
|
rmSync(testDir, { recursive: true });
|
|
98
|
-
mkdirSync(
|
|
98
|
+
mkdirSync(omcDir, { recursive: true });
|
|
99
99
|
|
|
100
100
|
const input3 = {
|
|
101
101
|
toolName: 'Bash',
|
|
@@ -106,7 +106,7 @@ try {
|
|
|
106
106
|
|
|
107
107
|
await runHook(input3);
|
|
108
108
|
|
|
109
|
-
const notepadPath = join(
|
|
109
|
+
const notepadPath = join(omcDir, 'notepad.md');
|
|
110
110
|
if (!existsSync(notepadPath)) {
|
|
111
111
|
console.log('✓ PASS: Bash tool did not trigger remember tag processing\n');
|
|
112
112
|
} else {
|
|
@@ -4,8 +4,8 @@ import { join } from 'path';
|
|
|
4
4
|
|
|
5
5
|
// Create test notepad
|
|
6
6
|
const testDir = join(tmpdir(), `session-test-${Date.now()}`);
|
|
7
|
-
const
|
|
8
|
-
mkdirSync(
|
|
7
|
+
const omcDir = join(testDir, '.omc');
|
|
8
|
+
mkdirSync(omcDir, { recursive: true });
|
|
9
9
|
|
|
10
10
|
const notepadContent = `# Notepad
|
|
11
11
|
|
|
@@ -22,10 +22,10 @@ Some working memory entry
|
|
|
22
22
|
User notes here
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
-
writeFileSync(join(
|
|
25
|
+
writeFileSync(join(omcDir, 'notepad.md'), notepadContent);
|
|
26
26
|
|
|
27
27
|
// Test priority context extraction (mimics session-start.mjs logic)
|
|
28
|
-
const content = readFileSync(join(
|
|
28
|
+
const content = readFileSync(join(omcDir, 'notepad.md'), 'utf-8');
|
|
29
29
|
const priorityMatch = content.match(/## Priority Context\n([\s\S]*?)(?=\n## [^#]|$)/);
|
|
30
30
|
const cleanContent = priorityMatch ? priorityMatch[1].replace(/<!--[\s\S]*?-->/g, '').trim() : '';
|
|
31
31
|
|
|
@@ -14,7 +14,7 @@ The UltraQA cycling workflow has been cancelled. Clearing state file.
|
|
|
14
14
|
Execute this command to cancel UltraQA:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
mkdir -p .
|
|
17
|
+
mkdir -p .omc && echo '{"active": false, "cancelled_at": "'$(date -Iseconds)'", "reason": "User cancelled via /cancel-ultraqa"}' > .omc/ultraqa-state.json
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
After running this command, the QA cycling will stop.
|