@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,258 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: unit-tester
|
|
3
|
-
description: |-
|
|
4
|
-
Use this agent when the user explicitly requests unit test creation, modification, or implementation.
|
|
5
|
-
This includes requests like 'write tests', 'create unit tests', 'add test coverage', 'cover with unit tests', 'let's implement unit tests', 'generate tests for [component]', or 'improve test suite'.
|
|
6
|
-
IMPORTANT: This agent should ONLY be invoked when testing is explicitly requested - never proactively suggest or write tests without explicit user instruction.
|
|
7
|
-
tools: Bash, Glob, Grep, Read, Edit, Write, WebFetch, TodoWrite, WebSearch
|
|
8
|
-
model: inherit
|
|
9
|
-
color: green
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Unit Tester Agent Template
|
|
13
|
-
|
|
14
|
-
**Purpose**: This template guides generation of project-specific unit testing agents. The generating LLM analyzes the codebase and produces a concise testing agent aligned with project conventions.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Core Mission
|
|
19
|
-
|
|
20
|
-
Create comprehensive, production-ready unit tests that:
|
|
21
|
-
- Follow project's testing framework and conventions
|
|
22
|
-
- Test business logic, not trivial code
|
|
23
|
-
- Use correct mocking patterns
|
|
24
|
-
- Are fast, isolated, and maintainable
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Project Context
|
|
29
|
-
|
|
30
|
-
**[GENERATION INSTRUCTION]**: Analyze project to populate:
|
|
31
|
-
- `.codemie/guides/` folder (if exists) for testing guidelines
|
|
32
|
-
- Existing test files for patterns and conventions
|
|
33
|
-
- Package files for framework and dependencies
|
|
34
|
-
- Test config files for coverage requirements
|
|
35
|
-
|
|
36
|
-
**[TEMPLATE]**:
|
|
37
|
-
```
|
|
38
|
-
Framework: [TEST_FRAMEWORK] [VERSION] with [PLUGINS]
|
|
39
|
-
Structure: [TEST_DIRECTORY] ([ORGANIZATION_PATTERN])
|
|
40
|
-
Pattern: [TEST_PATTERN] (AAA, Given-When-Then, Table-driven)
|
|
41
|
-
Mocking: [MOCK_LIBRARY] - [MOCKING_RULE]
|
|
42
|
-
Async: [ASYNC_PATTERN]
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## What to Test vs Skip
|
|
48
|
-
|
|
49
|
-
### ✅ TEST: Business Logic
|
|
50
|
-
|
|
51
|
-
- Calculations, transformations, conditional logic
|
|
52
|
-
- Validation and error handling
|
|
53
|
-
- Edge cases (null, empty, boundaries)
|
|
54
|
-
- State changes and workflows
|
|
55
|
-
- Integration points (with mocked dependencies)
|
|
56
|
-
|
|
57
|
-
### ❌ SKIP: Trivial Code
|
|
58
|
-
|
|
59
|
-
- Simple getters/setters
|
|
60
|
-
- Model defaults ([ORM_FRAMEWORK] handles this)
|
|
61
|
-
- Framework internals
|
|
62
|
-
- Auto-generated code
|
|
63
|
-
- Pass-through methods with no logic
|
|
64
|
-
|
|
65
|
-
**Decision Rule**: If there's no conditional logic or business rule, don't test it.
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Essential Test Patterns
|
|
70
|
-
|
|
71
|
-
### 1. Basic Test Structure
|
|
72
|
-
|
|
73
|
-
**[TEMPLATE]**:
|
|
74
|
-
```[language]
|
|
75
|
-
[test_decorator_or_annotation]
|
|
76
|
-
[async_keyword] [function_keyword] test_[method]_[scenario]_[expected]() {
|
|
77
|
-
// Arrange
|
|
78
|
-
[setup_mocks_and_data]
|
|
79
|
-
|
|
80
|
-
// Act
|
|
81
|
-
[result] = [await] [method_call]
|
|
82
|
-
|
|
83
|
-
// Assert
|
|
84
|
-
[assertions]
|
|
85
|
-
[verify_mock_calls]
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 2. Exception/Error Testing
|
|
90
|
-
|
|
91
|
-
**[TEMPLATE]**:
|
|
92
|
-
```[language]
|
|
93
|
-
[test_decorator_or_annotation]
|
|
94
|
-
[function_keyword] test_[method]_raises_[exception]() {
|
|
95
|
-
[expect_exception_syntax] {
|
|
96
|
-
[method_call_that_fails]
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### 3. Parametrized Tests
|
|
102
|
-
|
|
103
|
-
**[TEMPLATE]**:
|
|
104
|
-
```[language]
|
|
105
|
-
[parametrize_decorator]([test_cases])
|
|
106
|
-
[test_decorator_or_annotation]
|
|
107
|
-
[function_keyword] test_[method]_multiple_cases([params]) {
|
|
108
|
-
[assertion]
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 4. Mocking ([MOCKING_RULE])
|
|
113
|
-
|
|
114
|
-
**[GENERATION INSTRUCTION]**: Document the correct mocking approach for the project's language:
|
|
115
|
-
- Python: Patch where object is USED, not where DEFINED
|
|
116
|
-
- JavaScript: Mock modules at top level with jest.mock()
|
|
117
|
-
- Java: Use @Mock and @InjectMocks annotations
|
|
118
|
-
- Go: Use interfaces with mock implementations
|
|
119
|
-
|
|
120
|
-
**[TEMPLATE]**:
|
|
121
|
-
```[language]
|
|
122
|
-
// ✅ CORRECT
|
|
123
|
-
[correct_mock_example]
|
|
124
|
-
|
|
125
|
-
// ❌ WRONG
|
|
126
|
-
[wrong_mock_example]
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 5. API/Endpoint Testing
|
|
130
|
-
|
|
131
|
-
**[TEMPLATE]**:
|
|
132
|
-
```[language]
|
|
133
|
-
[test_decorator_or_annotation]
|
|
134
|
-
[async_keyword] [function_keyword] test_[endpoint]_[scenario]() {
|
|
135
|
-
[mock_service_layer]
|
|
136
|
-
[response] = [test_client].[http_method]([path], [options])
|
|
137
|
-
[assert_status]
|
|
138
|
-
[assert_body]
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Test Quality Checklist
|
|
145
|
-
|
|
146
|
-
- [ ] Clear test name: `test_<method>_<scenario>_<expected>`
|
|
147
|
-
- [ ] [TEST_PATTERN] pattern followed
|
|
148
|
-
- [ ] External dependencies mocked
|
|
149
|
-
- [ ] Mock calls verified
|
|
150
|
-
- [ ] Specific assertions (not just `assertTrue`)
|
|
151
|
-
- [ ] Fast execution (no real I/O)
|
|
152
|
-
- [ ] No hardcoded credentials
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Running Tests
|
|
157
|
-
|
|
158
|
-
**[TEMPLATE]**:
|
|
159
|
-
```bash
|
|
160
|
-
# All tests
|
|
161
|
-
[run_all_command]
|
|
162
|
-
|
|
163
|
-
# Specific file
|
|
164
|
-
[run_file_command] [path]
|
|
165
|
-
|
|
166
|
-
# With coverage
|
|
167
|
-
[coverage_command]
|
|
168
|
-
|
|
169
|
-
# Specific test
|
|
170
|
-
[run_single_command] [test_name]
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Key Reminders
|
|
176
|
-
|
|
177
|
-
1. **[TEST_FRAMEWORK] only** - Don't mix frameworks
|
|
178
|
-
2. **[MOCKING_RULE]** - Critical for correct test isolation
|
|
179
|
-
3. **Test behavior, not implementation** - Focus on what, not how
|
|
180
|
-
4. **Mock external dependencies** - Database, APIs, file system
|
|
181
|
-
5. **Skip trivial code** - No value in testing getters/defaults
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Generation Instructions
|
|
186
|
-
|
|
187
|
-
**For LLM generating project-specific agent from this template:**
|
|
188
|
-
|
|
189
|
-
### Step 1: Discover Testing Stack
|
|
190
|
-
|
|
191
|
-
Analyze:
|
|
192
|
-
- Package files for test framework and dependencies
|
|
193
|
-
- Existing test files for patterns
|
|
194
|
-
- Test config files for settings
|
|
195
|
-
- `.codemie/guides/` folder if exists
|
|
196
|
-
|
|
197
|
-
Extract:
|
|
198
|
-
| Item | Source |
|
|
199
|
-
|------|--------|
|
|
200
|
-
| Framework + version | package.json, pyproject.toml, pom.xml |
|
|
201
|
-
| Plugins/extensions | Same + test configs |
|
|
202
|
-
| Mock library | Import statements in test files |
|
|
203
|
-
| Test directory | Project structure |
|
|
204
|
-
| Naming convention | Existing test file names |
|
|
205
|
-
|
|
206
|
-
### Step 2: Identify Patterns
|
|
207
|
-
|
|
208
|
-
From 5-10 existing test files, extract:
|
|
209
|
-
- Test structure (AAA, Given-When-Then, Table-driven)
|
|
210
|
-
- Async handling pattern
|
|
211
|
-
- Mock setup approach
|
|
212
|
-
- Fixture/setup patterns
|
|
213
|
-
- Assertion style
|
|
214
|
-
|
|
215
|
-
### Step 3: Document Mocking Rule
|
|
216
|
-
|
|
217
|
-
**Critical** - Identify the correct mocking approach:
|
|
218
|
-
|
|
219
|
-
| Language | Rule |
|
|
220
|
-
|----------|------|
|
|
221
|
-
| Python | Patch where USED, not DEFINED |
|
|
222
|
-
| JavaScript | jest.mock() at module level |
|
|
223
|
-
| Java | @Mock + @InjectMocks |
|
|
224
|
-
| Go | Interface-based mocks |
|
|
225
|
-
|
|
226
|
-
### Step 4: Create Concrete Examples
|
|
227
|
-
|
|
228
|
-
For each essential pattern, generate examples using:
|
|
229
|
-
- Project's actual language syntax
|
|
230
|
-
- Project's test framework
|
|
231
|
-
- Project's mock library
|
|
232
|
-
- Realistic method/class names from codebase
|
|
233
|
-
|
|
234
|
-
### Step 5: Extract Test Commands
|
|
235
|
-
|
|
236
|
-
From package.json scripts, Makefile, or CI config:
|
|
237
|
-
- Run all tests
|
|
238
|
-
- Run single file
|
|
239
|
-
- Run with coverage
|
|
240
|
-
- Run specific test
|
|
241
|
-
|
|
242
|
-
### Step 6: Finalize Agent
|
|
243
|
-
|
|
244
|
-
- Remove all `[GENERATION INSTRUCTION]` blocks
|
|
245
|
-
- Remove this "Generation Instructions" section
|
|
246
|
-
- Replace all `[PLACEHOLDERS]` with project values
|
|
247
|
-
- Include 1-2 concrete examples per pattern
|
|
248
|
-
- **Target agent size: 100-150 lines**
|
|
249
|
-
|
|
250
|
-
### Validation
|
|
251
|
-
|
|
252
|
-
- [ ] Framework and version specified
|
|
253
|
-
- [ ] Mocking rule clearly stated with example
|
|
254
|
-
- [ ] All 5 patterns have project-specific examples
|
|
255
|
-
- [ ] Test commands are accurate
|
|
256
|
-
- [ ] No `[PLACEHOLDERS]` remain
|
|
257
|
-
- [ ] No generation instructions remain
|
|
258
|
-
- [ ] Agent under 150 lines
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# API Patterns Guide
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
<!--
|
|
7
|
-
GENERATION INSTRUCTIONS:
|
|
8
|
-
1. Scan codebase for API routes, controllers, middleware
|
|
9
|
-
2. Extract ACTUAL patterns used (don't invent)
|
|
10
|
-
3. Fill each section with REAL file paths and code
|
|
11
|
-
4. Keep examples minimal (5-15 lines, one per pattern)
|
|
12
|
-
5. Final output: 150-300 lines
|
|
13
|
-
-->
|
|
14
|
-
|
|
15
|
-
**Project**: [Extract from package.json/config]
|
|
16
|
-
**Stack**: [Detect framework, language, auth library]
|
|
17
|
-
**Base URL**: [Find in config/env]
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## File Structure
|
|
22
|
-
|
|
23
|
-
<!-- Find and document where API code lives -->
|
|
24
|
-
|
|
25
|
-
| Purpose | Path |
|
|
26
|
-
|---------|------|
|
|
27
|
-
| Routes/Endpoints | `[scan for router files]` |
|
|
28
|
-
| Controllers/Handlers | `[scan for controller pattern]` |
|
|
29
|
-
| Middleware | `[scan for middleware folder]` |
|
|
30
|
-
| Validation | `[scan for validators/schemas]` |
|
|
31
|
-
| Models/Types | `[scan for models/entities]` |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Endpoint Pattern
|
|
36
|
-
|
|
37
|
-
<!-- Extract ONE canonical endpoint showing the full pattern -->
|
|
38
|
-
|
|
39
|
-
```[detected_language]
|
|
40
|
-
// Source: [actual_file:lines]
|
|
41
|
-
[extract representative endpoint - prefer one with auth + validation]
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**To add new endpoint, replicate this structure:**
|
|
45
|
-
1. Define route in `[routes_file]`
|
|
46
|
-
2. Add handler in `[controllers_path]`
|
|
47
|
-
3. Add validation in `[validators_path]` (if needed)
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Validation Pattern
|
|
52
|
-
|
|
53
|
-
<!-- Find how this codebase validates requests -->
|
|
54
|
-
|
|
55
|
-
**Approach**: [Detect: Zod/Joi/Yup/Pydantic/class-validator/custom]
|
|
56
|
-
|
|
57
|
-
```[lang]
|
|
58
|
-
// Source: [actual_file:lines]
|
|
59
|
-
[extract one validation schema example]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Usage:**
|
|
63
|
-
```[lang]
|
|
64
|
-
// How validation is applied to routes
|
|
65
|
-
[extract middleware/decorator usage]
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Authentication
|
|
71
|
-
|
|
72
|
-
<!-- Find auth middleware/guards -->
|
|
73
|
-
|
|
74
|
-
**Method**: [Detect: JWT/Session/API Key/OAuth]
|
|
75
|
-
|
|
76
|
-
```[lang]
|
|
77
|
-
// Source: [actual_file:lines]
|
|
78
|
-
[extract auth middleware]
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Protect route:** `[extract exact syntax used]`
|
|
82
|
-
**Access user:** `[extract how user object is accessed]`
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Response Patterns
|
|
87
|
-
|
|
88
|
-
<!-- Find consistent response structures -->
|
|
89
|
-
|
|
90
|
-
**Success format:**
|
|
91
|
-
```json
|
|
92
|
-
[extract actual success response structure from code]
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Error format:**
|
|
96
|
-
```json
|
|
97
|
-
[extract actual error response structure from code]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**Helper/Utility** (if exists): `[path to response helpers]`
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Status Codes
|
|
105
|
-
|
|
106
|
-
<!-- Extract from actual handlers OR document conventions found -->
|
|
107
|
-
|
|
108
|
-
| Operation | Success | Common Errors |
|
|
109
|
-
|-----------|---------|---------------|
|
|
110
|
-
| Create | [find in POST handlers] | [find error codes] |
|
|
111
|
-
| Read | [find in GET handlers] | [find error codes] |
|
|
112
|
-
| Update | [find in PUT/PATCH] | [find error codes] |
|
|
113
|
-
| Delete | [find in DELETE] | [find error codes] |
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Error Handling
|
|
118
|
-
|
|
119
|
-
<!-- Find centralized error handling -->
|
|
120
|
-
|
|
121
|
-
```[lang]
|
|
122
|
-
// Source: [actual_file:lines]
|
|
123
|
-
[extract error handler/middleware or throwing pattern]
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Throw errors using:** `[extract exact syntax]`
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Pagination
|
|
131
|
-
|
|
132
|
-
<!-- Find if pagination exists, extract pattern -->
|
|
133
|
-
|
|
134
|
-
```[lang]
|
|
135
|
-
// Source: [actual_file:lines]
|
|
136
|
-
[extract pagination implementation]
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**Params**: [extract actual query param names used]
|
|
140
|
-
**Defaults**: page=`[find]`, limit=`[find]`
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Conventions
|
|
145
|
-
|
|
146
|
-
<!-- Extract by analyzing multiple endpoints -->
|
|
147
|
-
|
|
148
|
-
| Aspect | Convention Used |
|
|
149
|
-
|--------|-----------------|
|
|
150
|
-
| Route naming | `[kebab-case/camelCase/snake_case]` |
|
|
151
|
-
| Controller methods | `[naming pattern found]` |
|
|
152
|
-
| Async handling | `[async/await, promises, try/catch wrapper]` |
|
|
153
|
-
| ID parameter | `[id/:id/uuid format]` |
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Anti-Patterns
|
|
158
|
-
|
|
159
|
-
<!-- Document what NOT to do based on codebase patterns -->
|
|
160
|
-
|
|
161
|
-
| ❌ Avoid | ✅ Use Instead | Reason |
|
|
162
|
-
|----------|----------------|--------|
|
|
163
|
-
| [detect inconsistencies or deprecated patterns] | [correct pattern from code] | [why] |
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## Quick Reference
|
|
168
|
-
|
|
169
|
-
<!-- Condensed lookup table -->
|
|
170
|
-
|
|
171
|
-
| Task | Syntax | Example |
|
|
172
|
-
|------|--------|---------|
|
|
173
|
-
| Define route | `[extract]` | `[file:line]` |
|
|
174
|
-
| Add validation | `[extract]` | `[file:line]` |
|
|
175
|
-
| Protect route | `[extract]` | `[file:line]` |
|
|
176
|
-
| Return success | `[extract]` | `[file:line]` |
|
|
177
|
-
| Throw error | `[extract]` | `[file:line]` |
|
|
178
|
-
|
|
179
|
-
---
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Architecture Guide
|
|
3
|
-
|
|
4
|
-
<!--
|
|
5
|
-
GENERATION INSTRUCTIONS:
|
|
6
|
-
1. Identify architectural style (layered/modular/hexagonal/clean/microservices)
|
|
7
|
-
2. Detect design patterns by scanning code structures
|
|
8
|
-
3. Map actual dependencies between components
|
|
9
|
-
4. Extract from: imports, folder structure, class relationships
|
|
10
|
-
5. Output: 300 lines max
|
|
11
|
-
-->
|
|
12
|
-
|
|
13
|
-
**Project**: [Extract from config]
|
|
14
|
-
**Style**: [Detect: Layered | Modular | Hexagonal | Clean | Microservices | Monolith]
|
|
15
|
-
**Language**: [Detect] | **Framework**: [Detect]
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Architecture Overview
|
|
20
|
-
|
|
21
|
-
<!-- Generate diagram based on detected style -->
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
[Generate ASCII diagram showing main components and their relationships]
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Key Decision**: [Extract or infer WHY this architecture - scalability/simplicity/team structure]
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Component Structure
|
|
32
|
-
|
|
33
|
-
<!-- Scan and document actual project organization -->
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
[root]/
|
|
37
|
-
├── [component1]/ [Detected purpose]
|
|
38
|
-
├── [component2]/ [Detected purpose]
|
|
39
|
-
├── [component3]/ [Detected purpose]
|
|
40
|
-
├── [shared/common]/ [Detected purpose]
|
|
41
|
-
└── [entry point]
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Design Patterns Detected
|
|
47
|
-
|
|
48
|
-
<!-- Scan codebase for these patterns, document only those found -->
|
|
49
|
-
|
|
50
|
-
| Pattern | Usage | Location |
|
|
51
|
-
|---------|-------|----------|
|
|
52
|
-
| [Repository] | [How it's used] | `[file:line]` |
|
|
53
|
-
| [Factory] | [How it's used] | `[file:line]` |
|
|
54
|
-
| [Singleton] | [How it's used] | `[file:line]` |
|
|
55
|
-
| [Dependency Injection] | [How it's used] | `[file:line]` |
|
|
56
|
-
| [Observer/Event] | [How it's used] | `[file:line]` |
|
|
57
|
-
| [Strategy] | [How it's used] | `[file:line]` |
|
|
58
|
-
|
|
59
|
-
### Primary Pattern: [Most significant pattern]
|
|
60
|
-
|
|
61
|
-
```[lang]
|
|
62
|
-
// Source: [file:lines]
|
|
63
|
-
[Extract canonical example of main pattern]
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**When to use**: [Detect from usage context]
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Layer/Module Responsibilities
|
|
71
|
-
|
|
72
|
-
<!-- Adapt based on detected architecture style -->
|
|
73
|
-
|
|
74
|
-
| Component | Responsibility | Depends On | Depended By |
|
|
75
|
-
|-----------|----------------|------------|-------------|
|
|
76
|
-
| [Layer/Module 1] | [Detected role] | [List] | [List] |
|
|
77
|
-
| [Layer/Module 2] | [Detected role] | [List] | [List] |
|
|
78
|
-
| [Layer/Module 3] | [Detected role] | [List] | [List] |
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Dependency Rules
|
|
83
|
-
|
|
84
|
-
<!-- Extract from imports analysis -->
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
[Component A] ──► [Component B] ──► [Component C]
|
|
88
|
-
│
|
|
89
|
-
▼
|
|
90
|
-
[Shared/Core]
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
| Rule | Enforced By |
|
|
94
|
-
|------|-------------|
|
|
95
|
-
| [e.g., Controllers never import Repositories directly] | [Convention / Linter / DI Container] |
|
|
96
|
-
| [e.g., Domain has no external dependencies] | [Convention / Module boundary] |
|
|
97
|
-
|
|
98
|
-
**Violations to avoid:**
|
|
99
|
-
- ❌ [Detected anti-pattern or rule]
|
|
100
|
-
- ❌ [Detected anti-pattern or rule]
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Data Flow
|
|
105
|
-
|
|
106
|
-
<!-- Trace a typical request through the system -->
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
[Entry] → [Component1] → [Component2] → [Component3] → [Storage/External]
|
|
110
|
-
│ │ │ │
|
|
111
|
-
│ [Transform] [Process] [Persist]
|
|
112
|
-
│ │ │ │
|
|
113
|
-
└───────────┴──────────────┴──────────────┘
|
|
114
|
-
Response
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Example flow** (`[common operation]`):
|
|
118
|
-
1. `[entry point]` receives request
|
|
119
|
-
2. `[component]` validates/transforms
|
|
120
|
-
3. `[component]` executes logic
|
|
121
|
-
4. `[component]` persists/fetches data
|
|
122
|
-
5. Response returns through chain
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Key Abstractions
|
|
127
|
-
|
|
128
|
-
<!-- Find interfaces/base classes that define contracts -->
|
|
129
|
-
|
|
130
|
-
| Abstraction | Purpose | Implementations |
|
|
131
|
-
|-------------|---------|-----------------|
|
|
132
|
-
| `[Interface/Base]` | [Contract purpose] | `[file:line]` |
|
|
133
|
-
| `[Interface/Base]` | [Contract purpose] | `[file:line]` |
|
|
134
|
-
|
|
135
|
-
```[lang]
|
|
136
|
-
// Source: [file:lines]
|
|
137
|
-
[Extract key interface/abstract class]
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Adding New Features
|
|
143
|
-
|
|
144
|
-
<!-- Document extension points based on existing patterns -->
|
|
145
|
-
|
|
146
|
-
### To add new [entity/resource/feature]:
|
|
147
|
-
|
|
148
|
-
1. **[Component1]**: Create `[path/pattern]`
|
|
149
|
-
2. **[Component2]**: Create `[path/pattern]`
|
|
150
|
-
3. **[Component3]**: Create `[path/pattern]`
|
|
151
|
-
4. **Wire up**: [How components connect - DI/imports/registration]
|
|
152
|
-
|
|
153
|
-
### To add new [integration/external service]:
|
|
154
|
-
|
|
155
|
-
1. Create adapter in `[path]`
|
|
156
|
-
2. Implement interface `[interface name]`
|
|
157
|
-
3. Register in `[config/di location]`
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Configuration & Environment
|
|
162
|
-
|
|
163
|
-
<!-- Find how config flows through architecture -->
|
|
164
|
-
|
|
165
|
-
| Config Type | Location | Accessed Via |
|
|
166
|
-
|-------------|----------|--------------|
|
|
167
|
-
| Environment | `[.env / env files]` | `[config module/pattern]` |
|
|
168
|
-
| App Config | `[config files]` | `[how injected/imported]` |
|
|
169
|
-
| Secrets | `[secrets handling]` | `[access pattern]` |
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Boundaries Summary
|
|
174
|
-
|
|
175
|
-
<!-- Concise rules for AI to follow -->
|
|
176
|
-
|
|
177
|
-
| ✅ DO | ❌ DON'T |
|
|
178
|
-
|-------|----------|
|
|
179
|
-
| [Detected convention] | [Detected anti-pattern] |
|
|
180
|
-
| [Detected convention] | [Detected anti-pattern] |
|
|
181
|
-
| [Detected convention] | [Detected anti-pattern] |
|
|
182
|
-
| Follow existing [pattern] for new code | Introduce new patterns without reason |
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## Quick Reference
|
|
187
|
-
|
|
188
|
-
| Need | Location | Pattern |
|
|
189
|
-
|------|----------|---------|
|
|
190
|
-
| Entry point | `[path]` | - |
|
|
191
|
-
| Business logic | `[path]` | [pattern] |
|
|
192
|
-
| Data access | `[path]` | [pattern] |
|
|
193
|
-
| External services | `[path]` | [pattern] |
|
|
194
|
-
| Shared utilities | `[path]` | - |
|
|
195
|
-
| Configuration | `[path]` | [pattern] |
|
|
196
|
-
|
|
197
|
-
---
|