@hivehub/rulebook 4.2.2 → 4.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.
- package/.claude/commands/continue.md +33 -33
- package/.claude/commands/ralph-config.md +112 -112
- package/.claude/commands/ralph-history.md +110 -110
- package/.claude/commands/ralph-init.md +72 -72
- package/.claude/commands/ralph-pause-resume.md +105 -105
- package/.claude/commands/ralph-run.md +101 -101
- package/.claude/commands/ralph-status.md +76 -76
- package/.claude/commands/rulebook-memory-save.md +48 -48
- package/.claude/commands/rulebook-memory-search.md +47 -47
- package/.claude/commands/rulebook-task-apply.md +67 -67
- package/.claude/commands/rulebook-task-archive.md +70 -70
- package/.claude/commands/rulebook-task-create.md +93 -93
- package/.claude/commands/rulebook-task-list.md +42 -42
- package/.claude/commands/rulebook-task-show.md +52 -52
- package/.claude/commands/rulebook-task-validate.md +53 -53
- package/.claude-plugin/marketplace.json +28 -28
- package/.claude-plugin/plugin.json +8 -8
- package/README.md +8 -1
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +4 -4
- package/dist/cli/commands.js.map +1 -1
- package/dist/core/claude-mcp.d.ts +8 -1
- package/dist/core/claude-mcp.d.ts.map +1 -1
- package/dist/core/claude-mcp.js +32 -1
- package/dist/core/claude-mcp.js.map +1 -1
- package/dist/core/generator.d.ts +13 -0
- package/dist/core/generator.d.ts.map +1 -1
- package/dist/core/generator.js +283 -28
- package/dist/core/generator.js.map +1 -1
- package/dist/core/workspace/workspace-manager.d.ts.map +1 -1
- package/dist/core/workspace/workspace-manager.js +2 -6
- package/dist/core/workspace/workspace-manager.js.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/rulebook-server.d.ts.map +1 -1
- package/dist/mcp/rulebook-server.js +5 -4
- package/dist/mcp/rulebook-server.js.map +1 -1
- package/package.json +21 -22
- package/templates/agents/accessibility-reviewer.md +43 -0
- package/templates/agents/api-designer.md +42 -0
- package/templates/agents/architect.md +51 -0
- package/templates/agents/build-engineer.md +36 -0
- package/templates/agents/code-reviewer.md +47 -0
- package/templates/agents/database-architect.md +41 -0
- package/templates/agents/devops-engineer.md +42 -0
- package/templates/agents/docs-writer.md +38 -0
- package/templates/agents/i18n-engineer.md +42 -0
- package/templates/agents/implementer.md +38 -35
- package/templates/agents/migration-engineer.md +42 -0
- package/templates/agents/performance-engineer.md +49 -0
- package/templates/agents/refactoring-agent.md +41 -0
- package/templates/agents/researcher.md +38 -34
- package/templates/agents/security-reviewer.md +40 -0
- package/templates/agents/team-lead.md +37 -34
- package/templates/agents/tester.md +45 -42
- package/templates/agents/ux-reviewer.md +43 -0
- package/templates/ci/rulebook-review.yml +26 -26
- package/templates/cli/AIDER.md +49 -49
- package/templates/cli/AMAZON_Q.md +25 -25
- package/templates/cli/AUGGIE.md +32 -32
- package/templates/cli/CLAUDE.md +117 -117
- package/templates/cli/CLINE.md +99 -99
- package/templates/cli/CODEBUDDY.md +20 -20
- package/templates/cli/CODEIUM.md +20 -20
- package/templates/cli/CODEX.md +21 -21
- package/templates/cli/CONTINUE.md +34 -34
- package/templates/cli/CURSOR_CLI.md +62 -62
- package/templates/cli/FACTORY.md +18 -18
- package/templates/cli/GEMINI.md +35 -35
- package/templates/cli/KILOCODE.md +18 -18
- package/templates/cli/OPENCODE.md +18 -18
- package/templates/cli/_GENERIC_TEMPLATE.md +29 -29
- package/templates/commands/rulebook-memory-save.md +48 -48
- package/templates/commands/rulebook-memory-search.md +47 -47
- package/templates/commands/rulebook-task-apply.md +67 -67
- package/templates/commands/rulebook-task-archive.md +94 -94
- package/templates/commands/rulebook-task-create.md +93 -93
- package/templates/commands/rulebook-task-list.md +42 -42
- package/templates/commands/rulebook-task-show.md +52 -52
- package/templates/commands/rulebook-task-validate.md +53 -53
- package/templates/core/AGENTS_LEAN.md +25 -25
- package/templates/core/AGENTS_OVERRIDE.md +16 -16
- package/templates/core/AGENT_AUTOMATION.md +288 -288
- package/templates/core/DAG.md +304 -304
- package/templates/core/DOCUMENTATION_RULES.md +36 -36
- package/templates/core/MULTI_AGENT.md +74 -74
- package/templates/core/PLANS.md +28 -28
- package/templates/core/QUALITY_ENFORCEMENT.md +68 -68
- package/templates/core/RALPH.md +471 -471
- package/templates/core/RULEBOOK.md +1935 -1935
- package/templates/frameworks/ANGULAR.md +36 -36
- package/templates/frameworks/DJANGO.md +83 -83
- package/templates/frameworks/ELECTRON.md +147 -147
- package/templates/frameworks/FLASK.md +38 -38
- package/templates/frameworks/FLUTTER.md +55 -55
- package/templates/frameworks/JQUERY.md +32 -32
- package/templates/frameworks/LARAVEL.md +38 -38
- package/templates/frameworks/NESTJS.md +43 -43
- package/templates/frameworks/NEXTJS.md +127 -127
- package/templates/frameworks/NUXT.md +40 -40
- package/templates/frameworks/RAILS.md +66 -66
- package/templates/frameworks/REACT.md +38 -38
- package/templates/frameworks/REACT_NATIVE.md +47 -47
- package/templates/frameworks/SPRING.md +39 -39
- package/templates/frameworks/SYMFONY.md +36 -36
- package/templates/frameworks/VUE.md +36 -36
- package/templates/frameworks/ZEND.md +35 -35
- package/templates/git/CI_CD_PATTERNS.md +661 -661
- package/templates/git/GITHUB_ACTIONS.md +728 -728
- package/templates/git/GITLAB_CI.md +730 -730
- package/templates/git/GIT_WORKFLOW.md +1157 -1157
- package/templates/git/SECRETS_MANAGEMENT.md +585 -585
- package/templates/hooks/COMMIT_MSG.md +530 -530
- package/templates/hooks/POST_CHECKOUT.md +546 -546
- package/templates/hooks/PREPARE_COMMIT_MSG.md +619 -619
- package/templates/hooks/PRE_COMMIT.md +414 -414
- package/templates/hooks/PRE_PUSH.md +601 -601
- package/templates/ides/CONTINUE_RULES.md +16 -16
- package/templates/ides/COPILOT.md +37 -37
- package/templates/ides/COPILOT_INSTRUCTIONS.md +23 -23
- package/templates/ides/CURSOR.md +43 -43
- package/templates/ides/GEMINI_RULES.md +17 -17
- package/templates/ides/JETBRAINS_AI.md +35 -35
- package/templates/ides/REPLIT.md +36 -36
- package/templates/ides/TABNINE.md +29 -29
- package/templates/ides/VSCODE.md +40 -40
- package/templates/ides/WINDSURF.md +36 -36
- package/templates/ides/WINDSURF_RULES.md +14 -14
- package/templates/ides/ZED.md +32 -32
- package/templates/ides/cursor-mdc/go.mdc +24 -24
- package/templates/ides/cursor-mdc/python.mdc +24 -24
- package/templates/ides/cursor-mdc/quality.mdc +25 -25
- package/templates/ides/cursor-mdc/ralph.mdc +39 -39
- package/templates/ides/cursor-mdc/rulebook.mdc +38 -38
- package/templates/ides/cursor-mdc/rust.mdc +24 -24
- package/templates/ides/cursor-mdc/typescript.mdc +25 -25
- package/templates/languages/C.md +333 -333
- package/templates/languages/CPP.md +743 -743
- package/templates/languages/CSHARP.md +417 -417
- package/templates/languages/ELIXIR.md +454 -454
- package/templates/languages/ERLANG.md +361 -361
- package/templates/languages/GO.md +645 -645
- package/templates/languages/HASKELL.md +177 -177
- package/templates/languages/JAVA.md +607 -607
- package/templates/languages/JAVASCRIPT.md +631 -631
- package/templates/languages/JULIA.md +97 -97
- package/templates/languages/KOTLIN.md +511 -511
- package/templates/languages/LISP.md +100 -100
- package/templates/languages/LUA.md +74 -74
- package/templates/languages/OBJECTIVEC.md +90 -90
- package/templates/languages/PHP.md +416 -416
- package/templates/languages/PYTHON.md +682 -682
- package/templates/languages/RUBY.md +421 -421
- package/templates/languages/RUST.md +477 -477
- package/templates/languages/SAS.md +73 -73
- package/templates/languages/SCALA.md +348 -348
- package/templates/languages/SOLIDITY.md +580 -580
- package/templates/languages/SQL.md +137 -137
- package/templates/languages/SWIFT.md +466 -466
- package/templates/languages/TYPESCRIPT.md +591 -591
- package/templates/languages/ZIG.md +265 -265
- package/templates/modules/ATLASSIAN.md +255 -255
- package/templates/modules/CONTEXT7.md +54 -54
- package/templates/modules/FIGMA.md +267 -267
- package/templates/modules/GITHUB_MCP.md +64 -64
- package/templates/modules/GRAFANA.md +328 -328
- package/templates/modules/MEMORY.md +126 -126
- package/templates/modules/NOTION.md +247 -247
- package/templates/modules/PLAYWRIGHT.md +90 -90
- package/templates/modules/RULEBOOK_MCP.md +156 -156
- package/templates/modules/SERENA.md +337 -337
- package/templates/modules/SUPABASE.md +223 -223
- package/templates/modules/SYNAP.md +69 -69
- package/templates/modules/VECTORIZER.md +63 -63
- package/templates/modules/sequential-thinking.md +42 -42
- package/templates/ralph/ralph-history.bat +4 -4
- package/templates/ralph/ralph-history.sh +5 -5
- package/templates/ralph/ralph-init.bat +5 -5
- package/templates/ralph/ralph-init.sh +5 -5
- package/templates/ralph/ralph-pause.bat +5 -5
- package/templates/ralph/ralph-pause.sh +5 -5
- package/templates/ralph/ralph-run.bat +5 -5
- package/templates/ralph/ralph-run.sh +5 -5
- package/templates/ralph/ralph-status.bat +4 -4
- package/templates/ralph/ralph-status.sh +5 -5
- package/templates/services/AZURE_BLOB.md +184 -184
- package/templates/services/CASSANDRA.md +239 -239
- package/templates/services/DATADOG.md +26 -26
- package/templates/services/DOCKER.md +124 -124
- package/templates/services/DOCKER_COMPOSE.md +168 -168
- package/templates/services/DYNAMODB.md +308 -308
- package/templates/services/ELASTICSEARCH.md +347 -347
- package/templates/services/GCS.md +178 -178
- package/templates/services/HELM.md +194 -194
- package/templates/services/INFLUXDB.md +265 -265
- package/templates/services/KAFKA.md +341 -341
- package/templates/services/KUBERNETES.md +208 -208
- package/templates/services/MARIADB.md +183 -183
- package/templates/services/MEMCACHED.md +242 -242
- package/templates/services/MINIO.md +201 -201
- package/templates/services/MONGODB.md +268 -268
- package/templates/services/MYSQL.md +358 -358
- package/templates/services/NEO4J.md +247 -247
- package/templates/services/OPENTELEMETRY.md +25 -25
- package/templates/services/ORACLE.md +290 -290
- package/templates/services/PINO.md +24 -24
- package/templates/services/POSTGRESQL.md +326 -326
- package/templates/services/PROMETHEUS.md +33 -33
- package/templates/services/RABBITMQ.md +286 -286
- package/templates/services/REDIS.md +292 -292
- package/templates/services/S3.md +298 -298
- package/templates/services/SENTRY.md +23 -23
- package/templates/services/SQLITE.md +294 -294
- package/templates/services/SQLSERVER.md +294 -294
- package/templates/services/WINSTON.md +30 -30
- package/templates/skills/cli/aider/SKILL.md +59 -59
- package/templates/skills/cli/amazon-q/SKILL.md +35 -35
- package/templates/skills/cli/auggie/SKILL.md +42 -42
- package/templates/skills/cli/claude/SKILL.md +42 -42
- package/templates/skills/cli/cline/SKILL.md +42 -42
- package/templates/skills/cli/codebuddy/SKILL.md +30 -30
- package/templates/skills/cli/codeium/SKILL.md +30 -30
- package/templates/skills/cli/codex/SKILL.md +31 -31
- package/templates/skills/cli/continue/SKILL.md +44 -44
- package/templates/skills/cli/cursor-cli/SKILL.md +38 -38
- package/templates/skills/cli/factory/SKILL.md +28 -28
- package/templates/skills/cli/gemini/SKILL.md +45 -45
- package/templates/skills/cli/kilocode/SKILL.md +28 -28
- package/templates/skills/cli/opencode/SKILL.md +28 -28
- package/templates/skills/core/agent-automation/SKILL.md +194 -194
- package/templates/skills/core/dag/SKILL.md +314 -314
- package/templates/skills/core/documentation-rules/SKILL.md +46 -46
- package/templates/skills/core/quality-enforcement/SKILL.md +78 -78
- package/templates/skills/core/rulebook/SKILL.md +176 -176
- package/templates/skills/dev/accessibility/SKILL.md +17 -0
- package/templates/skills/dev/api-design/SKILL.md +15 -0
- package/templates/skills/dev/architect/SKILL.md +17 -0
- package/templates/skills/dev/build-fix/SKILL.md +17 -0
- package/templates/skills/dev/db-design/SKILL.md +15 -0
- package/templates/skills/dev/debug/SKILL.md +16 -0
- package/templates/skills/dev/deploy/SKILL.md +17 -0
- package/templates/skills/dev/docs/SKILL.md +17 -0
- package/templates/skills/dev/migrate/SKILL.md +15 -0
- package/templates/skills/dev/perf/SKILL.md +17 -0
- package/templates/skills/dev/refactor/SKILL.md +17 -0
- package/templates/skills/dev/research/SKILL.md +14 -0
- package/templates/skills/dev/review/SKILL.md +18 -0
- package/templates/skills/dev/security-audit/SKILL.md +17 -0
- package/templates/skills/frameworks/angular/SKILL.md +46 -46
- package/templates/skills/frameworks/django/SKILL.md +93 -93
- package/templates/skills/frameworks/electron/SKILL.md +157 -157
- package/templates/skills/frameworks/flask/SKILL.md +48 -48
- package/templates/skills/frameworks/flutter/SKILL.md +65 -65
- package/templates/skills/frameworks/jquery/SKILL.md +42 -42
- package/templates/skills/frameworks/laravel/SKILL.md +48 -48
- package/templates/skills/frameworks/nestjs/SKILL.md +53 -53
- package/templates/skills/frameworks/nextjs/SKILL.md +137 -137
- package/templates/skills/frameworks/nuxt/SKILL.md +50 -50
- package/templates/skills/frameworks/rails/SKILL.md +76 -76
- package/templates/skills/frameworks/react/SKILL.md +48 -48
- package/templates/skills/frameworks/react-native/SKILL.md +57 -57
- package/templates/skills/frameworks/spring/SKILL.md +49 -49
- package/templates/skills/frameworks/symfony/SKILL.md +46 -46
- package/templates/skills/frameworks/vue/SKILL.md +46 -46
- package/templates/skills/frameworks/zend/SKILL.md +45 -45
- package/templates/skills/ides/copilot/SKILL.md +47 -47
- package/templates/skills/ides/cursor/SKILL.md +53 -53
- package/templates/skills/ides/jetbrains-ai/SKILL.md +45 -45
- package/templates/skills/ides/replit/SKILL.md +46 -46
- package/templates/skills/ides/tabnine/SKILL.md +39 -39
- package/templates/skills/ides/vscode/SKILL.md +50 -50
- package/templates/skills/ides/windsurf/SKILL.md +46 -46
- package/templates/skills/ides/zed/SKILL.md +42 -42
- package/templates/skills/languages/c/SKILL.md +343 -343
- package/templates/skills/languages/cpp/SKILL.md +753 -753
- package/templates/skills/languages/csharp/SKILL.md +427 -427
- package/templates/skills/languages/elixir/SKILL.md +464 -464
- package/templates/skills/languages/erlang/SKILL.md +371 -371
- package/templates/skills/languages/go/SKILL.md +655 -655
- package/templates/skills/languages/haskell/SKILL.md +187 -187
- package/templates/skills/languages/java/SKILL.md +617 -617
- package/templates/skills/languages/javascript/SKILL.md +641 -641
- package/templates/skills/languages/julia/SKILL.md +107 -107
- package/templates/skills/languages/kotlin/SKILL.md +521 -521
- package/templates/skills/languages/lisp/SKILL.md +110 -110
- package/templates/skills/languages/lua/SKILL.md +84 -84
- package/templates/skills/languages/objectivec/SKILL.md +100 -100
- package/templates/skills/languages/php/SKILL.md +426 -426
- package/templates/skills/languages/python/SKILL.md +692 -692
- package/templates/skills/languages/ruby/SKILL.md +431 -431
- package/templates/skills/languages/rust/SKILL.md +487 -487
- package/templates/skills/languages/sas/SKILL.md +83 -83
- package/templates/skills/languages/scala/SKILL.md +358 -358
- package/templates/skills/languages/solidity/SKILL.md +590 -590
- package/templates/skills/languages/sql/SKILL.md +147 -147
- package/templates/skills/languages/swift/SKILL.md +476 -476
- package/templates/skills/languages/typescript/SKILL.md +302 -302
- package/templates/skills/languages/zig/SKILL.md +275 -275
- package/templates/skills/modules/atlassian/SKILL.md +265 -265
- package/templates/skills/modules/context7/SKILL.md +64 -64
- package/templates/skills/modules/figma/SKILL.md +277 -277
- package/templates/skills/modules/github-mcp/SKILL.md +74 -74
- package/templates/skills/modules/grafana/SKILL.md +338 -338
- package/templates/skills/modules/memory/SKILL.md +73 -73
- package/templates/skills/modules/notion/SKILL.md +257 -257
- package/templates/skills/modules/playwright/SKILL.md +100 -100
- package/templates/skills/modules/rulebook-mcp/SKILL.md +166 -166
- package/templates/skills/modules/serena/SKILL.md +347 -347
- package/templates/skills/modules/supabase/SKILL.md +233 -233
- package/templates/skills/modules/synap/SKILL.md +79 -79
- package/templates/skills/modules/vectorizer/SKILL.md +73 -73
- package/templates/skills/services/azure-blob/SKILL.md +194 -194
- package/templates/skills/services/cassandra/SKILL.md +249 -249
- package/templates/skills/services/dynamodb/SKILL.md +318 -318
- package/templates/skills/services/elasticsearch/SKILL.md +357 -357
- package/templates/skills/services/gcs/SKILL.md +188 -188
- package/templates/skills/services/influxdb/SKILL.md +275 -275
- package/templates/skills/services/kafka/SKILL.md +351 -351
- package/templates/skills/services/mariadb/SKILL.md +193 -193
- package/templates/skills/services/memcached/SKILL.md +252 -252
- package/templates/skills/services/minio/SKILL.md +211 -211
- package/templates/skills/services/mongodb/SKILL.md +278 -278
- package/templates/skills/services/mysql/SKILL.md +368 -368
- package/templates/skills/services/neo4j/SKILL.md +257 -257
- package/templates/skills/services/oracle/SKILL.md +300 -300
- package/templates/skills/services/postgresql/SKILL.md +336 -336
- package/templates/skills/services/rabbitmq/SKILL.md +296 -296
- package/templates/skills/services/redis/SKILL.md +302 -302
- package/templates/skills/services/s3/SKILL.md +308 -308
- package/templates/skills/services/sqlite/SKILL.md +304 -304
- package/templates/skills/services/sqlserver/SKILL.md +304 -304
- package/templates/skills/workflows/ralph/SKILL.md +309 -309
- package/templates/skills/workflows/ralph/install.sh +87 -87
- package/templates/skills/workflows/ralph/manifest.json +158 -158
|
@@ -9,6 +9,7 @@ export interface ClaudeCodeSetupResult {
|
|
|
9
9
|
detected: boolean;
|
|
10
10
|
mcpConfigured: boolean;
|
|
11
11
|
skillsInstalled: string[];
|
|
12
|
+
devSkillsInstalled: string[];
|
|
12
13
|
agentTeamsEnabled: boolean;
|
|
13
14
|
agentDefinitionsInstalled: string[];
|
|
14
15
|
}
|
|
@@ -26,10 +27,16 @@ export declare function isClaudeCodeInstalled(homeDir?: string): Promise<boolean
|
|
|
26
27
|
*/
|
|
27
28
|
export declare function configureMcpJson(projectRoot: string): Promise<boolean>;
|
|
28
29
|
/**
|
|
29
|
-
* Install rulebook skill templates as Claude Code commands.
|
|
30
|
+
* Install rulebook skill templates as Claude Code commands (legacy format).
|
|
30
31
|
* Copies templates/commands/*.md to .claude/commands/ in the project.
|
|
31
32
|
*/
|
|
32
33
|
export declare function installClaudeCodeSkills(projectRoot: string, templatesPath: string): Promise<string[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Install dev skills to .claude/skills/ (modern Claude Code format).
|
|
36
|
+
* Each skill is a directory with a SKILL.md file.
|
|
37
|
+
* Copies templates/dev-skills/<name>/SKILL.md to .claude/skills/<name>/SKILL.md.
|
|
38
|
+
*/
|
|
39
|
+
export declare function installDevSkills(projectRoot: string, templatesPath: string): Promise<string[]>;
|
|
33
40
|
/**
|
|
34
41
|
* Configure .claude/settings.json to enable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS.
|
|
35
42
|
* Creates the file if it does not exist. Preserves existing settings.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-mcp.d.ts","sourceRoot":"","sources":["../../src/core/claude-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACrC;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9E;AAYD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAuC5E;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAyBnB;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBnF;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAyBnB;AAWD;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"claude-mcp.d.ts","sourceRoot":"","sources":["../../src/core/claude-mcp.ts"],"names":[],"mappings":"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|
/**
|
|
70
|
-
* Install rulebook skill templates as Claude Code commands.
|
|
70
|
+
* Install rulebook skill templates as Claude Code commands (legacy format).
|
|
71
71
|
* Copies templates/commands/*.md to .claude/commands/ in the project.
|
|
72
72
|
*/
|
|
73
73
|
export async function installClaudeCodeSkills(projectRoot, templatesPath) {
|
|
@@ -90,6 +90,34 @@ export async function installClaudeCodeSkills(projectRoot, templatesPath) {
|
|
|
90
90
|
}
|
|
91
91
|
return installed;
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Install dev skills to .claude/skills/ (modern Claude Code format).
|
|
95
|
+
* Each skill is a directory with a SKILL.md file.
|
|
96
|
+
* Copies templates/dev-skills/<name>/SKILL.md to .claude/skills/<name>/SKILL.md.
|
|
97
|
+
*/
|
|
98
|
+
export async function installDevSkills(projectRoot, templatesPath) {
|
|
99
|
+
const skillsSourceDir = join(templatesPath, 'skills', 'dev');
|
|
100
|
+
const skillsTargetDir = join(projectRoot, '.claude', 'skills');
|
|
101
|
+
if (!(await fileExists(skillsSourceDir))) {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
await ensureDir(skillsTargetDir);
|
|
105
|
+
const entries = await readdir(skillsSourceDir, { withFileTypes: true });
|
|
106
|
+
const installed = [];
|
|
107
|
+
for (const entry of entries) {
|
|
108
|
+
if (!entry.isDirectory())
|
|
109
|
+
continue;
|
|
110
|
+
const skillFile = join(skillsSourceDir, entry.name, 'SKILL.md');
|
|
111
|
+
if (!(await fileExists(skillFile)))
|
|
112
|
+
continue;
|
|
113
|
+
const targetSkillDir = join(skillsTargetDir, entry.name);
|
|
114
|
+
await ensureDir(targetSkillDir);
|
|
115
|
+
const content = await readFile(skillFile);
|
|
116
|
+
await writeFile(join(targetSkillDir, 'SKILL.md'), content);
|
|
117
|
+
installed.push(entry.name);
|
|
118
|
+
}
|
|
119
|
+
return installed;
|
|
120
|
+
}
|
|
93
121
|
/**
|
|
94
122
|
* Configure .claude/settings.json to enable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS.
|
|
95
123
|
* Creates the file if it does not exist. Preserves existing settings.
|
|
@@ -161,6 +189,7 @@ export async function setupClaudeCodeIntegration(projectRoot, templatesPath, hom
|
|
|
161
189
|
detected: false,
|
|
162
190
|
mcpConfigured: false,
|
|
163
191
|
skillsInstalled: [],
|
|
192
|
+
devSkillsInstalled: [],
|
|
164
193
|
agentTeamsEnabled: false,
|
|
165
194
|
agentDefinitionsInstalled: [],
|
|
166
195
|
};
|
|
@@ -168,12 +197,14 @@ export async function setupClaudeCodeIntegration(projectRoot, templatesPath, hom
|
|
|
168
197
|
const resolvedTemplatesPath = templatesPath ?? getTemplatesPath();
|
|
169
198
|
const mcpConfigured = await configureMcpJson(projectRoot);
|
|
170
199
|
const skillsInstalled = await installClaudeCodeSkills(projectRoot, resolvedTemplatesPath);
|
|
200
|
+
const devSkillsInstalled = await installDevSkills(projectRoot, resolvedTemplatesPath);
|
|
171
201
|
const agentTeamsEnabled = await configureClaudeSettings(projectRoot);
|
|
172
202
|
const agentDefinitionsInstalled = await installAgentDefinitions(projectRoot, resolvedTemplatesPath);
|
|
173
203
|
return {
|
|
174
204
|
detected: true,
|
|
175
205
|
mcpConfigured,
|
|
176
206
|
skillsInstalled,
|
|
207
|
+
devSkillsInstalled,
|
|
177
208
|
agentTeamsEnabled,
|
|
178
209
|
agentDefinitionsInstalled,
|
|
179
210
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-mcp.js","sourceRoot":"","sources":["../../src/core/claude-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,QA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
|
|
5
5
|
export declare function generateModuleRules(module: string): Promise<string>;
|
|
6
6
|
export declare function generateServiceRules(service: string): Promise<string>;
|
|
7
7
|
export declare function generateGitRules(pushMode: string): Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Generate the agent delegation section for AGENTS.md.
|
|
10
|
+
* Adapts table based on detected languages and frameworks.
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateDelegationSection(config: ProjectConfig): string;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve placeholder values from project config.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveAgentPlaceholders(config: ProjectConfig): Record<string, string>;
|
|
17
|
+
/**
|
|
18
|
+
* Substitute placeholders in agent template content.
|
|
19
|
+
*/
|
|
20
|
+
export declare function substituteAgentPlaceholders(content: string, placeholders: Record<string, string>): string;
|
|
8
21
|
/**
|
|
9
22
|
* Generate modular AGENTS.md with references
|
|
10
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/core/generator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA2BjD,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA2VlF;AAED,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS7E;AAED,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAe/E;AAED,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAezE;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgB3E;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAqDxE;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;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,MAAM,CAAC,CAiCjB;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,MAAM,CAAC,CAoEjB"}
|
package/dist/core/generator.js
CHANGED
|
@@ -326,11 +326,11 @@ export async function generateFrameworkRules(framework) {
|
|
|
326
326
|
return await readFile(templatePath);
|
|
327
327
|
}
|
|
328
328
|
const title = framework.charAt(0).toUpperCase() + framework.slice(1);
|
|
329
|
-
return `<!-- ${framework.toUpperCase()}:START -->
|
|
330
|
-
# ${title} Framework Rules
|
|
331
|
-
|
|
332
|
-
Framework-specific rules for ${title}.
|
|
333
|
-
<!-- ${framework.toUpperCase()}:END -->
|
|
329
|
+
return `<!-- ${framework.toUpperCase()}:START -->
|
|
330
|
+
# ${title} Framework Rules
|
|
331
|
+
|
|
332
|
+
Framework-specific rules for ${title}.
|
|
333
|
+
<!-- ${framework.toUpperCase()}:END -->
|
|
334
334
|
`;
|
|
335
335
|
}
|
|
336
336
|
export async function generateModuleRules(module) {
|
|
@@ -374,31 +374,31 @@ export async function generateGitRules(pushMode) {
|
|
|
374
374
|
// Add push mode configuration
|
|
375
375
|
const pushModeConfig = `\n**AI Assistant Git Push Mode**: ${pushMode.toUpperCase()}\n\n`;
|
|
376
376
|
const pushModeInstructions = {
|
|
377
|
-
manual: `**CRITICAL**: Never execute \`git push\` commands automatically.
|
|
378
|
-
Always provide push commands for manual execution by the user.
|
|
379
|
-
|
|
380
|
-
Example:
|
|
381
|
-
\`\`\`
|
|
382
|
-
✋ MANUAL ACTION REQUIRED:
|
|
383
|
-
Run these commands manually (SSH password may be required):
|
|
384
|
-
git push origin main
|
|
385
|
-
git push origin v1.0.0
|
|
377
|
+
manual: `**CRITICAL**: Never execute \`git push\` commands automatically.
|
|
378
|
+
Always provide push commands for manual execution by the user.
|
|
379
|
+
|
|
380
|
+
Example:
|
|
381
|
+
\`\`\`
|
|
382
|
+
✋ MANUAL ACTION REQUIRED:
|
|
383
|
+
Run these commands manually (SSH password may be required):
|
|
384
|
+
git push origin main
|
|
385
|
+
git push origin v1.0.0
|
|
386
386
|
\`\`\``,
|
|
387
|
-
prompt: `**CRITICAL**: Always ask user permission before pushing.
|
|
388
|
-
|
|
389
|
-
Example:
|
|
390
|
-
\`\`\`
|
|
391
|
-
Ready to push changes. Execute these commands?
|
|
392
|
-
git push origin main
|
|
393
|
-
|
|
394
|
-
[Y/n]:
|
|
387
|
+
prompt: `**CRITICAL**: Always ask user permission before pushing.
|
|
388
|
+
|
|
389
|
+
Example:
|
|
390
|
+
\`\`\`
|
|
391
|
+
Ready to push changes. Execute these commands?
|
|
392
|
+
git push origin main
|
|
393
|
+
|
|
394
|
+
[Y/n]:
|
|
395
395
|
\`\`\``,
|
|
396
|
-
auto: `**INFO**: Automatic push enabled.
|
|
397
|
-
AI assistants may execute push commands automatically.
|
|
398
|
-
|
|
399
|
-
⚠️ Only use this mode if:
|
|
400
|
-
- SSH key has no password
|
|
401
|
-
- GitHub CLI is authenticated
|
|
396
|
+
auto: `**INFO**: Automatic push enabled.
|
|
397
|
+
AI assistants may execute push commands automatically.
|
|
398
|
+
|
|
399
|
+
⚠️ Only use this mode if:
|
|
400
|
+
- SSH key has no password
|
|
401
|
+
- GitHub CLI is authenticated
|
|
402
402
|
- You trust the AI assistant completely`,
|
|
403
403
|
};
|
|
404
404
|
// Insert push mode config after <!-- GIT:START -->
|
|
@@ -514,6 +514,251 @@ async function loadProjectConfigFromRulebook(projectRoot = process.cwd()) {
|
|
|
514
514
|
return {};
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
+
const AGENT_REGISTRY = [
|
|
518
|
+
// Core agents
|
|
519
|
+
{
|
|
520
|
+
task: 'Implementation',
|
|
521
|
+
agent: 'implementer',
|
|
522
|
+
model: 'sonnet',
|
|
523
|
+
when: 'Writing new code or modifying existing',
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
task: 'Research',
|
|
527
|
+
agent: 'researcher',
|
|
528
|
+
model: 'haiku',
|
|
529
|
+
when: 'Exploring codebase, finding patterns',
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
task: 'Testing',
|
|
533
|
+
agent: 'tester',
|
|
534
|
+
model: 'sonnet',
|
|
535
|
+
when: 'Writing and running tests',
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
task: 'Documentation',
|
|
539
|
+
agent: 'docs-writer',
|
|
540
|
+
model: 'haiku',
|
|
541
|
+
when: 'README, docs, changelogs',
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
task: 'Code Review',
|
|
545
|
+
agent: 'code-reviewer',
|
|
546
|
+
model: 'sonnet',
|
|
547
|
+
when: 'Reviewing implementations for quality',
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
task: 'Build/CI',
|
|
551
|
+
agent: 'build-engineer',
|
|
552
|
+
model: 'sonnet',
|
|
553
|
+
when: 'Build failures, CI, dependencies',
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
task: 'Security',
|
|
557
|
+
agent: 'security-reviewer',
|
|
558
|
+
model: 'haiku',
|
|
559
|
+
when: 'Dependency audit, vulnerability review',
|
|
560
|
+
},
|
|
561
|
+
// Specialist agents
|
|
562
|
+
{
|
|
563
|
+
task: 'Architecture',
|
|
564
|
+
agent: 'architect',
|
|
565
|
+
model: 'opus',
|
|
566
|
+
when: 'System design, ADRs, scalability decisions',
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
task: 'API Design',
|
|
570
|
+
agent: 'api-designer',
|
|
571
|
+
model: 'sonnet',
|
|
572
|
+
when: 'REST/GraphQL endpoints, OpenAPI specs',
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
task: 'Database',
|
|
576
|
+
agent: 'database-architect',
|
|
577
|
+
model: 'sonnet',
|
|
578
|
+
when: 'Schema design, migrations, query optimization',
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
task: 'DevOps',
|
|
582
|
+
agent: 'devops-engineer',
|
|
583
|
+
model: 'sonnet',
|
|
584
|
+
when: 'CI/CD, Docker, Kubernetes, infrastructure',
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
task: 'Performance',
|
|
588
|
+
agent: 'performance-engineer',
|
|
589
|
+
model: 'sonnet',
|
|
590
|
+
when: 'Profiling, benchmarks, optimization',
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
task: 'Refactoring',
|
|
594
|
+
agent: 'refactoring-agent',
|
|
595
|
+
model: 'sonnet',
|
|
596
|
+
when: 'Code smells, complexity reduction, cleanup',
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
task: 'Migration',
|
|
600
|
+
agent: 'migration-engineer',
|
|
601
|
+
model: 'sonnet',
|
|
602
|
+
when: 'DB migrations, API migrations, upgrades',
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
task: 'Accessibility',
|
|
606
|
+
agent: 'accessibility-reviewer',
|
|
607
|
+
model: 'haiku',
|
|
608
|
+
when: 'WCAG compliance, ARIA, screen readers',
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
task: 'i18n',
|
|
612
|
+
agent: 'i18n-engineer',
|
|
613
|
+
model: 'haiku',
|
|
614
|
+
when: 'Internationalization, localization, RTL',
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
task: 'UX Review',
|
|
618
|
+
agent: 'ux-reviewer',
|
|
619
|
+
model: 'haiku',
|
|
620
|
+
when: 'Usability, interaction patterns, error states',
|
|
621
|
+
},
|
|
622
|
+
// Orchestration
|
|
623
|
+
{
|
|
624
|
+
task: 'Orchestration',
|
|
625
|
+
agent: 'team-lead',
|
|
626
|
+
model: 'opus',
|
|
627
|
+
when: 'Multi-agent coordination for complex tasks',
|
|
628
|
+
},
|
|
629
|
+
];
|
|
630
|
+
/**
|
|
631
|
+
* Generate the agent delegation section for AGENTS.md.
|
|
632
|
+
* Adapts table based on detected languages and frameworks.
|
|
633
|
+
*/
|
|
634
|
+
export function generateDelegationSection(config) {
|
|
635
|
+
const lines = [];
|
|
636
|
+
const primaryLang = config.languages?.[0] || 'the project language';
|
|
637
|
+
const primaryFramework = config.frameworks?.[0] || '';
|
|
638
|
+
lines.push('## Agent Delegation');
|
|
639
|
+
lines.push('');
|
|
640
|
+
lines.push('Delegate work to specialist agents instead of doing everything in the main conversation. Each agent uses a cost-appropriate model.');
|
|
641
|
+
lines.push('');
|
|
642
|
+
lines.push('| Task | Agent | Model | When to use |');
|
|
643
|
+
lines.push('|------|-------|-------|-------------|');
|
|
644
|
+
for (const entry of AGENT_REGISTRY) {
|
|
645
|
+
lines.push(`| ${entry.task} | ${entry.agent} | ${entry.model} | ${entry.when} |`);
|
|
646
|
+
}
|
|
647
|
+
lines.push('');
|
|
648
|
+
lines.push('### Delegation Rules');
|
|
649
|
+
lines.push('');
|
|
650
|
+
lines.push('1. **Never write code directly in the main conversation** — delegate to the appropriate agent');
|
|
651
|
+
lines.push('2. **After implementing code**, launch tester + docs-writer in parallel to update tests and documentation');
|
|
652
|
+
lines.push('3. **The main conversation** serves for planning, coordination, and user communication only');
|
|
653
|
+
lines.push('4. **Use haiku agents** (researcher, docs-writer, security-reviewer) for read-only tasks — they are significantly cheaper');
|
|
654
|
+
lines.push('5. **Launch independent agents in parallel** when possible to maximize throughput');
|
|
655
|
+
lines.push('');
|
|
656
|
+
lines.push(`> **Project context**: Primary language is **${primaryLang}**${primaryFramework ? ` with **${primaryFramework}**` : ''}. Agents are pre-configured with this context.`);
|
|
657
|
+
lines.push('');
|
|
658
|
+
return lines.join('\n');
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Resolve placeholder values from project config.
|
|
662
|
+
*/
|
|
663
|
+
export function resolveAgentPlaceholders(config) {
|
|
664
|
+
const primaryLang = config.languages?.[0] || 'TypeScript';
|
|
665
|
+
const primaryFramework = config.frameworks?.[0] || '';
|
|
666
|
+
// Map language to common test framework
|
|
667
|
+
const testFrameworkMap = {
|
|
668
|
+
typescript: 'vitest',
|
|
669
|
+
javascript: 'jest',
|
|
670
|
+
python: 'pytest',
|
|
671
|
+
rust: 'cargo test',
|
|
672
|
+
go: 'go test',
|
|
673
|
+
java: 'JUnit',
|
|
674
|
+
csharp: 'xUnit',
|
|
675
|
+
ruby: 'RSpec',
|
|
676
|
+
php: 'PHPUnit',
|
|
677
|
+
swift: 'XCTest',
|
|
678
|
+
kotlin: 'JUnit',
|
|
679
|
+
dart: 'flutter test',
|
|
680
|
+
elixir: 'ExUnit',
|
|
681
|
+
scala: 'ScalaTest',
|
|
682
|
+
};
|
|
683
|
+
// Map language to file naming convention
|
|
684
|
+
const fileNamingMap = {
|
|
685
|
+
typescript: 'kebab-case',
|
|
686
|
+
javascript: 'kebab-case',
|
|
687
|
+
python: 'snake_case',
|
|
688
|
+
rust: 'snake_case',
|
|
689
|
+
go: 'snake_case',
|
|
690
|
+
java: 'PascalCase',
|
|
691
|
+
csharp: 'PascalCase',
|
|
692
|
+
ruby: 'snake_case',
|
|
693
|
+
php: 'PascalCase',
|
|
694
|
+
swift: 'PascalCase',
|
|
695
|
+
kotlin: 'PascalCase',
|
|
696
|
+
dart: 'snake_case',
|
|
697
|
+
elixir: 'snake_case',
|
|
698
|
+
scala: 'PascalCase',
|
|
699
|
+
};
|
|
700
|
+
const langKey = primaryLang.toLowerCase();
|
|
701
|
+
return {
|
|
702
|
+
'{{language}}': primaryLang,
|
|
703
|
+
'{{framework}}': primaryFramework || 'none',
|
|
704
|
+
'{{test_framework}}': testFrameworkMap[langKey] || 'the project test framework',
|
|
705
|
+
'{{file_naming}}': fileNamingMap[langKey] || 'kebab-case',
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Substitute placeholders in agent template content.
|
|
710
|
+
*/
|
|
711
|
+
export function substituteAgentPlaceholders(content, placeholders) {
|
|
712
|
+
let result = content;
|
|
713
|
+
for (const [key, value] of Object.entries(placeholders)) {
|
|
714
|
+
result = result.replaceAll(key, value);
|
|
715
|
+
}
|
|
716
|
+
return result;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Install agent definitions to .claude/agents/ with placeholder substitution.
|
|
720
|
+
*/
|
|
721
|
+
async function installAgentsWithPlaceholders(projectRoot, config) {
|
|
722
|
+
const agentsDir = path.join(getTemplatesDir(), 'agents');
|
|
723
|
+
const targetDir = path.join(projectRoot, '.claude', 'agents');
|
|
724
|
+
if (!(await fileExists(agentsDir)))
|
|
725
|
+
return;
|
|
726
|
+
await ensureDir(targetDir);
|
|
727
|
+
const placeholders = resolveAgentPlaceholders(config);
|
|
728
|
+
const { readdirSync } = await import('fs');
|
|
729
|
+
const files = readdirSync(agentsDir).filter((f) => f.endsWith('.md'));
|
|
730
|
+
for (const file of files) {
|
|
731
|
+
const content = await readFile(path.join(agentsDir, file));
|
|
732
|
+
const substituted = substituteAgentPlaceholders(content, placeholders);
|
|
733
|
+
await writeFile(path.join(targetDir, file), substituted);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Install dev skills to .claude/skills/ (modern Claude Code skills format).
|
|
738
|
+
* Each skill is a directory with a SKILL.md file.
|
|
739
|
+
* Always installed on init/update — useful for any project regardless of size.
|
|
740
|
+
*/
|
|
741
|
+
async function installDevSkillsFromTemplates(projectRoot) {
|
|
742
|
+
const { readdirSync, statSync } = await import('fs');
|
|
743
|
+
const skillsSourceDir = path.join(getTemplatesDir(), 'skills', 'dev');
|
|
744
|
+
const skillsTargetDir = path.join(projectRoot, '.claude', 'skills');
|
|
745
|
+
if (!(await fileExists(skillsSourceDir)))
|
|
746
|
+
return;
|
|
747
|
+
await ensureDir(skillsTargetDir);
|
|
748
|
+
const entries = readdirSync(skillsSourceDir);
|
|
749
|
+
for (const entry of entries) {
|
|
750
|
+
const entryPath = path.join(skillsSourceDir, entry);
|
|
751
|
+
if (!statSync(entryPath).isDirectory())
|
|
752
|
+
continue;
|
|
753
|
+
const skillFile = path.join(entryPath, 'SKILL.md');
|
|
754
|
+
if (!(await fileExists(skillFile)))
|
|
755
|
+
continue;
|
|
756
|
+
const targetSkillDir = path.join(skillsTargetDir, entry);
|
|
757
|
+
await ensureDir(targetSkillDir);
|
|
758
|
+
const content = await readFile(skillFile);
|
|
759
|
+
await writeFile(path.join(targetSkillDir, 'SKILL.md'), content);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
517
762
|
/**
|
|
518
763
|
* Generate modular AGENTS.md with references
|
|
519
764
|
*/
|
|
@@ -769,6 +1014,16 @@ export async function generateModularAgents(config, projectRoot = process.cwd())
|
|
|
769
1014
|
catch {
|
|
770
1015
|
// Multi-tool generation failed - skip silently
|
|
771
1016
|
}
|
|
1017
|
+
// Generate agent delegation section
|
|
1018
|
+
sections.push(generateDelegationSection(mergedConfig));
|
|
1019
|
+
// Install agent definitions and dev skills to .claude/
|
|
1020
|
+
try {
|
|
1021
|
+
await installAgentsWithPlaceholders(projectRoot, mergedConfig);
|
|
1022
|
+
await installDevSkillsFromTemplates(projectRoot);
|
|
1023
|
+
}
|
|
1024
|
+
catch {
|
|
1025
|
+
// Agent/skill installation failed — skip silently
|
|
1026
|
+
}
|
|
772
1027
|
// Append AGENTS.override.md content if present and non-empty
|
|
773
1028
|
try {
|
|
774
1029
|
const { readOverrideContent } = await import('./override-manager.js');
|