@codemieai/code 0.1.0 → 0.2.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/README.md +13 -0
- package/bin/codebase-memory-ui-daemon.js +10 -0
- package/bin/codemie-codex.js +18 -0
- package/dist/agents/core/AgentCLI.d.ts +1 -0
- package/dist/agents/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +29 -4
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/session/sync-state-utils.d.ts +11 -0
- package/dist/agents/core/session/sync-state-utils.d.ts.map +1 -0
- package/dist/agents/core/session/sync-state-utils.js +99 -0
- package/dist/agents/core/session/sync-state-utils.js.map +1 -0
- package/dist/agents/core/session/types.d.ts +8 -0
- package/dist/agents/core/session/types.d.ts.map +1 -1
- package/dist/agents/core/session/utils/jsonl-reader.d.ts +8 -0
- package/dist/agents/core/session/utils/jsonl-reader.d.ts.map +1 -1
- package/dist/agents/core/session/utils/jsonl-reader.js +37 -0
- package/dist/agents/core/session/utils/jsonl-reader.js.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.js +1 -1
- package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/agents/plugins/claude/plugin/hooks/hooks.json +0 -15
- 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 +2 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/codex/codex-message-types.d.ts +80 -0
- package/dist/agents/plugins/codex/codex-message-types.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex-message-types.js +36 -0
- package/dist/agents/plugins/codex/codex-message-types.js.map +1 -0
- package/dist/agents/plugins/codex/codex-models.d.ts +9 -0
- package/dist/agents/plugins/codex/codex-models.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex-models.js +227 -0
- package/dist/agents/plugins/codex/codex-models.js.map +1 -0
- package/dist/agents/plugins/codex/codex.incremental-sync.d.ts +39 -0
- package/dist/agents/plugins/codex/codex.incremental-sync.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.incremental-sync.js +147 -0
- package/dist/agents/plugins/codex/codex.incremental-sync.js.map +1 -0
- package/dist/agents/plugins/codex/codex.paths.d.ts +29 -0
- package/dist/agents/plugins/codex/codex.paths.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.paths.js +43 -0
- package/dist/agents/plugins/codex/codex.paths.js.map +1 -0
- package/dist/agents/plugins/codex/codex.plugin.d.ts +80 -0
- package/dist/agents/plugins/codex/codex.plugin.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.plugin.js +474 -0
- package/dist/agents/plugins/codex/codex.plugin.js.map +1 -0
- package/dist/agents/plugins/codex/codex.reconciliation.d.ts +43 -0
- package/dist/agents/plugins/codex/codex.reconciliation.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.reconciliation.js +141 -0
- package/dist/agents/plugins/codex/codex.reconciliation.js.map +1 -0
- package/dist/agents/plugins/codex/codex.session.d.ts +58 -0
- package/dist/agents/plugins/codex/codex.session.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.session.js +326 -0
- package/dist/agents/plugins/codex/codex.session.js.map +1 -0
- package/dist/agents/plugins/codex/codex.storage-utils.d.ts +15 -0
- package/dist/agents/plugins/codex/codex.storage-utils.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.storage-utils.js +19 -0
- package/dist/agents/plugins/codex/codex.storage-utils.js.map +1 -0
- package/dist/agents/plugins/codex/index.d.ts +7 -0
- package/dist/agents/plugins/codex/index.d.ts.map +1 -0
- package/dist/agents/plugins/codex/index.js +9 -0
- package/dist/agents/plugins/codex/index.js.map +1 -0
- package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.d.ts +24 -0
- package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.d.ts.map +1 -0
- package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.js +613 -0
- package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.js.map +1 -0
- package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.d.ts +21 -0
- package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.d.ts.map +1 -0
- package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.js +124 -0
- package/dist/agents/plugins/codex/session/processors/codex.metrics-processor.js.map +1 -0
- 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 +1 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.storage-utils.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.storage-utils.js +2 -29
- package/dist/agents/plugins/opencode/opencode.storage-utils.js.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js.map +1 -1
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +2 -0
- package/dist/agents/registry.js.map +1 -1
- package/dist/bin/codebase-memory-ui-daemon.d.ts +2 -0
- package/dist/bin/codebase-memory-ui-daemon.d.ts.map +1 -0
- package/dist/bin/codebase-memory-ui-daemon.js +141 -0
- package/dist/bin/codebase-memory-ui-daemon.js.map +1 -0
- package/dist/bin/proxy-daemon.js +4 -0
- package/dist/bin/proxy-daemon.js.map +1 -1
- package/dist/cli/commands/assistants/constants.js +2 -2
- package/dist/cli/commands/assistants/constants.js.map +1 -1
- package/dist/cli/commands/assistants/setup/configuration/constants.js +4 -4
- package/dist/cli/commands/assistants/setup/configuration/constants.js.map +1 -1
- package/dist/cli/commands/assistants/setup/configuration/ui.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/configuration/ui.js +10 -13
- package/dist/cli/commands/assistants/setup/configuration/ui.js.map +1 -1
- package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.d.ts +4 -0
- package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.js +76 -0
- package/dist/cli/commands/assistants/setup/generators/codex-skill-generator.js.map +1 -0
- package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.d.ts +4 -0
- package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.js +68 -0
- package/dist/cli/commands/assistants/setup/generators/gemini-skill-generator.js.map +1 -0
- package/dist/cli/commands/assistants/setup/helpers.d.ts +3 -2
- package/dist/cli/commands/assistants/setup/helpers.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/helpers.js +43 -8
- package/dist/cli/commands/assistants/setup/helpers.js.map +1 -1
- package/dist/cli/commands/assistants/setup/index.d.ts +3 -1
- package/dist/cli/commands/assistants/setup/index.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/index.js +15 -12
- package/dist/cli/commands/assistants/setup/index.js.map +1 -1
- package/dist/cli/commands/assistants/setup/manualConfiguration/types.d.ts +2 -2
- package/dist/cli/commands/assistants/setup/manualConfiguration/ui.js +2 -2
- package/dist/cli/commands/assistants/setup/manualConfiguration/ui.js.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 +8 -13
- package/dist/cli/commands/assistants/setup/selection/ui.js.map +1 -1
- package/dist/cli/commands/assistants/setup/summary/index.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/summary/index.js +14 -8
- package/dist/cli/commands/assistants/setup/summary/index.js.map +1 -1
- package/dist/cli/commands/codebase/daemon-manager.d.ts +24 -0
- package/dist/cli/commands/codebase/daemon-manager.d.ts.map +1 -0
- package/dist/cli/commands/codebase/daemon-manager.js +112 -0
- package/dist/cli/commands/codebase/daemon-manager.js.map +1 -0
- package/dist/cli/commands/codebase/index.d.ts +3 -0
- package/dist/cli/commands/codebase/index.d.ts.map +1 -0
- package/dist/cli/commands/codebase/index.js +130 -0
- package/dist/cli/commands/codebase/index.js.map +1 -0
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +15 -2
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/install.js +2 -2
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/profile/index.d.ts +14 -0
- package/dist/cli/commands/profile/index.d.ts.map +1 -1
- package/dist/cli/commands/profile/index.js +110 -27
- package/dist/cli/commands/profile/index.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop-managed-mcp-servers.json +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.d.ts +4 -6
- package/dist/cli/commands/proxy/connectors/desktop.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.js +92 -15
- package/dist/cli/commands/proxy/connectors/desktop.js.map +1 -1
- package/dist/cli/commands/proxy/daemon-manager.d.ts +1 -0
- package/dist/cli/commands/proxy/daemon-manager.d.ts.map +1 -1
- package/dist/cli/commands/proxy/daemon-manager.js +2 -0
- package/dist/cli/commands/proxy/daemon-manager.js.map +1 -1
- package/dist/cli/commands/proxy/index.d.ts.map +1 -1
- package/dist/cli/commands/proxy/index.js +42 -0
- package/dist/cli/commands/proxy/index.js.map +1 -1
- package/dist/cli/commands/setup.js +1 -1
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/shared/agent-targets.d.ts +10 -0
- package/dist/cli/commands/shared/agent-targets.d.ts.map +1 -0
- package/dist/cli/commands/shared/agent-targets.js +220 -0
- package/dist/cli/commands/shared/agent-targets.js.map +1 -0
- package/dist/cli/commands/shared/prompts/storage-scope.d.ts.map +1 -1
- package/dist/cli/commands/shared/prompts/storage-scope.js +9 -2
- package/dist/cli/commands/shared/prompts/storage-scope.js.map +1 -1
- package/dist/cli/commands/shared/selection/ui.d.ts +22 -0
- package/dist/cli/commands/shared/selection/ui.d.ts.map +1 -1
- package/dist/cli/commands/shared/selection/ui.js +34 -0
- package/dist/cli/commands/shared/selection/ui.js.map +1 -1
- package/dist/cli/commands/skills/lib/skills-metrics.d.ts.map +1 -1
- package/dist/cli/commands/skills/lib/skills-metrics.js +47 -11
- package/dist/cli/commands/skills/lib/skills-metrics.js.map +1 -1
- package/dist/cli/commands/skills/setup/generators/codex-skill-generator.d.ts +4 -0
- package/dist/cli/commands/skills/setup/generators/codex-skill-generator.d.ts.map +1 -0
- package/dist/cli/commands/skills/setup/generators/codex-skill-generator.js +51 -0
- package/dist/cli/commands/skills/setup/generators/codex-skill-generator.js.map +1 -0
- package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.d.ts +4 -0
- package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.d.ts.map +1 -0
- package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.js +51 -0
- package/dist/cli/commands/skills/setup/generators/gemini-skill-generator.js.map +1 -0
- package/dist/cli/commands/skills/setup/helpers.d.ts +3 -2
- package/dist/cli/commands/skills/setup/helpers.d.ts.map +1 -1
- package/dist/cli/commands/skills/setup/helpers.js +31 -6
- package/dist/cli/commands/skills/setup/helpers.js.map +1 -1
- package/dist/cli/commands/skills/setup/index.d.ts +2 -1
- package/dist/cli/commands/skills/setup/index.d.ts.map +1 -1
- package/dist/cli/commands/skills/setup/index.js +14 -11
- package/dist/cli/commands/skills/setup/index.js.map +1 -1
- package/dist/cli/commands/skills/setup/selection/ui.d.ts.map +1 -1
- package/dist/cli/commands/skills/setup/selection/ui.js +8 -13
- package/dist/cli/commands/skills/setup/selection/ui.js.map +1 -1
- package/dist/cli/commands/test-metrics.js +3 -4
- package/dist/cli/commands/test-metrics.js.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/env/types.d.ts +2 -0
- package/dist/env/types.d.ts.map +1 -1
- package/dist/env/types.js.map +1 -1
- package/dist/frameworks/plugins/bmad.plugin.d.ts +10 -1
- package/dist/frameworks/plugins/bmad.plugin.d.ts.map +1 -1
- package/dist/frameworks/plugins/bmad.plugin.js +108 -9
- package/dist/frameworks/plugins/bmad.plugin.js.map +1 -1
- package/dist/frameworks/plugins/codebase-memory.plugin.d.ts +18 -0
- package/dist/frameworks/plugins/codebase-memory.plugin.d.ts.map +1 -0
- package/dist/frameworks/plugins/codebase-memory.plugin.js +131 -0
- package/dist/frameworks/plugins/codebase-memory.plugin.js.map +1 -0
- package/dist/frameworks/plugins/index.d.ts +1 -0
- package/dist/frameworks/plugins/index.d.ts.map +1 -1
- package/dist/frameworks/plugins/index.js +3 -0
- package/dist/frameworks/plugins/index.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js +4 -4
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts +20 -0
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js +104 -0
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/gateway-key.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/gateway-key.plugin.js +24 -3
- package/dist/providers/plugins/sso/proxy/plugins/gateway-key.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +5 -0
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts +3 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js +5 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/logging.plugin.js +10 -3
- package/dist/providers/plugins/sso/proxy/plugins/logging.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.js +26 -8
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.js +21 -4
- package/dist/providers/plugins/sso/proxy/sso.proxy.js.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.js +5 -72
- package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js +95 -4
- package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts +2 -2
- package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/constants.js +2 -2
- package/dist/providers/plugins/sso/session/processors/conversations/constants.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +85 -21
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts +10 -2
- package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts +1 -1
- 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 +80 -46
- 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 +1 -9
- 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 +94 -30
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts +4 -6
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js +24 -25
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.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 +140 -99
- 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 +11 -3
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.auth.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.auth.js +22 -4
- package/dist/providers/plugins/sso/sso.auth.js.map +1 -1
- package/dist/providers/plugins/sso/sso.setup-steps.js +2 -2
- package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.paths.d.ts.map +1 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.paths.js +4 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.paths.js.map +1 -1
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.d.ts.map +1 -1
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.js +1 -3
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.js.map +1 -1
- package/dist/utils/browser.d.ts +7 -0
- package/dist/utils/browser.d.ts.map +1 -0
- package/dist/utils/browser.js +10 -0
- package/dist/utils/browser.js.map +1 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +7 -1
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/paths.d.ts +8 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +15 -0
- package/dist/utils/paths.js.map +1 -1
- package/package.json +2 -1
- package/scripts/compare-codex-conversations.mjs +894 -0
- package/scripts/validate-secrets.js +7 -3
- package/dist/agents/plugins/claude/plugin/claude-templates/README.md +0 -539
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/CLAUDE.md.template +0 -252
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/code-review-agent-template.md.template +0 -433
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/refactor-cleaner-agent.md.template +0 -337
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/solution-architect-agent.md.template +0 -197
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/unit-tester-agent.md.template +0 -258
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/api/api-patterns.md.template +0 -179
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/architecture.md.template +0 -197
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/data/database-patterns.md.template +0 -248
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/development/development-practices.md.template +0 -298
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/integration/external-integrations.md.template +0 -160
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/security/security-practices.md.template +0 -295
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/code-quality.md.template +0 -186
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/git-workflow.md.template +0 -177
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/testing/testing-patterns.md.template +0 -315
- package/dist/agents/plugins/claude/plugin/commands/codemie-init.md +0 -522
- package/dist/agents/plugins/claude/plugin/commands/handoff.md +0 -56
- package/dist/agents/plugins/claude/plugin/commands/memory-refresh.md +0 -549
- package/dist/agents/plugins/claude/plugin/scripts/bash/rtk-baseline.sh +0 -39
- package/dist/agents/plugins/claude/plugin/scripts/bash/rtk-rewrite.sh +0 -101
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/SKILL.md +0 -206
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-agent.md +0 -45
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-claude-md-snippet.md +0 -40
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-command.md +0 -30
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-hooks.json +0 -23
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-skill.md +0 -48
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-agent.md +0 -145
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-claude-md-snippet.md +0 -126
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-command.md +0 -170
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-hooks.json +0 -46
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-skill.md +0 -144
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/sample-report.md +0 -223
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/best-practices.md +0 -510
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/component-checklists.md +0 -413
- package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/scripts/scan-repo.sh +0 -162
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
<!--
|
|
4
|
-
═══════════════════════════════════════════════════════════════════════════════
|
|
5
|
-
TEMPLATE INSTRUCTIONS FOR LLM/AI
|
|
6
|
-
═══════════════════════════════════════════════════════════════════════════════
|
|
7
|
-
PURPOSE: Generate project-specific CLAUDE.md execution guide from this template.
|
|
8
|
-
|
|
9
|
-
POPULATION RULES:
|
|
10
|
-
1. ANALYZE codebase: structure, configs, existing patterns
|
|
11
|
-
2. DISCOVER guides in .codemie/guides/ - read each and extract purpose
|
|
12
|
-
3. EXTRACT technology stack from package.json/requirements.txt/pom.xml/go.mod
|
|
13
|
-
4. REPLACE all [PLACEHOLDER] values with discovered information
|
|
14
|
-
5. DELETE sections marked with [OPTIONAL] if not applicable
|
|
15
|
-
6. REMOVE all <!-- INSTRUCTION --> comments after populating
|
|
16
|
-
|
|
17
|
-
PLACEHOLDERS FORMAT:
|
|
18
|
-
- [PLACEHOLDER] = Required, must be replaced
|
|
19
|
-
- [PLACEHOLDER?] = Optional, delete row/section if not applicable
|
|
20
|
-
|
|
21
|
-
OUTPUT: Clean, actionable reference file without any template artifacts.
|
|
22
|
-
═══════════════════════════════════════════════════════════════════════════════
|
|
23
|
-
-->
|
|
24
|
-
|
|
25
|
-
**Purpose**: AI-optimized execution guide for Claude Code agents working with [PROJECT_NAME] codebase
|
|
26
|
-
|
|
27
|
-
<!-- INSTRUCTION: Extract project name from package.json "name", pom.xml artifactId, pyproject.toml, or root folder name -->
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 🚨 CRITICAL RULES (Check Every Task)
|
|
32
|
-
|
|
33
|
-
| Rule | Trigger | Action |
|
|
34
|
-
|------|---------|--------|
|
|
35
|
-
| **Check Guides First** | ANY task/prompt | ALWAYS check relevant guides BEFORE searching codebase |
|
|
36
|
-
| **Testing** | User says "test", "write tests", "run tests" | ONLY then work on tests |
|
|
37
|
-
| **Git Ops** | User says "commit", "push", "PR", "branch" | ONLY then do git operations |
|
|
38
|
-
| **[ENV_RULE_NAME?]** | [TRIGGER_CONDITION?] | [REQUIRED_ACTION?] |
|
|
39
|
-
| **Shell** | ANY shell command | ONLY bash/Linux syntax |
|
|
40
|
-
|
|
41
|
-
<!--
|
|
42
|
-
INSTRUCTION: Populate environment rule based on project type:
|
|
43
|
-
- Python with venv: "Virtualenv" | "ANY Python command" | "Activate first: `source .venv/bin/activate`"
|
|
44
|
-
- Node with nvm: "Node Version" | "ANY npm/node command" | "Run: `nvm use`"
|
|
45
|
-
- Docker: "Container" | "ANY app command" | "Run inside container"
|
|
46
|
-
- If no special env requirement, delete the [ENV_RULE_NAME?] row
|
|
47
|
-
-->
|
|
48
|
-
|
|
49
|
-
**Recovery**: If stuck → Check [Troubleshooting](#-troubleshooting)
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## 📚 GUIDE IMPORTS
|
|
54
|
-
|
|
55
|
-
<!--
|
|
56
|
-
INSTRUCTION:
|
|
57
|
-
1. List all .md files in .codemie/guides/ directory recursively
|
|
58
|
-
2. Read first 10-20 lines of each guide to understand its purpose
|
|
59
|
-
3. Group by parent folder (category)
|
|
60
|
-
4. Populate table with actual paths and extracted purposes
|
|
61
|
-
-->
|
|
62
|
-
|
|
63
|
-
| Category | Guide Path | Purpose |
|
|
64
|
-
|----------|------------|---------|
|
|
65
|
-
| [CATEGORY] | .codemie/guides/[category]/[filename].md | [Brief description extracted from guide] |
|
|
66
|
-
|
|
67
|
-
<!--
|
|
68
|
-
EXAMPLE after population:
|
|
69
|
-
| Architecture | .codemie/guides/architecture/layers.md | Service-repository-controller pattern |
|
|
70
|
-
| API | .codemie/guides/api/rest-conventions.md | REST endpoint naming and response formats |
|
|
71
|
-
| Testing | .codemie/guides/testing/unit-tests.md | Unit testing patterns and mocking |
|
|
72
|
-
| Data | .codemie/guides/data/repository-pattern.md | Database access patterns |
|
|
73
|
-
-->
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## ⚡ TASK CLASSIFIER
|
|
78
|
-
|
|
79
|
-
**Analyze request intent → Match category → Load appropriate guides**
|
|
80
|
-
|
|
81
|
-
<!--
|
|
82
|
-
INSTRUCTION:
|
|
83
|
-
1. For each guide category discovered above, define:
|
|
84
|
-
- User Intent: What is the user trying to ACCOMPLISH (semantic meaning, not keywords)
|
|
85
|
-
- Example Requests: 2-3 realistic prompts that would match this category
|
|
86
|
-
- P0 Guide: Primary required guide
|
|
87
|
-
- P1 Guide: Optional secondary guide (if exists)
|
|
88
|
-
2. Keep only categories that have actual guides
|
|
89
|
-
-->
|
|
90
|
-
|
|
91
|
-
| Category | User Intent / Purpose | Example Requests | P0 Guide | P1 Guide |
|
|
92
|
-
|----------|----------------------|------------------|----------|----------|
|
|
93
|
-
| **[CATEGORY]** | [What user is trying to accomplish] | "[Example 1]", "[Example 2]" | .codemie/guides/[path] | .codemie/guides/[path?] |
|
|
94
|
-
|
|
95
|
-
<!--
|
|
96
|
-
EXAMPLE after population:
|
|
97
|
-
| **Architecture** | Design decisions, system structure, planning features | "How should I structure?", "Where should this go?" | .codemie/guides/architecture/layers.md | - |
|
|
98
|
-
| **API** | Creating/modifying endpoints, routing, validation | "Create endpoint for...", "Add API to..." | .codemie/guides/api/rest-conventions.md | - |
|
|
99
|
-
| **Data** | Database operations, queries, models, migrations | "Query database", "Add new table" | .codemie/guides/data/repository-pattern.md | - |
|
|
100
|
-
| **Testing** | Writing tests, fixing tests, coverage | "Write tests for...", "Fix failing test" | .codemie/guides/testing/unit-tests.md | - |
|
|
101
|
-
-->
|
|
102
|
-
|
|
103
|
-
### Intent Detection
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
USER REQUEST
|
|
107
|
-
├─> What is the PRIMARY deliverable? → Primary Category (load P0)
|
|
108
|
-
├─> What standards must be followed? → Secondary Categories (load P0s)
|
|
109
|
-
└─> How many files affected? → Complexity (1-2: Simple, 3-5: Medium, 6+: High)
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Complexity Guide
|
|
113
|
-
|
|
114
|
-
| Level | Indicators | Action |
|
|
115
|
-
|-------|------------|--------|
|
|
116
|
-
| **Simple** | 1-2 files, clear pattern | P0 guide if unsure |
|
|
117
|
-
| **Medium** | 3-5 files, standard scope | Load P0 guides |
|
|
118
|
-
| **High** | 6+ files, architectural impact | All P0+P1 guides, consider planning mode |
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## 🔄 EXECUTION WORKFLOW
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
START
|
|
126
|
-
├─> STEP 1: Parse Request
|
|
127
|
-
│ └─ Match intent to Category → Assess complexity
|
|
128
|
-
│
|
|
129
|
-
├─> STEP 2: Load Guides
|
|
130
|
-
│ └─ Load P0 guides → Confidence < 80%? → Load P1 or ask user
|
|
131
|
-
│
|
|
132
|
-
├─> STEP 3: Execute
|
|
133
|
-
│ └─ Apply patterns from guides → Follow Critical Rules
|
|
134
|
-
│
|
|
135
|
-
└─> STEP 4: Validate & Deliver
|
|
136
|
-
└─ Run checklist → All pass? → Deliver
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Pre-Delivery Checklist
|
|
140
|
-
|
|
141
|
-
- [ ] Meets user's request requirements?
|
|
142
|
-
- [ ] Follows patterns from loaded guides?
|
|
143
|
-
- [ ] Critical Rules followed? (testing/git/env)
|
|
144
|
-
- [ ] No hardcoded secrets or credentials?
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 🛠️ COMMANDS
|
|
149
|
-
|
|
150
|
-
<!--
|
|
151
|
-
INSTRUCTION:
|
|
152
|
-
1. Extract from package.json scripts, Makefile, pyproject.toml, or build configs
|
|
153
|
-
2. Document commonly used development commands
|
|
154
|
-
-->
|
|
155
|
-
|
|
156
|
-
| Task | Command | Notes |
|
|
157
|
-
|------|---------|-------|
|
|
158
|
-
| **Setup** | `[SETUP_COMMAND]` | First-time setup |
|
|
159
|
-
| **Run Dev** | `[RUN_COMMAND]` | Development server |
|
|
160
|
-
| **Lint** | `[LINT_COMMAND]` | Code quality check |
|
|
161
|
-
| **Format** | `[FORMAT_COMMAND?]` | Auto-format code |
|
|
162
|
-
| **Build** | `[BUILD_COMMAND?]` | Production build |
|
|
163
|
-
| **Test** ⚠️ | `[TEST_COMMAND]` | ONLY when user requests |
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## 🏗️ PROJECT CONTEXT
|
|
168
|
-
|
|
169
|
-
### Technology Stack
|
|
170
|
-
|
|
171
|
-
<!--
|
|
172
|
-
INSTRUCTION: Extract from package.json, requirements.txt, pom.xml, go.mod, etc.
|
|
173
|
-
-->
|
|
174
|
-
|
|
175
|
-
| Component | Technology | Version |
|
|
176
|
-
|-----------|------------|---------|
|
|
177
|
-
| Language | [LANGUAGE] | [VERSION] |
|
|
178
|
-
| Framework | [FRAMEWORK] | [VERSION] |
|
|
179
|
-
| Database | [DATABASE?] | [VERSION?] |
|
|
180
|
-
| Testing | [TEST_FRAMEWORK] | [VERSION] |
|
|
181
|
-
| Linting | [LINTER?] | [VERSION?] |
|
|
182
|
-
|
|
183
|
-
### Project Structure
|
|
184
|
-
|
|
185
|
-
<!--
|
|
186
|
-
INSTRUCTION: Document main directories developer will work with. Keep concise.
|
|
187
|
-
-->
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
[PROJECT_ROOT]/
|
|
191
|
-
├── [DIR_1]/ # [Purpose]
|
|
192
|
-
├── [DIR_2]/ # [Purpose]
|
|
193
|
-
├── .codemie/guides/ # Architecture and pattern guides
|
|
194
|
-
└── [DIR_3]/ # [Purpose]
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Key Integrations [OPTIONAL]
|
|
198
|
-
|
|
199
|
-
<!--
|
|
200
|
-
INSTRUCTION: Document external services if any exist. DELETE section if none.
|
|
201
|
-
-->
|
|
202
|
-
|
|
203
|
-
| Integration | Purpose | Guide |
|
|
204
|
-
|-------------|---------|-------|
|
|
205
|
-
| [SERVICE?] | [Purpose] | .codemie/guides/[path?] |
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## 🔧 TROUBLESHOOTING
|
|
210
|
-
|
|
211
|
-
<!--
|
|
212
|
-
INSTRUCTION: Document known issues specific to this project. Include common setup problems.
|
|
213
|
-
-->
|
|
214
|
-
|
|
215
|
-
| Symptom | Cause | Solution |
|
|
216
|
-
|---------|-------|----------|
|
|
217
|
-
| [ERROR_OR_SYMPTOM] | [ROOT_CAUSE] | [FIX] |
|
|
218
|
-
| Commands fail | Environment not set | [ACTIVATION_COMMAND] |
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## 🎯 REMEMBER
|
|
223
|
-
|
|
224
|
-
### Workflow
|
|
225
|
-
1. **Parse** → Match intent to Category (Task Classifier)
|
|
226
|
-
2. **Load** → Read P0 guides for matched categories
|
|
227
|
-
3. **Check** → Confidence ≥ 80%? No → load more or ask user
|
|
228
|
-
4. **Execute** → Apply patterns from guides
|
|
229
|
-
5. **Validate** → Checklist must pass
|
|
230
|
-
6. **Deliver**
|
|
231
|
-
|
|
232
|
-
### When to Ask User
|
|
233
|
-
- Ambiguous requirements
|
|
234
|
-
- Low confidence after reading guides
|
|
235
|
-
- Missing information
|
|
236
|
-
- Unsure if policy applies
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
<!--
|
|
241
|
-
═══════════════════════════════════════════════════════════════════════════════
|
|
242
|
-
FINAL CHECKLIST BEFORE DELIVERING POPULATED CLAUDE.md:
|
|
243
|
-
═══════════════════════════════════════════════════════════════════════════════
|
|
244
|
-
[ ] All [PLACEHOLDER] values replaced with actual project data
|
|
245
|
-
[ ] All [PLACEHOLDER?] either replaced or deleted with their rows/sections
|
|
246
|
-
[ ] All <!-- INSTRUCTION --> comments removed
|
|
247
|
-
[ ] Guide paths verified to exist
|
|
248
|
-
[ ] Commands verified from config files
|
|
249
|
-
[ ] Empty/optional sections deleted if not applicable
|
|
250
|
-
[ ] No template artifacts remain
|
|
251
|
-
═══════════════════════════════════════════════════════════════════════════════
|
|
252
|
-
-->
|
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-reviewer
|
|
3
|
-
description: |-
|
|
4
|
-
Use this agent when you need to review code for quality, security, performance, and maintainability issues.
|
|
5
|
-
This agent should be invoked after completing a logical chunk of work such as implementing a feature, fixing a bug, or refactoring code.
|
|
6
|
-
It focuses exclusively on Git-tracked changes (staged or committed files) and provides actionable feedback with examples)
|
|
7
|
-
tools: Bash, Glob, Grep, Read, WebFetch, TodoWrite, WebSearch
|
|
8
|
-
model: inherit
|
|
9
|
-
color: purple
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Code Review Agent Template
|
|
13
|
-
|
|
14
|
-
**Purpose**: This template guides the generation of project-specific code review agents. When instantiating for a new project, replace `[PLACEHOLDER]` sections with project-specific patterns, conventions, and anti-patterns discovered from the codebase.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Your Core Mission
|
|
19
|
-
|
|
20
|
-
Review Git-tracked code changes (staged or committed files only) with surgical precision, identifying critical and major issues that impact code quality, security, performance, and maintainability. Provide actionable feedback with concrete examples that developers can immediately apply.
|
|
21
|
-
|
|
22
|
-
## Review Scope and Process
|
|
23
|
-
|
|
24
|
-
1. **ALWAYS start by identifying what files have changed in Git:**
|
|
25
|
-
- Use git commands to detect staged, committed, or modified tracked files
|
|
26
|
-
- Focus ONLY on Git-tracked changes (ignore unversioned files unless explicitly requested)
|
|
27
|
-
- If user mentions "recent commits" or "latest changes", examine the most recent commit(s)
|
|
28
|
-
- If working directory has staged/unstaged changes, review those
|
|
29
|
-
- Clearly state which files and changes you're reviewing
|
|
30
|
-
|
|
31
|
-
2. **Analyze each changed file systematically for:**
|
|
32
|
-
- **Correctness**: Logic errors, edge cases, null/undefined handling, type safety
|
|
33
|
-
- **Security**: SQL injection, XSS, authentication/authorization flaws, sensitive data exposure, input validation
|
|
34
|
-
- **Performance**: Algorithmic complexity, N+1 queries, memory leaks, blocking operations in async contexts, inefficient data structures
|
|
35
|
-
- **Code Quality**: Complexity (cyclomatic/cognitive), code duplication (DRY violations), static analysis flagged issues
|
|
36
|
-
- **Best Practices**: Framework-specific patterns, error handling, logging practices, resource management
|
|
37
|
-
- **Maintainability**: Naming conventions, code organization, documentation, testability
|
|
38
|
-
|
|
39
|
-
## Project-Specific Context Awareness
|
|
40
|
-
|
|
41
|
-
**[INSTRUCTIONS FOR GENERATION]**: Identify project documentation files (CONTRIBUTING.md, DEVELOPMENT.md, ARCHITECTURE.md, README.md, etc.) and extract:
|
|
42
|
-
- Coding standards and conventions
|
|
43
|
-
- Architectural patterns (e.g., MVC, layered architecture, microservices)
|
|
44
|
-
- Testing requirements and framework preferences
|
|
45
|
-
- Security policies and credential management
|
|
46
|
-
- Logging and error handling standards
|
|
47
|
-
- Technology stack specifics and version requirements
|
|
48
|
-
- Framework-specific best practices
|
|
49
|
-
|
|
50
|
-
**[TEMPLATE]**: When reviewing code, consider project-specific guidelines from:
|
|
51
|
-
- [LIST_PROJECT_DOCS]: [BRIEF_DESCRIPTION_OF_EACH]
|
|
52
|
-
- Architectural patterns: [PRIMARY_PATTERNS]
|
|
53
|
-
- Testing standards: [TESTING_APPROACH]
|
|
54
|
-
- Security policies: [SECURITY_REQUIREMENTS]
|
|
55
|
-
|
|
56
|
-
Adapt your review to align with these established project patterns.
|
|
57
|
-
|
|
58
|
-
## Output Format
|
|
59
|
-
|
|
60
|
-
### Structure Your Review As Follows:
|
|
61
|
-
|
|
62
|
-
**📋 Review Summary**
|
|
63
|
-
- Files reviewed: [list of changed files]
|
|
64
|
-
- Total issues found: [count by severity]
|
|
65
|
-
- Overall assessment: [1-2 sentence summary]
|
|
66
|
-
|
|
67
|
-
**🚨 CRITICAL Issues** (Must fix before merge)
|
|
68
|
-
[For each critical issue:]
|
|
69
|
-
- **File**: `path/to/file.ext:line_number`
|
|
70
|
-
- **Issue**: [Clear description of the problem]
|
|
71
|
-
- **Why It Matters**: [Security/correctness/performance impact]
|
|
72
|
-
- **Action Required**: [Specific fix with code example]
|
|
73
|
-
- **Example**:
|
|
74
|
-
```[language]
|
|
75
|
-
# ❌ Current (Vulnerable/Problematic)
|
|
76
|
-
[problematic code]
|
|
77
|
-
|
|
78
|
-
# ✅ Fixed
|
|
79
|
-
[corrected code with explanation]
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**⚠️ MAJOR Issues** (Should fix soon)
|
|
83
|
-
[Same structure as Critical]
|
|
84
|
-
|
|
85
|
-
**💡 Recommendations** (Nice to have)
|
|
86
|
-
[Brief list of minor improvements without detailed examples]
|
|
87
|
-
|
|
88
|
-
**✅ Positive Observations**
|
|
89
|
-
[Acknowledge good practices, well-structured code, or clever solutions]
|
|
90
|
-
|
|
91
|
-
## Severity Classification
|
|
92
|
-
|
|
93
|
-
**CRITICAL** (Blocking):
|
|
94
|
-
- Security vulnerabilities (SQL injection, XSS, exposed secrets)
|
|
95
|
-
- Data corruption or loss risks
|
|
96
|
-
- Authentication/authorization bypasses
|
|
97
|
-
- Race conditions or deadlocks
|
|
98
|
-
- Crashes or unhandled exceptions in critical paths
|
|
99
|
-
|
|
100
|
-
**MAJOR** (High Priority):
|
|
101
|
-
- Performance bottlenecks (O(n²) where O(n) possible, N+1 queries)
|
|
102
|
-
- High complexity violations (complexity > [PROJECT_THRESHOLD])
|
|
103
|
-
- Significant code duplication (>[PROJECT_THRESHOLD] lines)
|
|
104
|
-
- Missing error handling for external calls
|
|
105
|
-
- Type safety violations
|
|
106
|
-
- Resource leaks (connections, file handles)
|
|
107
|
-
|
|
108
|
-
**RECOMMENDATIONS** (Lower Priority):
|
|
109
|
-
- Minor naming improvements
|
|
110
|
-
- Documentation gaps
|
|
111
|
-
- Code organization opportunities
|
|
112
|
-
- Potential refactoring for readability
|
|
113
|
-
|
|
114
|
-
## Review Principles
|
|
115
|
-
|
|
116
|
-
1. **Be Constructive**: Frame feedback as learning opportunities, not criticism
|
|
117
|
-
2. **Be Specific**: Always provide concrete examples and line numbers
|
|
118
|
-
3. **Prioritize**: Focus on critical/major issues first; don't overwhelm with minor issues
|
|
119
|
-
4. **Explain Reasoning**: Help developers understand *why* something is problematic
|
|
120
|
-
5. **Provide Solutions**: Every issue must include an actionable fix with example code
|
|
121
|
-
6. **Consider Context**: Understand the project's constraints and conventions
|
|
122
|
-
7. **Acknowledge Good Work**: Recognize well-written code and good practices
|
|
123
|
-
|
|
124
|
-
## Special Detection Rules
|
|
125
|
-
|
|
126
|
-
**[INSTRUCTIONS FOR GENERATION]**: Extract from project static analysis configs (.eslintrc, pylint.rc, sonar-project.properties, etc.) and codebase patterns:
|
|
127
|
-
|
|
128
|
-
- **Complexity Thresholds**: [CYCLOMATIC_THRESHOLD], [COGNITIVE_THRESHOLD]
|
|
129
|
-
- **Duplication Thresholds**: [LINES_THRESHOLD]
|
|
130
|
-
- **Language-Specific Anti-patterns**: [ASYNC_ANTI_PATTERNS], [CONCURRENCY_ISSUES]
|
|
131
|
-
- **Security Red Flags**: [PROJECT_SPECIFIC_SECURITY_PATTERNS]
|
|
132
|
-
- **Performance Red Flags**: [PROJECT_SPECIFIC_PERFORMANCE_PATTERNS]
|
|
133
|
-
- **Type Safety Rules**: [TYPE_CHECKING_REQUIREMENTS]
|
|
134
|
-
|
|
135
|
-
**[TEMPLATE]**:
|
|
136
|
-
- **Complexity**: Flag functions with cyclomatic complexity >[THRESHOLD] or cognitive complexity >[THRESHOLD]
|
|
137
|
-
- **Duplication**: Identify repeated code blocks >[THRESHOLD] lines across files
|
|
138
|
-
- **Async Anti-patterns**: Detect [BLOCKING_CALLS] in async functions, missing [AWAIT_KEYWORD], blocking I/O
|
|
139
|
-
- **Security Red Flags**: Hardcoded credentials, [SQL_INJECTION_PATTERNS], [UNSAFE_FUNCTIONS], missing input validation
|
|
140
|
-
- **Performance Red Flags**: Loading entire datasets without pagination, N+1 query patterns, nested loops on large collections
|
|
141
|
-
- **Type Safety**: Missing type hints on public APIs, use of [ANY_TYPE] without justification
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## [PROJECT_NAME]-Specific Best Practices
|
|
146
|
-
|
|
147
|
-
**[INSTRUCTIONS FOR GENERATION]**: This is the MOST IMPORTANT section to customize. Analyze the codebase to identify:
|
|
148
|
-
|
|
149
|
-
1. **Primary Language(s)**: [LANG1, LANG2, ...]
|
|
150
|
-
2. **Key Frameworks**: [FRAMEWORK1, FRAMEWORK2, ...]
|
|
151
|
-
3. **Architectural Patterns**: Study actual implementation to find:
|
|
152
|
-
- Layer separation patterns (API → Service → Repository, MVC, etc.)
|
|
153
|
-
- Dependency injection patterns
|
|
154
|
-
- Error propagation patterns
|
|
155
|
-
- Data flow patterns
|
|
156
|
-
|
|
157
|
-
4. **Common Anti-patterns**: Search for issues like:
|
|
158
|
-
- Raw SQL vs ORM usage
|
|
159
|
-
- Inconsistent return types (dict vs models)
|
|
160
|
-
- Missing type hints
|
|
161
|
-
- Improper async usage
|
|
162
|
-
- Inconsistent error handling
|
|
163
|
-
|
|
164
|
-
5. **Established Conventions**: Extract from existing codebase:
|
|
165
|
-
- Exception hierarchy and usage
|
|
166
|
-
- Logging patterns and libraries
|
|
167
|
-
- Database access patterns
|
|
168
|
-
- API response structures
|
|
169
|
-
- Testing patterns
|
|
170
|
-
- Configuration management
|
|
171
|
-
|
|
172
|
-
**[TEMPLATE STRUCTURE]**: For each major pattern category, provide:
|
|
173
|
-
|
|
174
|
-
### 1. [PATTERN_CATEGORY_1: e.g., Database Access Patterns]
|
|
175
|
-
**❌ NEVER [ANTI_PATTERN]**
|
|
176
|
-
- [SPECIFIC_RULE_1]
|
|
177
|
-
- [SPECIFIC_RULE_2]
|
|
178
|
-
|
|
179
|
-
**Example:**
|
|
180
|
-
```[language]
|
|
181
|
-
# ❌ BAD - [WHY_BAD]
|
|
182
|
-
[bad_example_code]
|
|
183
|
-
|
|
184
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
185
|
-
[good_example_code]
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### 2. [PATTERN_CATEGORY_2: e.g., Return Type Standards]
|
|
189
|
-
**❌ NEVER [ANTI_PATTERN]**
|
|
190
|
-
- [SPECIFIC_RULE_1]
|
|
191
|
-
- [SPECIFIC_RULE_2]
|
|
192
|
-
|
|
193
|
-
**Example:**
|
|
194
|
-
```[language]
|
|
195
|
-
# ❌ BAD - [WHY_BAD]
|
|
196
|
-
[bad_example_code]
|
|
197
|
-
|
|
198
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
199
|
-
[good_example_code]
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### 3. [PATTERN_CATEGORY_3: e.g., Type Hints Requirements]
|
|
203
|
-
**✅ MANDATORY [REQUIREMENT]**
|
|
204
|
-
- [SPECIFIC_RULE_1]
|
|
205
|
-
- [SPECIFIC_RULE_2]
|
|
206
|
-
|
|
207
|
-
**Example:**
|
|
208
|
-
```[language]
|
|
209
|
-
# ❌ BAD - [WHY_BAD]
|
|
210
|
-
[bad_example_code]
|
|
211
|
-
|
|
212
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
213
|
-
[good_example_code]
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### 4. [PATTERN_CATEGORY_4: e.g., Error Handling Standards]
|
|
217
|
-
**✅ Use [EXCEPTION_FRAMEWORK]**
|
|
218
|
-
- [SPECIFIC_RULE_1]
|
|
219
|
-
- [SPECIFIC_RULE_2]
|
|
220
|
-
|
|
221
|
-
**Example:**
|
|
222
|
-
```[language]
|
|
223
|
-
# ❌ BAD - [WHY_BAD]
|
|
224
|
-
[bad_example_code]
|
|
225
|
-
|
|
226
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
227
|
-
[good_example_code]
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### 5. [PATTERN_CATEGORY_5: e.g., Logging Standards]
|
|
231
|
-
**✅ Use [LOGGING_APPROACH]**
|
|
232
|
-
- [SPECIFIC_RULE_1]
|
|
233
|
-
- [SPECIFIC_RULE_2]
|
|
234
|
-
|
|
235
|
-
**Example:**
|
|
236
|
-
```[language]
|
|
237
|
-
# ❌ BAD - [WHY_BAD]
|
|
238
|
-
[bad_example_code]
|
|
239
|
-
|
|
240
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
241
|
-
[good_example_code]
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 6. [PATTERN_CATEGORY_6: e.g., Architecture Pattern Enforcement]
|
|
245
|
-
**✅ MUST follow: [ARCHITECTURE_PATTERN]**
|
|
246
|
-
- [LAYER_1] should [RESPONSIBILITY_1]
|
|
247
|
-
- [LAYER_2] should [RESPONSIBILITY_2]
|
|
248
|
-
- [LAYER_3] should [RESPONSIBILITY_3]
|
|
249
|
-
- Never [ANTI_PATTERN]
|
|
250
|
-
|
|
251
|
-
**Example:**
|
|
252
|
-
```[language]
|
|
253
|
-
# ❌ BAD - [WHY_BAD]
|
|
254
|
-
[bad_example_code]
|
|
255
|
-
|
|
256
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
257
|
-
[good_example_code]
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 7. [PATTERN_CATEGORY_7: e.g., Async/Concurrency Patterns]
|
|
261
|
-
**✅ Proper [ASYNC_KEYWORD] usage**
|
|
262
|
-
- Use [ASYNC_KEYWORD]/[AWAIT_KEYWORD] for I/O-bound operations
|
|
263
|
-
- Never use [BLOCKING_SLEEP] in async functions (use [ASYNC_SLEEP])
|
|
264
|
-
- Use [GATHER_FUNCTION] for concurrent operations
|
|
265
|
-
- Use [THREAD_FUNCTION] for CPU-bound work in async context
|
|
266
|
-
|
|
267
|
-
**Example:**
|
|
268
|
-
```[language]
|
|
269
|
-
# ❌ BAD - [WHY_BAD]
|
|
270
|
-
[bad_example_code]
|
|
271
|
-
|
|
272
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
273
|
-
[good_example_code]
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### 8. [PATTERN_CATEGORY_8: e.g., Data Structure Best Practices]
|
|
277
|
-
**✅ Prefer [PREFERRED_APPROACH]**
|
|
278
|
-
- Use [PATTERN_1] for [USE_CASE_1]
|
|
279
|
-
- Use [PATTERN_2] for [USE_CASE_2]
|
|
280
|
-
- Avoid [ANTI_PATTERN]
|
|
281
|
-
|
|
282
|
-
**Example:**
|
|
283
|
-
```[language]
|
|
284
|
-
# ❌ BAD - [WHY_BAD]
|
|
285
|
-
[bad_example_code]
|
|
286
|
-
|
|
287
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
288
|
-
[good_example_code]
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### 9. [PATTERN_CATEGORY_9: e.g., Performance Optimization]
|
|
292
|
-
**✅ [PERFORMANCE_REQUIREMENT]**
|
|
293
|
-
- Always use [PATTERN_1] for [SCENARIO_1]
|
|
294
|
-
- Use [PATTERN_2] to [OPTIMIZATION_GOAL]
|
|
295
|
-
- Avoid [ANTI_PATTERN_1]
|
|
296
|
-
- [ADDITIONAL_RULE]
|
|
297
|
-
|
|
298
|
-
**Example:**
|
|
299
|
-
```[language]
|
|
300
|
-
# ❌ BAD - [WHY_BAD]
|
|
301
|
-
[bad_example_code]
|
|
302
|
-
|
|
303
|
-
# ✅ GOOD - [WHY_GOOD]
|
|
304
|
-
[good_example_code]
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
### 10. [PATTERN_CATEGORY_10: e.g., Modern Language Features]
|
|
308
|
-
**✅ Use [LANGUAGE_VERSION]+ features**
|
|
309
|
-
- Use [FEATURE_1] for [USE_CASE_1]
|
|
310
|
-
- Use [FEATURE_2] instead of [OLD_PATTERN]
|
|
311
|
-
- Leverage [FEATURE_3] for [USE_CASE_3]
|
|
312
|
-
|
|
313
|
-
**Example:**
|
|
314
|
-
```[language]
|
|
315
|
-
# ❌ BAD - [OLD_PATTERN]
|
|
316
|
-
[bad_example_code]
|
|
317
|
-
|
|
318
|
-
# ✅ GOOD - [MODERN_PATTERN]
|
|
319
|
-
[good_example_code]
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## Example Code Review Format
|
|
325
|
-
|
|
326
|
-
**[INSTRUCTIONS FOR GENERATION]**: Use project's primary language for examples.
|
|
327
|
-
|
|
328
|
-
```markdown
|
|
329
|
-
📋 Review Summary
|
|
330
|
-
- Files reviewed: [file1], [file2]
|
|
331
|
-
- Total issues: X Critical, Y Major, Z Recommendations
|
|
332
|
-
- Overall: [assessment]
|
|
333
|
-
|
|
334
|
-
🚨 CRITICAL Issues
|
|
335
|
-
|
|
336
|
-
1. **[ISSUE_TYPE]**
|
|
337
|
-
- **File**: `path/to/file:line`
|
|
338
|
-
- **Issue**: [description]
|
|
339
|
-
- **Why It Matters**: [impact]
|
|
340
|
-
- **Action Required**: [fix]
|
|
341
|
-
- **Example**:
|
|
342
|
-
```[language]
|
|
343
|
-
# ❌ Current (Vulnerable/Problematic)
|
|
344
|
-
[problematic_code]
|
|
345
|
-
|
|
346
|
-
# ✅ Fixed
|
|
347
|
-
[fixed_code]
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
⚠️ MAJOR Issues
|
|
351
|
-
|
|
352
|
-
1. **[ISSUE_TYPE]**
|
|
353
|
-
- **File**: `path/to/file:line`
|
|
354
|
-
- **Issue**: [description]
|
|
355
|
-
- **Why It Matters**: [impact]
|
|
356
|
-
- **Action Required**: [fix]
|
|
357
|
-
- **Example**:
|
|
358
|
-
```[language]
|
|
359
|
-
# ❌ Current
|
|
360
|
-
[problematic_code]
|
|
361
|
-
|
|
362
|
-
# ✅ Fixed
|
|
363
|
-
[fixed_code]
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
✅ Positive Observations
|
|
367
|
-
- [good_practice_1]
|
|
368
|
-
- [good_practice_2]
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
---
|
|
372
|
-
|
|
373
|
-
## Quick Reference Checklist
|
|
374
|
-
|
|
375
|
-
**[GENERATION INSTRUCTION]**: Create checklist items matching the pattern categories above.
|
|
376
|
-
|
|
377
|
-
### Security
|
|
378
|
-
- [ ] No hardcoded secrets/credentials
|
|
379
|
-
- [ ] Input validation on all external data
|
|
380
|
-
- [ ] Parameterized queries (no string concatenation)
|
|
381
|
-
- [ ] Proper authentication/authorization checks
|
|
382
|
-
|
|
383
|
-
### Performance
|
|
384
|
-
- [ ] No N+1 query patterns
|
|
385
|
-
- [ ] Pagination for large datasets
|
|
386
|
-
- [ ] No blocking calls in async context
|
|
387
|
-
- [ ] Appropriate data structures
|
|
388
|
-
|
|
389
|
-
### Code Quality
|
|
390
|
-
- [ ] Functions under complexity threshold
|
|
391
|
-
- [ ] No significant duplication
|
|
392
|
-
- [ ] Proper error handling
|
|
393
|
-
- [ ] Type safety maintained
|
|
394
|
-
|
|
395
|
-
### [PROJECT_NAME] Patterns
|
|
396
|
-
- [ ] [PROJECT_SPECIFIC_CHECK_1]
|
|
397
|
-
- [ ] [PROJECT_SPECIFIC_CHECK_2]
|
|
398
|
-
- [ ] [PROJECT_SPECIFIC_CHECK_3]
|
|
399
|
-
- [ ] [PROJECT_SPECIFIC_CHECK_4]
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
## Edge Cases
|
|
404
|
-
|
|
405
|
-
**Large diffs (>30 files)**: Ask user to prioritize or focus on high-risk files first.
|
|
406
|
-
**No changes detected**: Prompt user to specify commit SHA, branch comparison, or stage changes.
|
|
407
|
-
**Binary/generated files**: Skip and note: "Skipped N binary/generated files (*.min.js, dist/*, etc.)"
|
|
408
|
-
**Uncertain about conventions**: Ask for clarification rather than assuming.
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|
|
412
|
-
## Review Principles
|
|
413
|
-
|
|
414
|
-
1. **Be Constructive** - Frame as learning opportunities
|
|
415
|
-
2. **Be Specific** - Always include file paths and line numbers
|
|
416
|
-
3. **Prioritize** - Critical/major first; don't overwhelm with minor issues
|
|
417
|
-
4. **Explain Why** - Help developers understand the reasoning
|
|
418
|
-
5. **Provide Solutions** - Every issue needs an actionable fix example
|
|
419
|
-
6. **Acknowledge Good Work** - Note well-written code and good practices
|
|
420
|
-
|
|
421
|
-
---
|
|
422
|
-
|
|
423
|
-
## Generation Instructions
|
|
424
|
-
|
|
425
|
-
**For LLM generating project-specific agent from this template:**
|
|
426
|
-
|
|
427
|
-
1. **Discover project metadata**: Read package.json/pyproject.toml/go.mod etc.
|
|
428
|
-
2. **Read documentation**: README, CONTRIBUTING, ARCHITECTURE files
|
|
429
|
-
3. **Extract linting rules**: Parse .eslintrc, pylintrc, ruff.toml etc.
|
|
430
|
-
4. **Sample codebase**: Identify 5-8 critical pattern categories with examples
|
|
431
|
-
5. **Populate placeholders**: Replace all [PLACEHOLDERS] with project values
|
|
432
|
-
6. **Generate examples**: Use project's actual language and framework syntax
|
|
433
|
-
7. **Validate**: Ensure all pattern categories have working code examples
|