relay-cc 2.0.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 -0
- package/README.md +428 -0
- package/agents/relay-codebase-mapper.md +761 -0
- package/agents/relay-debugger.md +1203 -0
- package/agents/relay-estimator.md +257 -0
- package/agents/relay-executor.md +823 -0
- package/agents/relay-plan-checker.md +812 -0
- package/agents/relay-planner.md +1418 -0
- package/agents/relay-reviewer.md +279 -0
- package/agents/relay-ticket-researcher.md +287 -0
- package/agents/relay-verifier.md +778 -0
- package/bin/install.js +1667 -0
- package/commands/relay/add-todo.md +193 -0
- package/commands/relay/check-todos.md +200 -0
- package/commands/relay/debug.md +169 -0
- package/commands/relay/estimate.md +182 -0
- package/commands/relay/help.md +328 -0
- package/commands/relay/history.md +203 -0
- package/commands/relay/map-codebase.md +71 -0
- package/commands/relay/pause-work.md +128 -0
- package/commands/relay/pr.md +223 -0
- package/commands/relay/quick.md +307 -0
- package/commands/relay/resume-work.md +40 -0
- package/commands/relay/resume.md +181 -0
- package/commands/relay/review.md +322 -0
- package/commands/relay/rollback.md +248 -0
- package/commands/relay/set-profile.md +116 -0
- package/commands/relay/settings.md +165 -0
- package/commands/relay/setup.md +247 -0
- package/commands/relay/status.md +131 -0
- package/commands/relay/tickets.md +106 -0
- package/commands/relay/update.md +200 -0
- package/commands/relay/work.md +398 -0
- package/hooks/dist/relay-check-update.js +61 -0
- package/hooks/dist/relay-statusline.js +91 -0
- package/package.json +47 -0
- package/relay/references/checkpoints.md +1078 -0
- package/relay/references/continuation-format.md +249 -0
- package/relay/references/git-integration.md +209 -0
- package/relay/references/model-profiles.md +57 -0
- package/relay/references/planning-config.md +189 -0
- package/relay/references/questioning.md +141 -0
- package/relay/references/tdd.md +263 -0
- package/relay/references/ui-brand.md +162 -0
- package/relay/references/verification-patterns.md +612 -0
- package/relay/templates/DEBUG.md +159 -0
- package/relay/templates/UAT.md +247 -0
- package/relay/templates/analysis.md +101 -0
- package/relay/templates/codebase/architecture.md +255 -0
- package/relay/templates/codebase/concerns.md +310 -0
- package/relay/templates/codebase/conventions.md +307 -0
- package/relay/templates/codebase/integrations.md +280 -0
- package/relay/templates/codebase/stack.md +186 -0
- package/relay/templates/codebase/structure.md +285 -0
- package/relay/templates/codebase/testing.md +480 -0
- package/relay/templates/config.json +40 -0
- package/relay/templates/context.md +283 -0
- package/relay/templates/continue-here.md +78 -0
- package/relay/templates/debug-subagent-prompt.md +91 -0
- package/relay/templates/estimate.md +108 -0
- package/relay/templates/phase-prompt.md +567 -0
- package/relay/templates/planner-subagent-prompt.md +117 -0
- package/relay/templates/research.md +552 -0
- package/relay/templates/state.md +127 -0
- package/relay/templates/summary.md +246 -0
- package/relay/templates/verification-report.md +322 -0
- package/relay/workflows/analyze-ticket.md +42 -0
- package/relay/workflows/diagnose-issues.md +231 -0
- package/relay/workflows/execute-phase.md +700 -0
- package/relay/workflows/execute-plan.md +1851 -0
- package/relay/workflows/map-codebase.md +357 -0
- package/relay/workflows/resume-project.md +307 -0
- package/relay/workflows/sync-ticket.md +58 -0
- package/relay/workflows/verify-phase.md +628 -0
- package/relay/workflows/verify-ticket.md +596 -0
- package/scripts/build-hooks.js +42 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Claude Code Statusline - Relay Edition
|
|
3
|
+
// Shows: model | current task | directory | context usage
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
|
|
9
|
+
// Read JSON from stdin
|
|
10
|
+
let input = '';
|
|
11
|
+
process.stdin.setEncoding('utf8');
|
|
12
|
+
process.stdin.on('data', chunk => input += chunk);
|
|
13
|
+
process.stdin.on('end', () => {
|
|
14
|
+
try {
|
|
15
|
+
const data = JSON.parse(input);
|
|
16
|
+
const model = data.model?.display_name || 'Claude';
|
|
17
|
+
const dir = data.workspace?.current_dir || process.cwd();
|
|
18
|
+
const session = data.session_id || '';
|
|
19
|
+
const remaining = data.context_window?.remaining_percentage;
|
|
20
|
+
|
|
21
|
+
// Context window display (shows USED percentage scaled to 80% limit)
|
|
22
|
+
// Claude Code enforces an 80% context limit, so we scale to show 100% at that point
|
|
23
|
+
let ctx = '';
|
|
24
|
+
if (remaining != null) {
|
|
25
|
+
const rem = Math.round(remaining);
|
|
26
|
+
const rawUsed = Math.max(0, Math.min(100, 100 - rem));
|
|
27
|
+
// Scale: 80% real usage = 100% displayed
|
|
28
|
+
const used = Math.min(100, Math.round((rawUsed / 80) * 100));
|
|
29
|
+
|
|
30
|
+
// Build progress bar (10 segments)
|
|
31
|
+
const filled = Math.floor(used / 10);
|
|
32
|
+
const bar = '█'.repeat(filled) + '░'.repeat(10 - filled);
|
|
33
|
+
|
|
34
|
+
// Color based on scaled usage (thresholds adjusted for new scale)
|
|
35
|
+
if (used < 63) { // ~50% real
|
|
36
|
+
ctx = ` \x1b[32m${bar} ${used}%\x1b[0m`;
|
|
37
|
+
} else if (used < 81) { // ~65% real
|
|
38
|
+
ctx = ` \x1b[33m${bar} ${used}%\x1b[0m`;
|
|
39
|
+
} else if (used < 95) { // ~76% real
|
|
40
|
+
ctx = ` \x1b[38;5;208m${bar} ${used}%\x1b[0m`;
|
|
41
|
+
} else {
|
|
42
|
+
ctx = ` \x1b[5;31m💀 ${bar} ${used}%\x1b[0m`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Current task from todos
|
|
47
|
+
let task = '';
|
|
48
|
+
const homeDir = os.homedir();
|
|
49
|
+
const todosDir = path.join(homeDir, '.claude', 'todos');
|
|
50
|
+
if (session && fs.existsSync(todosDir)) {
|
|
51
|
+
try {
|
|
52
|
+
const files = fs.readdirSync(todosDir)
|
|
53
|
+
.filter(f => f.startsWith(session) && f.includes('-agent-') && f.endsWith('.json'))
|
|
54
|
+
.map(f => ({ name: f, mtime: fs.statSync(path.join(todosDir, f)).mtime }))
|
|
55
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
56
|
+
|
|
57
|
+
if (files.length > 0) {
|
|
58
|
+
try {
|
|
59
|
+
const todos = JSON.parse(fs.readFileSync(path.join(todosDir, files[0].name), 'utf8'));
|
|
60
|
+
const inProgress = todos.find(t => t.status === 'in_progress');
|
|
61
|
+
if (inProgress) task = inProgress.activeForm || '';
|
|
62
|
+
} catch (e) {}
|
|
63
|
+
}
|
|
64
|
+
} catch (e) {
|
|
65
|
+
// Silently fail on file system errors - don't break statusline
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Relay update available?
|
|
70
|
+
let relayUpdate = '';
|
|
71
|
+
const cacheFile = path.join(homeDir, '.claude', 'cache', 'relay-update-check.json');
|
|
72
|
+
if (fs.existsSync(cacheFile)) {
|
|
73
|
+
try {
|
|
74
|
+
const cache = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
|
|
75
|
+
if (cache.update_available) {
|
|
76
|
+
relayUpdate = '\x1b[33m⬆ /relay:update\x1b[0m │ ';
|
|
77
|
+
}
|
|
78
|
+
} catch (e) {}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Output
|
|
82
|
+
const dirname = path.basename(dir);
|
|
83
|
+
if (task) {
|
|
84
|
+
process.stdout.write(`${relayUpdate}\x1b[2m${model}\x1b[0m │ \x1b[1m${task}\x1b[0m │ \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
85
|
+
} else {
|
|
86
|
+
process.stdout.write(`${relayUpdate}\x1b[2m${model}\x1b[0m │ \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
87
|
+
}
|
|
88
|
+
} catch (e) {
|
|
89
|
+
// Silent fail - don't break statusline on parse errors
|
|
90
|
+
}
|
|
91
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "relay-cc",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Your AI dev agent, connected to your team's workflow. For Claude Code, OpenCode and Gemini CLI by TÂCHES.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"relay-cc": "bin/install.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin",
|
|
10
|
+
"commands",
|
|
11
|
+
"relay",
|
|
12
|
+
"agents",
|
|
13
|
+
"hooks/dist",
|
|
14
|
+
"scripts"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"claude",
|
|
18
|
+
"claude-code",
|
|
19
|
+
"ai",
|
|
20
|
+
"meta-prompting",
|
|
21
|
+
"context-engineering",
|
|
22
|
+
"spec-driven-development",
|
|
23
|
+
"gemini",
|
|
24
|
+
"gemini-cli"
|
|
25
|
+
],
|
|
26
|
+
"author": "TÂCHES",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/ibnyusrat/relay.git"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/ibnyusrat/relay",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/ibnyusrat/relay/issues"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=16.7.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"esbuild": "^0.24.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build:hooks": "node scripts/build-hooks.js",
|
|
45
|
+
"prepublishOnly": "npm run build:hooks"
|
|
46
|
+
}
|
|
47
|
+
}
|