claude-everything-workflow 0.2.14 → 0.2.15

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 (47) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/AGENTS.md +13 -23
  4. package/commands/pr.md +1 -1
  5. package/evals/routing-scenarios.json +19 -19
  6. package/harness/manifest.json +0 -52
  7. package/package.json +1 -1
  8. package/rules/common/testing.md +2 -8
  9. package/scripts/install-antigravity.js +8 -1
  10. package/scripts/retired-skill-files.json +25 -0
  11. package/scripts/upstream-capability-map.json +16 -13
  12. package/scripts/verify/install-rules.test.js +15 -2
  13. package/scripts/verify/skill-invocation.test.js +14 -2
  14. package/scripts/verify/workflow-checks.js +9 -14
  15. package/skills/README.md +2 -6
  16. package/skills/code-review/SKILL.md +1 -1
  17. package/skills/codebase-design/SKILL.md +7 -1
  18. package/skills/feature-acceptance/references/e2e-testing.md +8 -2
  19. package/skills/grilling/SKILL.md +1 -1
  20. package/skills/handoff/SKILL.md +2 -2
  21. package/skills/implement/SKILL.md +3 -2
  22. package/skills/resolving-merge-conflicts/SKILL.md +1 -1
  23. package/skills/spec-gate/SKILL.md +1 -1
  24. package/skills/systematic-debugging/SKILL.md +1 -1
  25. package/skills/systematic-debugging/references/diagnosing-bugs.upstream.md +1 -1
  26. package/skills/test-driven-development/SKILL.md +1 -1
  27. package/skills/to-tickets/SKILL.md +1 -1
  28. package/skills/triage/SKILL.md +2 -2
  29. package/skills/using-superpowers/SKILL.md +5 -6
  30. package/skills/using-superpowers/references/process-outcomes.md +1 -1
  31. package/skills/domain-modeling/SKILL.md +0 -103
  32. package/skills/improve-codebase-architecture/SKILL.md +0 -47
  33. package/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  34. package/skills/prototype/SKILL.md +0 -50
  35. package/skills/prototype/references/logic.md +0 -28
  36. package/skills/prototype/references/ui.md +0 -30
  37. package/skills/visual-companion/SKILL.md +0 -62
  38. package/skills/visual-companion/agents/openai.yaml +0 -4
  39. package/skills/visual-companion/references/guide.md +0 -298
  40. package/skills/visual-companion/scripts/frame-template.html +0 -243
  41. package/skills/visual-companion/scripts/helper.js +0 -167
  42. package/skills/visual-companion/scripts/pages.cjs +0 -28
  43. package/skills/visual-companion/scripts/server-utils.cjs +0 -82
  44. package/skills/visual-companion/scripts/server.cjs +0 -583
  45. package/skills/visual-companion/scripts/start-server.sh +0 -223
  46. package/skills/visual-companion/scripts/stop-server.sh +0 -120
  47. package/skills/visual-companion/scripts/websocket.cjs +0 -86
@@ -1,167 +0,0 @@
1
- (function() {
2
- const MIN_RECONNECT_MS = 500;
3
- const MAX_RECONNECT_MS = 30000;
4
- const TOMBSTONE_AFTER_MS = 15000; // show the "paused" overlay after this long disconnected
5
-
6
- // Pure: next backoff delay (doubles, capped). Exported for unit tests.
7
- function nextReconnectDelay(current, max) {
8
- return Math.min(current * 2, max);
9
- }
10
- if (typeof module !== 'undefined' && module.exports) {
11
- module.exports = { nextReconnectDelay, MIN_RECONNECT_MS, MAX_RECONNECT_MS, TOMBSTONE_AFTER_MS };
12
- }
13
-
14
- // Everything below is browser-only; bail out when loaded in Node (tests).
15
- if (typeof window === 'undefined') return;
16
-
17
- let ws = null;
18
- let eventQueue = [];
19
- let reconnectDelay = MIN_RECONNECT_MS;
20
- let reconnectTimer = null;
21
- let disconnectedSince = null;
22
- let everConnected = false;
23
- let tombstoneShown = false;
24
-
25
- function sessionKey() {
26
- try {
27
- return window.sessionStorage && window.sessionStorage.getItem('brainstorm-session-key');
28
- } catch (e) {}
29
- return null;
30
- }
31
-
32
- function websocketUrl() {
33
- const key = sessionKey();
34
- return 'ws://' + window.location.host + (key ? '/?key=' + encodeURIComponent(key) : '');
35
- }
36
-
37
- function reloadAfterRecovery() {
38
- const key = sessionKey();
39
- if (key) {
40
- window.location.replace('/?key=' + encodeURIComponent(key));
41
- } else {
42
- window.location.reload();
43
- }
44
- }
45
-
46
- // Reflect connection state in the frame's status pill (absent on full-doc screens).
47
- function setStatus(state) {
48
- const el = document.querySelector('.status');
49
- if (!el) return;
50
- const map = {
51
- connecting: ['Connecting…', 'var(--text-tertiary)'],
52
- connected: ['Connected', 'var(--success)'],
53
- reconnecting: ['Reconnecting…', 'var(--warning)'],
54
- disconnected: ['Disconnected', 'var(--error)']
55
- };
56
- const [text, color] = map[state] || map.disconnected;
57
- el.textContent = text;
58
- el.style.setProperty('--status-color', color);
59
- }
60
-
61
- // Self-styled so it works on framed and full-document screens alike.
62
- function showTombstone() {
63
- if (tombstoneShown) return;
64
- tombstoneShown = true;
65
- const el = document.createElement('div');
66
- el.id = 'bs-tombstone';
67
- el.style.cssText = 'position:fixed;inset:0;z-index:99999;display:flex;' +
68
- 'align-items:center;justify-content:center;padding:2rem;text-align:center;' +
69
- 'background:rgba(20,20,22,0.92);color:#f5f5f7;font-family:system-ui,sans-serif';
70
- el.innerHTML = '<div style="max-width:480px">' +
71
- '<h2 style="margin:0 0 .5rem;font-weight:600">Companion paused</h2>' +
72
- '<p style="margin:0;opacity:.85">This brainstorm companion has stopped. ' +
73
- 'Ask your coding agent to bring it back — this page reconnects automatically.</p></div>';
74
- if (document.body) document.body.appendChild(el);
75
- }
76
-
77
- function connect() {
78
- if (reconnectTimer) { clearTimeout(reconnectTimer); reconnectTimer = null; }
79
- setStatus(everConnected ? 'reconnecting' : 'connecting');
80
- ws = new WebSocket(websocketUrl());
81
-
82
- ws.onopen = () => {
83
- const recovered = tombstoneShown;
84
- everConnected = true;
85
- disconnectedSince = null;
86
- reconnectDelay = MIN_RECONNECT_MS;
87
- tombstoneShown = false;
88
- setStatus('connected');
89
- eventQueue.forEach(e => ws.send(JSON.stringify(e)));
90
- eventQueue = [];
91
- // Recovered from a tombstoned outage (e.g. the server restarted on the same
92
- // port) — reload through the keyed bootstrap when possible so the cookie is
93
- // refreshed before the visible URL returns to bare /.
94
- if (recovered) reloadAfterRecovery();
95
- };
96
-
97
- ws.onmessage = (msg) => {
98
- let data;
99
- try { data = JSON.parse(msg.data); } catch (e) { return; }
100
- if (data.type === 'reload') window.location.reload();
101
- };
102
-
103
- ws.onclose = () => {
104
- ws = null;
105
- if (disconnectedSince === null) disconnectedSince = Date.now();
106
- if (Date.now() - disconnectedSince >= TOMBSTONE_AFTER_MS) {
107
- setStatus('disconnected');
108
- showTombstone();
109
- } else {
110
- setStatus('reconnecting');
111
- }
112
- reconnectTimer = setTimeout(connect, reconnectDelay);
113
- reconnectDelay = nextReconnectDelay(reconnectDelay, MAX_RECONNECT_MS);
114
- };
115
-
116
- // Let onclose own reconnection so we don't schedule it twice.
117
- ws.onerror = () => { try { ws.close(); } catch (e) {} };
118
- }
119
-
120
- function sendEvent(event) {
121
- event.timestamp = Date.now();
122
- if (ws && ws.readyState === WebSocket.OPEN) {
123
- ws.send(JSON.stringify(event));
124
- } else {
125
- eventQueue.push(event);
126
- }
127
- }
128
-
129
- // Capture clicks on choice elements
130
- document.addEventListener('click', (e) => {
131
- const target = e.target.closest('[data-choice]');
132
- if (!target) return;
133
-
134
- sendEvent({
135
- type: 'click',
136
- text: target.textContent.trim(),
137
- choice: target.dataset.choice,
138
- id: target.id || null
139
- });
140
-
141
- });
142
-
143
- // Frame UI: selection tracking
144
- window.selectedChoice = null;
145
-
146
- window.toggleSelect = function(el) {
147
- const container = el.closest('.options') || el.closest('.cards');
148
- const multi = container && container.dataset.multiselect !== undefined;
149
- if (container && !multi) {
150
- container.querySelectorAll('.option, .card').forEach(o => o.classList.remove('selected'));
151
- }
152
- if (multi) {
153
- el.classList.toggle('selected');
154
- } else {
155
- el.classList.add('selected');
156
- }
157
- window.selectedChoice = el.dataset.choice;
158
- };
159
-
160
- // Expose API for explicit use
161
- window.brainstorm = {
162
- send: sendEvent,
163
- choice: (value, metadata = {}) => sendEvent({ type: 'choice', value, ...metadata })
164
- };
165
-
166
- connect();
167
- })();
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- const FORBIDDEN_PAGE = `<!DOCTYPE html>
4
- <html>
5
- <head><meta charset="utf-8"><title>Session key required</title>
6
- <style>body { font-family: system-ui, sans-serif; padding: 2rem; max-width: 800px; margin: 0 auto; }
7
- h1 { color: #333; } p { color: #666; } code { background: #f0f0f0; padding: 0.1em 0.3em;
8
- border-radius: 4px; }</style>
9
- </head>
10
- <body><h1>Session key required</h1>
11
- <p>This page needs the full URL your coding agent gave you, including the
12
- <code>?key=&hellip;</code> part. Copy the complete URL and open it again.</p></body></html>`;
13
-
14
- function bootstrapPage(key) {
15
- const jsonKey = JSON.stringify(String(key));
16
- return `<!DOCTYPE html>
17
- <html>
18
- <head><meta charset="utf-8"><title>Opening Brainstorm Companion</title></head>
19
- <body>
20
- <script>
21
- try { sessionStorage.setItem('brainstorm-session-key', ${jsonKey}); } catch (e) {}
22
- location.replace('/');
23
- </script>
24
- </body>
25
- </html>`;
26
- }
27
-
28
- module.exports = { FORBIDDEN_PAGE, bootstrapPage };
@@ -1,82 +0,0 @@
1
- 'use strict';
2
-
3
- const crypto = require('crypto');
4
-
5
- function urlHostForHttp(host) {
6
- const normalized = String(host);
7
- if (normalized.startsWith('[') && normalized.endsWith(']')) return normalized;
8
- return normalized.includes(':') ? '[' + normalized + ']' : normalized;
9
- }
10
-
11
- function browserLauncherForPlatform(url, options = {}) {
12
- const platform = options.platform || process.platform;
13
- const osRelease = options.osRelease || require('os').release();
14
- const env = options.env || process.env;
15
- const isWSL = platform === 'linux' && /microsoft/i.test(osRelease);
16
-
17
- if (platform === 'darwin') return { bin: 'open', args: [url] };
18
- if (platform === 'win32' || isWSL) {
19
- return { bin: 'rundll32.exe', args: ['url.dll,FileProtocolHandler', url] };
20
- }
21
- if (env.DISPLAY || env.WAYLAND_DISPLAY) return { bin: 'xdg-open', args: [url] };
22
- return null;
23
- }
24
-
25
- function timingSafeEqualStr(left, right) {
26
- const leftBuffer = Buffer.from(String(left));
27
- const rightBuffer = Buffer.from(String(right));
28
- if (leftBuffer.length !== rightBuffer.length) return false;
29
- return crypto.timingSafeEqual(leftBuffer, rightBuffer);
30
- }
31
-
32
- function parseCookies(header) {
33
- const output = {};
34
- if (!header) return output;
35
- for (const part of header.split(';')) {
36
- const separator = part.indexOf('=');
37
- if (separator < 0) continue;
38
- output[part.slice(0, separator).trim()] = part.slice(separator + 1).trim();
39
- }
40
- return output;
41
- }
42
-
43
- function pathnameOf(url) {
44
- const queryIndex = url.indexOf('?');
45
- return queryIndex >= 0 ? url.slice(0, queryIndex) : url;
46
- }
47
-
48
- function queryKey(url) {
49
- const queryIndex = url.indexOf('?');
50
- if (queryIndex < 0) return null;
51
- return new URLSearchParams(url.slice(queryIndex + 1)).get('key');
52
- }
53
-
54
- function securityHeaders(headers = {}) {
55
- return {
56
- 'Referrer-Policy': 'no-referrer',
57
- 'Cache-Control': 'no-store',
58
- 'X-Frame-Options': 'DENY',
59
- 'Content-Security-Policy': "frame-ancestors 'none'",
60
- 'Cross-Origin-Resource-Policy': 'same-origin',
61
- ...headers,
62
- };
63
- }
64
-
65
- function isAllowedWebSocketOrigin(req) {
66
- const origin = req.headers.origin;
67
- if (!origin) return true;
68
- const host = req.headers.host;
69
- if (!host) return false;
70
- return origin === 'http://' + host;
71
- }
72
-
73
- module.exports = {
74
- urlHostForHttp,
75
- browserLauncherForPlatform,
76
- timingSafeEqualStr,
77
- parseCookies,
78
- pathnameOf,
79
- queryKey,
80
- securityHeaders,
81
- isAllowedWebSocketOrigin,
82
- };