@genrtl/grtl 0.2.0 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +70 -69
  2. package/dist/index.js +13 -3
  3. package/package.json +33 -33
package/README.md CHANGED
@@ -1,69 +1,70 @@
1
- # @genrtl/grtl
2
-
3
- CLI and coding-agent integration for the GenRTL RTL engineering knowledge
4
- service.
5
-
6
- ## Install
7
-
8
- ```bash
9
- npm install --global @genrtl/grtl
10
- export GRTL_API_KEY="gtr_live_your_api_key"
11
- ```
12
-
13
- PowerShell:
14
-
15
- ```powershell
16
- $env:GRTL_API_KEY = "gtr_live_your_api_key"
17
- ```
18
-
19
- ## Agent Setup
20
-
21
- Install a Skill that tells the agent to call the `grtl` CLI:
22
-
23
- ```bash
24
- grtl setup --cli --codex
25
- grtl setup --cli --cursor --project
26
- ```
27
-
28
- Configure hosted MCP and install a Skill for the four MCP tools:
29
-
30
- ```bash
31
- grtl setup --mcp --codex
32
- grtl setup --mcp --cursor --project
33
- ```
34
-
35
- Without `--cli` or `--mcp`, setup asks which mode to install.
36
-
37
- For Codex, Skills are installed under `.agents/skills` for project setup or
38
- `~/.agents/skills` for global setup. MCP mode also updates
39
- `.codex/config.toml` or `~/.codex/config.toml`.
40
-
41
- The hosted MCP endpoint is:
42
-
43
- ```text
44
- https://genrtl.com/api/mcp
45
- ```
46
-
47
- ## Knowledge Commands
48
-
49
- ```bash
50
- grtl knowledge-search "AXI stream backpressure design"
51
- grtl spec2rtl-search "Design an APB register block"
52
- grtl verification-search "Verify an async FIFO"
53
- grtl debug-search "Explain this Vivado CDC warning"
54
- ```
55
-
56
- Use `--json` for structured output. Available filters include `--type`,
57
- `--domain`, `--tool`, `--tool-version`, `--error-type`, `--severity`,
58
- `--interface`, `--target`, `--tag`, `--top-k`, `--min-score`, and
59
- `--workspace-id`.
60
-
61
- ## Development
62
-
63
- ```bash
64
- pnpm install
65
- pnpm --filter @genrtl/grtl lint:check
66
- pnpm --filter @genrtl/grtl typecheck
67
- pnpm --filter @genrtl/grtl test
68
- pnpm --filter @genrtl/grtl build
69
- ```
1
+ # @genrtl/grtl
2
+
3
+ CLI and coding-agent integration for the GenRTL RTL engineering knowledge
4
+ service.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm install --global @genrtl/grtl
10
+ export GRTL_API_KEY="gtr_live_your_api_key"
11
+ ```
12
+
13
+ PowerShell:
14
+
15
+ ```powershell
16
+ $env:GRTL_API_KEY = "gtr_live_your_api_key"
17
+ ```
18
+
19
+ ## Agent Setup
20
+
21
+ Install a Skill that tells the agent to call the `grtl` CLI:
22
+
23
+ ```bash
24
+ grtl setup --cli --codex
25
+ grtl setup --cli --cursor --project
26
+ ```
27
+
28
+ Configure hosted MCP and install a Skill for the four MCP tools:
29
+
30
+ ```bash
31
+ grtl setup --mcp --codex
32
+ grtl setup --mcp --cursor --project
33
+ ```
34
+
35
+ Without `--cli` or `--mcp`, setup asks which mode to install.
36
+
37
+ For Codex, Skills are installed under `.agents/skills` for project setup or
38
+ `~/.agents/skills` for global setup. MCP mode also updates
39
+ `.codex/config.toml` or `~/.codex/config.toml`.
40
+
41
+ The hosted MCP endpoint is:
42
+
43
+ ```text
44
+ https://genrtl.com/api/mcp
45
+ ```
46
+
47
+ ## Knowledge Commands
48
+
49
+ ```bash
50
+ 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 debug-search "Explain this Vivado CDC warning"
55
+ ```
56
+
57
+ Use `--json` for structured output. `--type` accepts `spec2rtl`, `spec2plan`, `verification`, or `debug`; other filters include
58
+ `--domain`, `--tool`, `--tool-version`, `--error-type`, `--severity`,
59
+ `--interface`, `--target`, `--tag`, `--top-k`, `--min-score`, and
60
+ `--workspace-id`.
61
+
62
+ ## Development
63
+
64
+ ```bash
65
+ pnpm install
66
+ pnpm --filter @genrtl/grtl lint:check
67
+ pnpm --filter @genrtl/grtl typecheck
68
+ pnpm --filter @genrtl/grtl test
69
+ pnpm --filter @genrtl/grtl build
70
+ ```
package/dist/index.js CHANGED
@@ -376,6 +376,7 @@ var FALLBACK_MCP = `Use GenRTL MCP tools for grounded RTL engineering knowledge.
376
376
  Choose one tool:
377
377
  - \`genrtl_knowledge_search\` for cross-domain RTL questions
378
378
  - \`genrtl_spec2rtl_search\` for requirements and RTL design
379
+ - \`genrtl_spec2plan_search\` for implementation planning from a specification
379
380
  - \`genrtl_verification_search\` for testbenches and verification
380
381
  - \`genrtl_debug_search\` for lint, CDC, compile, synthesis, and RTL bugs
381
382
 
@@ -385,6 +386,7 @@ var FALLBACK_CLI = `Use the \`grtl\` CLI for grounded RTL engineering knowledge.
385
386
  Choose one command:
386
387
  - \`npx @genrtl/grtl@latest knowledge-search "<query>"\`
387
388
  - \`npx @genrtl/grtl@latest spec2rtl-search "<query>"\`
389
+ - \`npx @genrtl/grtl@latest spec2plan-search "<query>"\`
388
390
  - \`npx @genrtl/grtl@latest verification-search "<query>"\`
389
391
  - \`npx @genrtl/grtl@latest debug-search "<query>"\`
390
392
 
@@ -411,6 +413,7 @@ Choose exactly one MCP tool:
411
413
 
412
414
  - \`genrtl_knowledge_search\` for cross-domain RTL questions.
413
415
  - \`genrtl_spec2rtl_search\` for requirements, protocols, control logic, or algorithm-to-RTL work.
416
+ - \`genrtl_spec2plan_search\` for turning a specification into an actionable implementation plan.
414
417
  - \`genrtl_verification_search\` for testbenches and verification.
415
418
  - \`genrtl_debug_search\` for lint, CDC, compile, synthesis, or RTL bugs.
416
419
 
@@ -431,6 +434,7 @@ Choose exactly one command:
431
434
 
432
435
  - \`grtl knowledge-search "<query>" --json\` for cross-domain RTL questions.
433
436
  - \`grtl spec2rtl-search "<query>" --json\` for requirements, protocols, control logic, or algorithm-to-RTL work.
437
+ - \`grtl spec2plan-search "<query>" --json\` for turning a specification into an actionable implementation plan.
434
438
  - \`grtl verification-search "<query>" --json\` for testbenches and verification.
435
439
  - \`grtl debug-search "<query>" --json\` for lint, CDC, compile, synthesis, or RTL bugs.
436
440
 
@@ -951,6 +955,11 @@ var TOOL_COMMANDS = [
951
955
  alias: "spec2rtl-search",
952
956
  description: "Search Spec2RTL knowledge cards"
953
957
  },
958
+ {
959
+ name: "genrtl_spec2plan_search",
960
+ alias: "spec2plan-search",
961
+ description: "Search Spec2Plan knowledge cards"
962
+ },
954
963
  {
955
964
  name: "genrtl_verification_search",
956
965
  alias: "verification-search",
@@ -988,7 +997,7 @@ function buildKnowledgeSearchInput(query, options) {
988
997
  }
989
998
  const filters = {};
990
999
  if (options.type?.length) {
991
- const allowed = /* @__PURE__ */ new Set(["spec2rtl", "verification", "debug"]);
1000
+ const allowed = /* @__PURE__ */ new Set(["spec2rtl", "spec2plan", "verification", "debug"]);
992
1001
  const invalid = options.type.find((type) => !allowed.has(type));
993
1002
  if (invalid) {
994
1003
  throw new InvalidArgumentError(`Invalid knowledge type: ${invalid}`);
@@ -1065,7 +1074,7 @@ function printKnowledgeResult(result) {
1065
1074
  }
1066
1075
  }
1067
1076
  function addSearchOptions(command) {
1068
- return command.argument("<query>", "Natural-language RTL engineering question or diagnostic").option("--type <type...>", "Knowledge types: spec2rtl, verification, debug").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");
1077
+ return command.argument("<query>", "Natural-language RTL engineering question or diagnostic").option("--type <type...>", "Knowledge types: spec2rtl, spec2plan, verification, debug").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");
1069
1078
  }
1070
1079
  function registerKnowledgeCommands(program2) {
1071
1080
  for (const tool of TOOL_COMMANDS) {
@@ -1423,9 +1432,10 @@ Examples:
1423
1432
  ${brand.primary("npx @genrtl/grtl setup --cli --codex --project")}
1424
1433
  ${brand.primary("GRTL_API_KEY=your_key npx @genrtl/grtl setup --mcp --codex --project")}
1425
1434
 
1426
- ${brand.dim("# Search the same four tools exposed by the GenRTL MCP server")}
1435
+ ${brand.dim("# Search the same five tools exposed by the GenRTL MCP server")}
1427
1436
  ${brand.primary('npx @genrtl/grtl knowledge-search "AXI stream backpressure design"')}
1428
1437
  ${brand.primary('npx @genrtl/grtl spec2rtl-search "Generate an APB register block"')}
1438
+ ${brand.primary('npx @genrtl/grtl spec2plan-search "Plan an APB register block implementation"')}
1429
1439
  ${brand.primary('npx @genrtl/grtl verification-search "Verify an async FIFO"')}
1430
1440
  ${brand.primary('npx @genrtl/grtl debug-search "Explain this Vivado CDC warning"')}
1431
1441
  `
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
- {
1
+ {
2
2
  "name": "@genrtl/grtl",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "CLI, MCP, and coding-agent Skills for GenRTL RTL engineering knowledge",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "grtl": "dist/index.js"
8
8
  },
9
- "files": [
10
- "dist"
11
- ],
12
- "scripts": {
13
- "build": "tsup",
14
- "dev": "tsup --watch",
15
- "typecheck": "tsc --noEmit",
16
- "lint": "eslint src --fix",
17
- "lint:check": "eslint src",
18
- "format": "prettier --write src",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsup",
14
+ "dev": "tsup --watch",
15
+ "typecheck": "tsc --noEmit",
16
+ "lint": "eslint src --fix",
17
+ "lint:check": "eslint src",
18
+ "format": "prettier --write src",
19
19
  "format:check": "prettier --check src",
20
20
  "clean": "rm -rf dist node_modules",
21
21
  "test": "vitest run",
@@ -29,24 +29,24 @@
29
29
  "figlet": "^1.9.4",
30
30
  "ora": "^9.0.0",
31
31
  "picocolors": "^1.1.1"
32
- },
33
- "devDependencies": {
34
- "@types/figlet": "^1.7.0",
35
- "@types/node": "^22.19.1",
36
- "@typescript-eslint/eslint-plugin": "^8.28.0",
37
- "@typescript-eslint/parser": "^8.28.0",
38
- "eslint": "^9.34.0",
39
- "eslint-plugin-prettier": "^5.2.5",
40
- "prettier": "^3.6.2",
41
- "tsup": "^8.5.0",
42
- "typescript": "^5.8.2",
43
- "typescript-eslint": "^8.28.0",
44
- "vitest": "^4.0.13"
45
- },
46
- "keywords": [
47
- "genrtl",
48
- "cli",
49
- "ai",
32
+ },
33
+ "devDependencies": {
34
+ "@types/figlet": "^1.7.0",
35
+ "@types/node": "^22.19.1",
36
+ "@typescript-eslint/eslint-plugin": "^8.28.0",
37
+ "@typescript-eslint/parser": "^8.28.0",
38
+ "eslint": "^9.34.0",
39
+ "eslint-plugin-prettier": "^5.2.5",
40
+ "prettier": "^3.6.2",
41
+ "tsup": "^8.5.0",
42
+ "typescript": "^5.8.2",
43
+ "typescript-eslint": "^8.28.0",
44
+ "vitest": "^4.0.13"
45
+ },
46
+ "keywords": [
47
+ "genrtl",
48
+ "cli",
49
+ "ai",
50
50
  "rtl",
51
51
  "systemverilog",
52
52
  "verilog",
@@ -54,9 +54,9 @@
54
54
  "mcp"
55
55
  ],
56
56
  "author": "xroting",
57
- "license": "MIT",
58
- "repository": {
59
- "type": "git",
57
+ "license": "MIT",
58
+ "repository": {
59
+ "type": "git",
60
60
  "url": "git+https://github.com/xroting/grtl.git",
61
61
  "directory": "packages/cli"
62
62
  },