k-harness 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 +4 -2
  2. package/package.json +1 -1
  3. package/src/init.js +85 -20
package/README.md CHANGED
@@ -29,13 +29,14 @@ npx k-harness init --ide cursor
29
29
  npx k-harness init --ide codex
30
30
  npx k-harness init --ide windsurf
31
31
  npx k-harness init --ide augment
32
+ npx k-harness init --ide antigravity
32
33
  ```
33
34
 
34
35
  ### Options
35
36
 
36
37
  | Flag | Description |
37
38
  |------|-------------|
38
- | `--ide <name>` | Target IDE: `vscode`, `claude`, `cursor`, `codex`, `windsurf`, `augment` |
39
+ | `--ide <name>` | Target IDE: `vscode`, `claude`, `cursor`, `codex`, `windsurf`, `augment`, `antigravity` |
39
40
  | `--dir <path>` | Target directory (default: current directory) |
40
41
  | `--overwrite` | Overwrite existing files |
41
42
 
@@ -48,7 +49,8 @@ npx k-harness init --ide augment
48
49
  | **Cursor** | `.cursor/rules/core.mdc` | `.cursor/rules/*.mdc` | `.cursor/rules/*.mdc` | `.cursor/rules/*.mdc` |
49
50
  | **Codex** | `AGENTS.md` | (merged into AGENTS.md) | `.agents/skills/*/SKILL.md` | (merged into AGENTS.md) |
50
51
  | **Windsurf** | `.windsurfrules` | (merged) | (merged) | (merged) |
51
- | **Augment Code** | `.augment/rules/core.md` | `.augment/rules/*.md` | `.augment/rules/*.md` | `.augment/rules/*.md` |
52
+ | **Augment Code** | `.augment/rules/core.md` | `.augment/rules/*.md` | `.augment/skills/*/SKILL.md` | `.augment/skills/*/SKILL.md` |
53
+ | **Google Antigravity** | `.agent/rules/core.md` | `.agent/rules/*.md` | `.agent/skills/*/SKILL.md` | `.agent/skills/*/SKILL.md` |
52
54
 
53
55
  All IDEs also get `project-state.md`, `failure-patterns.md`, `features.md`, and `project-brief.md` at the project root.
54
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k-harness",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "LLM Development Harness — IDE-agnostic rules, skills, and agents that prevent common AI coding failures",
5
5
  "keywords": [
6
6
  "llm",
package/src/init.js CHANGED
@@ -230,28 +230,92 @@ function generateAugment(targetDir, overwrite) {
230
230
  backendRules;
231
231
  writeFile(targetDir, '.augment/rules/backend.md', backendRule, overwrite);
232
232
 
233
- // Skills as Auto rules
234
- const skills = ['test-integrity', 'security-checklist', 'investigate', 'impact-analysis', 'feature-breakdown'];
233
+ // .augment/skills/ SKILL.md format (enables / slash commands)
234
+ const skills = [
235
+ { id: 'test-integrity', desc: 'Ensure test mocks stay synchronized when interfaces change. Use when modifying repository or service interfaces.' },
236
+ { id: 'security-checklist', desc: 'Security risk inspection before commits. Use when reviewing code for security issues.' },
237
+ { id: 'investigate', desc: 'Investigate and diagnose issues. Use when debugging or analyzing unexpected behavior.' },
238
+ { id: 'impact-analysis', desc: 'Assess change blast radius. Use when modifying shared modules or interfaces.' },
239
+ { id: 'feature-breakdown', desc: 'Break down features into implementable stories. Use when planning new features.' },
240
+ ];
235
241
  for (const skill of skills) {
236
- const content = readTemplate(`skills/${skill}.md`);
237
- const rule =
238
- `---\ndescription: Skill — ${skill}\ntype: manual\n---\n\n` +
242
+ const content = readTemplate(`skills/${skill.id}.md`);
243
+ const skillMd =
244
+ `---\nname: ${skill.id}\ndescription: '${skill.desc}'\n---\n\n` +
239
245
  content;
240
- writeFile(targetDir, `.augment/rules/${skill}.md`, rule, overwrite);
246
+ writeFile(targetDir, `.augment/skills/${skill.id}/SKILL.md`, skillMd, overwrite);
241
247
  }
242
248
 
243
- // Agents as Manual rules
249
+ // Agents as skills (invokable via / commands)
244
250
  const agents = [
245
- { name: 'reviewer', file: 'agents/reviewer.md' },
246
- { name: 'sprint-manager', file: 'agents/sprint-manager.md' },
247
- { name: 'planner', file: 'agents/planner.md' },
251
+ { id: 'reviewer', file: 'agents/reviewer.md', desc: 'Code review + auto-fix. Validates quality, security, and test integrity before commits.' },
252
+ { id: 'sprint-manager', file: 'agents/sprint-manager.md', desc: 'Sprint/Story state tracking, next task guidance, scope drift prevention.' },
253
+ { id: 'planner', file: 'agents/planner.md', desc: 'Feature planning and dependency management. Analyze architecture, break down features.' },
254
+ ];
255
+ for (const agent of agents) {
256
+ const content = readTemplate(agent.file);
257
+ const skillMd =
258
+ `---\nname: ${agent.id}\ndescription: '${agent.desc}'\n---\n\n` +
259
+ content;
260
+ writeFile(targetDir, `.augment/skills/${agent.id}/SKILL.md`, skillMd, overwrite);
261
+ }
262
+
263
+ // State files
264
+ writeFile(targetDir, 'project-state.md', readTemplate('project-state.md'), overwrite);
265
+ writeFile(targetDir, 'failure-patterns.md', readTemplate('failure-patterns.md'), overwrite);
266
+ writeFile(targetDir, 'dependency-map.md', readTemplate('dependency-map.md'), overwrite);
267
+ writeFile(targetDir, 'features.md', readTemplate('features.md'), overwrite);
268
+ writeFile(targetDir, 'project-brief.md', readTemplate('project-brief.md'), overwrite);
269
+ }
270
+
271
+ function generateAntigravity(targetDir, overwrite) {
272
+ // .agent/rules/ — Always-type rules (same as Augment format, read by Antigravity)
273
+ const coreRules = readTemplate('core-rules.md');
274
+ const coreRule =
275
+ '---\ndescription: Core project rules — Iron Laws, completion protocol, concreteness\ntype: always\n---\n\n' +
276
+ coreRules;
277
+ writeFile(targetDir, '.agent/rules/core.md', coreRule, overwrite);
278
+
279
+ const testingRules = readTemplate('testing-rules.md');
280
+ const testingRule =
281
+ '---\ndescription: Testing rules — mock sync, forbidden patterns\ntype: auto\nglobs: "**/*.test.*,**/*.spec.*,**/__mocks__/**,**/__tests__/**"\n---\n\n' +
282
+ testingRules;
283
+ writeFile(targetDir, '.agent/rules/testing.md', testingRule, overwrite);
284
+
285
+ const backendRules = readTemplate('backend-rules.md');
286
+ const backendRule =
287
+ '---\ndescription: Backend code rules — architecture enforcement, type safety\ntype: auto\nglobs: "src/**/*.ts,src/**/*.js"\n---\n\n' +
288
+ backendRules;
289
+ writeFile(targetDir, '.agent/rules/backend.md', backendRule, overwrite);
290
+
291
+ // .agent/skills/ — SKILL.md format (enables / slash commands)
292
+ const skills = [
293
+ { id: 'test-integrity', desc: 'Ensure test mocks stay synchronized when interfaces change. Use when modifying repository or service interfaces.' },
294
+ { id: 'security-checklist', desc: 'Security risk inspection before commits. Use when reviewing code for security issues.' },
295
+ { id: 'investigate', desc: 'Investigate and diagnose issues. Use when debugging or analyzing unexpected behavior.' },
296
+ { id: 'impact-analysis', desc: 'Assess change blast radius. Use when modifying shared modules or interfaces.' },
297
+ { id: 'feature-breakdown', desc: 'Break down features into implementable stories. Use when planning new features.' },
298
+ ];
299
+ for (const skill of skills) {
300
+ const content = readTemplate(`skills/${skill.id}.md`);
301
+ const skillMd =
302
+ `---\nname: ${skill.id}\ndescription: '${skill.desc}'\n---\n\n` +
303
+ content;
304
+ writeFile(targetDir, `.agent/skills/${skill.id}/SKILL.md`, skillMd, overwrite);
305
+ }
306
+
307
+ // Agents as skills (invokable via / commands)
308
+ const agents = [
309
+ { id: 'reviewer', file: 'agents/reviewer.md', desc: 'Code review + auto-fix. Validates quality, security, and test integrity before commits.' },
310
+ { id: 'sprint-manager', file: 'agents/sprint-manager.md', desc: 'Sprint/Story state tracking, next task guidance, scope drift prevention.' },
311
+ { id: 'planner', file: 'agents/planner.md', desc: 'Feature planning and dependency management. Analyze architecture, break down features.' },
248
312
  ];
249
313
  for (const agent of agents) {
250
314
  const content = readTemplate(agent.file);
251
- const rule =
252
- `---\ndescription: Agent — ${agent.name}\ntype: manual\n---\n\n` +
315
+ const skillMd =
316
+ `---\nname: ${agent.id}\ndescription: '${agent.desc}'\n---\n\n` +
253
317
  content;
254
- writeFile(targetDir, `.augment/rules/${agent.name}.md`, rule, overwrite);
318
+ writeFile(targetDir, `.agent/skills/${agent.id}/SKILL.md`, skillMd, overwrite);
255
319
  }
256
320
 
257
321
  // State files
@@ -264,12 +328,13 @@ function generateAugment(targetDir, overwrite) {
264
328
 
265
329
  // ─── IDE registry ────────────────────────────────────────────
266
330
  const GENERATORS = {
267
- vscode: { name: 'VS Code Copilot', fn: generateVscode },
268
- claude: { name: 'Claude Code', fn: generateClaude },
269
- cursor: { name: 'Cursor', fn: generateCursor },
270
- codex: { name: 'Codex (OpenAI)', fn: generateCodex },
271
- windsurf: { name: 'Windsurf', fn: generateWindsurf },
272
- augment: { name: 'Augment Code', fn: generateAugment },
331
+ vscode: { name: 'VS Code Copilot', fn: generateVscode },
332
+ claude: { name: 'Claude Code', fn: generateClaude },
333
+ cursor: { name: 'Cursor', fn: generateCursor },
334
+ codex: { name: 'Codex (OpenAI)', fn: generateCodex },
335
+ windsurf: { name: 'Windsurf', fn: generateWindsurf },
336
+ augment: { name: 'Augment Code', fn: generateAugment },
337
+ antigravity: { name: 'Google Antigravity', fn: generateAntigravity },
273
338
  };
274
339
 
275
340
  // ─── Interactive prompt ──────────────────────────────────────
@@ -309,7 +374,7 @@ function showHelp() {
309
374
  npx k-harness init [options]
310
375
 
311
376
  Options:
312
- --ide <name> IDE target: vscode, claude, cursor, codex, windsurf, augment
377
+ --ide <name> IDE target: vscode, claude, cursor, codex, windsurf, augment, antigravity
313
378
  --dir <path> Target directory (default: current directory)
314
379
  --overwrite Overwrite existing files
315
380
  --help Show this help