@zweer/dev 1.3.0 → 2.1.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 (132) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +68 -795
  3. package/configs/_biome.json +38 -0
  4. package/configs/commitlint.config.ts +1 -0
  5. package/configs/editorconfig +16 -0
  6. package/configs/lefthook.yml +38 -0
  7. package/configs/lockfile-lintrc.json +6 -0
  8. package/configs/npmpackagejsonlintrc.json +34 -0
  9. package/configs/tsconfig.json +9 -0
  10. package/configs/tsdown.config.ts +8 -0
  11. package/configs/vitest.config.ts +12 -0
  12. package/dist/index.d.mts +1 -0
  13. package/dist/index.mjs +247 -0
  14. package/dist/index.mjs.map +1 -0
  15. package/kiro/agents/zweer-setup.json +38 -0
  16. package/kiro/prompts/zweer-setup.md +55 -0
  17. package/kiro/skills/agent-template/SKILL.md +22 -0
  18. package/kiro/skills/agent-template/references/base.json +38 -0
  19. package/kiro/skills/agent-template/references/example-monorepo-library.json +60 -0
  20. package/kiro/skills/agent-template/references/example-webapp-vercel.json +54 -0
  21. package/kiro/skills/prompt-template/SKILL.md +23 -0
  22. package/kiro/skills/prompt-template/references/example-library.md +56 -0
  23. package/kiro/skills/prompt-template/references/example-webapp.md +57 -0
  24. package/kiro/skills/skill-templates/SKILL.md +23 -0
  25. package/kiro/skills/skill-templates/references/new-package.md +72 -0
  26. package/kiro/skills/steering-templates/SKILL.md +31 -0
  27. package/kiro/skills/steering-templates/references/build-tooling.md +62 -0
  28. package/kiro/skills/steering-templates/references/code-style.md +83 -0
  29. package/kiro/skills/steering-templates/references/commit-conventions.md +58 -0
  30. package/kiro/skills/steering-templates/references/interaction.md +41 -0
  31. package/kiro/skills/steering-templates/references/testing.md +61 -0
  32. package/kiro/steering/build-tooling.md +62 -0
  33. package/kiro/steering/code-style.md +83 -0
  34. package/kiro/steering/commit-conventions.md +58 -0
  35. package/kiro/steering/interaction.md +41 -0
  36. package/kiro/steering/testing.md +61 -0
  37. package/package.json +42 -57
  38. package/templates/monorepo/CHANGELOG.md +5 -0
  39. package/templates/monorepo/README.md +22 -0
  40. package/templates/monorepo/package.json +30 -0
  41. package/templates/monorepo/packages/core/CHANGELOG.md +5 -0
  42. package/templates/monorepo/packages/core/README.md +21 -0
  43. package/templates/monorepo/packages/core/package.json +28 -0
  44. package/templates/monorepo/packages/core/src/index.ts +3 -0
  45. package/templates/monorepo/packages/core/test/index.test.ts +9 -0
  46. package/templates/monorepo/tsdown.config.ts +12 -0
  47. package/templates/monorepo/vitest.config.ts +12 -0
  48. package/templates/single/CHANGELOG.md +5 -0
  49. package/templates/single/README.md +30 -0
  50. package/templates/single/package.json +38 -0
  51. package/templates/single/src/index.ts +3 -0
  52. package/templates/single/test/index.test.ts +9 -0
  53. package/templates/single/tsdown.config.ts +11 -0
  54. package/workflows/base/ci.yml +24 -0
  55. package/workflows/base/dependabot-auto-merge.yml +43 -0
  56. package/workflows/base/dependabot-post-update.yml +38 -0
  57. package/workflows/base/dependabot.yml +39 -0
  58. package/workflows/base/pr.yml +41 -0
  59. package/workflows/base/security.yml +25 -0
  60. package/workflows/docs/docs.yml +47 -0
  61. package/workflows/library/npm.yml +45 -0
  62. package/agents/data/zweer_data_engineer.md +0 -436
  63. package/agents/design/zweer_ui_designer.md +0 -171
  64. package/agents/design/zweer_ui_ux.md +0 -124
  65. package/agents/infrastructure/zweer_infra_cdk.md +0 -701
  66. package/agents/infrastructure/zweer_infra_devops.md +0 -148
  67. package/agents/infrastructure/zweer_infra_observability.md +0 -610
  68. package/agents/infrastructure/zweer_infra_terraform.md +0 -658
  69. package/agents/mobile/zweer_mobile_android.md +0 -636
  70. package/agents/mobile/zweer_mobile_flutter.md +0 -623
  71. package/agents/mobile/zweer_mobile_ionic.md +0 -550
  72. package/agents/mobile/zweer_mobile_ios.md +0 -504
  73. package/agents/mobile/zweer_mobile_react_native.md +0 -561
  74. package/agents/quality/zweer_qa_documentation.md +0 -202
  75. package/agents/quality/zweer_qa_performance.md +0 -160
  76. package/agents/quality/zweer_qa_security.md +0 -197
  77. package/agents/quality/zweer_qa_testing.md +0 -189
  78. package/agents/services/zweer_svc_api_gateway.md +0 -553
  79. package/agents/services/zweer_svc_containers.md +0 -575
  80. package/agents/services/zweer_svc_lambda.md +0 -373
  81. package/agents/services/zweer_svc_messaging.md +0 -543
  82. package/agents/services/zweer_svc_microservices.md +0 -502
  83. package/agents/web/zweer_web_api_integration.md +0 -500
  84. package/agents/web/zweer_web_backend.md +0 -358
  85. package/agents/web/zweer_web_database.md +0 -357
  86. package/agents/web/zweer_web_frontend.md +0 -375
  87. package/agents/web/zweer_web_reader.md +0 -229
  88. package/agents/write/zweer_write_content.md +0 -499
  89. package/agents/write/zweer_write_narrative.md +0 -409
  90. package/agents/write/zweer_write_style.md +0 -247
  91. package/agents/write/zweer_write_warmth.md +0 -282
  92. package/cli/commands/bootstrap.d.ts +0 -4
  93. package/cli/commands/bootstrap.js +0 -377
  94. package/cli/commands/cao/agent/create.d.ts +0 -25
  95. package/cli/commands/cao/agent/create.js +0 -221
  96. package/cli/commands/cao/agent/index.d.ts +0 -2
  97. package/cli/commands/cao/agent/index.js +0 -8
  98. package/cli/commands/cao/agent/list.d.ts +0 -3
  99. package/cli/commands/cao/agent/list.js +0 -29
  100. package/cli/commands/cao/agent/remove.d.ts +0 -5
  101. package/cli/commands/cao/agent/remove.js +0 -39
  102. package/cli/commands/cao/index.d.ts +0 -2
  103. package/cli/commands/cao/index.js +0 -20
  104. package/cli/commands/cao/install.d.ts +0 -10
  105. package/cli/commands/cao/install.js +0 -59
  106. package/cli/commands/cao/launch.d.ts +0 -3
  107. package/cli/commands/cao/launch.js +0 -21
  108. package/cli/commands/cao/list.d.ts +0 -6
  109. package/cli/commands/cao/list.js +0 -36
  110. package/cli/commands/cao/server.d.ts +0 -3
  111. package/cli/commands/cao/server.js +0 -20
  112. package/cli/commands/cao/status.d.ts +0 -2
  113. package/cli/commands/cao/status.js +0 -25
  114. package/cli/commands/cao/sync.d.ts +0 -6
  115. package/cli/commands/cao/sync.js +0 -52
  116. package/cli/commands/cao/uninstall.d.ts +0 -2
  117. package/cli/commands/cao/uninstall.js +0 -16
  118. package/cli/commands/setup.d.ts +0 -4
  119. package/cli/commands/setup.js +0 -346
  120. package/cli/index.d.ts +0 -2
  121. package/cli/index.js +0 -13
  122. package/cli/utils/agents.d.ts +0 -8
  123. package/cli/utils/agents.js +0 -55
  124. package/cli/utils/cao.d.ts +0 -11
  125. package/cli/utils/cao.js +0 -56
  126. package/cli/utils/paths.d.ts +0 -5
  127. package/cli/utils/paths.js +0 -11
  128. package/templates/orchestrator_lambda.md +0 -263
  129. package/templates/orchestrator_microservices.md +0 -345
  130. package/templates/orchestrator_mobile.md +0 -199
  131. package/templates/orchestrator_webapp.md +0 -190
  132. package/templates/orchestrator_writing.md +0 -306
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "dev",
3
+ "description": "Agent for __NAME__ - TypeScript library with npm packages",
4
+ "prompt": "file://../prompts/dev.md",
5
+ "resources": [
6
+ "file://README.md",
7
+ "file://.kiro/specs/**/*.md",
8
+ "file://.kiro/steering/**/*.md",
9
+ "file://docs/**/*.md"
10
+ ],
11
+ "tools": [
12
+ "read",
13
+ "write",
14
+ "shell",
15
+ "grep",
16
+ "glob",
17
+ "web_search",
18
+ "web_fetch",
19
+ "introspect",
20
+ "thinking",
21
+ "code"
22
+ ],
23
+ "allowedTools": [
24
+ "read",
25
+ "shell",
26
+ "grep",
27
+ "glob",
28
+ "web_search",
29
+ "web_fetch",
30
+ "introspect",
31
+ "thinking",
32
+ "code"
33
+ ],
34
+ "toolsSettings": {
35
+ "write": {
36
+ "allowedPaths": [
37
+ ".kiro/**",
38
+ "packages/**",
39
+ "docs/**",
40
+ "scripts/**",
41
+ ".github/**",
42
+ "README.md",
43
+ "CHANGELOG.md",
44
+ "package.json",
45
+ "package-lock.json",
46
+ "tsconfig.json",
47
+ "tsdown.config.ts",
48
+ "vitest.config.ts",
49
+ "biome.json",
50
+ ".editorconfig",
51
+ ".gitignore",
52
+ ".npmpackagejsonlintrc.json"
53
+ ]
54
+ },
55
+ "shell": {
56
+ "autoAllowReadonly": true,
57
+ "deniedCommands": [".*git commit.*", ".*git push.*", ".*git tag .*", ".*npm publish.*"]
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "dev",
3
+ "description": "Agent for __NAME__ - Web application deployed on Vercel",
4
+ "prompt": "file://../prompts/dev.md",
5
+ "resources": ["file://README.md", "file://.kiro/specs/**/*.md", "file://.kiro/steering/**/*.md"],
6
+ "tools": [
7
+ "read",
8
+ "write",
9
+ "shell",
10
+ "grep",
11
+ "glob",
12
+ "web_search",
13
+ "web_fetch",
14
+ "introspect",
15
+ "thinking",
16
+ "code"
17
+ ],
18
+ "allowedTools": [
19
+ "read",
20
+ "shell",
21
+ "grep",
22
+ "glob",
23
+ "web_search",
24
+ "web_fetch",
25
+ "introspect",
26
+ "thinking",
27
+ "code"
28
+ ],
29
+ "toolsSettings": {
30
+ "write": {
31
+ "allowedPaths": [
32
+ ".kiro/**",
33
+ ".github/**",
34
+ "packages/**",
35
+ "docs/**",
36
+ "README.md",
37
+ "CHANGELOG.md",
38
+ "package.json",
39
+ "package-lock.json",
40
+ "tsconfig.json",
41
+ "vitest.config.ts",
42
+ "biome.json",
43
+ ".editorconfig",
44
+ ".gitignore",
45
+ "docker-compose.yml",
46
+ "Dockerfile"
47
+ ]
48
+ },
49
+ "shell": {
50
+ "autoAllowReadonly": true,
51
+ "deniedCommands": [".*git commit.*", ".*git push.*", ".*git tag .*", ".*npm publish.*"]
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: prompt-template
3
+ description: Generate .kiro/prompts/dev.md for a project. Use when creating the agent's system prompt.
4
+ ---
5
+
6
+ # Prompt Template
7
+
8
+ Generate a `.kiro/prompts/dev.md` file tailored to the project.
9
+
10
+ ## Structure
11
+
12
+ Every prompt should have these sections:
13
+ 1. **Title & Role** — "You are the __NAME__ Development Agent"
14
+ 2. **Project Mission** — What the project does, in 2-3 sentences
15
+ 3. **Project Knowledge** — Which specs/docs to always reference
16
+ 4. **Architecture Overview** — Tech stack, structure, design principles
17
+ 5. **Development Guidelines** — TypeScript style, testing, code quality
18
+ 6. **Git Rules** — NEVER commit/push, suggest commit messages
19
+ 7. **Communication Style** — Language, tone, focus
20
+
21
+ ## References
22
+ - Review `references/example-library.md` for npm library prompts
23
+ - Review `references/example-webapp.md` for web app prompts
@@ -0,0 +1,56 @@
1
+ # __NAME__ Development Agent
2
+
3
+ You are the **__NAME__ Development Agent**. You help develop and maintain __NAME__ — a TypeScript library published to npm.
4
+
5
+ ## Project Mission
6
+
7
+ Build a **modular TypeScript library** that:
8
+ - Works as an npm package (not a server)
9
+ - Has clean, well-tested APIs
10
+ - Is published to npm with proper types and sourcemaps
11
+
12
+ ## Project Knowledge
13
+
14
+ **ALWAYS refer to these files for context**:
15
+ - `.kiro/specs/` — Project requirements and design decisions
16
+ - `README.md` — Project overview and documentation
17
+
18
+ ## Architecture Overview
19
+
20
+ ### Monorepo Structure
21
+ ```
22
+ __NAME__/
23
+ ├── packages/
24
+ │ ├── core/ # Core library
25
+ │ └── ... # Additional packages
26
+ ├── docs/ # VitePress documentation
27
+ └── README.md
28
+ ```
29
+
30
+ ### Tech Stack
31
+ - **Language**: TypeScript (strict mode)
32
+ - **Build**: tsdown
33
+ - **Test**: Vitest
34
+ - **Lint**: Biome
35
+ - **Release**: bonvoy
36
+
37
+ ## Development Guidelines
38
+
39
+ ### TypeScript
40
+ - Strict mode, no `any`, explicit types
41
+ - ES modules with `.js` extensions in imports
42
+ - camelCase for code, kebab-case for files
43
+
44
+ ### Testing
45
+ - Vitest for all tests, high coverage target
46
+ - Mock external services, test real implementations
47
+
48
+ ## Git Rules
49
+
50
+ **NEVER commit, push, or create tags.** Prepare changes and suggest a commit message.
51
+
52
+ ## Communication Style
53
+
54
+ - **Language**: English for all code and docs
55
+ - **Tone**: Direct and concise
56
+ - **Focus**: Practical solutions, simplicity, testability
@@ -0,0 +1,57 @@
1
+ # __NAME__ Development Agent
2
+
3
+ You are the **__NAME__ Development Agent**. You help develop and maintain __NAME__ — a web application deployed on Vercel.
4
+
5
+ ## Project Mission
6
+
7
+ Build a **modern web application** that:
8
+ - Provides an excellent user experience
9
+ - Is deployed on Vercel (serverless, zero infrastructure)
10
+ - Has a clean, maintainable codebase
11
+
12
+ ## Project Knowledge
13
+
14
+ **ALWAYS refer to these files for context**:
15
+ - `.kiro/specs/` — Project requirements and design decisions
16
+ - `README.md` — Project overview
17
+
18
+ ## Architecture Overview
19
+
20
+ ### Project Structure
21
+ ```
22
+ __NAME__/
23
+ ├── packages/
24
+ │ ├── api/ # Backend API
25
+ │ ├── web/ # Frontend
26
+ │ └── shared/ # Shared types/utils
27
+ └── README.md
28
+ ```
29
+
30
+ ### Tech Stack
31
+ - **Frontend**: SvelteKit / Next.js
32
+ - **Backend**: Hono / API routes
33
+ - **Database**: PostgreSQL (Neon) + Drizzle ORM
34
+ - **Deploy**: Vercel
35
+ - **Build**: Vite (frontend), tsdown (shared)
36
+ - **Test**: Vitest
37
+
38
+ ## Development Guidelines
39
+
40
+ ### TypeScript
41
+ - Strict mode, no `any`, explicit types
42
+ - ES modules with `.js` extensions
43
+ - camelCase for code, kebab-case for files
44
+
45
+ ### Testing
46
+ - Vitest for all tests
47
+ - Mock database and external services
48
+
49
+ ## Git Rules
50
+
51
+ **NEVER commit, push, or create tags.** Prepare changes and suggest a commit message.
52
+
53
+ ## Communication Style
54
+
55
+ - **Language**: English for all code and docs
56
+ - **Tone**: Direct and concise
57
+ - **Focus**: User experience, clean code, practical solutions
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: skill-templates
3
+ description: Generate .kiro/skills/ for a project. Use when adding skills like new-package scaffolding to a monorepo.
4
+ ---
5
+
6
+ # Skill Templates
7
+
8
+ Generate project-specific skills under `.kiro/skills/`.
9
+
10
+ ## Available Skills
11
+
12
+ ### new-package (monorepos only)
13
+ Scaffolds a new package in a monorepo. Includes:
14
+ - Directory structure, package.json, src/index.ts, test file
15
+ - README.md, CHANGELOG.md
16
+ - Updates .vscode/settings.json scopes
17
+
18
+ ## When to Include
19
+
20
+ - `new-package` — Only for monorepo projects with `workspaces` in package.json
21
+
22
+ ## References
23
+ - Review `references/new-package.md` for the new-package skill content
@@ -0,0 +1,72 @@
1
+ # Create New Package in Monorepo
2
+
3
+ ## 1. Detect project structure
4
+
5
+ Check if the project uses:
6
+ - npm workspaces (`package.json` has `"workspaces"` field)
7
+ - Workspace pattern (e.g., `packages/*`)
8
+ - Naming convention (scoped like `@org/name` or unscoped)
9
+
10
+ ## 2. Read existing package metadata
11
+
12
+ From root `package.json` or an existing package, extract:
13
+ - `author`, `license`, `repository`, `homepage`, `bugs`
14
+
15
+ ## 3. Create directory structure
16
+
17
+ ```bash
18
+ mkdir -p <workspace-path>/<name>/{src,test}
19
+ ```
20
+
21
+ ## 4. Create package.json
22
+
23
+ ```json
24
+ {
25
+ "name": "<package-name>",
26
+ "version": "0.0.0",
27
+ "description": "<Short description>",
28
+ "type": "module",
29
+ "exports": {
30
+ ".": "./dist/index.js",
31
+ "./package.json": "./package.json"
32
+ },
33
+ "files": ["dist"],
34
+ "dependencies": {},
35
+ "engines": { "node": ">=<version from root>" }
36
+ }
37
+ ```
38
+
39
+ Use `^` for internal deps (e.g., `"@org/core": "^1.0.0"`).
40
+
41
+ ## 5. Create src/index.ts
42
+
43
+ Minimal entry point with a placeholder export.
44
+
45
+ ## 6. Create test file
46
+
47
+ Match the project's test framework (Vitest):
48
+
49
+ ```typescript
50
+ import { describe, it, expect } from 'vitest';
51
+ import { hello } from '../src/index.js';
52
+
53
+ describe('Package', () => {
54
+ it('should work', () => {
55
+ expect(hello()).toBe('Hello from new package');
56
+ });
57
+ });
58
+ ```
59
+
60
+ ## 7. Create README.md and CHANGELOG.md
61
+
62
+ ## 8. Add scope to .vscode/settings.json
63
+
64
+ If `conventionalCommits.scopes` exists, add the package name (without scope prefix).
65
+
66
+ ## 9. Install, build, test
67
+
68
+ ```bash
69
+ npm install && npm run build && npm test
70
+ ```
71
+
72
+ **Note**: tsconfig.json is NOT needed per package — TypeScript uses the root tsconfig.json.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: steering-templates
3
+ description: Generate .kiro/steering/ files for a project. Use when setting up steering docs for code style, tooling, testing, interaction, and commit conventions.
4
+ ---
5
+
6
+ # Steering Templates
7
+
8
+ Generate the 5 standard steering files under `.kiro/steering/`.
9
+
10
+ ## Files
11
+
12
+ All projects get these 5 files:
13
+ 1. `code-style.md` — TypeScript conventions, naming, error handling
14
+ 2. `build-tooling.md` — Stack reference (tsdown, biome, lefthook, npm)
15
+ 3. `testing.md` — Vitest, coverage, mocking rules
16
+ 4. `interaction.md` — Agent behavior (interview, plan mode, no git commit)
17
+ 5. `commit-conventions.md` — Conventional commits + gitmoji text codes
18
+
19
+ ## Customization
20
+
21
+ Adapt each file to the project:
22
+ - `build-tooling.md` — Add project-specific scripts, build commands, deploy info
23
+ - `testing.md` — Add project-specific test patterns (e.g., PGlite for DB tests)
24
+ - `code-style.md` — Add project-specific conventions (e.g., Svelte component style)
25
+
26
+ ## References
27
+ - Review `references/code-style.md` for the code style template
28
+ - Review `references/build-tooling.md` for the build tooling template
29
+ - Review `references/testing.md` for the testing template
30
+ - Review `references/interaction.md` for the interaction template
31
+ - Review `references/commit-conventions.md` for the commit conventions template
@@ -0,0 +1,62 @@
1
+ # Build & Tooling
2
+
3
+ ## Build System
4
+
5
+ ### tsdown
6
+ - **tsdown** for building all packages (NOT tsc, esbuild, rollup)
7
+ - Configuration: `tsdown.config.ts` at root
8
+ - Workspace mode for monorepos
9
+ - Outputs: `.mjs` + `.d.ts` + sourcemaps
10
+ - tsc is only used for type-checking (`tsc --noEmit`)
11
+
12
+ ### Build Commands
13
+ ```bash
14
+ npm run build # Build with tsdown
15
+ npm run clean # Remove dist/
16
+ npm run lint:typecheck # Type-check only (tsc --noEmit)
17
+ ```
18
+
19
+ ## Linting & Formatting
20
+
21
+ ### Biome
22
+ - **Biome** for linting and formatting (NOT ESLint/Prettier)
23
+ - Single quotes, 100 line width
24
+ - Uses `.editorconfig` for indent settings
25
+ - Import sorting with grouped blank lines
26
+
27
+ ### Commands
28
+ ```bash
29
+ npm run lint # All linters in parallel
30
+ npm run lint:format # Biome check + fix
31
+ npm run lint:typecheck # TypeScript check
32
+ npm run lint:lockfile # Lockfile security
33
+ npm run lint:package # package.json validation
34
+ npm run lint:sort_package # Sort package.json keys
35
+ npm run lint:engines # Validate engine compatibility
36
+ ```
37
+
38
+ ## Git Hooks
39
+
40
+ ### Lefthook
41
+ - **Lefthook** for git hooks (NOT husky + lint-staged)
42
+ - Configuration: `lefthook.yml` at root
43
+ - Pre-commit: biome → lockfile → package-lint → sort → build → typecheck → test
44
+ - Commit-msg: commitlint validation
45
+ - Built-in staging support (`stage_fixed: true`)
46
+
47
+ ## Package Manager
48
+
49
+ ### npm
50
+ - Use **npm** (NOT pnpm or yarn)
51
+ - Lock file: `package-lock.json`
52
+ - Workspaces enabled in root `package.json` for monorepos
53
+
54
+ ## Scripts Reference
55
+
56
+ | Script | Description |
57
+ |--------|-------------|
58
+ | `npm run build` | Build with tsdown |
59
+ | `npm run clean` | Remove dist/ |
60
+ | `npm run lint` | All linters in parallel |
61
+ | `npm test` | Run tests |
62
+ | `npm run test:coverage` | Tests with coverage |
@@ -0,0 +1,83 @@
1
+ # Code Style & Best Practices
2
+
3
+ ## TypeScript
4
+
5
+ ### Strict Mode
6
+ - Always use strict mode (enabled in `tsconfig.json`)
7
+ - No `any` types — use `unknown` or proper types
8
+ - Explicit return types on all exported functions
9
+ - Explicit parameter types always
10
+
11
+ ### Module System
12
+ - ES modules only (`"type": "module"` in package.json)
13
+ - Use `.js` extensions in imports (TypeScript requirement for ES modules)
14
+ - Example: `import { foo } from './bar.js'` (not `./bar` or `./bar.ts`)
15
+
16
+ ### Naming Conventions
17
+ - **camelCase** for variables, functions, methods
18
+ - **PascalCase** for classes, interfaces, types
19
+ - **UPPER_SNAKE_CASE** for constants
20
+ - **kebab-case** for file names
21
+
22
+ ### Code Organization
23
+ ```typescript
24
+ // 1. Imports (external first, then internal)
25
+ import { execa } from 'execa';
26
+ import type { Config } from './types.js';
27
+
28
+ // 2. Types/Interfaces
29
+ export interface MyConfig {
30
+ option: string;
31
+ }
32
+
33
+ // 3. Constants
34
+ const DEFAULT_TIMEOUT = 5000;
35
+
36
+ // 4. Classes/Functions
37
+ export class MyClass {}
38
+ ```
39
+
40
+ ### Type Definitions
41
+ - Prefer `interface` over `type` for object shapes
42
+ - Use `type` for unions, intersections, mapped types
43
+ - Export all public types
44
+ - Use `readonly` for immutable properties
45
+
46
+ ## Code Quality
47
+
48
+ ### Minimal Code
49
+ - Write only what's necessary
50
+ - No premature abstractions
51
+ - No unused code or imports
52
+ - No commented-out code in commits
53
+
54
+ ### Error Handling
55
+ - Always throw typed errors with clear messages
56
+ - Include context in error messages
57
+ - Use `try/catch` for async operations
58
+
59
+ ### Async/Await
60
+ - Prefer `async/await` over `.then()/.catch()`
61
+ - Always handle errors in async functions
62
+ - Use `Promise.all()` for parallel operations
63
+
64
+ ## Dependencies
65
+
66
+ ### Minimal Dependencies
67
+ - Only add dependencies when absolutely necessary
68
+ - Prefer native Node.js APIs when possible
69
+ - Use `^` for dependencies (allow minor/patch updates)
70
+ - Keep dependencies up to date — run `npm outdated` regularly
71
+ - Security updates must be applied immediately
72
+
73
+ ## Comments & Documentation
74
+
75
+ ### When to Comment
76
+ - Complex algorithms or non-obvious logic
77
+ - Public APIs (JSDoc)
78
+ - Workarounds or hacks (with explanation)
79
+
80
+ ### When NOT to Comment
81
+ - Obvious code
82
+ - Redundant information
83
+ - Commented-out code (delete it)
@@ -0,0 +1,58 @@
1
+ # Commit Conventions
2
+
3
+ **IMPORTANT**: The agent NEVER commits, pushes, or creates tags. The developer handles all git operations manually.
4
+
5
+ ## Format
6
+
7
+ Use conventional commits with gitmoji as text (not emoji):
8
+
9
+ ```
10
+ type(scope): :emoji_code: short description
11
+
12
+ Detailed explanation of what changed and why.
13
+ Include multiple lines if needed to fully describe:
14
+ - What was changed
15
+ - Why it was changed
16
+ - Any breaking changes or important notes
17
+ ```
18
+
19
+ ## Types
20
+
21
+ - `feat` — New feature (`:sparkles:`)
22
+ - `fix` — Bug fix (`:bug:`)
23
+ - `perf` — Performance improvement (`:zap:`)
24
+ - `docs` — Documentation (`:memo:`)
25
+ - `chore` — Maintenance tasks (`:wrench:`, `:arrow_up:`, `:bookmark:`)
26
+ - `refactor` — Code refactoring (`:recycle:`)
27
+ - `test` — Tests (`:white_check_mark:`)
28
+ - `style` — Code formatting (`:art:`)
29
+ - `ci` — CI/CD changes (`:construction_worker:`)
30
+ - `build` — Build system (`:hammer:`)
31
+
32
+ ## Scope
33
+
34
+ Use only ONE scope per commit — typically the package, module, or component affected.
35
+
36
+ If `.vscode/settings.json` exists with `conventionalCommits.scopes`, use those values.
37
+ Scope is optional for cross-cutting changes.
38
+
39
+ ## Gitmoji
40
+
41
+ **Always use text codes** (`:sparkles:`), **never actual emoji** (✨).
42
+
43
+ ## Body
44
+
45
+ **Always include a detailed body** explaining:
46
+ 1. What was changed
47
+ 2. Why it was changed
48
+ 3. Any important context or side effects
49
+
50
+ ## Breaking Changes
51
+
52
+ Add `!` after the type/scope and include `BREAKING CHANGE:` in the body:
53
+
54
+ ```
55
+ feat(api)!: :boom: remove deprecated methods
56
+
57
+ BREAKING CHANGE: Removed old API methods deprecated in v0.5.
58
+ ```
@@ -0,0 +1,41 @@
1
+ # Interaction Patterns
2
+
3
+ ## Interview Before Implementing
4
+
5
+ For ambiguous or complex requests, ask clarifying questions BEFORE writing code:
6
+ - What's the expected behavior?
7
+ - Are there edge cases to consider?
8
+ - Does this affect existing features?
9
+ - What's the priority (quick fix vs proper solution)?
10
+
11
+ Skip the interview for clear, well-defined tasks.
12
+
13
+ ## Plan Mode
14
+
15
+ For multi-step tasks (new features, refactors, architecture changes):
16
+ 1. Write a short numbered plan first
17
+ 2. Wait for approval before implementing
18
+ 3. Adapt the plan if requirements change mid-execution
19
+
20
+ Skip planning for single-file fixes, small bug fixes, or simple questions.
21
+
22
+ ## ASCII Diagrams
23
+
24
+ Use ASCII diagrams when discussing:
25
+ - Architecture decisions
26
+ - Data flow between components
27
+ - New feature design involving multiple files
28
+ - Database schema relationships
29
+
30
+ ## Context Hygiene
31
+
32
+ - Keep each steering/spec file under ~200 lines
33
+ - Split files when they grow beyond that
34
+ - One concern per file (don't mix code style with testing rules)
35
+ - Update specs when features are completed or changed
36
+
37
+ ## Git Rules
38
+
39
+ - **NEVER commit, push, or create tags** — the developer handles all git operations
40
+ - Prepare changes and suggest a commit message
41
+ - The developer reviews and commits manually
@@ -0,0 +1,61 @@
1
+ # Testing Strategy
2
+
3
+ ## Test Framework
4
+
5
+ ### Vitest
6
+ - All tests use **Vitest** (NOT Jest, Mocha, or others)
7
+ - Configuration in `vitest.config.ts` at root
8
+ - v8 coverage provider
9
+ - Coverage reporters: text, json, json-summary
10
+
11
+ ## Test Structure
12
+
13
+ ### File Organization
14
+ ```
15
+ src/
16
+ └── feature.ts
17
+ test/
18
+ └── feature.test.ts
19
+ ```
20
+
21
+ ### Test Pattern (AAA)
22
+ ```typescript
23
+ import { describe, it, expect } from 'vitest';
24
+
25
+ describe('FeatureName', () => {
26
+ it('should do something specific', () => {
27
+ // Arrange
28
+ const input = 'test';
29
+
30
+ // Act
31
+ const result = doSomething(input);
32
+
33
+ // Assert
34
+ expect(result).toBe('expected');
35
+ });
36
+ });
37
+ ```
38
+
39
+ ## Mocking
40
+
41
+ ### When to Mock
42
+ - External APIs, file system, git commands, network requests
43
+
44
+ ### When NOT to Mock
45
+ - Internal functions, simple utilities, pure functions
46
+
47
+ ## Best Practices
48
+
49
+ ### Test Naming
50
+ - Use `should` in test names: "should throw error when input is invalid"
51
+
52
+ ### Independence
53
+ - Each test must be independent — no shared state
54
+ - Use `beforeEach` for setup
55
+
56
+ ### Edge Cases
57
+ - Empty arrays/strings, null/undefined, invalid input, boundary values
58
+
59
+ ### Coverage
60
+ - Exclude barrel re-exports (`index.ts`) and type files (`types.ts`)
61
+ - Include all source files in coverage