@orderful/droid 0.45.0 → 0.45.1

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.
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "droid",
11
11
  "description": "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows.",
12
- "version": "0.7.0",
12
+ "version": "0.7.1",
13
13
  "source": {
14
14
  "source": "github",
15
15
  "repo": "orderful/droid",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "AI-powered development tools for Claude Code",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -22,6 +22,7 @@
22
22
  "./src/tools/comments/skills/comments/SKILL.md",
23
23
  "./src/tools/droid/skills/droid/SKILL.md",
24
24
  "./src/tools/droid/skills/droid-bootstrap/SKILL.md",
25
+ "./src/tools/edi-schema/skills/edi-schema/SKILL.md",
25
26
  "./src/tools/meeting/skills/meeting/SKILL.md",
26
27
  "./src/tools/plan/skills/plan/SKILL.md",
27
28
  "./src/tools/project/skills/project/SKILL.md",
@@ -38,6 +39,7 @@
38
39
  "./src/tools/codex/commands/codex.md",
39
40
  "./src/tools/comments/commands/comments.md",
40
41
  "./src/tools/droid/commands/setup.md",
42
+ "./src/tools/edi-schema/commands/edi-schema.md",
41
43
  "./src/tools/meeting/commands/meeting.md",
42
44
  "./src/tools/plan/commands/plan.md",
43
45
  "./src/tools/project/commands/project.md",
@@ -52,6 +54,7 @@
52
54
  "./src/tools/code-review/agents/error-handling-reviewer.md",
53
55
  "./src/tools/code-review/agents/test-coverage-analyzer.md",
54
56
  "./src/tools/code-review/agents/type-reviewer.md",
55
- "./src/tools/codex/agents/codex-document-processor.md"
57
+ "./src/tools/codex/agents/codex-document-processor.md",
58
+ "./src/tools/edi-schema/agents/edi-schema-agent.md"
56
59
  ]
57
60
  }
@@ -148,7 +148,6 @@ jobs:
148
148
  id: implement
149
149
  uses: anthropics/claude-code-action@v1
150
150
  with:
151
- github_token: ${{ github.token }}
152
151
  claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
153
152
  track_progress: true
154
153
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @orderful/droid
2
2
 
3
+ ## 0.45.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#289](https://github.com/Orderful/droid/pull/289) [`f6e43e5`](https://github.com/Orderful/droid/commit/f6e43e52069e53cb8c4000455e46b04ddd515ea8) Thanks [@claude](https://github.com/apps/claude)! - droid: add alwaysApply: true to droid-bootstrap and droid skills so update awareness and tool discovery load every session
8
+
9
+ - [#291](https://github.com/Orderful/droid/pull/291) [`b5819c2`](https://github.com/Orderful/droid/commit/b5819c254dabd51bb1e85e423e3163d057d502e3) Thanks [@frytyler](https://github.com/frytyler)! - add new `edi-schema` tool with skill, command, and specialized sub-agent for querying X12/EDIFACT schemas using targeted extraction strategies
10
+
3
11
  ## 0.45.0
4
12
 
5
13
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,6 +1,6 @@
1
1
  name: droid
2
2
  description: "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows."
3
- version: 0.7.0
3
+ version: 0.7.1
4
4
  status: beta
5
5
 
6
6
  # System tool - always stays current regardless of auto-update settings
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: droid
3
3
  description: "Core droid meta-skill for updates, tool discovery, usage help, and skill overrides. Use when checking for droid updates, discovering available tools, answering 'how do I...' questions about droid workflows, or customizing skill behaviour. User prompts like 'any droid updates?', 'what tools do I have?', 'what tools do you have?', 'remind me what tools you have', 'hey droid what can you do', 'how do I add context?', 'remind me how to use codex', 'what's the best way to start a session?', 'customize brain search', 'create an override for brain'."
4
+ alwaysApply: true
4
5
  allowed-tools: [Bash, Read, Write]
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: droid-bootstrap
3
3
  description: "Lightweight droid bootstrap for update awareness. Checks for droid updates once per session."
4
+ alwaysApply: true
4
5
  allowed-tools: [Bash]
5
6
  ---
6
7
 
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "droid-edi-schema",
3
+ "version": "0.1.0",
4
+ "description": "Query EDI schemas without context overhead. Uses a sub-agent to inspect large schema and code-list files, then returns concise results.",
5
+ "author": {
6
+ "name": "Orderful",
7
+ "url": "https://github.com/orderful"
8
+ },
9
+ "repository": "https://github.com/orderful/droid",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "droid",
13
+ "ai",
14
+ "edi-schema"
15
+ ],
16
+ "skills": [
17
+ "./skills/edi-schema/SKILL.md"
18
+ ],
19
+ "commands": [
20
+ "./commands/edi-schema.md"
21
+ ],
22
+ "agents": [
23
+ "./agents/edi-schema-agent.md"
24
+ ]
25
+ }
@@ -0,0 +1,29 @@
1
+ name: edi-schema
2
+ description: "Query EDI schemas without context overhead. Uses a sub-agent to inspect large schema and code-list files, then returns concise results."
3
+ version: 0.1.0
4
+ status: beta
5
+
6
+ includes:
7
+ skills:
8
+ - name: edi-schema
9
+ required: true
10
+ commands:
11
+ - name: edi-schema
12
+ is_alias: false
13
+ agents:
14
+ - edi-schema-agent
15
+
16
+ dependencies: []
17
+
18
+ prerequisites:
19
+ - name: jq
20
+ description: JSON query tool used for targeted schema extraction
21
+ check: "jq --version"
22
+ install_hint: "brew install jq"
23
+
24
+ config_schema:
25
+ schemas_dir:
26
+ type: string
27
+ description: "Optional absolute path to a repository containing libs/schemas/. If empty, auto-detect from current workspace."
28
+ required: false
29
+ default: ""
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: edi-schema-agent
3
+ description: "Specialized EDI schema query agent. Uses jq and targeted reads to extract precise schema details with minimal output."
4
+ tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Bash
9
+ color: blue
10
+ ---
11
+
12
+ You are an EDI schema analysis agent. Your job is to query large schema files and return concise, accurate findings.
13
+
14
+ ## Inputs
15
+
16
+ You will receive:
17
+
18
+ 1. `schemasRoot`: Absolute repo path containing `libs/schemas/src/lib/data`
19
+ 2. `mode`: One of `field-search`, `segments`, `loops`, `codes`, `versions`, `types`
20
+ 3. `transactionType`: Full or short transaction type identifier
21
+ 4. `schemaFile` (optional): Resolved schema file path for schema-specific modes
22
+ 5. `query` (optional): Search text for `field-search`
23
+ 6. `elementId` (optional): Element identifier for `codes`
24
+
25
+ ## Rules
26
+
27
+ - Prioritize correctness over broad output.
28
+ - Never output full JSON blobs.
29
+ - Keep returned content compact and actionable.
30
+ - Prefer jq for extraction. If jq is missing, use `rg` + targeted reads.
31
+
32
+ ## Query Strategies
33
+
34
+ ### `field-search`
35
+
36
+ Run exact identifier and title-first queries before fuzzy search:
37
+
38
+ ```bash
39
+ jq '.. | objects | select(.elementIdentifier? == $id)' --arg id "{query}" "{schemaFile}"
40
+ jq '.. | objects | select(.title? == $title)' --arg title "{query}" "{schemaFile}"
41
+ jq '.. | objects | select(.title? | test($q; "i"))' --arg q "{query}" "{schemaFile}"
42
+ ```
43
+
44
+ Return top matches including:
45
+
46
+ - `elementIdentifier` (if present)
47
+ - `title`
48
+ - `schemaType`
49
+ - `X12Requirement` / relevant requirement field
50
+ - a concise path hint when derivable
51
+
52
+ ### `segments`
53
+
54
+ ```bash
55
+ jq '[.. | objects | select(.schemaType? == "segmentInstance") | {title, requirement: .X12Requirement}] | unique' "{schemaFile}"
56
+ ```
57
+
58
+ Return deduplicated segment names and requirement info.
59
+
60
+ ### `loops`
61
+
62
+ ```bash
63
+ jq '[.. | objects | select(.schemaType? | test("loop")) | {title, schemaType}]' "{schemaFile}"
64
+ ```
65
+
66
+ Return loop hierarchy summary. Include parent-child nesting hints if visible.
67
+
68
+ ### `codes`
69
+
70
+ Find likely code-list file (for example `x12_004010_codeList.json`), then:
71
+
72
+ ```bash
73
+ jq --arg id "{elementId}" '.[$id]' "{codeListFile}"
74
+ ```
75
+
76
+ Return code values and descriptions. If no entry exists, return "not found" and suggest checking identifier/version.
77
+
78
+ ### `versions`
79
+
80
+ List available schema filenames matching type in x12 + edifact directories, then normalize to type/version list.
81
+
82
+ ### `types`
83
+
84
+ Read `transactionTypes.json` and return a concise sorted list (or filtered list if query provided).
85
+
86
+ ## Output Format
87
+
88
+ Respond in markdown with this structure:
89
+
90
+ 1. `Resolved:` line (type/version and file used)
91
+ 2. `Results:` compact bullets or table
92
+ 3. `Notes:` any ambiguity, fallbacks, or missing data
93
+
94
+ If no match:
95
+
96
+ - state that clearly
97
+ - provide 2-5 nearest alternatives when possible
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: edi-schema
3
+ description: "Query EDI schemas (X12/EDIFACT) without context blowup. Find fields, segments, loops, and code-list values."
4
+ argument-hint: "{transactionType|types|versions {transactionType}} [{query|--segments|--loops|--codes {elementId}}]"
5
+ ---
6
+
7
+ # /edi-schema
8
+
9
+ **User invoked:** `/edi-schema $ARGUMENTS`
10
+
11
+ **Your task:** Invoke the **edi-schema skill** with these arguments.
12
+
13
+ ## Examples
14
+
15
+ - `/edi-schema 944_004010 freeFormDescription`
16
+ - `/edi-schema 850 --segments`
17
+ - `/edi-schema 856_004010 --loops`
18
+ - `/edi-schema 850 --codes BEG01`
19
+ - `/edi-schema types`
20
+ - `/edi-schema versions 850`
21
+
22
+ ## Quick Reference
23
+
24
+ ```bash
25
+ /edi-schema {transactionType} {query} # Search fields/elements
26
+ /edi-schema {transactionType} --segments # List segment set
27
+ /edi-schema {transactionType} --loops # Show loop structure
28
+ /edi-schema {transactionType} --codes ID # Code-list values for element
29
+ /edi-schema types # List transaction types
30
+ /edi-schema versions {transactionType} # List available versions
31
+ ```
32
+
33
+ See the **edi-schema skill** for full behaviour and resolution rules.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: edi-schema
3
+ description: "Query EDI schemas without consuming parent context. Use when finding fields, loops, segments, requirements, or code-list values for X12/EDIFACT transaction types. User prompts like '/edi-schema 944_004010 freeFormDescription' or '/edi-schema 850 --codes BEG01'."
4
+ argument-hint: "{transactionType|types|versions {transactionType}} [{query|--segments|--loops|--codes {elementId}}]"
5
+ allowed-tools: [Read, Glob, Grep, Bash, Task]
6
+ ---
7
+
8
+ # EDI Schema Skill
9
+
10
+ Query EDI schemas through a sub-agent so large schema JSON files never enter parent context.
11
+
12
+ ## Commands
13
+
14
+ ```bash
15
+ /edi-schema {transactionType} {query}
16
+ /edi-schema {transactionType} --segments
17
+ /edi-schema {transactionType} --loops
18
+ /edi-schema {transactionType} --codes {elementId}
19
+ /edi-schema types
20
+ /edi-schema versions {transactionType}
21
+ ```
22
+
23
+ ## Input Rules
24
+
25
+ - `transactionType` accepts either full form (`850_004010`, `ORDERS_D96A`) or short form (`850`, `ORDERS`).
26
+ - If short form is used, resolve to the most common version and state which version was selected.
27
+ - If multiple plausible versions exist and no safe default is clear, show options and ask user to pick.
28
+
29
+ ## Data Sources
30
+
31
+ Expected paths in the target schemas repo:
32
+
33
+ - `libs/schemas/src/lib/data/transactionSchemas/x12/`
34
+ - `libs/schemas/src/lib/data/transactionSchemas/edifact/`
35
+ - `libs/schemas/src/lib/data/codeLists/`
36
+ - `libs/schemas/src/lib/data/transactionTypes.json`
37
+
38
+ ## Procedure
39
+
40
+ ### 1. Resolve schemas root
41
+
42
+ 1. Check `droid config --get tools.edi-schema.schemas_dir`.
43
+ 2. If configured and valid, use it.
44
+ 3. Otherwise auto-detect from current workspace by finding `libs/schemas/src/lib/data/`.
45
+ 4. If not found, ask user for the repo path or suggest setting `tools.edi-schema.schemas_dir`.
46
+
47
+ ### 2. Route command
48
+
49
+ - `types`:
50
+ - List transaction types from `transactionTypes.json` (type + description where available).
51
+ - `versions {transactionType}`:
52
+ - List matching schema versions from x12/edifact schema filenames.
53
+ - `{transactionType} --segments`:
54
+ - Ask sub-agent for unique segment list and requirement indicators.
55
+ - `{transactionType} --loops`:
56
+ - Ask sub-agent for loop hierarchy.
57
+ - `{transactionType} --codes {elementId}`:
58
+ - Ask sub-agent for code-list values for the requested element ID.
59
+ - `{transactionType} {query}`:
60
+ - Ask sub-agent to search by identifier/title/business term and return best matches.
61
+
62
+ ### 3. Sub-agent handoff
63
+
64
+ Use `edi-schema-agent` for all schema/content queries. Pass:
65
+
66
+ - Resolved schemas root
67
+ - Resolved schema file path + transaction type/version
68
+ - Query mode (`field-search`, `segments`, `loops`, `codes`, `versions`, `types`)
69
+ - User input (`query`, `elementId`)
70
+
71
+ ### 4. Response format
72
+
73
+ Keep responses compact and structured:
74
+
75
+ - Header with resolved schema (`850_004010`, etc.)
76
+ - Result table or bullets with identifiers and titles
77
+ - Requirement/type constraints where relevant
78
+ - Path hints (loop/segment path) when available
79
+ - Clear next step if no matches
80
+
81
+ ## Behaviour Rules
82
+
83
+ - Never dump the entire schema JSON.
84
+ - Prefer exact identifier match first (for example `BEG01`) before fuzzy title matching.
85
+ - When no exact match, return top fuzzy matches with confidence notes.
86
+ - If jq is unavailable, fall back to `rg`/targeted reads and state that fallback was used.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderful/droid",
3
- "version": "0.45.0",
3
+ "version": "0.45.1",
4
4
  "description": "AI workflow toolkit for sharing skills, commands, and agents across the team",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,6 +1,6 @@
1
1
  name: droid
2
2
  description: "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows."
3
- version: 0.7.0
3
+ version: 0.7.1
4
4
  status: beta
5
5
 
6
6
  # System tool - always stays current regardless of auto-update settings
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: droid
3
3
  description: "Core droid meta-skill for updates, tool discovery, usage help, and skill overrides. Use when checking for droid updates, discovering available tools, answering 'how do I...' questions about droid workflows, or customizing skill behaviour. User prompts like 'any droid updates?', 'what tools do I have?', 'what tools do you have?', 'remind me what tools you have', 'hey droid what can you do', 'how do I add context?', 'remind me how to use codex', 'what's the best way to start a session?', 'customize brain search', 'create an override for brain'."
4
+ alwaysApply: true
4
5
  allowed-tools: [Bash, Read, Write]
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: droid-bootstrap
3
3
  description: "Lightweight droid bootstrap for update awareness. Checks for droid updates once per session."
4
+ alwaysApply: true
4
5
  allowed-tools: [Bash]
5
6
  ---
6
7
 
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "droid-edi-schema",
3
+ "version": "0.1.0",
4
+ "description": "Query EDI schemas without context overhead. Uses a sub-agent to inspect large schema and code-list files, then returns concise results.",
5
+ "author": {
6
+ "name": "Orderful",
7
+ "url": "https://github.com/orderful"
8
+ },
9
+ "repository": "https://github.com/orderful/droid",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "droid",
13
+ "ai",
14
+ "edi-schema"
15
+ ],
16
+ "skills": [
17
+ "./skills/edi-schema/SKILL.md"
18
+ ],
19
+ "commands": [
20
+ "./commands/edi-schema.md"
21
+ ],
22
+ "agents": [
23
+ "./agents/edi-schema-agent.md"
24
+ ]
25
+ }
@@ -0,0 +1,29 @@
1
+ name: edi-schema
2
+ description: "Query EDI schemas without context overhead. Uses a sub-agent to inspect large schema and code-list files, then returns concise results."
3
+ version: 0.1.0
4
+ status: beta
5
+
6
+ includes:
7
+ skills:
8
+ - name: edi-schema
9
+ required: true
10
+ commands:
11
+ - name: edi-schema
12
+ is_alias: false
13
+ agents:
14
+ - edi-schema-agent
15
+
16
+ dependencies: []
17
+
18
+ prerequisites:
19
+ - name: jq
20
+ description: JSON query tool used for targeted schema extraction
21
+ check: "jq --version"
22
+ install_hint: "brew install jq"
23
+
24
+ config_schema:
25
+ schemas_dir:
26
+ type: string
27
+ description: "Optional absolute path to a repository containing libs/schemas/. If empty, auto-detect from current workspace."
28
+ required: false
29
+ default: ""
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: edi-schema-agent
3
+ description: "Specialized EDI schema query agent. Uses jq and targeted reads to extract precise schema details with minimal output."
4
+ tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ - Bash
9
+ color: blue
10
+ ---
11
+
12
+ You are an EDI schema analysis agent. Your job is to query large schema files and return concise, accurate findings.
13
+
14
+ ## Inputs
15
+
16
+ You will receive:
17
+
18
+ 1. `schemasRoot`: Absolute repo path containing `libs/schemas/src/lib/data`
19
+ 2. `mode`: One of `field-search`, `segments`, `loops`, `codes`, `versions`, `types`
20
+ 3. `transactionType`: Full or short transaction type identifier
21
+ 4. `schemaFile` (optional): Resolved schema file path for schema-specific modes
22
+ 5. `query` (optional): Search text for `field-search`
23
+ 6. `elementId` (optional): Element identifier for `codes`
24
+
25
+ ## Rules
26
+
27
+ - Prioritize correctness over broad output.
28
+ - Never output full JSON blobs.
29
+ - Keep returned content compact and actionable.
30
+ - Prefer jq for extraction. If jq is missing, use `rg` + targeted reads.
31
+
32
+ ## Query Strategies
33
+
34
+ ### `field-search`
35
+
36
+ Run exact identifier and title-first queries before fuzzy search:
37
+
38
+ ```bash
39
+ jq '.. | objects | select(.elementIdentifier? == $id)' --arg id "{query}" "{schemaFile}"
40
+ jq '.. | objects | select(.title? == $title)' --arg title "{query}" "{schemaFile}"
41
+ jq '.. | objects | select(.title? | test($q; "i"))' --arg q "{query}" "{schemaFile}"
42
+ ```
43
+
44
+ Return top matches including:
45
+
46
+ - `elementIdentifier` (if present)
47
+ - `title`
48
+ - `schemaType`
49
+ - `X12Requirement` / relevant requirement field
50
+ - a concise path hint when derivable
51
+
52
+ ### `segments`
53
+
54
+ ```bash
55
+ jq '[.. | objects | select(.schemaType? == "segmentInstance") | {title, requirement: .X12Requirement}] | unique' "{schemaFile}"
56
+ ```
57
+
58
+ Return deduplicated segment names and requirement info.
59
+
60
+ ### `loops`
61
+
62
+ ```bash
63
+ jq '[.. | objects | select(.schemaType? | test("loop")) | {title, schemaType}]' "{schemaFile}"
64
+ ```
65
+
66
+ Return loop hierarchy summary. Include parent-child nesting hints if visible.
67
+
68
+ ### `codes`
69
+
70
+ Find likely code-list file (for example `x12_004010_codeList.json`), then:
71
+
72
+ ```bash
73
+ jq --arg id "{elementId}" '.[$id]' "{codeListFile}"
74
+ ```
75
+
76
+ Return code values and descriptions. If no entry exists, return "not found" and suggest checking identifier/version.
77
+
78
+ ### `versions`
79
+
80
+ List available schema filenames matching type in x12 + edifact directories, then normalize to type/version list.
81
+
82
+ ### `types`
83
+
84
+ Read `transactionTypes.json` and return a concise sorted list (or filtered list if query provided).
85
+
86
+ ## Output Format
87
+
88
+ Respond in markdown with this structure:
89
+
90
+ 1. `Resolved:` line (type/version and file used)
91
+ 2. `Results:` compact bullets or table
92
+ 3. `Notes:` any ambiguity, fallbacks, or missing data
93
+
94
+ If no match:
95
+
96
+ - state that clearly
97
+ - provide 2-5 nearest alternatives when possible
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: edi-schema
3
+ description: "Query EDI schemas (X12/EDIFACT) without context blowup. Find fields, segments, loops, and code-list values."
4
+ argument-hint: "{transactionType|types|versions {transactionType}} [{query|--segments|--loops|--codes {elementId}}]"
5
+ ---
6
+
7
+ # /edi-schema
8
+
9
+ **User invoked:** `/edi-schema $ARGUMENTS`
10
+
11
+ **Your task:** Invoke the **edi-schema skill** with these arguments.
12
+
13
+ ## Examples
14
+
15
+ - `/edi-schema 944_004010 freeFormDescription`
16
+ - `/edi-schema 850 --segments`
17
+ - `/edi-schema 856_004010 --loops`
18
+ - `/edi-schema 850 --codes BEG01`
19
+ - `/edi-schema types`
20
+ - `/edi-schema versions 850`
21
+
22
+ ## Quick Reference
23
+
24
+ ```bash
25
+ /edi-schema {transactionType} {query} # Search fields/elements
26
+ /edi-schema {transactionType} --segments # List segment set
27
+ /edi-schema {transactionType} --loops # Show loop structure
28
+ /edi-schema {transactionType} --codes ID # Code-list values for element
29
+ /edi-schema types # List transaction types
30
+ /edi-schema versions {transactionType} # List available versions
31
+ ```
32
+
33
+ See the **edi-schema skill** for full behaviour and resolution rules.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: edi-schema
3
+ description: "Query EDI schemas without consuming parent context. Use when finding fields, loops, segments, requirements, or code-list values for X12/EDIFACT transaction types. User prompts like '/edi-schema 944_004010 freeFormDescription' or '/edi-schema 850 --codes BEG01'."
4
+ argument-hint: "{transactionType|types|versions {transactionType}} [{query|--segments|--loops|--codes {elementId}}]"
5
+ allowed-tools: [Read, Glob, Grep, Bash, Task]
6
+ ---
7
+
8
+ # EDI Schema Skill
9
+
10
+ Query EDI schemas through a sub-agent so large schema JSON files never enter parent context.
11
+
12
+ ## Commands
13
+
14
+ ```bash
15
+ /edi-schema {transactionType} {query}
16
+ /edi-schema {transactionType} --segments
17
+ /edi-schema {transactionType} --loops
18
+ /edi-schema {transactionType} --codes {elementId}
19
+ /edi-schema types
20
+ /edi-schema versions {transactionType}
21
+ ```
22
+
23
+ ## Input Rules
24
+
25
+ - `transactionType` accepts either full form (`850_004010`, `ORDERS_D96A`) or short form (`850`, `ORDERS`).
26
+ - If short form is used, resolve to the most common version and state which version was selected.
27
+ - If multiple plausible versions exist and no safe default is clear, show options and ask user to pick.
28
+
29
+ ## Data Sources
30
+
31
+ Expected paths in the target schemas repo:
32
+
33
+ - `libs/schemas/src/lib/data/transactionSchemas/x12/`
34
+ - `libs/schemas/src/lib/data/transactionSchemas/edifact/`
35
+ - `libs/schemas/src/lib/data/codeLists/`
36
+ - `libs/schemas/src/lib/data/transactionTypes.json`
37
+
38
+ ## Procedure
39
+
40
+ ### 1. Resolve schemas root
41
+
42
+ 1. Check `droid config --get tools.edi-schema.schemas_dir`.
43
+ 2. If configured and valid, use it.
44
+ 3. Otherwise auto-detect from current workspace by finding `libs/schemas/src/lib/data/`.
45
+ 4. If not found, ask user for the repo path or suggest setting `tools.edi-schema.schemas_dir`.
46
+
47
+ ### 2. Route command
48
+
49
+ - `types`:
50
+ - List transaction types from `transactionTypes.json` (type + description where available).
51
+ - `versions {transactionType}`:
52
+ - List matching schema versions from x12/edifact schema filenames.
53
+ - `{transactionType} --segments`:
54
+ - Ask sub-agent for unique segment list and requirement indicators.
55
+ - `{transactionType} --loops`:
56
+ - Ask sub-agent for loop hierarchy.
57
+ - `{transactionType} --codes {elementId}`:
58
+ - Ask sub-agent for code-list values for the requested element ID.
59
+ - `{transactionType} {query}`:
60
+ - Ask sub-agent to search by identifier/title/business term and return best matches.
61
+
62
+ ### 3. Sub-agent handoff
63
+
64
+ Use `edi-schema-agent` for all schema/content queries. Pass:
65
+
66
+ - Resolved schemas root
67
+ - Resolved schema file path + transaction type/version
68
+ - Query mode (`field-search`, `segments`, `loops`, `codes`, `versions`, `types`)
69
+ - User input (`query`, `elementId`)
70
+
71
+ ### 4. Response format
72
+
73
+ Keep responses compact and structured:
74
+
75
+ - Header with resolved schema (`850_004010`, etc.)
76
+ - Result table or bullets with identifiers and titles
77
+ - Requirement/type constraints where relevant
78
+ - Path hints (loop/segment path) when available
79
+ - Clear next step if no matches
80
+
81
+ ## Behaviour Rules
82
+
83
+ - Never dump the entire schema JSON.
84
+ - Prefer exact identifier match first (for example `BEG01`) before fuzzy title matching.
85
+ - When no exact match, return top fuzzy matches with confidence notes.
86
+ - If jq is unavailable, fall back to `rg`/targeted reads and state that fallback was used.