@genrtl/grtl 0.4.0 → 1.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/README.md +20 -10
- package/dist/index.js +45 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,9 +32,18 @@ grtl setup --mcp --codex
|
|
|
32
32
|
grtl setup --mcp --cursor --project
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Without `--cli` or `--mcp`, setup asks which mode to install.
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
Without `--cli` or `--mcp`, setup asks which mode to install.
|
|
36
|
+
|
|
37
|
+
Installing a newer npm package does not modify Skills already written to an
|
|
38
|
+
agent configuration directory. Run the matching setup command again after an
|
|
39
|
+
upgrade to refresh the Skill. For example:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
grtl setup --cli --cursor
|
|
43
|
+
grtl setup --cli --cursor --project
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For Codex, Skills are installed under `.agents/skills` for project setup or
|
|
38
47
|
`~/.agents/skills` for global setup. MCP mode also updates
|
|
39
48
|
`.codex/config.toml` or `~/.codex/config.toml`.
|
|
40
49
|
|
|
@@ -48,13 +57,14 @@ https://genrtl.com/api/mcp
|
|
|
48
57
|
|
|
49
58
|
```bash
|
|
50
59
|
grtl knowledge-search "AXI stream backpressure design"
|
|
51
|
-
grtl spec2rtl-search "Design an APB register block"
|
|
52
|
-
grtl spec2plan-search "Plan an APB register block implementation"
|
|
53
|
-
grtl verification-search "Verify an async FIFO"
|
|
54
|
-
grtl
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
grtl spec2rtl-search "Design an APB register block"
|
|
61
|
+
grtl spec2plan-search "Plan an APB register block implementation"
|
|
62
|
+
grtl verification-search "Verify an async FIFO"
|
|
63
|
+
grtl compile-search "Explain this Vivado CDC warning"
|
|
64
|
+
grtl debug-search "Fix this RTL bug from bad code and error message"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `--json` for structured output. `--type` accepts `spec2rtl`, `spec2plan`, `verification`, `compile`, `debug`, or `coding_style`; other filters include
|
|
58
68
|
`--domain`, `--tool`, `--tool-version`, `--error-type`, `--severity`,
|
|
59
69
|
`--interface`, `--target`, `--tag`, `--top-k`, `--min-score`, and
|
|
60
70
|
`--workspace-id`.
|
package/dist/index.js
CHANGED
|
@@ -378,18 +378,24 @@ Choose one tool:
|
|
|
378
378
|
- \`genrtl_spec2rtl_search\` for requirements and RTL design
|
|
379
379
|
- \`genrtl_spec2plan_search\` for implementation planning from a specification
|
|
380
380
|
- \`genrtl_verification_search\` for testbenches and verification
|
|
381
|
-
- \`
|
|
381
|
+
- \`genrtl_compile_search\` for lint, CDC, compile, synthesis, implementation, and simulator diagnostics
|
|
382
|
+
- \`genrtl_debug_search\` for issue descriptions, erroneous code, solutions, and corrected RTL
|
|
382
383
|
|
|
383
384
|
Pass the complete engineering question in \`query\`. Add filters only when useful.`;
|
|
384
|
-
var FALLBACK_CLI = `Use the \`grtl\` CLI for grounded RTL engineering knowledge.
|
|
385
|
+
var FALLBACK_CLI = `Use the \`grtl\` CLI for grounded RTL engineering knowledge and reusable CBB installation.
|
|
385
386
|
|
|
386
|
-
|
|
387
|
+
For knowledge retrieval, choose one command:
|
|
387
388
|
- \`npx @genrtl/grtl@latest knowledge-search "<query>"\`
|
|
388
389
|
- \`npx @genrtl/grtl@latest spec2rtl-search "<query>"\`
|
|
389
390
|
- \`npx @genrtl/grtl@latest spec2plan-search "<query>"\`
|
|
390
391
|
- \`npx @genrtl/grtl@latest verification-search "<query>"\`
|
|
392
|
+
- \`npx @genrtl/grtl@latest compile-search "<query>"\`
|
|
391
393
|
- \`npx @genrtl/grtl@latest debug-search "<query>"\`
|
|
392
394
|
|
|
395
|
+
To install a reusable RTL block into the current project:
|
|
396
|
+
- \`npx @genrtl/grtl@latest cbb install <cbb_id>@<version>\`
|
|
397
|
+
- Add \`--target <relative-dir>\` only when a non-default install path is needed.
|
|
398
|
+
|
|
393
399
|
Pass the complete engineering question. Add filters such as \`--tool\`,
|
|
394
400
|
\`--tool-version\`, \`--target\`, \`--interface\`, or \`--tag\` when known.
|
|
395
401
|
If authentication fails, set \`GRTL_API_KEY\` or \`GENRTL_API_KEY\` in the
|
|
@@ -402,7 +408,7 @@ alwaysApply: true
|
|
|
402
408
|
var CODEX_CLI_SANDBOX_GUIDANCE = `Run GenRTL CLI requests outside Codex's default sandbox. If a GenRTL CLI command fails with DNS or network errors such as ENOTFOUND, host resolution failures, or fetch failed, rerun it outside the sandbox instead of retrying inside the sandbox.`;
|
|
403
409
|
var MCP_SKILL = `---
|
|
404
410
|
name: genrtl-mcp
|
|
405
|
-
description: Use GenRTL MCP tools for grounded RTL design, verification,
|
|
411
|
+
description: Use GenRTL MCP tools for grounded RTL design, verification, compile/synthesis diagnostics, debugging, and coding style knowledge.
|
|
406
412
|
---
|
|
407
413
|
|
|
408
414
|
# GenRTL MCP
|
|
@@ -415,28 +421,36 @@ Choose exactly one MCP tool:
|
|
|
415
421
|
- \`genrtl_spec2rtl_search\` for requirements, protocols, control logic, or algorithm-to-RTL work.
|
|
416
422
|
- \`genrtl_spec2plan_search\` for turning a specification into an actionable implementation plan.
|
|
417
423
|
- \`genrtl_verification_search\` for testbenches and verification.
|
|
418
|
-
- \`
|
|
424
|
+
- \`genrtl_compile_search\` for lint, CDC, compile, synthesis, implementation, or simulator diagnostics.
|
|
425
|
+
- \`genrtl_debug_search\` for issue descriptions, erroneous code, solutions, and corrected RTL.
|
|
419
426
|
|
|
420
427
|
Pass the complete engineering question in \`query\`. Add \`filters\`, \`top_k\`,
|
|
421
428
|
\`min_score\`, or \`workspace_id\` only when useful.
|
|
422
429
|
`;
|
|
423
430
|
var CLI_SKILL = `---
|
|
424
431
|
name: genrtl-cli
|
|
425
|
-
description: Use the grtl CLI for grounded RTL design, verification,
|
|
432
|
+
description: Use the grtl CLI for grounded RTL design, verification, compile/synthesis diagnostics, debugging knowledge, and secure installation of reusable RTL CBBs.
|
|
426
433
|
---
|
|
427
434
|
|
|
428
435
|
# GenRTL CLI
|
|
429
436
|
|
|
430
|
-
Use this skill when an RTL engineering task needs grounded GenRTL knowledge
|
|
431
|
-
|
|
437
|
+
Use this skill when an RTL engineering task needs grounded GenRTL knowledge or
|
|
438
|
+
a reusable CBB must be installed into the user's local project.
|
|
432
439
|
|
|
433
|
-
|
|
440
|
+
For knowledge retrieval, choose exactly one command:
|
|
434
441
|
|
|
435
442
|
- \`grtl knowledge-search "<query>" --json\` for cross-domain RTL questions.
|
|
436
443
|
- \`grtl spec2rtl-search "<query>" --json\` for requirements, protocols, control logic, or algorithm-to-RTL work.
|
|
437
444
|
- \`grtl spec2plan-search "<query>" --json\` for turning a specification into an actionable implementation plan.
|
|
438
445
|
- \`grtl verification-search "<query>" --json\` for testbenches and verification.
|
|
439
|
-
- \`grtl
|
|
446
|
+
- \`grtl compile-search "<query>" --json\` for lint, CDC, compile, synthesis, implementation, or simulator diagnostics.
|
|
447
|
+
- \`grtl debug-search "<query>" --json\` for issue descriptions, erroneous code, solutions, and corrected RTL.
|
|
448
|
+
|
|
449
|
+
For a CBB selected from GenRTL search results:
|
|
450
|
+
|
|
451
|
+
- \`grtl cbb install <cbb_id>@<version>\` downloads, verifies, and safely extracts it.
|
|
452
|
+
- Add \`--target <relative-dir>\` only when the user requests a specific project path.
|
|
453
|
+
- Do not download or extract the artifact manually; the CLI verifies SHA-256 and prevents unsafe ZIP paths.
|
|
440
454
|
|
|
441
455
|
Pass the complete engineering question. Add filters such as \`--tool\`,
|
|
442
456
|
\`--tool-version\`, \`--target\`, \`--interface\`, or \`--tag\` only when useful.
|
|
@@ -972,10 +986,15 @@ var TOOL_COMMANDS = [
|
|
|
972
986
|
alias: "verification-search",
|
|
973
987
|
description: "Search verification and testbench knowledge cards"
|
|
974
988
|
},
|
|
989
|
+
{
|
|
990
|
+
name: "genrtl_compile_search",
|
|
991
|
+
alias: "compile-search",
|
|
992
|
+
description: "Search compile, lint, CDC, synthesis, implementation, and simulator diagnostic knowledge cards"
|
|
993
|
+
},
|
|
975
994
|
{
|
|
976
995
|
name: "genrtl_debug_search",
|
|
977
996
|
alias: "debug-search",
|
|
978
|
-
description: "Search
|
|
997
|
+
description: "Search RTL debug cards with issue description, erroneous code, solution, and corrected code"
|
|
979
998
|
}
|
|
980
999
|
];
|
|
981
1000
|
function parseInteger(value) {
|
|
@@ -1004,7 +1023,14 @@ function buildKnowledgeSearchInput(query, options) {
|
|
|
1004
1023
|
}
|
|
1005
1024
|
const filters = {};
|
|
1006
1025
|
if (options.type?.length) {
|
|
1007
|
-
const allowed = /* @__PURE__ */ new Set([
|
|
1026
|
+
const allowed = /* @__PURE__ */ new Set([
|
|
1027
|
+
"spec2rtl",
|
|
1028
|
+
"spec2plan",
|
|
1029
|
+
"verification",
|
|
1030
|
+
"compile",
|
|
1031
|
+
"debug",
|
|
1032
|
+
"coding_style"
|
|
1033
|
+
]);
|
|
1008
1034
|
const invalid = options.type.find((type) => !allowed.has(type));
|
|
1009
1035
|
if (invalid) {
|
|
1010
1036
|
throw new InvalidArgumentError(`Invalid knowledge type: ${invalid}`);
|
|
@@ -1081,7 +1107,10 @@ function printKnowledgeResult(result) {
|
|
|
1081
1107
|
}
|
|
1082
1108
|
}
|
|
1083
1109
|
function addSearchOptions(command) {
|
|
1084
|
-
return command.argument("<query>", "Natural-language RTL engineering question or diagnostic").option(
|
|
1110
|
+
return command.argument("<query>", "Natural-language RTL engineering question or diagnostic").option(
|
|
1111
|
+
"--type <type...>",
|
|
1112
|
+
"Knowledge types: spec2rtl, spec2plan, verification, compile, debug, coding_style"
|
|
1113
|
+
).option("--domain <domain>", "Filter by engineering domain").option("--tool <tool>", "Filter by EDA tool").option("--tool-version <version>", "Filter by EDA tool version").option("--error-type <type>", "Filter by error type").option("--severity <severity>", "Filter by severity").option("--interface <interface>", "Filter by hardware interface").option("--target <target>", "Filter by target: fpga, asic, or both").option("--tag <tag...>", "Filter by one or more tags").option("--top-k <count>", "Maximum results (1-20)", parseInteger).option("--min-score <score>", "Minimum similarity score (0-1)", parseNumber).option("--workspace-id <id>", "GenRTL workspace ID").option("--json", "Output the structured MCP result as JSON");
|
|
1085
1114
|
}
|
|
1086
1115
|
function registerKnowledgeCommands(program2) {
|
|
1087
1116
|
for (const tool of TOOL_COMMANDS) {
|
|
@@ -1901,12 +1930,13 @@ Examples:
|
|
|
1901
1930
|
${brand.primary("npx @genrtl/grtl setup --cli --codex --project")}
|
|
1902
1931
|
${brand.primary("GRTL_API_KEY=your_key npx @genrtl/grtl setup --mcp --codex --project")}
|
|
1903
1932
|
|
|
1904
|
-
${brand.dim("# Search the same
|
|
1933
|
+
${brand.dim("# Search the same six knowledge tools exposed by the GenRTL MCP server")}
|
|
1905
1934
|
${brand.primary('npx @genrtl/grtl knowledge-search "AXI stream backpressure design"')}
|
|
1906
1935
|
${brand.primary('npx @genrtl/grtl spec2rtl-search "Generate an APB register block"')}
|
|
1907
1936
|
${brand.primary('npx @genrtl/grtl spec2plan-search "Plan an APB register block implementation"')}
|
|
1908
1937
|
${brand.primary('npx @genrtl/grtl verification-search "Verify an async FIFO"')}
|
|
1909
|
-
${brand.primary('npx @genrtl/grtl
|
|
1938
|
+
${brand.primary('npx @genrtl/grtl compile-search "Explain this Vivado CDC warning"')}
|
|
1939
|
+
${brand.primary('npx @genrtl/grtl debug-search "Fix this RTL bug from bad code and error message"')}
|
|
1910
1940
|
|
|
1911
1941
|
${brand.dim("# Acquire and install a reusable RTL CBB")}
|
|
1912
1942
|
${brand.primary("npx @genrtl/grtl cbb install cbb_uart@1.2.0")}
|