Skip to content

Commit 1797e79

Browse files
authored
Merge pull request #334 from affaan-m/codex/release-1.8.0-core
feat: v1.8.0 harness release (core reliability + parity + new commands)
2 parents 32e9c29 + 1f8b3ea commit 1797e79

107 files changed

Lines changed: 3682 additions & 776 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"name": "everything-claude-code",
1515
"source": "./",
1616
"description": "The most comprehensive Claude Code plugin — 14+ agents, 56+ skills, 33+ commands, and production-ready hooks for TDD, security scanning, code review, and continuous learning",
17-
"version": "1.7.0",
17+
"version": "1.8.0",
1818
"author": {
1919
"name": "Affaan Mustafa",
2020
"email": "me@affaanmustafa.com"

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "everything-claude-code",
3-
"version": "1.7.0",
3+
"version": "1.8.0",
44
"description": "Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use",
55
"author": {
66
"name": "Affaan Mustafa",

.cursor/hooks/adapter.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ function transformToClaude(cursorInput, overrides = {}) {
2929
return {
3030
tool_input: {
3131
command: cursorInput.command || cursorInput.args?.command || '',
32-
file_path: cursorInput.path || cursorInput.file || '',
32+
file_path: cursorInput.path || cursorInput.file || cursorInput.args?.filePath || '',
3333
...overrides.tool_input,
3434
},
3535
tool_output: {
3636
output: cursorInput.output || cursorInput.result || '',
3737
...overrides.tool_output,
3838
},
39+
transcript_path: cursorInput.transcript_path || cursorInput.transcriptPath || cursorInput.session?.transcript_path || '',
3940
_cursor: {
4041
conversation_id: cursorInput.conversation_id,
4142
hook_event_name: cursorInput.hook_event_name,
@@ -59,4 +60,22 @@ function runExistingHook(scriptName, stdinData) {
5960
}
6061
}
6162

62-
module.exports = { readStdin, getPluginRoot, transformToClaude, runExistingHook };
63+
function hookEnabled(hookId, allowedProfiles = ['standard', 'strict']) {
64+
const rawProfile = String(process.env.ECC_HOOK_PROFILE || 'standard').toLowerCase();
65+
const profile = ['minimal', 'standard', 'strict'].includes(rawProfile) ? rawProfile : 'standard';
66+
67+
const disabled = new Set(
68+
String(process.env.ECC_DISABLED_HOOKS || '')
69+
.split(',')
70+
.map(v => v.trim().toLowerCase())
71+
.filter(Boolean)
72+
);
73+
74+
if (disabled.has(String(hookId || '').toLowerCase())) {
75+
return false;
76+
}
77+
78+
return allowedProfiles.includes(profile);
79+
}
80+
81+
module.exports = { readStdin, getPluginRoot, transformToClaude, runExistingHook, hookEnabled };
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
2-
const { readStdin } = require('./adapter');
2+
const { readStdin, hookEnabled } = require('./adapter');
3+
34
readStdin().then(raw => {
45
try {
5-
const input = JSON.parse(raw);
6-
const cmd = input.command || '';
7-
const output = input.output || input.result || '';
6+
const input = JSON.parse(raw || '{}');
7+
const cmd = String(input.command || input.args?.command || '');
8+
const output = String(input.output || input.result || '');
89

9-
// PR creation logging
10-
if (/gh pr create/.test(cmd)) {
10+
if (hookEnabled('post:bash:pr-created', ['standard', 'strict']) && /\bgh\s+pr\s+create\b/.test(cmd)) {
1111
const m = output.match(/https:\/\/github\.com\/[^/]+\/[^/]+\/pull\/\d+/);
1212
if (m) {
1313
console.error('[ECC] PR created: ' + m[0]);
@@ -17,10 +17,12 @@ readStdin().then(raw => {
1717
}
1818
}
1919

20-
// Build completion notice
21-
if (/(npm run build|pnpm build|yarn build)/.test(cmd)) {
20+
if (hookEnabled('post:bash:build-complete', ['standard', 'strict']) && /(npm run build|pnpm build|yarn build)/.test(cmd)) {
2221
console.error('[ECC] Build completed');
2322
}
24-
} catch {}
23+
} catch {
24+
// noop
25+
}
26+
2527
process.stdout.write(raw);
2628
}).catch(() => process.exit(0));
Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,72 @@
11
#!/usr/bin/env node
2-
const { readStdin } = require('./adapter');
2+
const { readStdin, hookEnabled } = require('./adapter');
3+
4+
function splitShellSegments(command) {
5+
const segments = [];
6+
let current = '';
7+
let quote = null;
8+
9+
for (let i = 0; i < command.length; i++) {
10+
const ch = command[i];
11+
if (quote) {
12+
if (ch === quote) quote = null;
13+
current += ch;
14+
continue;
15+
}
16+
17+
if (ch === '"' || ch === "'") {
18+
quote = ch;
19+
current += ch;
20+
continue;
21+
}
22+
23+
const next = command[i + 1] || '';
24+
if (ch === ';' || (ch === '&' && next === '&') || (ch === '|' && next === '|') || (ch === '&' && next !== '&')) {
25+
if (current.trim()) segments.push(current.trim());
26+
current = '';
27+
if ((ch === '&' && next === '&') || (ch === '|' && next === '|')) i++;
28+
continue;
29+
}
30+
31+
current += ch;
32+
}
33+
34+
if (current.trim()) segments.push(current.trim());
35+
return segments;
36+
}
37+
338
readStdin().then(raw => {
439
try {
5-
const input = JSON.parse(raw);
6-
const cmd = input.command || '';
7-
8-
// 1. Block dev server outside tmux
9-
if (process.platform !== 'win32' && /(npm run dev\b|pnpm( run)? dev\b|yarn dev\b|bun run dev\b)/.test(cmd)) {
10-
console.error('[ECC] BLOCKED: Dev server must run in tmux for log access');
11-
console.error('[ECC] Use: tmux new-session -d -s dev "npm run dev"');
12-
process.exit(2);
40+
const input = JSON.parse(raw || '{}');
41+
const cmd = String(input.command || input.args?.command || '');
42+
43+
if (hookEnabled('pre:bash:dev-server-block', ['standard', 'strict']) && process.platform !== 'win32') {
44+
const segments = splitShellSegments(cmd);
45+
const tmuxLauncher = /^\s*tmux\s+(new|new-session|new-window|split-window)\b/;
46+
const devPattern = /\b(npm\s+run\s+dev|pnpm(?:\s+run)?\s+dev|yarn\s+dev|bun\s+run\s+dev)\b/;
47+
const hasBlockedDev = segments.some(segment => devPattern.test(segment) && !tmuxLauncher.test(segment));
48+
if (hasBlockedDev) {
49+
console.error('[ECC] BLOCKED: Dev server must run in tmux for log access');
50+
console.error('[ECC] Use: tmux new-session -d -s dev "npm run dev"');
51+
process.exit(2);
52+
}
1353
}
1454

15-
// 2. Tmux reminder for long-running commands
16-
if (process.platform !== 'win32' && !process.env.TMUX &&
17-
/(npm (install|test)|pnpm (install|test)|yarn (install|test)?|bun (install|test)|cargo build|make\b|docker\b|pytest|vitest|playwright)/.test(cmd)) {
55+
if (
56+
hookEnabled('pre:bash:tmux-reminder', ['strict']) &&
57+
process.platform !== 'win32' &&
58+
!process.env.TMUX &&
59+
/(npm (install|test)|pnpm (install|test)|yarn (install|test)?|bun (install|test)|cargo build|make\b|docker\b|pytest|vitest|playwright)/.test(cmd)
60+
) {
1861
console.error('[ECC] Consider running in tmux for session persistence');
1962
}
2063

21-
// 3. Git push review reminder
22-
if (/git push/.test(cmd)) {
64+
if (hookEnabled('pre:bash:git-push-reminder', ['strict']) && /\bgit\s+push\b/.test(cmd)) {
2365
console.error('[ECC] Review changes before push: git diff origin/main...HEAD');
2466
}
25-
} catch {}
67+
} catch {
68+
// noop
69+
}
70+
2671
process.stdout.write(raw);
2772
}).catch(() => process.exit(0));

.cursor/hooks/session-end.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env node
2-
const { readStdin, runExistingHook, transformToClaude } = require('./adapter');
2+
const { readStdin, runExistingHook, transformToClaude, hookEnabled } = require('./adapter');
33
readStdin().then(raw => {
4-
const input = JSON.parse(raw);
4+
const input = JSON.parse(raw || '{}');
55
const claudeInput = transformToClaude(input);
6-
runExistingHook('session-end.js', claudeInput);
7-
runExistingHook('evaluate-session.js', claudeInput);
6+
if (hookEnabled('session:end:marker', ['minimal', 'standard', 'strict'])) {
7+
runExistingHook('session-end-marker.js', claudeInput);
8+
}
89
process.stdout.write(raw);
910
}).catch(() => process.exit(0));

.cursor/hooks/session-start.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/usr/bin/env node
2-
const { readStdin, runExistingHook, transformToClaude } = require('./adapter');
2+
const { readStdin, runExistingHook, transformToClaude, hookEnabled } = require('./adapter');
33
readStdin().then(raw => {
4-
const input = JSON.parse(raw);
4+
const input = JSON.parse(raw || '{}');
55
const claudeInput = transformToClaude(input);
6-
runExistingHook('session-start.js', claudeInput);
6+
if (hookEnabled('session:start', ['minimal', 'standard', 'strict'])) {
7+
runExistingHook('session-start.js', claudeInput);
8+
}
79
process.stdout.write(raw);
810
}).catch(() => process.exit(0));

.cursor/hooks/stop.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
#!/usr/bin/env node
2-
const { readStdin, runExistingHook, transformToClaude } = require('./adapter');
2+
const { readStdin, runExistingHook, transformToClaude, hookEnabled } = require('./adapter');
33
readStdin().then(raw => {
4-
const claudeInput = JSON.parse(raw || '{}');
5-
runExistingHook('check-console-log.js', transformToClaude(claudeInput));
4+
const input = JSON.parse(raw || '{}');
5+
const claudeInput = transformToClaude(input);
6+
7+
if (hookEnabled('stop:check-console-log', ['standard', 'strict'])) {
8+
runExistingHook('check-console-log.js', claudeInput);
9+
}
10+
if (hookEnabled('stop:session-end', ['minimal', 'standard', 'strict'])) {
11+
runExistingHook('session-end.js', claudeInput);
12+
}
13+
if (hookEnabled('stop:evaluate-session', ['minimal', 'standard', 'strict'])) {
14+
runExistingHook('evaluate-session.js', claudeInput);
15+
}
16+
if (hookEnabled('stop:cost-tracker', ['minimal', 'standard', 'strict'])) {
17+
runExistingHook('cost-tracker.js', claudeInput);
18+
}
19+
620
process.stdout.write(raw);
721
}).catch(() => process.exit(0));

.github/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
changelog:
2+
categories:
3+
- title: Core Harness
4+
labels:
5+
- enhancement
6+
- feature
7+
- title: Reliability & Bug Fixes
8+
labels:
9+
- bug
10+
- fix
11+
- title: Docs & Guides
12+
labels:
13+
- docs
14+
- title: Tooling & CI
15+
labels:
16+
- ci
17+
- chore
18+
exclude:
19+
labels:
20+
- skip-changelog

0 commit comments

Comments
 (0)