@codemieai/code 0.0.44 → 0.0.46
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/dist/agents/core/BaseAgentAdapter.d.ts +9 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +31 -3
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/core/metrics/types.d.ts +0 -6
- package/dist/agents/core/metrics/types.d.ts.map +1 -1
- package/dist/agents/core/session/BaseSessionAdapter.d.ts +0 -6
- package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
- package/dist/agents/core/types.d.ts +83 -0
- package/dist/agents/core/types.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin-installer.d.ts +0 -11
- package/dist/agents/plugins/claude/claude.plugin-installer.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin-installer.js +0 -32
- package/dist/agents/plugins/claude/claude.plugin-installer.js.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.js +10 -1
- package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
- package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.session.js +1 -28
- package/dist/agents/plugins/claude/claude.session.js.map +1 -1
- package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/agents/plugins/claude/plugin/README.md +1 -14
- package/dist/agents/plugins/claude/plugin/hooks/hooks.json +10 -5
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/SKILL.md +206 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-agent.md +45 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-claude-md-snippet.md +40 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-command.md +30 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-hooks.json +23 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-skill.md +48 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-agent.md +145 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-claude-md-snippet.md +126 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-command.md +170 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-hooks.json +46 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-skill.md +144 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/sample-report.md +223 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/best-practices.md +510 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/component-checklists.md +413 -0
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/scripts/scan-repo.sh +162 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +3 -78
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js +7 -16
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js.map +1 -1
- package/dist/agents/plugins/claude/sounds-installer.d.ts +1 -1
- package/dist/agents/plugins/claude/sounds-installer.d.ts.map +1 -1
- package/dist/agents/plugins/claude/sounds-installer.js +1 -4
- package/dist/agents/plugins/claude/sounds-installer.js.map +1 -1
- package/dist/agents/plugins/codemie-code.plugin.d.ts +1 -4
- package/dist/agents/plugins/codemie-code.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/codemie-code.plugin.js +26 -81
- package/dist/agents/plugins/codemie-code.plugin.js.map +1 -1
- package/dist/agents/plugins/gemini/gemini.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/gemini/gemini.plugin.js +10 -0
- package/dist/agents/plugins/gemini/gemini.plugin.js.map +1 -1
- package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts +1 -8
- package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts.map +1 -1
- package/dist/agents/plugins/gemini/gemini.session-adapter.js +2 -30
- package/dist/agents/plugins/gemini/gemini.session-adapter.js.map +1 -1
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js +2 -8
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.d.ts.map +1 -1
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js +0 -7
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js.map +1 -1
- package/dist/agents/plugins/opencode/index.d.ts +1 -1
- package/dist/agents/plugins/opencode/index.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/index.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode-message-types.d.ts +2 -22
- package/dist/agents/plugins/opencode/opencode-message-types.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode-message-types.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.session.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.session.js +5 -30
- package/dist/agents/plugins/opencode/opencode.session.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.js +0 -2
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.js.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts +0 -8
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js +8 -97
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js.map +1 -1
- package/dist/cli/commands/analytics/aggregator.d.ts +0 -8
- package/dist/cli/commands/analytics/aggregator.d.ts.map +1 -1
- package/dist/cli/commands/analytics/aggregator.js +5 -100
- package/dist/cli/commands/analytics/aggregator.js.map +1 -1
- package/dist/cli/commands/analytics/data-loader.d.ts +0 -7
- package/dist/cli/commands/analytics/data-loader.d.ts.map +1 -1
- package/dist/cli/commands/analytics/data-loader.js +3 -10
- package/dist/cli/commands/analytics/data-loader.js.map +1 -1
- package/dist/cli/commands/analytics/exporter.d.ts.map +1 -1
- package/dist/cli/commands/analytics/exporter.js +0 -12
- package/dist/cli/commands/analytics/exporter.js.map +1 -1
- package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
- package/dist/cli/commands/analytics/formatter.js +0 -9
- package/dist/cli/commands/analytics/formatter.js.map +1 -1
- package/dist/cli/commands/analytics/types.d.ts +0 -17
- package/dist/cli/commands/analytics/types.d.ts.map +1 -1
- package/dist/cli/commands/assistants/chat/historyLoader.d.ts +22 -0
- package/dist/cli/commands/assistants/chat/historyLoader.d.ts.map +1 -0
- package/dist/cli/commands/assistants/chat/historyLoader.js +80 -0
- package/dist/cli/commands/assistants/chat/historyLoader.js.map +1 -0
- package/dist/cli/commands/assistants/{chat.d.ts → chat/index.d.ts} +1 -1
- package/dist/cli/commands/assistants/chat/index.d.ts.map +1 -0
- package/dist/cli/commands/assistants/{chat.js → chat/index.js} +54 -45
- package/dist/cli/commands/assistants/chat/index.js.map +1 -0
- package/dist/cli/commands/assistants/chat/types.d.ts +27 -0
- package/dist/cli/commands/assistants/chat/types.d.ts.map +1 -0
- package/dist/cli/commands/assistants/chat/types.js +5 -0
- package/dist/cli/commands/assistants/chat/types.js.map +1 -0
- package/dist/cli/commands/assistants/chat/utils.d.ts +12 -0
- package/dist/cli/commands/assistants/chat/utils.d.ts.map +1 -0
- package/dist/cli/commands/assistants/chat/utils.js +24 -0
- package/dist/cli/commands/assistants/chat/utils.js.map +1 -0
- package/dist/cli/commands/assistants/constants.d.ts +1 -0
- package/dist/cli/commands/assistants/constants.d.ts.map +1 -1
- package/dist/cli/commands/assistants/constants.js.map +1 -1
- package/dist/cli/commands/assistants/index.js +2 -2
- package/dist/cli/commands/assistants/index.js.map +1 -1
- package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.js +1 -1
- package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js +1 -1
- package/dist/cli/commands/assistants/setup/index.js +4 -4
- package/dist/cli/commands/assistants/setup/index.js.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/index.d.ts +1 -1
- package/dist/cli/commands/assistants/setup/selection/index.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/index.js +5 -3
- package/dist/cli/commands/assistants/setup/selection/index.js.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js +7 -1
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/types.d.ts +2 -0
- package/dist/cli/commands/assistants/setup/selection/types.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/ui.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/selection/ui.js +15 -4
- package/dist/cli/commands/assistants/setup/selection/ui.js.map +1 -1
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +22 -6
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/plugin.d.ts +16 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +210 -0
- package/dist/cli/commands/plugin.js.map +1 -0
- package/dist/cli/commands/setup.js +1 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +3 -1
- package/dist/cli/commands/skill.js.map +1 -1
- package/dist/cli/commands/sound.d.ts +3 -0
- package/dist/cli/commands/sound.d.ts.map +1 -0
- package/dist/cli/commands/sound.js +87 -0
- package/dist/cli/commands/sound.js.map +1 -0
- package/dist/cli/commands/test-metrics.js +3 -5
- package/dist/cli/commands/test-metrics.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/env/types.d.ts +8 -0
- package/dist/env/types.d.ts.map +1 -1
- package/dist/env/types.js.map +1 -1
- package/dist/plugins/core/index.d.ts +13 -0
- package/dist/plugins/core/index.d.ts.map +1 -0
- package/dist/plugins/core/index.js +15 -0
- package/dist/plugins/core/index.js.map +1 -0
- package/dist/plugins/core/manifest-parser.d.ts +28 -0
- package/dist/plugins/core/manifest-parser.d.ts.map +1 -0
- package/dist/plugins/core/manifest-parser.js +137 -0
- package/dist/plugins/core/manifest-parser.js.map +1 -0
- package/dist/plugins/core/plugin-cache.d.ts +65 -0
- package/dist/plugins/core/plugin-cache.d.ts.map +1 -0
- package/dist/plugins/core/plugin-cache.js +170 -0
- package/dist/plugins/core/plugin-cache.js.map +1 -0
- package/dist/plugins/core/plugin-loader.d.ts +21 -0
- package/dist/plugins/core/plugin-loader.d.ts.map +1 -0
- package/dist/plugins/core/plugin-loader.js +55 -0
- package/dist/plugins/core/plugin-loader.js.map +1 -0
- package/dist/plugins/core/plugin-resolver.d.ts +33 -0
- package/dist/plugins/core/plugin-resolver.d.ts.map +1 -0
- package/dist/plugins/core/plugin-resolver.js +118 -0
- package/dist/plugins/core/plugin-resolver.js.map +1 -0
- package/dist/plugins/core/types.d.ts +183 -0
- package/dist/plugins/core/types.d.ts.map +1 -0
- package/dist/plugins/core/types.js +22 -0
- package/dist/plugins/core/types.js.map +1 -0
- package/dist/plugins/loaders/agents-loader.d.ts +19 -0
- package/dist/plugins/loaders/agents-loader.d.ts.map +1 -0
- package/dist/plugins/loaders/agents-loader.js +92 -0
- package/dist/plugins/loaders/agents-loader.js.map +1 -0
- package/dist/plugins/loaders/hooks-loader.d.ts +27 -0
- package/dist/plugins/loaders/hooks-loader.d.ts.map +1 -0
- package/dist/plugins/loaders/hooks-loader.js +94 -0
- package/dist/plugins/loaders/hooks-loader.js.map +1 -0
- package/dist/plugins/loaders/mcp-loader.d.ts +24 -0
- package/dist/plugins/loaders/mcp-loader.d.ts.map +1 -0
- package/dist/plugins/loaders/mcp-loader.js +86 -0
- package/dist/plugins/loaders/mcp-loader.js.map +1 -0
- package/dist/plugins/loaders/skills-loader.d.ts +30 -0
- package/dist/plugins/loaders/skills-loader.d.ts.map +1 -0
- package/dist/plugins/loaders/skills-loader.js +167 -0
- package/dist/plugins/loaders/skills-loader.js.map +1 -0
- package/dist/providers/plugins/bedrock/bedrock.template.js +1 -1
- package/dist/providers/plugins/jwt/jwt.setup-steps.js +1 -1
- package/dist/providers/plugins/jwt/jwt.template.js +1 -1
- package/dist/providers/plugins/litellm/litellm.template.js +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +10 -0
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/proxy-types.d.ts +3 -0
- package/dist/providers/plugins/sso/proxy/proxy-types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.js +2 -3
- package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts +21 -0
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js +159 -0
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts +24 -0
- package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/constants.js +36 -0
- package/dist/providers/plugins/sso/session/processors/conversations/constants.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts +19 -0
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/{conversation-sync-processor.js → syncProcessor.js} +48 -33
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/{conversation-types.d.ts → types.d.ts} +14 -2
- package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/types.js +14 -0
- package/dist/providers/plugins/sso/session/processors/conversations/types.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js +16 -17
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts +6 -5
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js +40 -39
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js +2 -6
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts +74 -31
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.template.js +1 -1
- package/dist/{agents/codemie-code/skills → skills}/core/SkillDiscovery.d.ts +10 -0
- package/dist/skills/core/SkillDiscovery.d.ts.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/core/SkillDiscovery.js +64 -7
- package/dist/skills/core/SkillDiscovery.js.map +1 -0
- package/dist/skills/core/SkillManager.d.ts.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/core/SkillManager.js +15 -10
- package/dist/skills/core/SkillManager.js.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/core/types.d.ts +3 -25
- package/dist/skills/core/types.d.ts.map +1 -0
- package/dist/skills/core/types.js.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/index.d.ts +3 -3
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/index.js +2 -2
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/sync/SkillSync.d.ts.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/sync/SkillSync.js +5 -3
- package/dist/skills/sync/SkillSync.js.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/utils/content-loader.d.ts +2 -12
- package/dist/skills/utils/content-loader.d.ts.map +1 -0
- package/dist/{agents/codemie-code/skills → skills}/utils/content-loader.js +3 -8
- package/dist/skills/utils/content-loader.js.map +1 -0
- package/dist/skills/utils/pattern-matcher.d.ts.map +1 -0
- package/dist/skills/utils/pattern-matcher.js.map +1 -0
- package/dist/utils/extensions-scan.d.ts +27 -0
- package/dist/utils/extensions-scan.d.ts.map +1 -0
- package/dist/utils/extensions-scan.js +182 -0
- package/dist/utils/extensions-scan.js.map +1 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/package.json +1 -1
- package/dist/agents/codemie-code/agent.d.ts +0 -129
- package/dist/agents/codemie-code/agent.d.ts.map +0 -1
- package/dist/agents/codemie-code/agent.js +0 -1106
- package/dist/agents/codemie-code/agent.js.map +0 -1
- package/dist/agents/codemie-code/config.d.ts +0 -40
- package/dist/agents/codemie-code/config.d.ts.map +0 -1
- package/dist/agents/codemie-code/config.js +0 -293
- package/dist/agents/codemie-code/config.js.map +0 -1
- package/dist/agents/codemie-code/filters.d.ts +0 -91
- package/dist/agents/codemie-code/filters.d.ts.map +0 -1
- package/dist/agents/codemie-code/filters.js +0 -328
- package/dist/agents/codemie-code/filters.js.map +0 -1
- package/dist/agents/codemie-code/index.d.ts +0 -93
- package/dist/agents/codemie-code/index.d.ts.map +0 -1
- package/dist/agents/codemie-code/index.js +0 -359
- package/dist/agents/codemie-code/index.js.map +0 -1
- package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +0 -87
- package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +0 -1
- package/dist/agents/codemie-code/modes/contextAwarePlanning.js +0 -957
- package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +0 -1
- package/dist/agents/codemie-code/modes/planMode.d.ts +0 -116
- package/dist/agents/codemie-code/modes/planMode.d.ts.map +0 -1
- package/dist/agents/codemie-code/modes/planMode.js +0 -537
- package/dist/agents/codemie-code/modes/planMode.js.map +0 -1
- package/dist/agents/codemie-code/prompts.d.ts +0 -47
- package/dist/agents/codemie-code/prompts.d.ts.map +0 -1
- package/dist/agents/codemie-code/prompts.js +0 -207
- package/dist/agents/codemie-code/prompts.js.map +0 -1
- package/dist/agents/codemie-code/skills/core/SkillDiscovery.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/core/SkillDiscovery.js.map +0 -1
- package/dist/agents/codemie-code/skills/core/SkillManager.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/core/SkillManager.js.map +0 -1
- package/dist/agents/codemie-code/skills/core/types.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/core/types.js.map +0 -1
- package/dist/agents/codemie-code/skills/index.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/index.js.map +0 -1
- package/dist/agents/codemie-code/skills/sync/SkillSync.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/sync/SkillSync.js.map +0 -1
- package/dist/agents/codemie-code/skills/utils/content-loader.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/utils/content-loader.js.map +0 -1
- package/dist/agents/codemie-code/skills/utils/frontmatter.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/utils/frontmatter.js.map +0 -1
- package/dist/agents/codemie-code/skills/utils/pattern-matcher.d.ts.map +0 -1
- package/dist/agents/codemie-code/skills/utils/pattern-matcher.js.map +0 -1
- package/dist/agents/codemie-code/storage/todoStorage.d.ts +0 -78
- package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +0 -1
- package/dist/agents/codemie-code/storage/todoStorage.js +0 -225
- package/dist/agents/codemie-code/storage/todoStorage.js.map +0 -1
- package/dist/agents/codemie-code/tokenUtils.d.ts +0 -108
- package/dist/agents/codemie-code/tokenUtils.d.ts.map +0 -1
- package/dist/agents/codemie-code/tokenUtils.js +0 -220
- package/dist/agents/codemie-code/tokenUtils.js.map +0 -1
- package/dist/agents/codemie-code/toolMetadata.d.ts +0 -15
- package/dist/agents/codemie-code/toolMetadata.d.ts.map +0 -1
- package/dist/agents/codemie-code/toolMetadata.js +0 -316
- package/dist/agents/codemie-code/toolMetadata.js.map +0 -1
- package/dist/agents/codemie-code/tools/assistant-invocation.d.ts +0 -47
- package/dist/agents/codemie-code/tools/assistant-invocation.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/assistant-invocation.js +0 -129
- package/dist/agents/codemie-code/tools/assistant-invocation.js.map +0 -1
- package/dist/agents/codemie-code/tools/index.d.ts +0 -111
- package/dist/agents/codemie-code/tools/index.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/index.js +0 -424
- package/dist/agents/codemie-code/tools/index.js.map +0 -1
- package/dist/agents/codemie-code/tools/planning.d.ts +0 -54
- package/dist/agents/codemie-code/tools/planning.d.ts.map +0 -1
- package/dist/agents/codemie-code/tools/planning.js +0 -226
- package/dist/agents/codemie-code/tools/planning.js.map +0 -1
- package/dist/agents/codemie-code/types.d.ts +0 -459
- package/dist/agents/codemie-code/types.d.ts.map +0 -1
- package/dist/agents/codemie-code/types.js +0 -59
- package/dist/agents/codemie-code/types.js.map +0 -1
- package/dist/agents/codemie-code/ui/autocomplete.d.ts +0 -98
- package/dist/agents/codemie-code/ui/autocomplete.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui/autocomplete.js +0 -145
- package/dist/agents/codemie-code/ui/autocomplete.js.map +0 -1
- package/dist/agents/codemie-code/ui/keyHandlers.d.ts +0 -112
- package/dist/agents/codemie-code/ui/keyHandlers.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui/keyHandlers.js +0 -415
- package/dist/agents/codemie-code/ui/keyHandlers.js.map +0 -1
- package/dist/agents/codemie-code/ui/mentions.d.ts +0 -86
- package/dist/agents/codemie-code/ui/mentions.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui/mentions.js +0 -122
- package/dist/agents/codemie-code/ui/mentions.js.map +0 -1
- package/dist/agents/codemie-code/ui/progressTracker.d.ts +0 -125
- package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui/progressTracker.js +0 -343
- package/dist/agents/codemie-code/ui/progressTracker.js.map +0 -1
- package/dist/agents/codemie-code/ui/terminalCodes.d.ts +0 -38
- package/dist/agents/codemie-code/ui/terminalCodes.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui/terminalCodes.js +0 -42
- package/dist/agents/codemie-code/ui/terminalCodes.js.map +0 -1
- package/dist/agents/codemie-code/ui/todoPanel.d.ts +0 -112
- package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui/todoPanel.js +0 -321
- package/dist/agents/codemie-code/ui/todoPanel.js.map +0 -1
- package/dist/agents/codemie-code/ui.d.ts +0 -180
- package/dist/agents/codemie-code/ui.d.ts.map +0 -1
- package/dist/agents/codemie-code/ui.js +0 -1345
- package/dist/agents/codemie-code/ui.js.map +0 -1
- package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +0 -87
- package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +0 -1
- package/dist/agents/codemie-code/utils/progressionEnforcer.js +0 -293
- package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +0 -1
- package/dist/agents/codemie-code/utils/todoParser.d.ts +0 -41
- package/dist/agents/codemie-code/utils/todoParser.d.ts.map +0 -1
- package/dist/agents/codemie-code/utils/todoParser.js +0 -305
- package/dist/agents/codemie-code/utils/todoParser.js.map +0 -1
- package/dist/agents/codemie-code/utils/todoValidator.d.ts +0 -65
- package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +0 -1
- package/dist/agents/codemie-code/utils/todoValidator.js +0 -249
- package/dist/agents/codemie-code/utils/todoValidator.js.map +0 -1
- package/dist/agents/codemie-code/validators/planValidator.d.ts +0 -94
- package/dist/agents/codemie-code/validators/planValidator.d.ts.map +0 -1
- package/dist/agents/codemie-code/validators/planValidator.js +0 -281
- package/dist/agents/codemie-code/validators/planValidator.js.map +0 -1
- package/dist/agents/plugins/claude/plugin/hooks/hooks.windows.json +0 -98
- package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.ps1 +0 -112
- package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.sh +0 -58
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts +0 -26
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts.map +0 -1
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.js +0 -38
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.js.map +0 -1
- package/dist/cli/commands/assistants/chat.d.ts.map +0 -1
- package/dist/cli/commands/assistants/chat.js.map +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts +0 -26
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts.map +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js +0 -146
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js.map +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts +0 -22
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts.map +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js.map +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.d.ts.map +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js +0 -7
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js.map +0 -1
- /package/dist/{agents/codemie-code/skills → skills}/core/SkillManager.d.ts +0 -0
- /package/dist/{agents/codemie-code/skills → skills}/core/types.js +0 -0
- /package/dist/{agents/codemie-code/skills → skills}/sync/SkillSync.d.ts +0 -0
- /package/dist/{agents/codemie-code/skills → skills}/utils/pattern-matcher.d.ts +0 -0
- /package/dist/{agents/codemie-code/skills → skills}/utils/pattern-matcher.js +0 -0
- /package/dist/{agents/codemie-code/skills/utils → utils}/frontmatter.d.ts +0 -0
- /package/dist/{agents/codemie-code/skills/utils → utils}/frontmatter.js +0 -0
package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/best-practices.md
ADDED
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
# Best Practices Reference
|
|
2
|
+
|
|
3
|
+
Rationale, anti-patterns, and quick-fix guidance for each component type.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Skill Types
|
|
8
|
+
|
|
9
|
+
### Codemie-Delegating Skills: Reduced Rubric Applies
|
|
10
|
+
|
|
11
|
+
**What they are**: Thin wrapper skills that route a user request to a Codemie AI assistant via API (`codemie assistants chat <uuid>`). They do not execute local tool calls, have no step-by-step workflow, and do not control output format — the backend assistant handles all of that.
|
|
12
|
+
|
|
13
|
+
**Detection**:
|
|
14
|
+
```bash
|
|
15
|
+
grep -i "codemie.*assistant\|codemie.*chat\|assistants chat" SKILL.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**What to skip** (do NOT penalise for these — they are architecturally N/A):
|
|
19
|
+
- `allowed-tools` — no local tool execution happens
|
|
20
|
+
- Methodology / workflow section — delegation is the entire process
|
|
21
|
+
- Output format section — determined by the assistant
|
|
22
|
+
- Examples section — invocation differs from standard skills
|
|
23
|
+
- Checklists — no process steps to enumerate
|
|
24
|
+
|
|
25
|
+
**What still matters** (always assessed):
|
|
26
|
+
- Identity: name convention, description quality (users still need to find and trigger it)
|
|
27
|
+
- Technical hygiene: especially **no hardcoded UUIDs** (see below)
|
|
28
|
+
- Design: single responsibility, clear triggers, token budget
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Skills
|
|
33
|
+
|
|
34
|
+
### ✅ Description: Third-person with specific trigger phrases
|
|
35
|
+
|
|
36
|
+
**Why it matters**: The `description` field is the only signal Claude uses to decide whether to load a skill. Vague descriptions cause the skill to never load (misses) or load on unrelated tasks (false positives). Specific trigger phrases make the skill predictable.
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
# ✅ Good — third person, specific phrases
|
|
40
|
+
description: This skill should be used when the user asks to "commit changes",
|
|
41
|
+
"create a conventional commit", "stage and commit", or wants to write a commit
|
|
42
|
+
message following the conventional commits standard.
|
|
43
|
+
|
|
44
|
+
# ❌ Bad — vague, wrong person, no triggers
|
|
45
|
+
description: Use this skill for git operations and commits.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### ✅ `allowed-tools`: Always specify explicitly
|
|
49
|
+
|
|
50
|
+
**Why it matters**: Without `allowed-tools`, Claude defaults to its full toolset. Explicit restrictions enforce least-privilege and prevent a documentation skill from accidentally running shell commands.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
# ✅ Good
|
|
54
|
+
allowed-tools: [Read, Grep, Glob]
|
|
55
|
+
|
|
56
|
+
# ❌ Bad — missing entirely (defaults to unconstrained)
|
|
57
|
+
# (no allowed-tools field in frontmatter)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### ✅ Keep SKILL.md lean — move details to `references/`
|
|
61
|
+
|
|
62
|
+
**Why it matters**: SKILL.md loads into context every time the skill triggers. A 6,000-token SKILL.md consumes substantial context even when 80% of the content isn't relevant to the current task. Lean SKILL.md + on-demand references = efficient context use.
|
|
63
|
+
|
|
64
|
+
**Target**: SKILL.md body 1,500–2,000 words. Move detailed docs to `references/`.
|
|
65
|
+
|
|
66
|
+
### ✅ Single focused purpose
|
|
67
|
+
|
|
68
|
+
**Why it matters**: Multi-purpose skills have ambiguous trigger conditions ("does this trigger for commits OR for PRs?") and are harder to maintain (fixing a commit bug might break the PR flow).
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
# ✅ Good
|
|
72
|
+
name: commit-helper # one responsibility: commits
|
|
73
|
+
name: pr-creator # one responsibility: pull requests
|
|
74
|
+
|
|
75
|
+
# ❌ Bad — three concerns in one
|
|
76
|
+
name: git-workflow-helper # commits + PRs + branch management
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### ✅ Include actionable checklists (`- [ ]`)
|
|
80
|
+
|
|
81
|
+
**Why it matters**: Checklists make the skill's criteria explicit and verifiable. They give the executing Claude instance something to tick off, reducing missed steps.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Agents
|
|
86
|
+
|
|
87
|
+
### ✅ Always specify `model:`
|
|
88
|
+
|
|
89
|
+
**Why it matters**: Without a model, Claude selects the default. The default may be over-powered (costly for simple classification) or under-powered (Haiku for complex reasoning). Explicit model choice is an intentional architectural decision.
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
# ✅ Good — match model to task complexity
|
|
93
|
+
model: claude-haiku-4-5-20251001 # fast lookups, classification
|
|
94
|
+
model: claude-sonnet-4-6 # balanced reasoning, most tasks
|
|
95
|
+
model: claude-opus-4-6 # complex analysis, architecture
|
|
96
|
+
model: inherit # intentionally use calling context's model
|
|
97
|
+
|
|
98
|
+
# ❌ Bad — no model
|
|
99
|
+
# (no model: field)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**`model: inherit` is valid**: It means the agent deliberately adopts the model of whoever invokes it. This is a legitimate architectural choice (e.g., when agents are invoked from other agents and should match capability). Do **not** penalise `model: inherit` — penalise only a missing `model:` field entirely.
|
|
103
|
+
|
|
104
|
+
### ✅ Justify powerful tools inline
|
|
105
|
+
|
|
106
|
+
**Why it matters**: Bash is the most powerful and risky tool, but Write, Edit, WebFetch, and WebSearch also have significant side effects. An agent with an 8-tool list gives no signal about why each tool is needed. Justification creates an audit trail and forces minimum-privilege thinking.
|
|
107
|
+
|
|
108
|
+
**Rule**: Any tool from `[Bash, Write, Edit, WebFetch, WebSearch]` in a tool list of 4+ tools should be accompanied by an inline comment within 3 lines of the `tools:` declaration.
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
# ✅ Good — comment immediately after tools line
|
|
112
|
+
tools: [Read, Grep, Bash]
|
|
113
|
+
# Bash required for: git diff, git log to inspect changed files
|
|
114
|
+
|
|
115
|
+
# ✅ Also good — comment on same line (if format allows)
|
|
116
|
+
tools: [Glob, Grep, Read, WebFetch, TodoWrite, WebSearch, Edit, Write, Bash]
|
|
117
|
+
# Bash: run tests/scripts; Edit/Write: create spec files; WebFetch/WebSearch: look up API docs
|
|
118
|
+
|
|
119
|
+
# ❌ Bad — no justification for Bash (or any powerful tool)
|
|
120
|
+
tools: [Read, Grep, Glob, Bash, Write, WebFetch]
|
|
121
|
+
# (nothing explaining why Bash, Write, or WebFetch are needed)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Partial credit**: A comment that says "for running commands" or "for file operations" is better than nothing but too vague — partial credit applies.
|
|
125
|
+
|
|
126
|
+
### ✅ Description: Third-person with trigger phrases and negative cases
|
|
127
|
+
|
|
128
|
+
**Why it matters**: The description determines when the agent auto-loads. Three failure modes exist:
|
|
129
|
+
1. **Second-person user-directed** ("Use this agent when **you** need to…") — places the user as subject; awkward in agent routing context
|
|
130
|
+
2. **Object-directed but no negatives** ("Use this agent when the user requests…") — acceptable but incomplete
|
|
131
|
+
3. **Third-person with positives AND negatives** — ideal; routes correctly and prevents over-invocation
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
# ✅ Best — third person, positive triggers, negative cases
|
|
135
|
+
description: |-
|
|
136
|
+
This agent should be invoked when code needs to be reviewed for quality or security.
|
|
137
|
+
Invoke after completing a feature, bug fix, or refactor.
|
|
138
|
+
Do NOT invoke for: architecture decisions, test writing, or deployment tasks.
|
|
139
|
+
|
|
140
|
+
# ⚠️ Acceptable — object-directed, missing negative cases
|
|
141
|
+
description: |-
|
|
142
|
+
Use this agent when the user requests a code review.
|
|
143
|
+
Focuses on Git-tracked changes only.
|
|
144
|
+
|
|
145
|
+
# ❌ Bad — user-directed second person, vague
|
|
146
|
+
description: Use this agent when you need to review code.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Scoring**: Full pass → third-person with negatives; partial → "Use this agent when the user…" with triggers; lower partial → "Use this agent when you…" with triggers.
|
|
150
|
+
|
|
151
|
+
### ✅ Include anti-hallucination guardrails
|
|
152
|
+
|
|
153
|
+
**Why it matters**: Without explicit instructions, agents confidently state incorrect information (wrong version numbers, invented API signatures, fabricated statistics). Guardrails reduce this significantly.
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
# ✅ Good — explicit guardrails
|
|
157
|
+
## Source Verification
|
|
158
|
+
- Cite documentation or tool output when stating facts
|
|
159
|
+
- State "I don't have verified info on..." when uncertain
|
|
160
|
+
- Never invent: statistics, version numbers, API signatures, error messages
|
|
161
|
+
|
|
162
|
+
# ❌ Bad — no accuracy guidance at all
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### ✅ Define scope with negative cases ("When NOT to use")
|
|
166
|
+
|
|
167
|
+
**Why it matters**: Without negative cases, agents are invoked for everything related to their domain. A "code-reviewer" agent without negative cases might be invoked to review architecture decisions — which is a separate concern.
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
# ✅ Good
|
|
171
|
+
## Scope
|
|
172
|
+
**DO NOT use this agent for**: architecture decisions, test writing, deployment.
|
|
173
|
+
Use `solution-architect` agent for architecture. Use `test-writer` for tests.
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### ✅ "You are…" role statement
|
|
177
|
+
|
|
178
|
+
**Why it matters**: Role statements calibrate the agent's persona, expertise level, and decision-making style. Without one, behavior is generic and inconsistent across tasks.
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
# ✅ Good
|
|
182
|
+
You are a senior security engineer with expertise in OWASP Top 10 and secure
|
|
183
|
+
code review. Your job is to identify real vulnerabilities, not style issues.
|
|
184
|
+
|
|
185
|
+
# ❌ Bad — no role
|
|
186
|
+
# (starts directly with instructions, no persona)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## CLAUDE.md
|
|
192
|
+
|
|
193
|
+
### ✅ Keep CLAUDE.md short — ≤400 non-code words
|
|
194
|
+
|
|
195
|
+
**Why it matters**: Claude reads CLAUDE.md at the start of every session. Bloated files cause rules to get lost — Claude may miss instructions buried in long prose. The official guidance: *"For each line, ask: 'Would removing this cause Claude to make mistakes?' If not, cut it."*
|
|
196
|
+
|
|
197
|
+
**Target**: ≤400 words of non-code text. Use code blocks freely (they're scanned, not parsed as prose).
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
# ✅ Good — lean, verb-first, essential only
|
|
201
|
+
## Code Style
|
|
202
|
+
- ES modules only (import/export), never require()
|
|
203
|
+
- .js extension on all imports
|
|
204
|
+
- Throw specific error classes from src/utils/errors.ts
|
|
205
|
+
|
|
206
|
+
## Workflow
|
|
207
|
+
- Run `npm run lint` after any TypeScript change
|
|
208
|
+
- NEVER commit to main directly — use feature branches
|
|
209
|
+
|
|
210
|
+
# ❌ Bad — bloated with obvious or redundant content
|
|
211
|
+
## Code Style
|
|
212
|
+
TypeScript is a strongly typed superset of JavaScript that helps catch errors.
|
|
213
|
+
You should write clean code that follows best practices. Variable names should
|
|
214
|
+
be meaningful and descriptive. Use camelCase for variables and PascalCase for
|
|
215
|
+
classes, which is the standard TypeScript convention...
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Pruning test**: If Claude already follows a rule without being told, delete it. If the rule is about standard language conventions (camelCase, etc.), delete it. If it's project-specific and non-obvious, keep it.
|
|
219
|
+
|
|
220
|
+
### ✅ Use `@import` to delegate detail
|
|
221
|
+
|
|
222
|
+
**Why it matters**: `@path/to/file` tells Claude to load that file into context when relevant. This keeps CLAUDE.md lean while making detailed guides available on demand — same progressive disclosure principle as skills.
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
# ✅ Good — delegates without embedding
|
|
226
|
+
See @README.md for project overview.
|
|
227
|
+
|
|
228
|
+
# Git workflow
|
|
229
|
+
@docs/git-instructions.md
|
|
230
|
+
|
|
231
|
+
# Architecture decisions
|
|
232
|
+
@.codemie/guides/architecture/architecture.md
|
|
233
|
+
|
|
234
|
+
# ❌ Bad — all detail copy-pasted into CLAUDE.md
|
|
235
|
+
## Architecture (500 words of inline architecture prose...)
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**When to use `@import`**: Any time CLAUDE.md references a file ("see the architecture guide"), replace the pointer with an actual `@path` reference.
|
|
239
|
+
|
|
240
|
+
### ✅ Choose one knowledge organisation pattern — and use it consistently
|
|
241
|
+
|
|
242
|
+
**Why it matters**: There are two valid ways to organise deep project knowledge for Claude. Both work well. Using both at once creates confusion about where knowledge lives.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
**Pattern A: Single CLAUDE.md + Guide Files**
|
|
247
|
+
|
|
248
|
+
One lean root CLAUDE.md acts as an index with path references; all detail lives in separate guide files that Claude reads on demand.
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
# ✅ Good — Pattern A
|
|
252
|
+
./CLAUDE.md ← lean index, references guides by path
|
|
253
|
+
./.codemie/guides/architecture.md ← architecture detail
|
|
254
|
+
./.codemie/guides/testing.md ← testing patterns
|
|
255
|
+
./docs/git-instructions.md ← git workflow
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
CLAUDE.md should reference these guides by actual path so Claude loads them when needed:
|
|
259
|
+
```markdown
|
|
260
|
+
# Architecture
|
|
261
|
+
See .codemie/guides/architecture/architecture.md for layer patterns.
|
|
262
|
+
|
|
263
|
+
# Testing
|
|
264
|
+
See .codemie/guides/testing/testing-patterns.md for Vitest patterns.
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Best for**: Projects with rich domain knowledge (many guides), or teams wanting a single source of truth with CLAUDE.md as a navigator.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
**Pattern B: Hierarchical CLAUDE.md**
|
|
272
|
+
|
|
273
|
+
Multiple CLAUDE.md files at different directory depths, each scoped to its level. Claude automatically loads parent-directory CLAUDE.md files when working in subdirectories.
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
# ✅ Good — Pattern B
|
|
277
|
+
./CLAUDE.md ← project-wide: Node 20+, git workflow, ESLint
|
|
278
|
+
./packages/api/CLAUDE.md ← api-only: Express patterns, OpenAPI conventions
|
|
279
|
+
./packages/frontend/CLAUDE.md ← frontend-only: React, CSS modules, Vite
|
|
280
|
+
|
|
281
|
+
# ❌ Bad — Pattern B with duplication
|
|
282
|
+
./CLAUDE.md ← has Node.js conventions
|
|
283
|
+
./packages/api/CLAUDE.md ← repeats the same Node.js conventions
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Best for**: Monorepos where different packages have genuinely different tech stacks or conventions.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
**Detection commands** (run both to identify which pattern is in use):
|
|
291
|
+
```bash
|
|
292
|
+
# Find all CLAUDE.md files
|
|
293
|
+
find . -name "CLAUDE.md" -o -name "CLAUDE.local.md" | grep -v node_modules | sort
|
|
294
|
+
|
|
295
|
+
# Find guide directories (Pattern A signal)
|
|
296
|
+
find . -type d \( -name 'guides' -o -name '.codemie' \) | grep -v node_modules
|
|
297
|
+
|
|
298
|
+
# Check git tracking
|
|
299
|
+
git ls-files CLAUDE.md
|
|
300
|
+
|
|
301
|
+
# Check CLAUDE.local.md is gitignored
|
|
302
|
+
grep CLAUDE.local.md .gitignore
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### ✅ Use MANDATORY / NEVER / ALWAYS with trigger conditions
|
|
306
|
+
|
|
307
|
+
**Why it matters**: Vague guidance ("try to follow…", "consider using…") is deprioritized when Claude is making decisions. Explicit directives with trigger conditions are followed consistently.
|
|
308
|
+
|
|
309
|
+
```markdown
|
|
310
|
+
# ✅ Good — directive + trigger + rationale
|
|
311
|
+
🚨 MANDATORY: When user says "commit", NEVER use `git commit --no-verify`.
|
|
312
|
+
If a hook fails, fix the underlying issue first.
|
|
313
|
+
|
|
314
|
+
# ❌ Bad — vague
|
|
315
|
+
Try to avoid skipping git hooks when possible.
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### ✅ Include a keyword/trigger table
|
|
319
|
+
|
|
320
|
+
**Why it matters**: CLAUDE.md is read on every task. A task classifier table lets Claude quickly identify which rules apply to the current task, rather than re-reading everything every time.
|
|
321
|
+
|
|
322
|
+
```markdown
|
|
323
|
+
# ✅ Good
|
|
324
|
+
| Keyword | Load Guide / Rule |
|
|
325
|
+
|---------|------------------|
|
|
326
|
+
| "commit", "push" | Follow Git Policy |
|
|
327
|
+
| "test", "spec" | Follow Testing Policy (write tests ONLY if asked) |
|
|
328
|
+
| TypeScript | Use strict mode, .js imports |
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### ✅ Show ✅/❌ examples for critical rules
|
|
332
|
+
|
|
333
|
+
**Why it matters**: Abstract rules ("use meaningful variable names") are interpreted differently. Concrete examples remove ambiguity.
|
|
334
|
+
|
|
335
|
+
```markdown
|
|
336
|
+
# ✅ Good
|
|
337
|
+
## Import Style
|
|
338
|
+
✅ `import { foo } from './utils.js'`
|
|
339
|
+
❌ `import { foo } from './utils'` ← missing .js extension
|
|
340
|
+
❌ `const { foo } = require('./utils')` ← no CommonJS
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### ✅ Never contradict yourself
|
|
344
|
+
|
|
345
|
+
**Anti-pattern to avoid**: Having `Always use npm` in one section and `Use pnpm for dependencies` in another. Claude will pick one inconsistently, and behavior becomes unpredictable.
|
|
346
|
+
|
|
347
|
+
**Prevention**: Search CLAUDE.md for tool names and compare all mentions before writing a new rule.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Commands
|
|
352
|
+
|
|
353
|
+
### ✅ `argument-hint` is mandatory when using `$ARGUMENTS`
|
|
354
|
+
|
|
355
|
+
**Why it matters**: Without `argument-hint`, the slash-complete UI shows no hint. Users don't know what to type and the command appears broken.
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
# ✅ Good
|
|
359
|
+
argument-hint: "<ticket-id> [--dry-run] [--priority high|medium|low]"
|
|
360
|
+
|
|
361
|
+
# ❌ Bad — uses $ARGUMENTS but no hint
|
|
362
|
+
# (no argument-hint field, $ARGUMENTS appears in body)
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### ✅ Phase-based workflow for auditability
|
|
366
|
+
|
|
367
|
+
**Why it matters**: Numbered phases make command execution auditable ("it failed in Phase 3"). Users understand progress and can debug failures.
|
|
368
|
+
|
|
369
|
+
```markdown
|
|
370
|
+
# ✅ Good
|
|
371
|
+
## Phase 1: Validate Input
|
|
372
|
+
## Phase 2: Generate Content
|
|
373
|
+
## Phase 3: Confirm and Execute
|
|
374
|
+
|
|
375
|
+
# ❌ Bad — flat instructions
|
|
376
|
+
Run git status. Then commit. Then push.
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### ✅ Always handle the failure path
|
|
380
|
+
|
|
381
|
+
**Why it matters**: Commands that don't handle failures leave users stranded with no error context and no path forward.
|
|
382
|
+
|
|
383
|
+
```markdown
|
|
384
|
+
# ✅ Good
|
|
385
|
+
## Error Handling
|
|
386
|
+
| Error | Action |
|
|
387
|
+
|-------|--------|
|
|
388
|
+
| API unreachable | Save draft to ./draft.md, print error |
|
|
389
|
+
| Invalid input | Show usage hint, exit cleanly |
|
|
390
|
+
|
|
391
|
+
# ❌ Bad — no failure cases mentioned at all
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Hooks
|
|
397
|
+
|
|
398
|
+
### ✅ Scope matchers to specific tools
|
|
399
|
+
|
|
400
|
+
**Why it matters**: A wildcard matcher (`.*`) runs on every tool use, adding latency to every action Claude takes. Overly broad hooks also create unexpected side effects.
|
|
401
|
+
|
|
402
|
+
```json
|
|
403
|
+
// ✅ Good — targets specific tool
|
|
404
|
+
{"matcher": "Bash", "hooks": [...]}
|
|
405
|
+
{"matcher": "Write|Edit", "hooks": [...]}
|
|
406
|
+
|
|
407
|
+
// ❌ Bad — matches everything
|
|
408
|
+
{"matcher": ".*", "hooks": [...]}
|
|
409
|
+
{"matcher": "", "hooks": [...]}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### ✅ Scripts must handle failures explicitly
|
|
413
|
+
|
|
414
|
+
**Why it matters**: A hook script that crashes without a clean exit blocks the tool use it's attached to. Users see cryptic failures with no context.
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
#!/usr/bin/env bash
|
|
418
|
+
# ✅ Good
|
|
419
|
+
set -e
|
|
420
|
+
trap 'echo "Hook failed on line $LINENO" >&2' ERR
|
|
421
|
+
|
|
422
|
+
# ❌ Bad — no error handling
|
|
423
|
+
curl https://api.example.com/log -d "$CLAUDE_TOOL_INPUT"
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### ✅ Never hardcode credentials in hook commands
|
|
427
|
+
|
|
428
|
+
**Why it matters**: `settings.json` is often committed to version control. Hardcoded tokens in hooks become exposed credentials in git history.
|
|
429
|
+
|
|
430
|
+
```json
|
|
431
|
+
// ✅ Good — env var reference
|
|
432
|
+
"command": "bash -c 'curl $API_URL -H \"Authorization: Bearer $MY_TOKEN\"'"
|
|
433
|
+
|
|
434
|
+
// ❌ Bad — literal token in config
|
|
435
|
+
"command": "bash -c 'curl https://api.example.com -H \"Authorization: Bearer sk-abc123\"'"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## MCP Config
|
|
441
|
+
|
|
442
|
+
### ✅ Use env var references for all credentials
|
|
443
|
+
|
|
444
|
+
**Why it matters**: `.mcp.json` is often committed to repositories and shared across teams. Literal credentials become a security incident.
|
|
445
|
+
|
|
446
|
+
```json
|
|
447
|
+
// ✅ Good
|
|
448
|
+
"env": {
|
|
449
|
+
"API_KEY": "${MY_SERVICE_API_KEY}",
|
|
450
|
+
"DATABASE_URL": "${DATABASE_URL}"
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// ❌ Bad
|
|
454
|
+
"env": {
|
|
455
|
+
"API_KEY": "sk-prod-abc123",
|
|
456
|
+
"DATABASE_URL": "postgres://user:pass@prod-host/db"
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### ✅ Document required env vars
|
|
461
|
+
|
|
462
|
+
**Why it matters**: New team members cloning the repo can't use your MCP servers if they don't know which env vars to configure. This creates a "works on my machine" problem.
|
|
463
|
+
|
|
464
|
+
**Do this**: Add a `.env.example` file or a `## MCP Configuration` section to `CLAUDE.md` listing:
|
|
465
|
+
- Server name
|
|
466
|
+
- Required env var name
|
|
467
|
+
- Where to get the value
|
|
468
|
+
- Example value format (not real value)
|
|
469
|
+
|
|
470
|
+
### ✅ Use descriptive server names
|
|
471
|
+
|
|
472
|
+
**Why it matters**: `server1`, `mcp`, `test` give no information about what the server does. Descriptive names help Claude and team members understand the ecosystem at a glance.
|
|
473
|
+
|
|
474
|
+
```json
|
|
475
|
+
// ✅ Good
|
|
476
|
+
"mcpServers": {
|
|
477
|
+
"jira": {...},
|
|
478
|
+
"github": {...},
|
|
479
|
+
"postgres-analytics": {...}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// ❌ Bad
|
|
483
|
+
"mcpServers": {
|
|
484
|
+
"server1": {...},
|
|
485
|
+
"mcp": {...},
|
|
486
|
+
"test": {...}
|
|
487
|
+
}
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## Common Anti-Patterns Quick Reference
|
|
493
|
+
|
|
494
|
+
| Anti-Pattern | Component | Impact | Fix |
|
|
495
|
+
|--------------|-----------|--------|-----|
|
|
496
|
+
| Second-person in skill description ("Use this skill when you…") | Skill | Poor triggering | Rewrite as third-person: "This skill should be used when…" |
|
|
497
|
+
| User-directed agent description ("Use this agent when you need to…") | Agent | Awkward routing | Use "Use this agent when the user requests…" or full third-person |
|
|
498
|
+
| No negative cases in agent description | Agent | Over-invocation | Add "Do NOT invoke for: X, Y, Z" |
|
|
499
|
+
| Missing `model:` field | Agent | Unpredictable cost/quality | Add explicit model; `model: inherit` is valid if intentional |
|
|
500
|
+
| Powerful tools (Bash/Write/Edit) with no inline comment | Agent | Security risk, no audit trail | Add `# <Tool> required for: [reason]` within 3 lines of `tools:` |
|
|
501
|
+
| Wall of text CLAUDE.md | CLAUDE.md | Rules ignored | Add H2 sections + tables |
|
|
502
|
+
| No `argument-hint` | Command | Poor UX | Add `argument-hint: "<description>"` |
|
|
503
|
+
| `.*` matcher in hook | Hook | Latency + side effects | Scope to specific tool name |
|
|
504
|
+
| Hardcoded token in `.mcp.json` | MCP | Security incident | Use `${ENV_VAR_NAME}` pattern |
|
|
505
|
+
| Multi-purpose skill ("does X AND Y AND Z") | Skill | Ambiguous triggers | Split into separate skills |
|
|
506
|
+
| Vague guidance ("be careful") | CLAUDE.md | Rules ignored | Replace with explicit directives |
|
|
507
|
+
| No usage examples in agent | Agent | Unpredictable invocation | Add `## Examples` with 3+ invocation cases |
|
|
508
|
+
| "You are…" role statement missing or buried | Agent | Weak persona calibration | Add "You are a [role]…" as first line of body |
|
|
509
|
+
| No anti-hallucination section | Agent | Accuracy issues | Add "Source Verification" section OR "FIRST STEP: Read [guide]" |
|
|
510
|
+
| Agent references no guides or other components | Agent | Poor grounding | Reference project guides or related skills/agents |
|