@reqall/claude-plugin 0.0.1 → 0.0.4
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/dist/hooks/classify.js +10 -2
- package/dist/hooks/classify.js.map +1 -1
- package/dist/hooks/classify.mjs +9 -1
- package/dist/hooks/context.js +11 -10
- package/dist/hooks/context.js.map +1 -1
- package/dist/hooks/context.mjs +6 -1
- package/dist/hooks/plan.js +13 -3
- package/dist/hooks/plan.js.map +1 -1
- package/dist/hooks/plan.mjs +10 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +34 -0
- package/dist/src/index.js.map +1 -0
- package/hooks/hooks.json +1 -1
- package/package.json +11 -4
- package/plugin.json +1 -1
- package/skills/issues/SKILL.md +1 -1
- package/skills/specs/SKILL.md +1 -1
- package/hooks/classify.ts +0 -31
- package/hooks/context.ts +0 -37
- package/hooks/plan.ts +0 -37
- package/scripts/bundle-hooks.js +0 -25
- package/tsconfig.json +0 -8
package/dist/hooks/classify.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Reads the agent's session transcript and classifies the work done.
|
|
5
5
|
* Outputs a prompt for the agent to persist the classification via MCP tools.
|
|
6
|
+
*
|
|
7
|
+
* This is type: "agent" — the output becomes instructions for the agent,
|
|
8
|
+
* which has full MCP tool access to call reqall:upsert_record etc.
|
|
6
9
|
*/
|
|
7
10
|
import { loadConfig, detectProject, CLASSIFICATION_PROMPT } from '@reqall/core';
|
|
8
11
|
async function main() {
|
|
@@ -15,10 +18,15 @@ async function main() {
|
|
|
15
18
|
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
16
19
|
process.stdin.on('end', () => resolve(data));
|
|
17
20
|
});
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
if (!input.trim()) {
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
20
24
|
console.log(`[reqall] Project: ${projectName}`);
|
|
25
|
+
console.log(`[reqall] Classify the work completed in this session.`);
|
|
26
|
+
console.log();
|
|
21
27
|
console.log(CLASSIFICATION_PROMPT);
|
|
28
|
+
console.log();
|
|
29
|
+
console.log(`When saving, first call reqall:upsert_project with name "${projectName}" to get the project ID, then use that project_id in reqall:upsert_record.`);
|
|
22
30
|
}
|
|
23
31
|
catch {
|
|
24
32
|
// Non-blocking: exit cleanly on any error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../hooks/classify.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../hooks/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEhF,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;QAE1D,6BAA6B;QAC7B,MAAM,KAAK,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YAClD,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,qBAAqB,WAAW,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QACnC,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,4DAA4D,WAAW,4EAA4E,CAAC,CAAC;IACnK,CAAC;IAAC,MAAM,CAAC;QACP,0CAA0C;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/hooks/classify.mjs
CHANGED
|
@@ -48,10 +48,11 @@ var CLASSIFICATION_PROMPT = `Classify the work just completed into exactly one c
|
|
|
48
48
|
| New feature request (not yet done) | todo | open |
|
|
49
49
|
| Completed feature request | todo | resolved |
|
|
50
50
|
| New spec or plan | spec | open |
|
|
51
|
+
| Test scenario | test | open |
|
|
51
52
|
| Trivial / Q&A / unclassifiable | \u2014 | no action |
|
|
52
53
|
|
|
53
54
|
If the work is non-trivial, save it via reqall:upsert_record with the appropriate kind, status, and a short descriptive title.
|
|
54
|
-
If the work created or modified relationships between records, also call reqall:
|
|
55
|
+
If the work created or modified relationships between records, also call reqall:upsert_link.`;
|
|
55
56
|
|
|
56
57
|
// dist/hooks/classify.js
|
|
57
58
|
async function main() {
|
|
@@ -65,8 +66,15 @@ async function main() {
|
|
|
65
66
|
});
|
|
66
67
|
process.stdin.on("end", () => resolve(data));
|
|
67
68
|
});
|
|
69
|
+
if (!input.trim()) {
|
|
70
|
+
process.exit(0);
|
|
71
|
+
}
|
|
68
72
|
console.log(`[reqall] Project: ${projectName}`);
|
|
73
|
+
console.log(`[reqall] Classify the work completed in this session.`);
|
|
74
|
+
console.log();
|
|
69
75
|
console.log(CLASSIFICATION_PROMPT);
|
|
76
|
+
console.log();
|
|
77
|
+
console.log(`When saving, first call reqall:upsert_project with name "${projectName}" to get the project ID, then use that project_id in reqall:upsert_record.`);
|
|
70
78
|
} catch {
|
|
71
79
|
process.exit(0);
|
|
72
80
|
}
|
package/dist/hooks/context.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UserPromptSubmit hook — Context Retrieval (pre-prompt)
|
|
3
3
|
*
|
|
4
|
-
* Reads the user's prompt from stdin
|
|
5
|
-
*
|
|
4
|
+
* Reads the user's prompt from stdin and instructs the agent to search
|
|
5
|
+
* reqall for relevant context using its built-in MCP access.
|
|
6
|
+
*
|
|
7
|
+
* This is type: "agent" — the output becomes instructions for the agent,
|
|
8
|
+
* which has full MCP tool access to call reqall:search etc.
|
|
6
9
|
*/
|
|
7
10
|
import { loadConfig, detectProject } from '@reqall/core';
|
|
8
11
|
async function main() {
|
|
9
12
|
try {
|
|
10
13
|
const config = loadConfig();
|
|
11
14
|
const projectName = config.projectName || detectProject();
|
|
12
|
-
// Read stdin JSON from Claude Code
|
|
13
15
|
const input = await new Promise((resolve) => {
|
|
14
16
|
let data = '';
|
|
15
17
|
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
16
18
|
process.stdin.on('end', () => resolve(data));
|
|
17
19
|
});
|
|
20
|
+
if (!input.trim())
|
|
21
|
+
process.exit(0);
|
|
18
22
|
const { prompt } = JSON.parse(input);
|
|
19
|
-
// TODO: Call reqall MCP tools via HTTP to fetch context
|
|
20
|
-
// 1. list_records for recent records in this project
|
|
21
|
-
// 2. search with the prompt text for semantic matches
|
|
22
|
-
// 3. Format and output
|
|
23
|
-
// Placeholder output until MCP client is implemented
|
|
24
23
|
console.log(`[reqall] Project: ${projectName}`);
|
|
25
|
-
console.log(`[reqall]
|
|
24
|
+
console.log(`[reqall] Search for relevant context before responding.`);
|
|
25
|
+
console.log();
|
|
26
|
+
console.log(`Call reqall:search with query="${prompt}", project_name="${projectName}", limit=${config.contextLimit}`);
|
|
27
|
+
console.log(`If results are found, consider them as context for the user's request.`);
|
|
26
28
|
}
|
|
27
29
|
catch {
|
|
28
|
-
// Non-blocking: exit cleanly on any error
|
|
29
30
|
process.exit(0);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../hooks/context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../hooks/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;QAE1D,MAAM,KAAK,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YAClD,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEnC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,qBAAqB,WAAW,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,kCAAkC,MAAM,oBAAoB,WAAW,YAAY,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QACtH,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACxF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/hooks/context.mjs
CHANGED
|
@@ -50,9 +50,14 @@ async function main() {
|
|
|
50
50
|
});
|
|
51
51
|
process.stdin.on("end", () => resolve(data));
|
|
52
52
|
});
|
|
53
|
+
if (!input.trim())
|
|
54
|
+
process.exit(0);
|
|
53
55
|
const { prompt } = JSON.parse(input);
|
|
54
56
|
console.log(`[reqall] Project: ${projectName}`);
|
|
55
|
-
console.log(`[reqall]
|
|
57
|
+
console.log(`[reqall] Search for relevant context before responding.`);
|
|
58
|
+
console.log();
|
|
59
|
+
console.log(`Call reqall:search with query="${prompt}", project_name="${projectName}", limit=${config.contextLimit}`);
|
|
60
|
+
console.log(`If results are found, consider them as context for the user's request.`);
|
|
56
61
|
} catch {
|
|
57
62
|
process.exit(0);
|
|
58
63
|
}
|
package/dist/hooks/plan.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Triggered when a planning subagent completes. Reads the plan transcript
|
|
5
5
|
* and prompts the agent to persist it as a spec record.
|
|
6
|
+
*
|
|
7
|
+
* This is type: "agent" — the output becomes instructions for the agent,
|
|
8
|
+
* which has full MCP tool access to call reqall:upsert_record etc.
|
|
6
9
|
*/
|
|
7
10
|
import { loadConfig, detectProject } from '@reqall/core';
|
|
8
11
|
async function main() {
|
|
@@ -19,10 +22,17 @@ async function main() {
|
|
|
19
22
|
// Empty transcript — skip silently
|
|
20
23
|
process.exit(0);
|
|
21
24
|
}
|
|
22
|
-
// TODO: Extract plan title and details from transcript
|
|
23
|
-
// Prompt agent to save via reqall:upsert_record with kind=spec, status=open
|
|
24
25
|
console.log(`[reqall] Project: ${projectName}`);
|
|
25
|
-
console.log(`[reqall]
|
|
26
|
+
console.log(`[reqall] A planning subagent just completed. Save this plan as a specification record.`);
|
|
27
|
+
console.log();
|
|
28
|
+
console.log(`Instructions:`);
|
|
29
|
+
console.log(`1. Extract a concise title for this plan (prefix with "ARCH:" or "PLAN:" as appropriate)`);
|
|
30
|
+
console.log(`2. Call reqall:upsert_project with name "${projectName}" to get the project ID`);
|
|
31
|
+
console.log(`3. Call reqall:upsert_record with kind="spec", status="open", the title, and the full plan as the body`);
|
|
32
|
+
console.log(`4. If this plan relates to existing records, create links via reqall:upsert_link`);
|
|
33
|
+
console.log();
|
|
34
|
+
console.log(`Plan transcript:`);
|
|
35
|
+
console.log(input);
|
|
26
36
|
}
|
|
27
37
|
catch {
|
|
28
38
|
// Non-blocking: exit cleanly on any error
|
package/dist/hooks/plan.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../hooks/plan.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../hooks/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;QAE1D,kCAAkC;QAClC,MAAM,KAAK,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;YAClD,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YAClB,mCAAmC;YACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,qBAAqB,WAAW,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,wFAAwF,CAAC,CAAC;QACtG,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,0FAA0F,CAAC,CAAC;QACxG,OAAO,CAAC,GAAG,CAAC,4CAA4C,WAAW,yBAAyB,CAAC,CAAC;QAC9F,OAAO,CAAC,GAAG,CAAC,wGAAwG,CAAC,CAAC;QACtH,OAAO,CAAC,GAAG,CAAC,kFAAkF,CAAC,CAAC;QAChG,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,0CAA0C;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/hooks/plan.mjs
CHANGED
|
@@ -54,7 +54,16 @@ async function main() {
|
|
|
54
54
|
process.exit(0);
|
|
55
55
|
}
|
|
56
56
|
console.log(`[reqall] Project: ${projectName}`);
|
|
57
|
-
console.log(`[reqall]
|
|
57
|
+
console.log(`[reqall] A planning subagent just completed. Save this plan as a specification record.`);
|
|
58
|
+
console.log();
|
|
59
|
+
console.log(`Instructions:`);
|
|
60
|
+
console.log(`1. Extract a concise title for this plan (prefix with "ARCH:" or "PLAN:" as appropriate)`);
|
|
61
|
+
console.log(`2. Call reqall:upsert_project with name "${projectName}" to get the project ID`);
|
|
62
|
+
console.log(`3. Call reqall:upsert_record with kind="spec", status="open", the title, and the full plan as the body`);
|
|
63
|
+
console.log(`4. If this plan relates to existing records, create links via reqall:upsert_link`);
|
|
64
|
+
console.log();
|
|
65
|
+
console.log(`Plan transcript:`);
|
|
66
|
+
console.log(input);
|
|
58
67
|
} catch {
|
|
59
68
|
process.exit(0);
|
|
60
69
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @reqall/claude-plugin CLI
|
|
4
|
+
*
|
|
5
|
+
* Outputs the plugin root directory so Claude Code can discover
|
|
6
|
+
* plugin.json, hooks, skills, and MCP server configuration.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* npx -y @reqall/claude-plugin # print plugin directory path
|
|
10
|
+
* npx -y @reqall/claude-plugin --json # print plugin.json with resolved paths
|
|
11
|
+
*/
|
|
12
|
+
import { resolve } from 'node:path';
|
|
13
|
+
import { readFileSync } from 'node:fs';
|
|
14
|
+
// dist/src/index.js → package root is two levels up
|
|
15
|
+
const pluginRoot = resolve(import.meta.dirname, '..', '..');
|
|
16
|
+
const arg = process.argv[2];
|
|
17
|
+
if (arg === '--help' || arg === '-h') {
|
|
18
|
+
console.log('Usage: reqall-claude-plugin [--json]');
|
|
19
|
+
console.log();
|
|
20
|
+
console.log('Outputs the plugin root directory for Claude Code discovery.');
|
|
21
|
+
console.log();
|
|
22
|
+
console.log('Options:');
|
|
23
|
+
console.log(' --json Print plugin manifest with resolved directory path');
|
|
24
|
+
console.log(' --help Show this help message');
|
|
25
|
+
process.exit(0);
|
|
26
|
+
}
|
|
27
|
+
if (arg === '--json') {
|
|
28
|
+
const manifest = JSON.parse(readFileSync(resolve(pluginRoot, 'plugin.json'), 'utf-8'));
|
|
29
|
+
console.log(JSON.stringify({ ...manifest, dir: pluginRoot }, null, 2));
|
|
30
|
+
process.exit(0);
|
|
31
|
+
}
|
|
32
|
+
// Default: print plugin root directory
|
|
33
|
+
console.log(pluginRoot);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,oDAAoD;AACpD,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE5D,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAE5B,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxB,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;IACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CACzB,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,CAC1D,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,uCAAuC;AACvC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC"}
|
package/hooks/hooks.json
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqall/claude-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Reqall plugin for Claude Code — persistent semantic memory for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"reqall-claude-plugin": "dist/index.js"
|
|
8
|
+
"reqall-claude-plugin": "dist/src/index.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@reqall/core": "0.0.
|
|
11
|
+
"@reqall/core": "0.0.3"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"esbuild": "^0.25.0"
|
|
15
15
|
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"hooks/hooks.json",
|
|
19
|
+
"skills",
|
|
20
|
+
"plugin.json",
|
|
21
|
+
"mcp-servers.json"
|
|
22
|
+
],
|
|
16
23
|
"license": "MIT",
|
|
17
24
|
"scripts": {
|
|
18
25
|
"build": "tsc && node scripts/bundle-hooks.js",
|
package/plugin.json
CHANGED
package/skills/issues/SKILL.md
CHANGED
|
@@ -39,7 +39,7 @@ reqall:upsert_record { id: <issue_id>, status: "resolved" }
|
|
|
39
39
|
|
|
40
40
|
### Link related issues
|
|
41
41
|
```
|
|
42
|
-
reqall:
|
|
42
|
+
reqall:upsert_link { source_id: <id>, source_table: "records", target_id: <id>, target_table: "records", relationship: "blocks" }
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
## Related Skills
|
package/skills/specs/SKILL.md
CHANGED
|
@@ -35,7 +35,7 @@ reqall:search { query: "...", kind: "spec" }
|
|
|
35
35
|
|
|
36
36
|
### Link a spec to its implementation
|
|
37
37
|
```
|
|
38
|
-
reqall:
|
|
38
|
+
reqall:upsert_link { source_id: <spec_id>, source_table: "records", target_id: <impl_id>, target_table: "records", relationship: "implements" }
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Related Skills
|
package/hooks/classify.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stop hook — Work Classification (post-task)
|
|
3
|
-
*
|
|
4
|
-
* Reads the agent's session transcript and classifies the work done.
|
|
5
|
-
* Outputs a prompt for the agent to persist the classification via MCP tools.
|
|
6
|
-
*/
|
|
7
|
-
import { loadConfig, detectProject, CLASSIFICATION_PROMPT } from '@reqall/core';
|
|
8
|
-
|
|
9
|
-
async function main() {
|
|
10
|
-
try {
|
|
11
|
-
const config = loadConfig();
|
|
12
|
-
const projectName = config.projectName || detectProject();
|
|
13
|
-
|
|
14
|
-
// Read transcript from stdin
|
|
15
|
-
const input = await new Promise<string>((resolve) => {
|
|
16
|
-
let data = '';
|
|
17
|
-
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
18
|
-
process.stdin.on('end', () => resolve(data));
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// TODO: Parse transcript, apply classification logic, prompt agent to save
|
|
22
|
-
// For now, output the classification prompt for the agent
|
|
23
|
-
console.log(`[reqall] Project: ${projectName}`);
|
|
24
|
-
console.log(CLASSIFICATION_PROMPT);
|
|
25
|
-
} catch {
|
|
26
|
-
// Non-blocking: exit cleanly on any error
|
|
27
|
-
process.exit(0);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
main();
|
package/hooks/context.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UserPromptSubmit hook — Context Retrieval (pre-prompt)
|
|
3
|
-
*
|
|
4
|
-
* Reads the user's prompt from stdin, searches Reqall for relevant records,
|
|
5
|
-
* and outputs context lines for the agent to see.
|
|
6
|
-
*/
|
|
7
|
-
import { loadConfig, detectProject, formatContext } from '@reqall/core';
|
|
8
|
-
|
|
9
|
-
async function main() {
|
|
10
|
-
try {
|
|
11
|
-
const config = loadConfig();
|
|
12
|
-
const projectName = config.projectName || detectProject();
|
|
13
|
-
|
|
14
|
-
// Read stdin JSON from Claude Code
|
|
15
|
-
const input = await new Promise<string>((resolve) => {
|
|
16
|
-
let data = '';
|
|
17
|
-
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
18
|
-
process.stdin.on('end', () => resolve(data));
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const { prompt } = JSON.parse(input);
|
|
22
|
-
|
|
23
|
-
// TODO: Call reqall MCP tools via HTTP to fetch context
|
|
24
|
-
// 1. list_records for recent records in this project
|
|
25
|
-
// 2. search with the prompt text for semantic matches
|
|
26
|
-
// 3. Format and output
|
|
27
|
-
|
|
28
|
-
// Placeholder output until MCP client is implemented
|
|
29
|
-
console.log(`[reqall] Project: ${projectName}`);
|
|
30
|
-
console.log(`[reqall] Context retrieval ready — MCP client pending implementation`);
|
|
31
|
-
} catch {
|
|
32
|
-
// Non-blocking: exit cleanly on any error
|
|
33
|
-
process.exit(0);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
main();
|
package/hooks/plan.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SubagentStop hook — Plan Capture (post-plan)
|
|
3
|
-
*
|
|
4
|
-
* Triggered when a planning subagent completes. Reads the plan transcript
|
|
5
|
-
* and prompts the agent to persist it as a spec record.
|
|
6
|
-
*/
|
|
7
|
-
import { loadConfig, detectProject } from '@reqall/core';
|
|
8
|
-
|
|
9
|
-
async function main() {
|
|
10
|
-
try {
|
|
11
|
-
const config = loadConfig();
|
|
12
|
-
const projectName = config.projectName || detectProject();
|
|
13
|
-
|
|
14
|
-
// Read plan transcript from stdin
|
|
15
|
-
const input = await new Promise<string>((resolve) => {
|
|
16
|
-
let data = '';
|
|
17
|
-
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
18
|
-
process.stdin.on('end', () => resolve(data));
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
if (!input.trim()) {
|
|
22
|
-
// Empty transcript — skip silently
|
|
23
|
-
process.exit(0);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// TODO: Extract plan title and details from transcript
|
|
27
|
-
// Prompt agent to save via reqall:upsert_record with kind=spec, status=open
|
|
28
|
-
|
|
29
|
-
console.log(`[reqall] Project: ${projectName}`);
|
|
30
|
-
console.log(`[reqall] Plan detected — save as spec record via reqall:upsert_record with kind=spec, status=open`);
|
|
31
|
-
} catch {
|
|
32
|
-
// Non-blocking: exit cleanly on any error
|
|
33
|
-
process.exit(0);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
main();
|
package/scripts/bundle-hooks.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bundle each hook script into a self-contained .mjs file using esbuild.
|
|
3
|
-
* This inlines @reqall/core since Claude Code copies plugins without node_modules.
|
|
4
|
-
*/
|
|
5
|
-
import { build } from 'esbuild';
|
|
6
|
-
import { readdirSync } from 'node:fs';
|
|
7
|
-
import { join } from 'node:path';
|
|
8
|
-
|
|
9
|
-
const hooksDir = join(import.meta.dirname, '..', 'dist', 'hooks');
|
|
10
|
-
const outDir = join(import.meta.dirname, '..', 'dist', 'hooks');
|
|
11
|
-
|
|
12
|
-
const hookFiles = readdirSync(hooksDir).filter(f => f.endsWith('.js') && f !== 'hooks.json');
|
|
13
|
-
|
|
14
|
-
for (const file of hookFiles) {
|
|
15
|
-
const name = file.replace('.js', '.mjs');
|
|
16
|
-
await build({
|
|
17
|
-
entryPoints: [join(hooksDir, file)],
|
|
18
|
-
bundle: true,
|
|
19
|
-
platform: 'node',
|
|
20
|
-
format: 'esm',
|
|
21
|
-
outfile: join(outDir, name),
|
|
22
|
-
external: [],
|
|
23
|
-
});
|
|
24
|
-
console.log(`Bundled: ${name}`);
|
|
25
|
-
}
|