@hyphaene/hexa-ts-kit 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/LICENSE +21 -0
- package/README.md +169 -0
- package/bin/hexa-ts-mcp.js +2 -0
- package/bin/hexa-ts.js +2 -0
- package/dist/chunk-56VIQG3N.js +1434 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +26 -0
- package/dist/mcp-server.d.ts +1 -0
- package/dist/mcp-server.js +104 -0
- package/package.json +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 hyphaene
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# hexa-ts-kit
|
|
2
|
+
|
|
3
|
+
TypeScript dev kit for Claude Code agents: architecture linting, scaffolding, and knowledge analysis.
|
|
4
|
+
|
|
5
|
+
Built for colocated feature architectures in Vue.js, NestJS, and Playwright projects.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @hyphaene/hexa-ts-kit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or use directly with npx:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @hyphaene/hexa-ts-kit lint
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### CLI
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Lint current directory
|
|
25
|
+
hexa-ts lint
|
|
26
|
+
|
|
27
|
+
# Lint only git-changed files (incremental mode)
|
|
28
|
+
hexa-ts lint --changed
|
|
29
|
+
|
|
30
|
+
# Filter by rule categories
|
|
31
|
+
hexa-ts lint --rules COL,NAM,VUE
|
|
32
|
+
|
|
33
|
+
# Analyze files to find matching knowledges
|
|
34
|
+
hexa-ts analyze src/domains/contracts/upload.composable.ts
|
|
35
|
+
|
|
36
|
+
# Analyze git-changed files
|
|
37
|
+
hexa-ts analyze --changed
|
|
38
|
+
|
|
39
|
+
# Scaffold a Vue feature
|
|
40
|
+
hexa-ts scaffold vue-feature src/domains/contracts/upload
|
|
41
|
+
|
|
42
|
+
# Scaffold a NestJS feature
|
|
43
|
+
hexa-ts scaffold nestjs-feature src/domains/orders/create
|
|
44
|
+
|
|
45
|
+
# Scaffold Playwright tests
|
|
46
|
+
hexa-ts scaffold playwright-feature e2e/checkout
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### MCP Server
|
|
50
|
+
|
|
51
|
+
Add to your Claude Code MCP configuration:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"mcpServers": {
|
|
56
|
+
"hexa-ts": {
|
|
57
|
+
"command": "hexa-ts-mcp"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Available MCP tools:
|
|
64
|
+
|
|
65
|
+
| Tool | Description |
|
|
66
|
+
| ---------- | ------------------------------------- |
|
|
67
|
+
| `lint` | Lint files for architecture rules |
|
|
68
|
+
| `analyze` | Map files to associated knowledges |
|
|
69
|
+
| `scaffold` | Generate colocated feature structures |
|
|
70
|
+
|
|
71
|
+
## Lint Rules
|
|
72
|
+
|
|
73
|
+
71 rules across 9 categories:
|
|
74
|
+
|
|
75
|
+
| Category | Prefix | Count | Focus |
|
|
76
|
+
| ------------ | ------ | ----- | ---------------------------------- |
|
|
77
|
+
| Colocation | COL | 12 | File placement and structure |
|
|
78
|
+
| Naming | NAM | 12 | File and export naming conventions |
|
|
79
|
+
| Vue | VUE | 13 | Vue component patterns |
|
|
80
|
+
| Composable | CMP | 11 | Composable patterns |
|
|
81
|
+
| Rules | RUL | 12 | Business rules file patterns |
|
|
82
|
+
| Query | QRY | 8 | Query/API file patterns |
|
|
83
|
+
| Translations | TRN | 5 | i18n file patterns |
|
|
84
|
+
| TypeScript | TSP | 12 | TypeScript patterns |
|
|
85
|
+
| Domain | DOM | 4 | Domain boundary rules |
|
|
86
|
+
|
|
87
|
+
### Output Formats
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Console output (default)
|
|
91
|
+
hexa-ts lint
|
|
92
|
+
|
|
93
|
+
# JSON output (for agents)
|
|
94
|
+
hexa-ts lint --format json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Scaffold Templates
|
|
98
|
+
|
|
99
|
+
### Vue Feature
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
src/domains/{domain}/{feature}/
|
|
103
|
+
├── Feature.vue
|
|
104
|
+
├── feature.composable.ts
|
|
105
|
+
├── feature.rules.ts
|
|
106
|
+
├── feature.types.ts
|
|
107
|
+
├── feature.query.ts
|
|
108
|
+
├── feature.translations.ts
|
|
109
|
+
└── __tests__/
|
|
110
|
+
└── feature.rules.test.ts
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### NestJS Feature
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
src/domains/{domain}/{feature}/
|
|
117
|
+
├── feature.module.ts
|
|
118
|
+
├── feature.controller.ts
|
|
119
|
+
├── feature.service.ts
|
|
120
|
+
├── feature.types.ts
|
|
121
|
+
└── __tests__/
|
|
122
|
+
└── feature.controller.e2e.spec.ts
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Playwright Feature
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
e2e/{feature}/
|
|
129
|
+
├── feature.spec.ts
|
|
130
|
+
├── feature.page.ts
|
|
131
|
+
└── feature.fixtures.ts
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Knowledge Analysis
|
|
135
|
+
|
|
136
|
+
The `analyze` command maps files to knowledge documents based on file patterns:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
$ hexa-ts analyze upload.composable.ts
|
|
140
|
+
|
|
141
|
+
{
|
|
142
|
+
"success": true,
|
|
143
|
+
"files": ["upload.composable.ts"],
|
|
144
|
+
"mappings": [
|
|
145
|
+
{
|
|
146
|
+
"file": "upload.composable.ts",
|
|
147
|
+
"knowledges": ["vue-composable.knowledge.md"]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Knowledge files use frontmatter to declare their matching patterns:
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
---
|
|
157
|
+
name: vue-composable
|
|
158
|
+
match: "*.composable.ts"
|
|
159
|
+
---
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Requirements
|
|
163
|
+
|
|
164
|
+
- Node.js 20+
|
|
165
|
+
- Git (for `--changed` mode)
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT
|
package/bin/hexa-ts.js
ADDED