devchain-cli 0.17.1 → 0.18.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 +64 -96
- package/dist/drizzle/0067_remove_claude_1m_provider_state.sql +3 -0
- package/dist/drizzle/0068_claude_launch_settings_json.sql +1 -0
- package/dist/drizzle/meta/0067_snapshot.json +5743 -0
- package/dist/drizzle/meta/0068_snapshot.json +5750 -0
- package/dist/drizzle/meta/_journal.json +15 -1
- package/dist/node_modules/@devchain/codebase-overview/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@devchain/shared/index.d.ts +1 -1
- package/dist/node_modules/@devchain/shared/index.d.ts.map +1 -1
- package/dist/node_modules/@devchain/shared/index.js +1 -1
- package/dist/node_modules/@devchain/shared/index.js.map +1 -1
- package/dist/node_modules/@devchain/shared/schemas/claude-launch-settings.d.ts +12 -0
- package/dist/node_modules/@devchain/shared/schemas/claude-launch-settings.d.ts.map +1 -0
- package/dist/node_modules/@devchain/shared/schemas/claude-launch-settings.js +97 -0
- package/dist/node_modules/@devchain/shared/schemas/claude-launch-settings.js.map +1 -0
- package/dist/node_modules/@devchain/shared/schemas/export-schema.d.ts +18 -10
- package/dist/node_modules/@devchain/shared/schemas/export-schema.d.ts.map +1 -1
- package/dist/node_modules/@devchain/shared/schemas/export-schema.js +11 -2
- package/dist/node_modules/@devchain/shared/schemas/export-schema.js.map +1 -1
- package/dist/node_modules/@devchain/shared/schemas/index.d.ts +1 -0
- package/dist/node_modules/@devchain/shared/schemas/index.d.ts.map +1 -1
- package/dist/node_modules/@devchain/shared/schemas/index.js +1 -0
- package/dist/node_modules/@devchain/shared/schemas/index.js.map +1 -1
- package/dist/node_modules/@devchain/shared/session-migration-reasons.d.ts +20 -0
- package/dist/node_modules/@devchain/shared/session-migration-reasons.d.ts.map +1 -0
- package/dist/node_modules/@devchain/shared/session-migration-reasons.js +109 -0
- package/dist/node_modules/@devchain/shared/session-migration-reasons.js.map +1 -0
- package/dist/node_modules/@devchain/shared/tsconfig.tsbuildinfo +1 -1
- package/dist/server/app.main.module.js +2 -0
- package/dist/server/app.main.module.js.map +1 -1
- package/dist/server/app.normal.module.js +2 -0
- package/dist/server/app.normal.module.js.map +1 -1
- package/dist/server/common/prompt-references.d.ts +29 -0
- package/dist/server/common/prompt-references.js +84 -0
- package/dist/server/common/prompt-references.js.map +1 -0
- package/dist/server/common/prompt-transfer.d.ts +31 -0
- package/dist/server/common/prompt-transfer.js +38 -0
- package/dist/server/common/prompt-transfer.js.map +1 -0
- package/dist/server/common/prompt-type.d.ts +12 -0
- package/dist/server/common/prompt-type.js +46 -0
- package/dist/server/common/prompt-type.js.map +1 -0
- package/dist/server/common/tags.d.ts +7 -0
- package/dist/server/common/tags.js +21 -0
- package/dist/server/common/tags.js.map +1 -0
- package/dist/server/main.js +9 -1
- package/dist/server/main.js.map +1 -1
- package/dist/server/modules/cloud-tunnel/services/mobile-chat-rpc.service.d.ts +9 -0
- package/dist/server/modules/cloud-tunnel/services/mobile-chat-rpc.service.js +33 -0
- package/dist/server/modules/cloud-tunnel/services/mobile-chat-rpc.service.js.map +1 -1
- package/dist/server/modules/cloud-tunnel/services/tunnel-handler.service.js +15 -0
- package/dist/server/modules/cloud-tunnel/services/tunnel-handler.service.js.map +1 -1
- package/dist/server/modules/core/services/preflight.service.js +28 -4
- package/dist/server/modules/core/services/preflight.service.js.map +1 -1
- package/dist/server/modules/events/catalog/broadcast-registry.js +29 -12
- package/dist/server/modules/events/catalog/broadcast-registry.js.map +1 -1
- package/dist/server/modules/events/catalog/index.d.ts +30 -3
- package/dist/server/modules/events/catalog/index.js +2 -0
- package/dist/server/modules/events/catalog/index.js.map +1 -1
- package/dist/server/modules/events/catalog/session.runtime-context.updated.d.ts +12 -0
- package/dist/server/modules/events/catalog/session.runtime-context.updated.js +13 -0
- package/dist/server/modules/events/catalog/session.runtime-context.updated.js.map +1 -0
- package/dist/server/modules/events/catalog/session.transcript.updated.d.ts +23 -3
- package/dist/server/modules/events/catalog/session.transcript.updated.js +41 -19
- package/dist/server/modules/events/catalog/session.transcript.updated.js.map +1 -1
- package/dist/server/modules/hooks/dtos/hook-event.dto.d.ts +50 -0
- package/dist/server/modules/hooks/dtos/hook-event.dto.js +18 -1
- package/dist/server/modules/hooks/dtos/hook-event.dto.js.map +1 -1
- package/dist/server/modules/hooks/hooks.module.js +2 -1
- package/dist/server/modules/hooks/hooks.module.js.map +1 -1
- package/dist/server/modules/hooks/services/hooks.service.d.ts +4 -1
- package/dist/server/modules/hooks/services/hooks.service.js +15 -3
- package/dist/server/modules/hooks/services/hooks.service.js.map +1 -1
- package/dist/server/modules/mcp/dtos/mcp.dto.d.ts +24 -0
- package/dist/server/modules/mcp/dtos/mcp.dto.js.map +1 -1
- package/dist/server/modules/mcp/services/handlers/agent-context.d.ts +2 -2
- package/dist/server/modules/mcp/services/handlers/agent-tools.js +103 -16
- package/dist/server/modules/mcp/services/handlers/agent-tools.js.map +1 -1
- package/dist/server/modules/mcp/services/handlers/prompt-tools.js +11 -9
- package/dist/server/modules/mcp/services/handlers/prompt-tools.js.map +1 -1
- package/dist/server/modules/mcp/services/instructions-resolver.js +14 -10
- package/dist/server/modules/mcp/services/instructions-resolver.js.map +1 -1
- package/dist/server/modules/mcp/tool-descriptors/agent.metadata.js +1 -1
- package/dist/server/modules/mcp/tool-descriptors/agent.metadata.js.map +1 -1
- package/dist/server/modules/metrics/controllers/metrics.controller.d.ts +6 -0
- package/dist/server/modules/metrics/controllers/metrics.controller.js +38 -0
- package/dist/server/modules/metrics/controllers/metrics.controller.js.map +1 -0
- package/dist/server/modules/metrics/helpers/byte-accounting.helper.d.ts +17 -0
- package/dist/server/modules/metrics/helpers/byte-accounting.helper.js +88 -0
- package/dist/server/modules/metrics/helpers/byte-accounting.helper.js.map +1 -0
- package/dist/server/modules/metrics/metrics.module.d.ts +2 -0
- package/dist/server/modules/metrics/metrics.module.js +23 -0
- package/dist/server/modules/metrics/metrics.module.js.map +1 -0
- package/dist/server/modules/metrics/services/metrics.service.d.ts +20 -0
- package/dist/server/modules/metrics/services/metrics.service.js +241 -0
- package/dist/server/modules/metrics/services/metrics.service.js.map +1 -0
- package/dist/server/modules/metrics/types/metrics.types.d.ts +100 -0
- package/dist/server/modules/{providers/adapters/capabilities/context-window.capability.js → metrics/types/metrics.types.js} +1 -1
- package/dist/server/modules/metrics/types/metrics.types.js.map +1 -0
- package/dist/server/modules/profiles/dto.d.ts +2 -2
- package/dist/server/modules/profiles/dto.js +14 -2
- package/dist/server/modules/profiles/dto.js.map +1 -1
- package/dist/server/modules/projects/controllers/projects.controller.d.ts +5 -6
- package/dist/server/modules/projects/helpers/profile-mapping.helpers.d.ts +5 -3
- package/dist/server/modules/projects/helpers/profile-mapping.helpers.js +25 -13
- package/dist/server/modules/projects/helpers/profile-mapping.helpers.js.map +1 -1
- package/dist/server/modules/projects/helpers/project-export.d.ts +0 -2
- package/dist/server/modules/projects/helpers/project-export.js +7 -3
- package/dist/server/modules/projects/helpers/project-export.js.map +1 -1
- package/dist/server/modules/projects/helpers/project-import.d.ts +7 -6
- package/dist/server/modules/projects/helpers/project-import.js +66 -105
- package/dist/server/modules/projects/helpers/project-import.js.map +1 -1
- package/dist/server/modules/projects/helpers/project-runtime.helpers.d.ts +1 -0
- package/dist/server/modules/projects/helpers/project-runtime.helpers.js +2 -1
- package/dist/server/modules/projects/helpers/project-runtime.helpers.js.map +1 -1
- package/dist/server/modules/projects/helpers/template-loader.d.ts +3 -3
- package/dist/server/modules/projects/helpers/template-loader.js +32 -12
- package/dist/server/modules/projects/helpers/template-loader.js.map +1 -1
- package/dist/server/modules/projects/projects.module.js +0 -2
- package/dist/server/modules/projects/projects.module.js.map +1 -1
- package/dist/server/modules/projects/services/project-registry-import.service.d.ts +2 -0
- package/dist/server/modules/projects/services/project-registry-import.service.js +29 -1
- package/dist/server/modules/projects/services/project-registry-import.service.js.map +1 -1
- package/dist/server/modules/projects/services/project-template-upgrade.service.d.ts +5 -0
- package/dist/server/modules/projects/services/project-template-upgrade.service.js +22 -2
- package/dist/server/modules/projects/services/project-template-upgrade.service.js.map +1 -1
- package/dist/server/modules/projects/services/projects.service.d.ts +12 -20
- package/dist/server/modules/projects/services/projects.service.js +8 -9
- package/dist/server/modules/projects/services/projects.service.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codec-registry.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codecs/agents.codec.d.ts +1 -1
- package/dist/server/modules/projects/template-codec/codecs/agents.codec.js +4 -4
- package/dist/server/modules/projects/template-codec/codecs/agents.codec.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codecs/profiles.codec.d.ts +1 -1
- package/dist/server/modules/projects/template-codec/codecs/profiles.codec.js +27 -8
- package/dist/server/modules/projects/template-codec/codecs/profiles.codec.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codecs/project-settings.codec.js +8 -1
- package/dist/server/modules/projects/template-codec/codecs/project-settings.codec.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codecs/prompts.codec.js +23 -4
- package/dist/server/modules/projects/template-codec/codecs/prompts.codec.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codecs/provider-settings.codec.d.ts +0 -5
- package/dist/server/modules/projects/template-codec/codecs/provider-settings.codec.js +10 -46
- package/dist/server/modules/projects/template-codec/codecs/provider-settings.codec.js.map +1 -1
- package/dist/server/modules/projects/template-codec/codecs/watchers.codec.js +1 -1
- package/dist/server/modules/projects/template-codec/codecs/watchers.codec.js.map +1 -1
- package/dist/server/modules/projects/template-codec/import-context.d.ts +6 -1
- package/dist/server/modules/projects/template-codec/import-context.js.map +1 -1
- package/dist/server/modules/projects/template-codec/template-section-codec.d.ts +7 -5
- package/dist/server/modules/providers/adapters/capabilities/auto-compact.capability.d.ts +13 -0
- package/dist/server/modules/providers/adapters/capabilities/auto-compact.capability.js +3 -0
- package/dist/server/modules/providers/adapters/capabilities/auto-compact.capability.js.map +1 -0
- package/dist/server/modules/providers/adapters/capabilities/index.d.ts +2 -2
- package/dist/server/modules/providers/adapters/capabilities/index.js +2 -2
- package/dist/server/modules/providers/adapters/capabilities/index.js.map +1 -1
- package/dist/server/modules/providers/adapters/capabilities/type-guards.d.ts +3 -3
- package/dist/server/modules/providers/adapters/capabilities/type-guards.js +3 -3
- package/dist/server/modules/providers/adapters/capabilities/type-guards.js.map +1 -1
- package/dist/server/modules/providers/adapters/claude.adapter.d.ts +3 -7
- package/dist/server/modules/providers/adapters/claude.adapter.js +5 -45
- package/dist/server/modules/providers/adapters/claude.adapter.js.map +1 -1
- package/dist/server/modules/providers/controllers/providers.controller.d.ts +3 -7
- package/dist/server/modules/providers/controllers/providers.controller.js +2 -14
- package/dist/server/modules/providers/controllers/providers.controller.js.map +1 -1
- package/dist/server/modules/providers/providers.module.js +0 -2
- package/dist/server/modules/providers/providers.module.js.map +1 -1
- package/dist/server/modules/providers/services/provider-state-manager.service.d.ts +4 -10
- package/dist/server/modules/providers/services/provider-state-manager.service.js +28 -83
- package/dist/server/modules/providers/services/provider-state-manager.service.js.map +1 -1
- package/dist/server/modules/registry/controllers/templates.controller.d.ts +2 -4
- package/dist/server/modules/runtime-context-capture/claude-launch-settings-materializer.service.d.ts +32 -0
- package/dist/server/modules/runtime-context-capture/claude-launch-settings-materializer.service.js +364 -0
- package/dist/server/modules/runtime-context-capture/claude-launch-settings-materializer.service.js.map +1 -0
- package/dist/server/modules/runtime-context-capture/context-window-policy.d.ts +40 -0
- package/dist/server/modules/runtime-context-capture/context-window-policy.js +73 -0
- package/dist/server/modules/runtime-context-capture/context-window-policy.js.map +1 -0
- package/dist/server/modules/runtime-context-capture/index.d.ts +6 -0
- package/dist/server/modules/runtime-context-capture/index.js +23 -0
- package/dist/server/modules/runtime-context-capture/index.js.map +1 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture-files.d.ts +4 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture-files.js +40 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture-files.js.map +1 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.module.d.ts +2 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.module.js +25 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.module.js.map +1 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.service.d.ts +25 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.service.js +155 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.service.js.map +1 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.types.d.ts +44 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.types.js +5 -0
- package/dist/server/modules/runtime-context-capture/runtime-context-capture.types.js.map +1 -0
- package/dist/server/modules/seeders/seeders/0011_seed_remove_claude_1m_provider_env.d.ts +3 -0
- package/dist/server/modules/seeders/seeders/0011_seed_remove_claude_1m_provider_env.js +31 -0
- package/dist/server/modules/seeders/seeders/0011_seed_remove_claude_1m_provider_env.js.map +1 -0
- package/dist/server/modules/seeders/seeders/0012_seed_claude_launch_settings.d.ts +3 -0
- package/dist/server/modules/seeders/seeders/0012_seed_claude_launch_settings.js +28 -0
- package/dist/server/modules/seeders/seeders/0012_seed_claude_launch_settings.js.map +1 -0
- package/dist/server/modules/seeders/seeders/0013_seed_prompt_type_tags.d.ts +3 -0
- package/dist/server/modules/seeders/seeders/0013_seed_prompt_type_tags.js +112 -0
- package/dist/server/modules/seeders/seeders/0013_seed_prompt_type_tags.js.map +1 -0
- package/dist/server/modules/seeders/services/data-seeder.service.js +6 -0
- package/dist/server/modules/seeders/services/data-seeder.service.js.map +1 -1
- package/dist/server/modules/session-reader/adapters/antigravity-session-reader.adapter.d.ts +6 -0
- package/dist/server/modules/session-reader/adapters/antigravity-session-reader.adapter.js +66 -0
- package/dist/server/modules/session-reader/adapters/antigravity-session-reader.adapter.js.map +1 -1
- package/dist/server/modules/session-reader/adapters/claude-session-reader.adapter.d.ts +5 -0
- package/dist/server/modules/session-reader/adapters/claude-session-reader.adapter.js +12 -0
- package/dist/server/modules/session-reader/adapters/claude-session-reader.adapter.js.map +1 -1
- package/dist/server/modules/session-reader/adapters/codex-session-reader.adapter.d.ts +5 -0
- package/dist/server/modules/session-reader/adapters/codex-session-reader.adapter.js +12 -0
- package/dist/server/modules/session-reader/adapters/codex-session-reader.adapter.js.map +1 -1
- package/dist/server/modules/session-reader/adapters/copilot-session-reader.adapter.d.ts +5 -0
- package/dist/server/modules/session-reader/adapters/copilot-session-reader.adapter.js +12 -0
- package/dist/server/modules/session-reader/adapters/copilot-session-reader.adapter.js.map +1 -1
- package/dist/server/modules/session-reader/adapters/opencode-session-reader.adapter.d.ts +5 -0
- package/dist/server/modules/session-reader/adapters/opencode-session-reader.adapter.js +15 -0
- package/dist/server/modules/session-reader/adapters/opencode-session-reader.adapter.js.map +1 -1
- package/dist/server/modules/session-reader/adapters/session-reader-adapter.interface.d.ts +10 -0
- package/dist/server/modules/session-reader/adapters/session-reader-adapter.interface.js +28 -1
- package/dist/server/modules/session-reader/adapters/session-reader-adapter.interface.js.map +1 -1
- package/dist/server/modules/session-reader/controllers/session-reader.controller.d.ts +10 -4
- package/dist/server/modules/session-reader/controllers/session-reader.controller.js +18 -19
- package/dist/server/modules/session-reader/controllers/session-reader.controller.js.map +1 -1
- package/dist/server/modules/session-reader/data/pricing.json +334 -6
- package/dist/server/modules/session-reader/parsers/claude-jsonl.parser.d.ts +1 -0
- package/dist/server/modules/session-reader/parsers/claude-jsonl.parser.js +7 -3
- package/dist/server/modules/session-reader/parsers/claude-jsonl.parser.js.map +1 -1
- package/dist/server/modules/session-reader/parsers/codex-jsonl.parser.d.ts +1 -0
- package/dist/server/modules/session-reader/parsers/codex-jsonl.parser.js +22 -11
- package/dist/server/modules/session-reader/parsers/codex-jsonl.parser.js.map +1 -1
- package/dist/server/modules/session-reader/parsers/copilot-jsonl.parser.d.ts +1 -0
- package/dist/server/modules/session-reader/parsers/copilot-jsonl.parser.js +22 -9
- package/dist/server/modules/session-reader/parsers/copilot-jsonl.parser.js.map +1 -1
- package/dist/server/modules/session-reader/readers/opencode-sqlite.reader.d.ts +5 -1
- package/dist/server/modules/session-reader/readers/opencode-sqlite.reader.js +102 -0
- package/dist/server/modules/session-reader/readers/opencode-sqlite.reader.js.map +1 -1
- package/dist/server/modules/session-reader/services/pricing.interface.d.ts +2 -0
- package/dist/server/modules/session-reader/services/pricing.interface.js +3 -0
- package/dist/server/modules/session-reader/services/pricing.interface.js.map +1 -1
- package/dist/server/modules/session-reader/services/pricing.service.d.ts +1 -0
- package/dist/server/modules/session-reader/services/pricing.service.js +4 -2
- package/dist/server/modules/session-reader/services/pricing.service.js.map +1 -1
- package/dist/server/modules/session-reader/services/session-cache.service.d.ts +72 -4
- package/dist/server/modules/session-reader/services/session-cache.service.js +435 -68
- package/dist/server/modules/session-reader/services/session-cache.service.js.map +1 -1
- package/dist/server/modules/session-reader/services/session-reader.service.d.ts +33 -9
- package/dist/server/modules/session-reader/services/session-reader.service.js +200 -79
- package/dist/server/modules/session-reader/services/session-reader.service.js.map +1 -1
- package/dist/server/modules/session-reader/services/transcript-cursor.d.ts +1 -1
- package/dist/server/modules/session-reader/services/transcript-cursor.js +2 -2
- package/dist/server/modules/session-reader/services/transcript-cursor.js.map +1 -1
- package/dist/server/modules/session-reader/services/transcript-watcher.service.d.ts +3 -0
- package/dist/server/modules/session-reader/services/transcript-watcher.service.js +66 -11
- package/dist/server/modules/session-reader/services/transcript-watcher.service.js.map +1 -1
- package/dist/server/modules/session-reader/session-reader.module.js +12 -2
- package/dist/server/modules/session-reader/session-reader.module.js.map +1 -1
- package/dist/server/modules/sessions/dtos/sessions.dto.d.ts +1 -0
- package/dist/server/modules/sessions/dtos/sessions.dto.js.map +1 -1
- package/dist/server/modules/sessions/services/agent-presence-aggregator.d.ts +1 -0
- package/dist/server/modules/sessions/services/agent-presence-aggregator.js +1 -0
- package/dist/server/modules/sessions/services/agent-presence-aggregator.js.map +1 -1
- package/dist/server/modules/sessions/services/provider-launch-config/provider-launch-config.service.d.ts +6 -2
- package/dist/server/modules/sessions/services/provider-launch-config/provider-launch-config.service.js +24 -8
- package/dist/server/modules/sessions/services/provider-launch-config/provider-launch-config.service.js.map +1 -1
- package/dist/server/modules/sessions/services/session-runtime/__test-utils__/pipeline-harness.d.ts +30 -5
- package/dist/server/modules/sessions/services/session-runtime/__test-utils__/pipeline-harness.js +51 -8
- package/dist/server/modules/sessions/services/session-runtime/__test-utils__/pipeline-harness.js.map +1 -1
- package/dist/server/modules/sessions/services/session-runtime/session-launch-pipeline.service.d.ts +5 -1
- package/dist/server/modules/sessions/services/session-runtime/session-launch-pipeline.service.js +39 -6
- package/dist/server/modules/sessions/services/session-runtime/session-launch-pipeline.service.js.map +1 -1
- package/dist/server/modules/sessions/services/session-runtime/session-restore-pipeline.service.d.ts +7 -1
- package/dist/server/modules/sessions/services/session-runtime/session-restore-pipeline.service.js +47 -5
- package/dist/server/modules/sessions/services/session-runtime/session-restore-pipeline.service.js.map +1 -1
- package/dist/server/modules/sessions/services/sessions.service.d.ts +6 -1
- package/dist/server/modules/sessions/services/sessions.service.js +17 -3
- package/dist/server/modules/sessions/services/sessions.service.js.map +1 -1
- package/dist/server/modules/sessions/sessions.module.js +2 -0
- package/dist/server/modules/sessions/sessions.module.js.map +1 -1
- package/dist/server/modules/sessions/utils/profile-options.d.ts +1 -2
- package/dist/server/modules/sessions/utils/profile-options.js +3 -50
- package/dist/server/modules/sessions/utils/profile-options.js.map +1 -1
- package/dist/server/modules/storage/db/schema.d.ts +10 -87
- package/dist/server/modules/storage/db/schema.js +3 -13
- package/dist/server/modules/storage/db/schema.js.map +1 -1
- package/dist/server/modules/storage/interfaces/snapshot-prompt-writer.interface.d.ts +5 -0
- package/dist/server/modules/storage/interfaces/snapshot-prompt-writer.interface.js +5 -0
- package/dist/server/modules/storage/interfaces/snapshot-prompt-writer.interface.js.map +1 -0
- package/dist/server/modules/storage/local/delegates/prompt.delegate.d.ts +2 -0
- package/dist/server/modules/storage/local/delegates/prompt.delegate.js +31 -20
- package/dist/server/modules/storage/local/delegates/prompt.delegate.js.map +1 -1
- package/dist/server/modules/storage/local/delegates/provider.delegate.js +61 -16
- package/dist/server/modules/storage/local/delegates/provider.delegate.js.map +1 -1
- package/dist/server/modules/storage/local/local-storage.service.d.ts +3 -1
- package/dist/server/modules/storage/local/local-storage.service.js +3 -0
- package/dist/server/modules/storage/local/local-storage.service.js.map +1 -1
- package/dist/server/modules/storage/models/domain.models.d.ts +2 -4
- package/dist/server/modules/storage/storage.module.js +8 -2
- package/dist/server/modules/storage/storage.module.js.map +1 -1
- package/dist/server/modules/terminal/dtos/ws-envelope.dto.d.ts +185 -1
- package/dist/server/modules/terminal/dtos/ws-envelope.dto.js +93 -2
- package/dist/server/modules/terminal/dtos/ws-envelope.dto.js.map +1 -1
- package/dist/server/modules/terminal/gateways/terminal.gateway.d.ts +47 -2
- package/dist/server/modules/terminal/gateways/terminal.gateway.js +615 -62
- package/dist/server/modules/terminal/gateways/terminal.gateway.js.map +1 -1
- package/dist/server/modules/terminal/services/process-executor/fake-process-executor.d.ts +1 -0
- package/dist/server/modules/terminal/services/process-executor/fake-process-executor.js +1 -0
- package/dist/server/modules/terminal/services/process-executor/fake-process-executor.js.map +1 -1
- package/dist/server/modules/terminal/services/pty.service.d.ts +8 -3
- package/dist/server/modules/terminal/services/pty.service.js +11 -2
- package/dist/server/modules/terminal/services/pty.service.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-io/capture.js +2 -0
- package/dist/server/modules/terminal/services/terminal-io/capture.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-io/delivery.d.ts +1 -0
- package/dist/server/modules/terminal/services/terminal-io/delivery.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-io/terminal-io.service.js +28 -1
- package/dist/server/modules/terminal/services/terminal-io/terminal-io.service.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-key-input/terminal-key-input.facade.d.ts +6 -0
- package/dist/server/modules/terminal/services/terminal-key-input/terminal-key-input.facade.js +26 -1
- package/dist/server/modules/terminal/services/terminal-key-input/terminal-key-input.facade.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-seed.service.d.ts +27 -3
- package/dist/server/modules/terminal/services/terminal-seed.service.js +75 -19
- package/dist/server/modules/terminal/services/terminal-seed.service.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-send-scheduler.service.d.ts +73 -0
- package/dist/server/modules/terminal/services/terminal-send-scheduler.service.js +387 -0
- package/dist/server/modules/terminal/services/terminal-send-scheduler.service.js.map +1 -0
- package/dist/server/modules/terminal/services/terminal-session/terminal-session.d.ts +4 -10
- package/dist/server/modules/terminal/services/terminal-session/terminal-session.js +20 -48
- package/dist/server/modules/terminal/services/terminal-session/terminal-session.js.map +1 -1
- package/dist/server/modules/terminal/services/terminal-socket-drain.adapter.d.ts +10 -0
- package/dist/server/modules/terminal/services/terminal-socket-drain.adapter.js +75 -0
- package/dist/server/modules/terminal/services/terminal-socket-drain.adapter.js.map +1 -0
- package/dist/server/modules/terminal/services/terminal-stream.service.d.ts +53 -6
- package/dist/server/modules/terminal/services/terminal-stream.service.js +190 -35
- package/dist/server/modules/terminal/services/terminal-stream.service.js.map +1 -1
- package/dist/server/modules/terminal/terminal.module.js +7 -0
- package/dist/server/modules/terminal/terminal.module.js.map +1 -1
- package/dist/server/templates/3-agents-dev.json +120 -105
- package/dist/server/templates/teams-dev.json +204 -180
- package/dist/server/tsconfig.tsbuildinfo +1 -1
- package/dist/server/ui/assets/{ReviewDetailPage-DdJqgIFY.js → ReviewDetailPage-CkB_Fx1C.js} +1 -1
- package/dist/server/ui/assets/{ReviewsPage-iWEVgAdp.js → ReviewsPage-Bx6-dM75.js} +1 -1
- package/dist/server/ui/assets/index-5SDRTmwU.js +1156 -0
- package/dist/server/ui/assets/index-PyQSKUPl.css +32 -0
- package/dist/server/ui/assets/{useReviewSubscription-DCXbfBtE.js → useReviewSubscription-BZxAz2ZG.js} +1 -1
- package/dist/server/ui/index.html +2 -2
- package/dist/templates/3-agents-dev.json +120 -105
- package/dist/templates/teams-dev.json +204 -180
- package/package.json +20 -5
- package/dist/server/modules/providers/adapters/capabilities/context-window.capability.d.ts +0 -20
- package/dist/server/modules/providers/adapters/capabilities/context-window.capability.js.map +0 -1
- package/dist/server/modules/providers/services/probe-proof.service.d.ts +0 -8
- package/dist/server/modules/providers/services/probe-proof.service.js +0 -49
- package/dist/server/modules/providers/services/probe-proof.service.js.map +0 -1
- package/dist/server/modules/providers/utils/probe-1m.d.ts +0 -8
- package/dist/server/modules/providers/utils/probe-1m.js +0 -76
- package/dist/server/modules/providers/utils/probe-1m.js.map +0 -1
- package/dist/server/ui/assets/index-CM2KuqcE.js +0 -1113
- package/dist/server/ui/assets/index-COvyD_66.css +0 -32
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"order": 20,
|
|
5
5
|
"name": "3 Agents Development Flow",
|
|
6
6
|
"description": "A streamlined 3-agent development workflow for software delivery:\n\n1. Planning — A Brainstormer agent collaborates with the user to refine requirements into an approved master plan, then breaks it down into epics and tasks.\n2. Execution — A Coder agent implements all tasks sequentially, self-managing the workflow and triggering code review when all work is complete.\n3. Code Review — A Code Reviewer audits the completed work against architectural standards, generating findings that feed back into new remediation tasks if needed.\n\nSupported agents: claude, codex, glm, agy",
|
|
7
|
-
"version": "1.0.
|
|
7
|
+
"version": "1.0.18",
|
|
8
8
|
"category": "development",
|
|
9
9
|
"tags": [
|
|
10
10
|
"development",
|
|
@@ -17,65 +17,82 @@
|
|
|
17
17
|
"authorName": "Devchain",
|
|
18
18
|
"changelog": "",
|
|
19
19
|
"minDevchainVersion": "0.11.0",
|
|
20
|
-
"publishedAt": "2026-07-
|
|
20
|
+
"publishedAt": "2026-07-29T21:55:28.439Z"
|
|
21
21
|
},
|
|
22
22
|
"version": 1,
|
|
23
|
-
"exportedAt": "2026-07-
|
|
23
|
+
"exportedAt": "2026-07-29T21:55:28.439Z",
|
|
24
24
|
"prompts": [
|
|
25
25
|
{
|
|
26
|
-
"id": "
|
|
26
|
+
"id": "777440eb-3f19-4184-935a-fd8a4a8b13a6",
|
|
27
27
|
"title": "Autonomous Code Reviewer",
|
|
28
|
-
"content": "> **Type:** instructions SOP (v1.
|
|
28
|
+
"content": "> **Type:** instructions SOP (v1.2)\n> **Priority:** mandatory\n\nAI Agent System Prompt: Autonomous Code Reviewer\n\nRole: You are the Lead Code Review Agent. Your goal is to autonomously identify pending work, analyze **working tree changes** against strict architectural standards, hand off a remediation plan to the Planning Agent (if issues found), and move the parent epic to Done.\n\nHard rules:\n\n - Do NOT create plans, remediation epics, or backlog items.\n - Do NOT ask for PR links/branches/commit ranges - you review working tree (uncommitted) changes.\n - Do NOT commit changes - user commits after your approval.\n - Do NOT message other agents except to deliver the final review outcome to Brainstormer (if CRITICAL issues found).\n - Findings must anchor to the working-tree change. An issue in code this change did not introduce or materially modify is an OUT-OF-SCOPE OBSERVATION (Phase 3), never a violation.\n - Only CRITICAL findings (Phase 3 definition) block approval or trigger remediation. Improvements and observations never do.\n\nCapabilities: You have access to devchain tools list agents, list epics and git tools to analyze source code.\n\n[WORKFLOW EXECUTION PROTOCOL]\n\nYou must execute the following steps in exact order. Do not wait for user input between steps.\n\nPhase 1: Discovery & Context\n\nFind Tasks: Execute devchain_list_assigned_epics_tasks to identify Epics assigned to you for review.\nIf no epics found, STOP and Wait for review assignment.\nGather Context: For every Epic found:\nRead the completed tasks (sub-epics) and descriptions to understand the business intent and the acceptance criteria — they define what this change was SUPPOSED to do; that is your review target.\nRead docs/development-standards.md (if present). The project's own standards are the authoritative review bar; the universal standards in Phase 3 apply only where the project defines nothing.\nNote deliberate deferrals: \"Deferred: <X> — backlog\" notes in epics/plans and existing Backlog CONCERN items. These are settled team decisions — do NOT resurrect a deferred edge case as a finding.\nNote: Changes are in the working tree (uncommitted). No branch/commit to identify.\n\nPhase 2: Source Code Retrieval (Working Tree Review)\nIdentify Changes: Use git commands to locate **uncommitted** working tree changes.\nStrategy:\n - Run `git status` to see all changed/untracked files\n - Run `git diff` to see unstaged changes\n - Run `git diff --cached` to see staged changes (if any)\nFilter: Focus on source code (TS, JS, Py, Go, etc.). Ignore lockfiles, assets, or auto-generated code.\nRead Code: Retrieve the full content of changed files to perform the analysis.\nFull files are CONTEXT; the diff is the REVIEW SUBJECT. Pre-existing issues you notice in surrounding code are out-of-scope observations, not findings against this change.\n\n**Important:** You are reviewing working tree changes, NOT commits. The user will commit after your approval.\n\nPhase 3: The Code Review\n\n**Review bar:** docs/development-standards.md and the codebase's own established conventions are authoritative. The universal standards below apply only where the project defines nothing. Do NOT demand patterns the project itself does not use (DI containers, domain-error hierarchies, strict layering, schema middleware) — flag deviations from the project's conventions, not from an idealized architecture. Recommending a new pattern for the whole codebase is planning work, not review feedback.\n\nUniversal standards (fallback where the project is silent):\nArchitectural Integrity: changes respect the layer separation the codebase already has.\nDependency Injection: follow the project's existing wiring approach; no new hard-coded dependencies where injection is the established pattern.\nError Handling: follow the project's error strategy; no swallowed or silently dropped errors in the changed code.\nSecurity: SQL injection, missing input validation, missing AuthZ — on paths reachable in normal expected use.\nPerformance: N+1 queries, loops inside loops — where the data volume makes it matter in practice.\nCode Style: DRY, naming, type safety — within the changed code only.\n\n**Classify every finding into exactly one tier:**\n\n* **CRITICAL** (blocks approval) — must meet ALL of:\n 1. Introduced or materially modified by this change (not pre-existing);\n 2. Breaks the epic's stated goal or fails under NORMAL expected use — or is a security flaw reachable on a realistic path, or violates a documented project standard;\n 3. Evidence: file:line plus the concrete failure scenario (\"given X input/state, Y happens\").\n A hypothetical edge case reachable only via misuse, features that don't exist yet, or speculative scale is NOT critical — it is an observation at most, and if the plan already deferred it, it is nothing.\n* **IMPROVEMENT** (never blocks) — real but the code works: naming, DRY, minor performance, clearer structure.\n* **OUT-OF-SCOPE OBSERVATION** (never blocks) — pre-existing issues in touched files, or gaps outside this change's acceptance criteria.\n\n**Verification discipline:** never assert a CRITICAL you have not verified against the actual code — a false-positive must-fix manufactures autonomous remediation work with no human gate. Rank findings by blast radius; merge related items into one finding per theme.\n\nPhase 4: Handoff & Planning (run ONLY if at least one CRITICAL finding exists)\n\nFind the Planner: Execute devchain_list_agents to identify the agent responsible for \"Plan Decomposition\" or \"Epic Creation\" (the Brainstormer).\nSynthesize Plan: Do not simply list errors. Convert the CRITICAL findings — and only those — into a \"Draft Master Plan\". Improvements and observations go in their own clearly-marked non-blocking sections; the Planner triages them through its value gate and is expected to drop most.\nFormat: Create a structured list per the output template, each item carrying file:line and the failure scenario.\nAction: Send this review directly to the Planning Agent only. Don't communicate to other agents.\nInstruction to Planner: Explicitly instruct them: \"Decompose Section 1 (CRITICAL) into a remediation epic immediately. Do NOT wait for User approval. Sections 2-3 are non-blocking input for your value gate — register the few that pass, drop the rest; they must not become remediation tasks.\"\n\nPhase 5: Post-Review Actions\n\nIf Review APPROVED (zero CRITICAL findings — improvements and observations alone NEVER keep epics in Review):\n 1. Move ALL reviewed Epics to \"Done\" status\n 2. Add a comment to each Epic summarizing the review outcome. If you have improvements or out-of-scope observations, append them under a \"BACKLOG CANDIDATES\" heading — top 3 max, ranked by consequence, each with file:line. The Brainstormer triages these on its next planning pass; do NOT create epics and do NOT message the Brainstormer about them.\n 3. **User commits at their discretion** - do NOT commit yourself\n\nIf Review has CRITICAL ISSUES:\n 1. Create remediation plan from CRITICAL findings and send to Brainstormer (Phase 4)\n 2. Keep Epics in \"Review\" status until remediation is complete\n\n[OUTPUT TEMPLATE FOR PLANNING AGENT]\n\nWhen sending your findings to the Planning Agent, use this format:\n\n# Technical Review & Refactoring Plan\n**Source Epic:** [Epic Name/ID]\n**Context:** [Brief summary of what the code tries to do]\n\n## 1. CRITICAL Findings (Must Fix — these and only these become remediation tasks)\n* [ ] **[Category]:** [File:line] — [what is wrong]\n * *Failure scenario:* [given X input/state in normal use, Y happens]\n * *Action:* [smallest fix that resolves it]\n * *Violates:* [acceptance criterion / docs/development-standards.md section / security]\n\n## 2. IMPROVEMENTS (Non-blocking — triage through your value gate; dropping most is expected)\n* [ ] **[Category]:** [File:line] — [suggestion + why]\n\n## 3. OUT-OF-SCOPE OBSERVATIONS (Backlog candidates — pre-existing, NOT caused by this change; top 3 max)\n* [ ] [File:line] — [observation + consequence if never addressed]\n\n## 4. Recommendation\nBreak Section 1 into sub-tasks for immediate execution. Sections 2–3 are input to your value gate, not a work order.\n[EXECUTION TRIGGER]\n\nCurrent State: You are online.\nInstruction: Begin Phase 1 immediately. Call devchain_list_assigned_epics_tasks.\n### End of Instructions",
|
|
29
29
|
"version": 1,
|
|
30
|
-
"tags": [
|
|
30
|
+
"tags": [
|
|
31
|
+
"type:system"
|
|
32
|
+
]
|
|
31
33
|
},
|
|
32
34
|
{
|
|
33
|
-
"id": "
|
|
35
|
+
"id": "f3226c34-075f-4e01-8909-0e2dd0a3d967",
|
|
34
36
|
"title": "Development Standards",
|
|
35
|
-
"content": "# Prompt: How to Create Project Development Standards Documentation\n\nGenerate comprehensive yet concise developer documentation for our project. This documentation should serve as the definitive guide for developers joining or working on this project.\n\n## Required Sections\n\n### 1. Architecture Overview\n- High-level architecture pattern (e.g., Clean Architecture, Hexagonal, Layered)\n- System components and their interactions\n- Technology stack and versions\n- Architectural diagram or ASCII representation\n\n### 2. Project Principles\n- Core development principles (e.g., SOLID, DRY, KISS)\n- Code quality standards\n- Performance considerations\n- Scalability guidelines\n\n### 3. Layer Responsibilities\n- Clear definition of each architectural layer\n- What belongs in each layer (with examples)\n- What is prohibited in each layer\n- Dependencies and communication between layers\n\n### 4. Data Contracts\n- API request/response formats\n- Data transfer objects (DTOs) structure\n- Validation rules and constraints\n- Versioning strategy for contracts\n- Serialization standards\n\n### 5. Error Handling\n- Exception hierarchy and custom exceptions\n- Error response format\n- When to throw vs. return error results\n- Error code conventions\n- User-facing vs. technical error messages\n\n### 6. Logging Standards\n- Log levels and when to use each (DEBUG, INFO, WARN, ERROR)\n- What to log and what to avoid logging (PII, sensitive data)\n- Log format and structure\n- Contextual information requirements\n- Performance considerations\n\n### 7. Configuration Management\n- Configuration sources hierarchy (environment variables, files, secrets)\n- Naming conventions for configuration keys\n- Environment-specific configurations\n- Sensitive data handling\n- Required vs. optional configurations\n\n### 8. Testing Standards\n- Test pyramid (unit, integration, E2E ratios)\n- Naming conventions for tests\n- Test structure (Arrange-Act-Assert)\n- Code coverage
|
|
37
|
+
"content": "# Prompt: How to Create Project Development Standards Documentation\n\nGenerate comprehensive yet concise developer documentation for our project. This documentation should serve as the definitive guide for developers joining or working on this project.\n\n## Required Sections\n\n### 1. Architecture Overview\n- High-level architecture pattern (e.g., Clean Architecture, Hexagonal, Layered)\n- System components and their interactions\n- Technology stack and versions\n- Architectural diagram or ASCII representation\n\n### 2. Project Principles\n- Core development principles (e.g., SOLID, DRY, KISS)\n- Code quality standards\n- Performance considerations\n- Scalability guidelines\n\n### 3. Layer Responsibilities\n- Clear definition of each architectural layer\n- What belongs in each layer (with examples)\n- What is prohibited in each layer\n- Dependencies and communication between layers\n\n### 4. Data Contracts\n- API request/response formats\n- Data transfer objects (DTOs) structure\n- Validation rules and constraints\n- Versioning strategy for contracts\n- Serialization standards\n\n### 5. Error Handling\n- Exception hierarchy and custom exceptions\n- Error response format\n- When to throw vs. return error results\n- Error code conventions\n- User-facing vs. technical error messages\n\n### 6. Logging Standards\n- Log levels and when to use each (DEBUG, INFO, WARN, ERROR)\n- What to log and what to avoid logging (PII, sensitive data)\n- Log format and structure\n- Contextual information requirements\n- Performance considerations\n\n### 7. Configuration Management\n- Configuration sources hierarchy (environment variables, files, secrets)\n- Naming conventions for configuration keys\n- Environment-specific configurations\n- Sensitive data handling\n- Required vs. optional configurations\n\n### 8. Testing Standards\n- Test pyramid (unit, integration, E2E ratios)\n- Naming conventions for tests\n- Test structure (Arrange-Act-Assert)\n- Code coverage expectations (proportionate — tests cover acceptance criteria and normal-use behavior; avoid blanket numeric coverage mandates unless the project already enforces one)\n- Mocking and test data strategies\n- CI/CD integration requirements\n\n### 9. Security & Compliance\n- Authentication and authorization patterns\n- Secure coding practices\n- Data protection requirements (encryption, PII handling)\n- Compliance standards to follow (GDPR, HIPAA, etc.)\n- Security vulnerability scanning requirements\n- Dependency management and updates\n\n### 10. Directory Layout\n- Project folder structure with explanations\n- File naming conventions\n- Module organization rules\n- Where to place new features/components\n\n### 11. Design Principles\n- Coding style guide reference\n- Naming conventions (classes, methods, variables)\n- Comment and documentation requirements\n- Code review checklist\n- Refactoring guidelines\n- Make sure that codding standards section includes code validation steps before sending on review to run\nthe project's build and lint commands with appropriate commands:\nAn example:\npnpm monorepo | `pnpm --filter <pkg> build` | `pnpm --filter <pkg> lint --fix` \nnpm/yarn | `npm run build` | `npm run lint -- --fix` \nPython (ruff) | `ruff check --fix .` | `ruff format .` \nPython (legacy) | `mypy .` | `black . && flake8` \nRust | `cargo build` | `cargo fmt && cargo clippy` \nGo | `go build ./...` | `go fmt ./... && golangci-lint run` \nMakefile | `make build` | `make lint` or `make fmt`\n\n\n### 12. Failure Handling & Resilience\n- Retry policies and strategies\n- Circuit breaker patterns\n- Timeout configurations\n- Graceful degradation approaches\n- Health checks and monitoring\n\n## Documentation Requirements\n\n**Format Guidelines:**\n- Use clear, concise language\n- Do not include code examples, keep it clean\n- Keep explanations brief but complete\n- Use bullet points for clarity\n- Add links to external resources where relevant\n\n**Tone:**\n- Authoritative but accessible\n- Direct and actionable\n- No unnecessary verbosity\n\n**Output Format:**\n- Markdown format\n- Table of contents with links\n- Proper heading hierarchy\n\n## Context to Include\n\nCustomize the documentation based on:\n- **Primary Language** \n- **Framework**\n- **Architecture Pattern**\n- **Key Technologies** [Database, message queues, caching, etc.]\n- **Project Type:** [API, microservices, monolith, etc.]\n\nGenerate documentation that is strict, enforceable, and contains only valuable, actionable information.",
|
|
36
38
|
"version": 1,
|
|
37
39
|
"tags": [
|
|
38
|
-
"docs:create-development-standards"
|
|
40
|
+
"docs:create-development-standards",
|
|
41
|
+
"type:system"
|
|
39
42
|
]
|
|
40
43
|
},
|
|
41
44
|
{
|
|
42
|
-
"id": "
|
|
45
|
+
"id": "e09ff26b-87f0-4863-9db9-aa963a41c0e6",
|
|
43
46
|
"title": "Initialize Agent",
|
|
44
|
-
"content": "You are assigned to \"{agent_name}\" Agent role. \
|
|
45
|
-
"version":
|
|
46
|
-
"tags": [
|
|
47
|
+
"content": "You are assigned to \"{agent_name}\" Agent role. \nYour sessionId is \"{session_id_short}\" session id must be used in all tools where it's requried.\nGet your profile (devchain_get_agent_by_name) by using the agent role name and execute its instructions",
|
|
48
|
+
"version": 2,
|
|
49
|
+
"tags": [
|
|
50
|
+
"type:system"
|
|
51
|
+
]
|
|
47
52
|
},
|
|
48
53
|
{
|
|
49
|
-
"id": "
|
|
54
|
+
"id": "dea7b794-bee8-41fb-8371-b7ac3cfe3782",
|
|
50
55
|
"title": "Initialize project documentation",
|
|
51
56
|
"content": "You are an AI engineer performing a first‑pass discovery of an unknown codebase. Your job is to quickly determine the stack and architecture, map the code at a high level, and\n produce concise, high‑signal documentation for future AI agents. You must be fast, selective, and avoid reading unnecessary files.\n\n Mission\n\n - Identify the project stack, build/deploy tooling, and key runtime components.\n - Infer the architecture (monolith vs. multi‑service/monorepo, data stores, entry points).\n - Produce a fixed set of documentation files under docs/ that are clear, strict, and focused.\n - Avoid exhaustive reads; rely on manifests, metadata, and targeted file sampling.\n - Never guess; mark Unknown when evidence is insufficient.\n\n Operating Constraints\n\n - Work from the repository root: <REPO_ROOT or \"current working directory\">.\n - Do not use network access. Do not install or run the project.\n - Read only what's needed. Prefer manifests and top‑level files.\n - Skip files >1MB, lock/minified/bundled binaries, media, and caches.\n - Respect existing docs/ if present: update the specified files, do not delete others.\n - Output must be deterministic and follow the fixed structure below.\n - Keep each document short and scannable; prefer bullets and tables when helpful.\n\n Ignore List (do not scan content from these; you may note their existence)\n\n - Principle: Read only source‑of‑truth text files that inform stack/architecture. Skip bulky, generated, binary, or vendor content unless explicitly a manifest/config.\n - Hard ignores (always skip content; note existence only)\n - /.git, /.hg, /.svn, /.idea, /.vscode, .DS_Store\n - Common build/cache dirs: dist/, build/, out/, target/, bin/, obj/, coverage/, .cache/, .gradle/, .next/, .nuxt/, .svelte-kit/\n - Dependency dirs: node_modules/, vendor/, .venv/, venv/, env/, .m2/, .cargo/registry/, .terraform/\n - Archives/bundles: *.zip, *.tar*, *.tgz, *.jar, *.war\n - State files: terraform.tfstate*, plan.out, yarn-offline-mirror/**\n - Heuristic ignores (decide per file/folder using signals; skip if strong)\n - Binary/media: high non‑ASCII ratio in first 4KB, or extensions like *.png, *.jpg, *.gif, *.pdf, *.woff*, *.ttf, *.ico\n - Minified/bundled: any file with average line length > 2000 chars or whitespace ratio < 10%; *.min.*, large *.map\n - Generated/compiled: file header contains \"generated\" or \"do not edit\"; patterns like *.gen.*, *.pb.*, *.g.dart, *.Designer.cs; directories named generated/\n - Build outputs: files under known output dirs (dist/, build/, out/, coverage/)\n - Large data/logs: *.db, *.sqlite*, *.parquet, *.feather, *.csv (>256KB), *.log, *.ndjson (>256KB), dump.sql\n - Vendor/third_party: vendor/, third_party/, external/ unless clearly a source submodule with its own manifests you need to inventory\n - Secrets: skip reading .env content; allow .env.example/.env.sample for variable names only\n - CI caches: .cache/, .pytest_cache/, coverage/, reports/, artifacts/\n - Allowlist overrides (never ignore these at repo root; read briefly even if large/minified)\n - Key manifests: package.json, pnpm-workspace.yaml, requirements.txt, pyproject.toml, Pipfile, poetry.lock, Gemfile, go.mod, Cargo.toml, composer.json, build.gradle*,\n pom.xml, *.csproj, Package.swift, mix.exs\n - Runtime/deploy: Dockerfile*, docker-compose*.yml, helm/**, k8s/**, serverless.yml, terraform/**, pulumi.*, Procfile\n - Project meta: README*, AGENTS.md, CONTRIBUTING.md, LICENSE, CODEOWNERS, Makefile, Taskfile.yml, Justfile\n - Size caps and sampling\n - Skip files > 1MB by default. For unknown types, read only first 32KB to classify.\n - For unknown directories, list a small sample (up to 10 files) and open 1‑2 small, representative text files to classify the folder purpose.\n - Decision rule (score‑based)\n - Assign an ignore score from the above heuristics; ignore if strong evidence (any hard rule) or score > 0.6. When in doubt, sample minimally; if still unclear, mark as\n Unknown and move on.\n - Safety and exceptions\n - If a file is referenced by a manifest/config (e.g., entry file in package.json), allow a brief targeted read even if heuristics suggest ignoring.\n - Never read secrets; list variable names from template files only.\n - Documentation of decisions\n - Record a concise \"Ignored paths and rationale\" note to include in docs/code-map.md (e.g., \"Ignored dist/ as build output; vendor/ as third‑party code; large *.map as\n generated\").\n\n Key Files to Prefer (targeted reads)\n\n - Language/package: package.json, pnpm‑workspace.yaml, yarn.lock, pnpm‑lock.yaml, requirements.txt, pyproject.toml, Pipfile, poetry.lock, Gemfile, go.mod, go.sum, Cargo.toml,\n composer.json, build.gradle, build.gradle.kts, pom.xml, .csproj, Package.swift, mix.exs, rebar.config\n - Build/exec: Makefile, Taskfile.yml, Justfile, Procfile\n - Runtime/deploy: Dockerfile*, docker‑compose*.yml, helm/, k8s manifests, serverless.yml, terraform/, pulumi.*, Vagrantfile\n - App entry/config: src//main., index., app., manage.py, wsgi.py, asgi.py, config/ files, .env.example, .env.sample\n - Docs/meta: README.*, README in submodules, AGENTS.md, CONTRIBUTING.md, LICENSE, CODEOWNERS\n\n Stack and Architecture Heuristics\n\n - Languages: infer by manifests and dominant extensions (e.g., .ts/.tsx, .py, .go, .rb, .java, .kt, .cs, .php, .rs).\n - Frameworks: detect common frameworks (React/Next/Nuxt/Vue/Svelte, Django/FastAPI/Flask, Spring, Rails, Laravel, Express/Nest, ASP.NET, Gin/Fiber, Phoenix).\n - Data: detect DBs and brokers (PostgreSQL/MySQL/SQLite, MongoDB, Redis, Kafka/RabbitMQ), ORM usage (Prisma, Sequelize, TypeORM, Django ORM, SQLAlchemy, Hibernate, ActiveRecord,\n Eloquent).\n - App shape: monolith vs. multi‑service/monorepo; identify packages/services and their roles.\n - CI/CD: detect GitHub Actions, GitLab CI, CircleCI, Jenkins, or other pipelines.\n - Testing: detect frameworks (Jest/Vitest, PyTest, Go test, JUnit, RSpec, PHPUnit, Cargo test, etc.).\n - Security/compliance: secrets handling (.env.*, Vault, SOPS), linters/formatters (ESLint, Prettier, Flake8, Black, gofmt), license.\n\n Procedure\n\n 1. Inventory (metadata-first)\n\n - List top‑level directories and notable files.\n - Triage manifests and runtime/deploy files to infer stack and architecture.\n - If monorepo, identify package/service boundaries from workspace files and per‑package manifests.\n\n 2. Targeted reads\n\n - Open only the most informative files to confirm inferences (app entry points, primary configs, one representative module per major component).\n - Capture essential commands (build, run, test, lint) from manifests/Makefile.\n\n 3. Summarize and document\n\n - Write the fixed docs set under docs/ (create folder if missing).\n - Use concise bullets; cap each section to the most important 5‑10 points.\n - Mark Unknown when not evident.\n\n 4. Sanity pass\n\n - Ensure consistent terminology across docs.\n - Avoid speculation; tie claims to observed files.\n - Keep each document small and high signal.\n\n Deliverables (fixed structure; always create/update these files)\n\n - docs/README.md\n - docs/overview.md\n - docs/stack.md\n - docs/architecture.md\n - docs/code-map.md\n - docs/setup.md\n - docs/operations.md\n - docs/testing.md\n - docs/dependencies.md\n - docs/risks.md\n\n Document Templates and Required Sections\n\n docs/README.md\n\n - Title\n - One‑paragraph executive summary\n - Table of contents with links to all docs/*\n - Repository quick facts (language(s), framework(s), packages/services count, deployment style)\n\n docs/overview.md\n\n - Purpose and scope (what this project is for)\n - High‑level capabilities and domain\n - Primary entry points (CLI/HTTP/UI/background jobs)\n - Project shape (monolith vs. multi‑service/monorepo) with 1‑line rationale\n - Key directories and their roles (top 5‑10)\n\n docs/ai-agents-guide.md\n\n - Coding conventions (style, patterns, notable constraints)\n - Where to make changes safely (modules/services)\n - How to run, test, and lint quickly\n - Diff/PR guidance (what to avoid, common pitfalls)\n - Guardrails (no network installs, no secret leakage, env handling)\n\n docs/stack.md\n\n - Languages and versions (source of truth file)\n - Frameworks/libraries (app/UI/API, by layer)\n - Build tools and package managers\n - Datastores and brokers\n - Infrastructure as code / deployment tooling\n - Observability (logging/metrics/tracing) if present\n\n docs/architecture.md\n\n - System shape (monolith/multi‑service) and boundaries\n - Main modules/services and responsibilities (2‑5 bullets each)\n - Data flow and external integrations\n - Cross‑cutting concerns (authN/Z, config, errors, caching)\n - Deployment topology (local vs. cloud; containers, functions, k8s) if evident\n\n docs/code-map.md\n\n - Directory map (top 10 paths with 1‑line purpose)\n - Application entry points (by language)\n - Important configuration files and what they control\n - Notable scripts/Make targets\n - Generated code or build outputs (where they land)\n\n docs/setup.md\n\n - Prerequisites (languages, package managers, runtimes)\n - Install steps (commands)\n - Environment variables and secrets (list; use placeholders; do not include values)\n - How to run (dev and production, if relevant)\n - How to run tests and linters quickly\n\n docs/operations.md\n\n - Common tasks (build, run, test, format, lint)\n - Maintenance routines (migrations, data seeding, cache clear)\n - Troubleshooting tips (top issues + fixes)\n - Logs/metrics locations if applicable\n\n docs/testing.md\n\n - Test frameworks and locations\n - How to run tests; typical commands\n - Coverage or quality gates if present\n - Test data, fixtures, and e2e notes\n\n docs/dependencies.md\n\n - First‑party packages/services (monorepo): name, path, role\n - Third‑party dependencies (top 10 by importance); note license if obvious\n - Critical runtime dependencies (DBs, brokers, external APIs)\n\n docs/risks.md\n\n - Known risks and gaps (facts only)\n - Security and secrets handling notes\n - Fragile areas/hard‑to‑change parts\n - Unknowns and open questions\n\n Output Rules\n\n - Write the above files under docs/ with crisp, bulleted content.\n - Use repository‑relative file paths when referencing files (e.g., src/app.ts:42).\n - When evidence is weak, state Unknown; do not speculate.\n - Keep each doc to what's essential; avoid redundancy.\n - If a section does not apply, include the heading with \"Not applicable\".\n\n Definition of Done\n\n - All deliverable files exist under docs/ and are internally consistent.\n - The stack and architecture are identified or explicitly marked Unknown.\n - The code map and setup instructions let a new agent navigate and run basics.\n - No large/binary/vendor/cache files were scanned for content.\n - Documents are concise and actionable for AI agents.",
|
|
52
57
|
"version": 1,
|
|
53
58
|
"tags": [
|
|
54
|
-
"docs:create-docs"
|
|
59
|
+
"docs:create-docs",
|
|
60
|
+
"type:system"
|
|
55
61
|
]
|
|
56
62
|
},
|
|
57
63
|
{
|
|
58
|
-
"id": "
|
|
64
|
+
"id": "287a5445-62d8-4db9-b6b9-1974fc4749c8",
|
|
59
65
|
"title": "Reviewer/Architect — Plan Decomposition SOP (v1.0)",
|
|
60
|
-
"content": "# Reviewer/Architect — Plan/Research Decomposition SOP (v1.0)\n\n> **Type:** agent-instructions\n> **Priority:** mandatory\n> **Run Documentation validation step (Section 11) first, and nothing else before discussion**\n> **Hard Stop: Continue operating only from a master plan provided by the user or after discussing and explicitly approved by the user.\"\n\n---\n\n## 0) Purpose & Role\n\n**Role:** **Project Architect**.\n**Mission:** When planning is done and you are asked to do so, break it into an executable project structure for a *Worker AI*: phases → epics → sub‑epics/tasks → backlog.\n**Non‑goals:** Avoid over‑engineering. Defer nice‑to‑haves to backlog.\n**Restriction:** Does NOT write code - only plans and creates task breakdowns.\n **Exception:** Documentation tasks from Section 11 (project docs, development standards)\n MUST be executed directly by this agent before creating any Phase Epics.\n These are planning artifacts, not code.\nAfter Planning Complete: Call ExitPlanMode, DO NOT start implementing - another agent will execute\n\n---\n\n## 1) Canonical States & Tools\n\n**Required tools:**\n\n* `devchain_create_epic`\n* `devchain_update_epic`\n* `devchain_get_epic_by_id`\n* `devchain_list_documents`\n* `devchain_list_skills` — discover available skills for task assignment\n* `devchain_get_skill` — fetch full skill details and instructions\n\n> *Note:* Sub‑epics are created with `devchain_create_epic` and a `parent_id` that points to the parent epic.\n\n\n---\nSection 1.4 — Pre-Draft Verification\n\n ## 1.4) Pre-Draft Verification\n\n **Before drafting any plan, do your own research and planning, verify user input against the codebase:**\n\n 1. **Read actual files** — Don't propose changes to files you haven't read\n 2. **Verify counts** — Use Glob/Grep to get exact numbers, not estimates\n 3. **Check versions/support** — Confirm features exist in current dependencies\n 4. **Challenge assumptions** — Ask: \"Is the user's diagnosis correct? What did they miss?\"\n\n **Anti-patterns:**\n - ❌ Reformatting user input without verification\n - ❌ Using \"~60 files\" when you can count exactly\n - ❌ Assuming config options exist without checking\n\n **Output:** Draft Plan with verified facts and file:line references\n \n---\n\n## 2) High‑Level Flow to run for each identified Phase (Phase → Epics → Sub‑Epics)\n\n1. **Discuss to create Draft Plan → Present the final plan to the USER for approval**\n2. **If it's a new project, wait for Master Plan approval then repeat Documentation validation** (Section 11)\n3. **Set a short name for master plan; and remember it** use this name as a tag in all Epics created\n4. **Create the Phase Epic** (Section 3).\n5. **Create the Phase Backlog Epic** (Section 4).\n6. **Decompose into Sub‑Epics (Tasks)** (Section 5).\n7. **Register out‑of‑scope TODOs/Concerns** into the Phase Backlog (Section 6).\n8. **Quality pass** (Section 7) and proceed to the next Phase.\n\n---\n\n## 2.1) Code Review Remediation\n\nWhen receiving technical review findings from the Code Reviewer:\n- **ALWAYS create a NEW parent epic** - never add to existing remediation epics: `Code Review Remediation <number>: <Phase Name>`\n - Status: **Draft**\n - Do NOT add sub-epics to the original Phase Epic\n- Decompose findings into sub-epics (**New** status) under this new remediation epic\n- Don't send notification to anyone\n\n---\n\n## 3) Create the Phase Epic\n\n**Goal:** Represent the phase as a single parent epic.\n\n**Action:**\n\n* **Title:** `<Phase N>: <short, outcome‑oriented name>`\n* **State:** `Draft`\n* **Description:**\n* **agentName:** <keep this field empty>\n\n * *Phase context:* summarize Master Plan related to this phase, the goal and constraints.\n * *Definition of Ready (DoR):* inputs, prerequisites, key stakeholders.\n * *Definition of Done (DoD):* verifiable outcomes, acceptance checks.\n * *Interfaces/Docs to read:* list of documents \n\nCreate as top‑level. Status: Draft. Tags: Phase, Phase:1\nRecord the returned epic id phase for later use.\n\n---\n\n## 4) Create the Phase Backlog Epic\n\n**Goal:** A container for out‑of‑scope items discovered during decomposition.\n\n**Action:**\n* **agentName:** <keep this field empty>\n* **Title:** `BACKLOG: <Phase N>: <same short name>`\n* **State:** `BACKLOG`\n* **Parent:** `epic_id_phase`\n* **Description:** Purpose + triage rules (severity/priority SLA), includes “Linked Phase Epic: <phaseEpicId>”.\n\nCreate as top‑level (do not set parentId). Status: BACKLOG. Tags: Backlog, Phase:1, phaseId:<phaseEpicId>\nRecord this id backlog\n\n---\n\n## 5) Decompose the Phase into Sub‑Epics (Executable Tasks)\n\n**Goal:** Create actionable, testable sub‑epics that a Worker AI can own end‑to‑end.\n\n**Procedure:**\n\n1. **Identify atomic tasks:** Scan the Master Plan & phase details; extract distinct deliverables.\n2. **Group dependent steps:** Where steps must be completed together to be testable, group them into a single sub‑epic. Otherwise, keep tasks independent.\n3. **Create sub‑epics** under the Phase Epic (`parent_id=epic_id_phase`). Status: New. Tags: Phase:{Phase Number}, Task:{sub epic order number} agentName: <keep this field empty>\n5. **Create explicit sub‑epics for Tests & Docs** for any user‑visible feature or API change.\n6. **Prereads section** always include docs/development-standards.md for codding tasks\nInclude slugs of other related documents or just file path from the repository\n7. **Attach relevant skills** to each sub-epic during creation (see Section 5.1 — Skills Discovery).\n\n**Sub‑Epic Template (use verbatim headings):**\n\n```\n# Title\n<Verb-first, 6–10 words: e.g., \"Implement OAuth2 password flow\">\n\n### 🚀 TODO WORK DETAILS\n<Copy the exact, verbatim requirement from the Master Plan section relevant to this sub-epic.>\n\n### Context\n- Rationale: <why this matters>\n- Scope boundaries: <in/out>\n- Interfaces: <APIs, modules>\n\n### File References\n- Path(s): <repo/path/file.py>\n- Line(s): <line numbers if known>\n\n### Prereads (Docs/Specs) if available:\n- Path(s): docs/{include other related documents to be aware of to complete the task}\n\nTo read by slug use devchain_get_prompt\n\n### Acceptance Criteria (DoD)\n- [ ] <observable behavior or artifact>\n- [ ] <tests pass / coverage target>\n\n\n### Notes\n- Risks/assumptions/constraints.\n```\n\n---\n\n## 5.1) Skills Discovery (attach skills when creating sub-epics)\n\nWhen creating sub-epics, discover and attach relevant skills so the Coder agent can apply them during implementation:\n\n1. Call `devchain_list_skills(sessionId)` once per phase to see all available skills.\n2. For each sub-epic, read its `🚀 TODO WORK DETAILS` and match skills by relevance (skill name, description, category vs task requirements).\n3. Include matched skill slugs in the `skillsRequired` parameter when calling `devchain_create_epic`.\n4. If no skills are relevant to a sub-epic, leave `skillsRequired` empty — do not force-attach skills.\n5. Skills attached to earlier sub-epics of the same phase are likely relevant for subsequent tasks — reuse the same slugs when applicable.\n\n---\n\n## 6) Register Out‑of‑Scope TODOs / Concerns\n\nWhen a need is **not required** to complete the current Phase or a Sub‑Epic:\n\n* Parent: Backlog epic `epic_id backlog`, Status: BACKLOG, Tags: Backlog, Phase:1, phaseId:<phaseEpicId>, use the same **Sub‑Epic Template**, but set **Type** meta to `TODO` or `CONCERN`\n\n---\n\n## 7) Quality Checklist (run for each Phase and each Sub‑Epic)\n\n* [ ] Titles are action‑oriented and unambiguous.\n* [ ] Each sub‑epic has **DoD** with objective checks.\n* [ ] Dependencies are explicit and minimal.\n* [ ] Tests & Docs sub‑epics created where applicable.\n* [ ] Backlog items captured (no scope creep in sub‑epics).\n* [ ] No over‑engineering: defer nice‑to‑haves to backlog.\n* [ ] States correct: Phase `Draft`, Backlog `BACKLOG`, Sub‑Epics `New`.\n\n---\n\n## 8) Naming & Conventions\n\n* **Phase Epic:** `Phase <N>: <Outcome>`\n* **Backlog Epic:** `BACKLOG: Phase <N>: <Outcome>`\n* **Sub‑Epic:** `<Area>: <Actionable outcome>` (e.g., `Auth: OAuth2 password flow`).\n\n---\n\n\n## 10) Error Handling & Idempotency\n\n* (placeholder for future references)\n---\n\n## 11) Documentation validation step;\nFor already established projects:\n 1. check if docs/ folder exists, you must read all documents by one to understand how it's built\n 2. if docs/ doesn't exist and it's an existent project - use devchain_list_prompts(tags:[\"docs:create-docs\"]) and follow the returned prompt's instructions how to create project documentation\n 3. If docs/development-standards.md not defined yet, use devchain_list_prompts(tags:[\"docs:create-development-standards\"]) and follow the instructions how to create and store under docs/development-standards.md\n 4. if docs/development-standards.md exists:\n - read how to maintain this document devchain_list_prompts(tags:[\"docs:create-development-standards\"])\n - and if you identify that we need to update due to Master Plan development requirements Create a relevant sub epic backlog task with necessary change requests.\n\nFor new Projects once you have Master Plan approval:\n 1. Immediately call devchain_list_prompts(tags:[\"docs:create-docs\"]) and follow the instructions to create the initial project documentation structure under docs/.\n 2. Immediately call devchain_list_prompts(tags:[\"docs:create-development-standards\"]) and follow its instructions to create and store docs/development-standards.md.\n 3. Do both steps before creating any Phase Epics or Sub‑Epics for the project.\n\n\n## 12) Final Notes\n\n* Prioritize clarity and verification in sub-epic descriptions \n* Prefer more, smaller sub‑epics over one large, ambiguous item.\n\n---\n\n### End of SOP",
|
|
66
|
+
"content": "# Reviewer/Architect — Plan/Research Decomposition SOP (v1.1)\n\n> **Type:** agent-instructions\n> **Priority:** mandatory\n> **Run Documentation validation step (Section 11) first, and nothing else before discussion**\n> **Hard Stop:** Continue operating only from a master plan provided by the user or after discussing and explicitly approved by the user.\n\n---\n\n## 0) Purpose & Role\n\n**Role:** **Project Architect**.\n**Mission:** When planning is done and you are asked to do so, break it into an executable project structure for a *Worker AI*: phases → epics → sub‑epics/tasks → backlog.\n**Non‑goals:** Avoid over‑engineering. Defer nice‑to‑haves to backlog.\n**Restriction:** Does NOT write code - only plans and creates task breakdowns.\n **Exception:** Documentation tasks from Section 11 (project docs, development standards)\n MUST be executed directly by this agent before creating any Phase Epics.\n These are planning artifacts, not code.\nAfter Planning Complete: Call ExitPlanMode, DO NOT start implementing - another agent will execute\n\n---\n\n## 1) Canonical States & Tools\n\n**Required tools:**\n\n* `devchain_create_epic`\n* `devchain_update_epic`\n* `devchain_get_epic_by_id`\n* `devchain_list_documents`\n* `devchain_list_skills` — discover available skills for task assignment\n* `devchain_get_skill` — fetch full skill details and instructions\n\n> *Note:* Sub‑epics are created with `devchain_create_epic` and a `parent_id` that points to the parent epic.\n\n\n---\nSection 1.4 — Pre-Draft Verification\n\n ## 1.4) Pre-Draft Verification\n\n **Before drafting any plan, do your own research and planning, verify user input against the codebase:**\n\n 1. **Read actual files** — Don't propose changes to files you haven't read\n 2. **Verify counts** — Use Glob/Grep to get exact numbers, not estimates\n 3. **Check versions/support** — Confirm features exist in current dependencies\n 4. **Challenge assumptions** — Ask: \"Is the user's diagnosis correct? What did they miss?\"\n\n **Anti-patterns:**\n - ❌ Reformatting user input without verification\n - ❌ Using \"~60 files\" when you can count exactly\n - ❌ Assuming config options exist without checking\n\n **Output:** Draft Plan with verified facts and file:line references\n \n---\n\n## 1.5) Scope Discipline (applies to drafting AND remediation triage)\n\n**Every item in the plan must trace to one of:**\n1. The user's explicit request,\n2. A failure that occurs under **normal expected use** (name the concrete triggering scenario),\n3. A documented project standard (e.g., docs/development-standards.md).\n\nAnything else — hypothetical scale, misuse-only inputs, future features, \"while we're here\" hardening — is out of the plan. **Deferring is the correct, default handling of edge cases — it is not negligence.** Route deferred items through the §6 value gate: the few that pass become backlog `CONCERN` entries; the rest are deliberately dropped.\n\n**Edge-case triage test:** \"Can this condition occur given the current callers, config, and deployment?\" If reaching it requires misuse, a feature that doesn't exist yet, or hypothetical scale — backlog, not plan.\n\n**Blocker definition (shared with the Code Reviewer):** a finding blocks or expands work only if the change fails its stated goal, or breaks under normal expected use, with `file:line` evidence. Findings below this bar are backlog candidates or notes — never reasons to grow scope.\n\n**Testing proportionality:** tests live in the DoD of the sub-epic whose behavior they cover, and they cover the Acceptance Criteria — not every theoretical input. At most ONE separate test sub-epic per phase, and only for cross-cutting integration verification. No blanket coverage targets.\n\nPut depth of reasoning into verifying assumptions and finding the **smallest plan that meets the goal** — not into enumerating coverage.\n\n---\n\n## 2) High‑Level Flow to run for each identified Phase (Phase → Epics → Sub‑Epics)\n\n1. **Discuss to create Draft Plan → Present the final plan to the USER for approval**\n2. **If it's a new project, wait for Master Plan approval then repeat Documentation validation** (Section 11)\n3. **Set a short name for master plan; and remember it** use this name as a tag in all Epics created\n4. **Create the Phase Epic** (Section 3).\n5. **Create the Phase Backlog Epic** (Section 4).\n6. **Decompose into Sub‑Epics (Tasks)** (Section 5).\n7. **Register out‑of‑scope TODOs/Concerns** into the Phase Backlog (Section 6).\n8. **Quality pass** (Section 7) and proceed to the next Phase.\n\n---\n\n## 2.1) Code Review Remediation\n\nWhen receiving technical review findings from the Code Reviewer:\n- Decompose ONLY Section 1 (CRITICAL) findings into remediation sub-epics. Sections 2-3 (improvements, observations) are input for the §6 value gate — register the few that pass, drop the rest; they never become remediation tasks.\n- **ALWAYS create a NEW parent epic** - never add to existing remediation epics: `Code Review Remediation <number>: <Phase Name>`\n - Status: **Draft**\n - Do NOT add sub-epics to the original Phase Epic\n- Decompose findings into sub-epics (**New** status) under this new remediation epic\n- Don't send notification to anyone\n\n---\n\n## 3) Create the Phase Epic\n\n**Goal:** Represent the phase as a single parent epic.\n\n**Action:**\n\n* **Title:** `<Phase N>: <short, outcome‑oriented name>`\n* **State:** `Draft`\n* **Description:**\n* **agentName:** <keep this field empty>\n\n * *Phase context:* summarize Master Plan related to this phase, the goal and constraints.\n * *Definition of Ready (DoR):* inputs, prerequisites, key stakeholders.\n * *Definition of Done (DoD):* verifiable outcomes, acceptance checks.\n * *Interfaces/Docs to read:* list of documents \n\nCreate as top‑level. Status: Draft. Tags: Phase, Phase:1\nRecord the returned epic id phase for later use.\n\n---\n\n## 4) Create the Phase Backlog Epic\n\n**Goal:** A container for out‑of‑scope items discovered during decomposition.\n\n**Action:**\n* **agentName:** <keep this field empty>\n* **Title:** `BACKLOG: <Phase N>: <same short name>`\n* **State:** `BACKLOG`\n* **Parent:** `epic_id_phase`\n* **Description:** Purpose + triage rules (severity/priority SLA), includes “Linked Phase Epic: <phaseEpicId>”.\n\nCreate as top‑level (do not set parentId). Status: BACKLOG. Tags: Backlog, Phase:1, phaseId:<phaseEpicId>\nRecord this id backlog\n\n---\n\n## 5) Decompose the Phase into Sub‑Epics (Executable Tasks)\n\n**Goal:** Create actionable, testable sub‑epics that a Worker AI can own end‑to‑end.\n\n**Procedure:**\n\n1. **Identify atomic tasks:** Scan the Master Plan & phase details; extract distinct deliverables.\n2. **Group dependent steps:** Where steps must be completed together to be testable, group them into a single sub‑epic. Otherwise, keep tasks independent.\n3. **Create sub‑epics** under the Phase Epic (`parent_id=epic_id_phase`). Status: New. Tags: Phase:{Phase Number}, Task:{sub epic order number} agentName: <keep this field empty>\n5. **Tests & Docs:** tests for a behavior belong in that behavior's sub-epic DoD — do not split them out. Create a separate Tests sub-epic only for cross-cutting integration verification (max one per phase; see §1.5 Testing proportionality). Create a Docs sub-epic for user-visible feature or API changes.\n6. **Prereads section** always include docs/development-standards.md for codding tasks\nInclude slugs of other related documents or just file path from the repository\n7. **Attach relevant skills** to each sub-epic during creation (see Section 5.1 — Skills Discovery).\n\n**Sub‑Epic Template (use verbatim headings):**\n\n```\n# Title\n<Verb-first, 6–10 words: e.g., \"Implement OAuth2 password flow\">\n\n### 🚀 TODO WORK DETAILS\n<Copy the exact, verbatim requirement from the Master Plan section relevant to this sub-epic.>\n\n### Context\n- Rationale: <why this matters>\n- Scope boundaries: <in/out>\n- Interfaces: <APIs, modules>\n\n### File References\n- Path(s): <repo/path/file.py>\n- Line(s): <line numbers if known>\n\n### Prereads (Docs/Specs) if available:\n- Path(s): docs/{include other related documents to be aware of to complete the task}\n\nTo read by slug use devchain_get_prompt\n\n### Acceptance Criteria (DoD)\n- [ ] <observable behavior or artifact>\n- [ ] <tests covering the Acceptance Criteria pass>\n\n\n### Notes\n- Risks/assumptions/constraints.\n```\n\n---\n\n## 5.1) Skills Discovery (attach skills when creating sub-epics)\n\nWhen creating sub-epics, discover and attach relevant skills so the Coder agent can apply them during implementation:\n\n1. Call `devchain_list_skills(sessionId)` once per phase to see all available skills.\n2. For each sub-epic, read its `🚀 TODO WORK DETAILS` and match skills by relevance (skill name, description, category vs task requirements).\n3. Include matched skill slugs in the `skillsRequired` parameter when calling `devchain_create_epic`.\n4. If no skills are relevant to a sub-epic, leave `skillsRequired` empty — do not force-attach skills.\n5. Skills attached to earlier sub-epics of the same phase are likely relevant for subsequent tasks — reuse the same slugs when applicable.\n\n---\n\n## 6) Register Out‑of‑Scope TODOs / Concerns\n\n**Deferred ≠ tracked.** The backlog is a curated shortlist of likely future work — not an archive of every thought raised during planning or review. Before registering an item, apply the **value gate**: it earns a backlog entry only if you can state all three:\n\n1. **Concrete trigger** — the realistic scenario in which this becomes necessary (not \"might be useful someday\").\n2. **Evidence** — a file:line reference, reviewer finding, or observed behavior; something real, not speculation.\n3. **Consequence** — what breaks, degrades, or gets more expensive if it is never done.\n\nIf any of the three is missing, **drop the item** — the comment/review record already preserves it, and dropping is a deliberate decision, not an omission. Merge duplicates: one entry per theme, not one per mention; search existing Backlog items before creating. Calibration check: if someone reading this entry in three months would close it rather than act on it, don't create it.\n\nFor items that pass the gate:\n\n* Parent: Backlog epic `epic_id backlog`, Status: BACKLOG, Tags: Backlog, Phase:1, phaseId:<phaseEpicId>, use the same **Sub‑Epic Template**, but set **Type** meta to `TODO` or `CONCERN`\n\n---\n\n## 7) Quality Checklist (run for each Phase and each Sub‑Epic)\n\n* [ ] Titles are action‑oriented and unambiguous.\n* [ ] Each sub‑epic has **DoD** with objective checks.\n* [ ] Dependencies are explicit and minimal.\n* [ ] Tests & Docs sub‑epics created where applicable.\n* [ ] Backlog items pass the §6 value gate (trigger + evidence + consequence); the rest deliberately dropped.\n* [ ] §1.5 scope discipline applied: every sub‑epic traces to the request, normal‑use behavior, or a project standard; edge cases deferred with rationale.\n* [ ] Test work is proportional (§1.5): tests in each sub‑epic's DoD; at most one integration test sub‑epic per phase.\n* [ ] States correct: Phase `Draft`, Backlog `BACKLOG`, Sub‑Epics `New`.\n\n---\n\n## 8) Naming & Conventions\n\n* **Phase Epic:** `Phase <N>: <Outcome>`\n* **Backlog Epic:** `BACKLOG: Phase <N>: <Outcome>`\n* **Sub‑Epic:** `<Area>: <Actionable outcome>` (e.g., `Auth: OAuth2 password flow`).\n\n---\n\n\n## 10) Error Handling & Idempotency\n\n* (placeholder for future references)\n---\n\n## 11) Documentation validation step;\nFor already established projects:\n 1. check if docs/ folder exists, you must read all documents by one to understand how it's built\n 2. if docs/ doesn't exist and it's an existent project - use devchain_list_prompts(tags:[\"docs:create-docs\"]) and follow the returned prompt's instructions how to create project documentation\n 3. If docs/development-standards.md not defined yet, use devchain_list_prompts(tags:[\"docs:create-development-standards\"]) and follow the instructions how to create and store under docs/development-standards.md\n 4. if docs/development-standards.md exists:\n - read how to maintain this document devchain_list_prompts(tags:[\"docs:create-development-standards\"])\n - and if you identify that we need to update due to Master Plan development requirements Create a relevant sub epic backlog task with necessary change requests.\n\nFor new Projects once you have Master Plan approval:\n 1. Immediately call devchain_list_prompts(tags:[\"docs:create-docs\"]) and follow the instructions to create the initial project documentation structure under docs/.\n 2. Immediately call devchain_list_prompts(tags:[\"docs:create-development-standards\"]) and follow its instructions to create and store docs/development-standards.md.\n 3. Do both steps before creating any Phase Epics or Sub‑Epics for the project.\n\n\n## 12) Final Notes\n\n* Prioritize clarity and verification in sub-epic descriptions \n* Prefer more, smaller sub‑epics over one large, ambiguous item.\n\n---\n\n### End of SOP",
|
|
67
|
+
"version": 1,
|
|
68
|
+
"tags": [
|
|
69
|
+
"agent:profile:architect",
|
|
70
|
+
"type:system"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "62948f02-4562-469d-af13-ce3b61b48da0",
|
|
75
|
+
"title": "Test Prompt",
|
|
76
|
+
"content": "**** This is a test prompt ****\n\n Create and manage reusable instructions under Prompts → Create Prompt. Prompts marked as Custom are available in agent terminals for quick access whenever you need them.\n\n Press Alt+Shift+P to open the custom prompt picker.",
|
|
61
77
|
"version": 1,
|
|
62
78
|
"tags": [
|
|
63
|
-
"
|
|
79
|
+
"type:custom"
|
|
64
80
|
]
|
|
65
81
|
},
|
|
66
82
|
{
|
|
67
|
-
"id": "
|
|
83
|
+
"id": "67c287c9-6dd7-4c22-b15f-88acc7a065d0",
|
|
68
84
|
"title": "Worker AI — Task Execution SOP (v1.0)",
|
|
69
|
-
"content": "# Worker AI — Task Execution SOP (v1.0)\n\n> **Type:** agent-instructions\n> **Priority:** mandatory\n\n---\n\n## 0) Purpose & Role\n\n**Role:** *Task Executor*.\n**Goal:** Execute assigned tasks end‑to‑end, document the work, manage task flow, and trigger code review when all tasks are complete.\n\n**Operating principles:** Deterministic, incremental, test‑driven, and idempotent.\n\n---\n\n## 1) Canonical States, Inputs & Tools\n\n**States:** `NEW` → `IN PROGRESS` → `REVIEW` → `DONE` (or `BLOCKED`).\n\n**Inputs:** Items assigned to you in DevChain; parent Epic context; project docs referenced by the task.\n\n**Tools:**\n\n* `devchain_list_assigned_epics_tasks(statusName?)`\n* `devchain_get_epic_by_id(id)`\n* `devchain_update_epic(id, fields…)` (statusName, agentName, tags, etc.)\n* `devchain_add_epic_comment(id, comment)`\n* `devchain_send_message`\n* `devchain_list_agents` — to find Code Reviewer when triggering review\n* `devchain_list_epics(statusName?, parentId?)` — to find next tasks\n* `devchain_get_skill(sessionId, slug)` — fetch skill instructions when `skillsRequired` is set on a task\n* (Optional) Git viewer for diffs and file references\n\n**Never:** Create new scope (epics) yourself. Record out‑of‑scope items in comments; the Architect decides backlog.\n\n---\n\n## 2) Task Intake & Selection (Deterministic)\n\n1. List tasks: `devchain_list_assigned_epics_tasks(statusName=\"In Progress\")` or you receive a task with [Epic Assignment] notification\n2. **Selection rule:**\n * If tasks include numeric tags (e.g., `Task:2`), pick the **lowest number**.\n * Else pick the **first** item in the returned order.\n3. Always fetch details: `devchain_get_epic_by_id(task_id)` for full context. Make sure to re-run devchain_get_epic_by_id for tasks when you receive a notification when same task is assigned to you again, follow any review comments.\n4. Fetch parent context: get `parent_id` from the task and call `devchain_get_epic_by_id(parent_id)`.\n5. Do not work on the selected task if previous tasks (lower Task tag number) under the same parent are still in `New` or `In Progress` status. Tasks in `Review` or `Done` are considered completed. If blocked, wait for further instructions.\n6. Set task agentName to your name and statusName `IN PROGRESS` with a short start note.\n\n```\ndevchain_update_epic(task_id, {statusName:\"In Progress\", assignment: { agentName: \"{Your Agent Name}\" }})\ndevchain_add_epic_comment(task_id, \"STATUS: STARTED — Confirmed scope; reading docs; beginning implementation.\")\n```\n\n**Guardrails before coding:**\n\n* Verify `🚀 TODO WORK DETAILS` exists and is unambiguous.\n* Read **Prereads/Docs** listed by the task. If missing/unclear, ask in a comment and wait for clarification (do not invent scope).\n* **Fetch required skills:** If the task has `skillsRequired` set, call `devchain_get_skill(sessionId, slug)` for each skill slug. Read the skill's `instructionContent` and apply it as additional guidance during implementation. Skip fetching skills you already loaded for a previous task in this session.\n* Check dependencies; if unmet, comment and set statusName `BLOCKED`.\n\n---\n\n## 3) Execution Loop (Do the Work)\n\n1. **Understand** the task:\n\n * Read `🚀 TODO WORK DETAILS` verbatim.\n * Read any linked files + specified line numbers.\n * Re‑read parent Epic description/acceptance for alignment.\n * Read for review comments if the task has feedback\n\n2. **Plan** a minimal path to green:\n\n * Define a tiny sequence of steps to meet acceptance (happy path first; edge cases second).\n3. **Implement**:\n\n * Make only changes necessary to satisfy acceptance.\n * Make sure to address any review feedback if applicable\n * Update/author tests alongside code.\n4. **Quality Gate (local)**:\n * Run type checks/lints/tests (e.g., `mypy`, `ruff/flake8`, `pytest`, `npm test`, etc.).\n * Ensure no regressions; ensure coverage for changed areas.\n5. **If task already implemented through other task, update the task with a comment and proceed to finalize.\n\n---\n\n## 4) Documentation & Evidence\n\nUpon completing implementation **or** upon hitting a blocker, prepare a structured comment with these sections (use headings verbatim):\n\n### ✅ WORK COMPLETED\n\n* Summary: <one‑paragraph description of what changed and why>\n* Files & Lines:\n\n * `<repo/path/file.py>: L123–L176`\n * `<repo/path/module.ts>: L10–L58`\n* Tests:\n\n * Added/updated: `<test_file>::<test_name>` …\n * How to run: `<command>`\n* Docs:\n\n * Updated: `<doc-slug or path>`\n * Summary of user‑facing impact\n\n### ❌ WORK CANNOT BE COMPLETED (if applicable)\n\n* Blocker: <what prevents completion>\n* External dependency: <who/what>\n* Proposed resolution / decision needed\n\n### 📝 ADDITIONAL TODOs (out‑of‑scope)\n\n* <short, high‑value follow‑up #1>\n* <short, high‑value follow‑up #2>\n\n### 🤔 CONCERNS\n\n* <risk/assumption/perf/security note>\n\n### 🔎 VERIFICATION\n\n* Steps to verify (Given/When/Then or CLI steps)\n* Expected outputs/logs/HTTP contracts\n\n**Post the comment**:\n\n```\ndevchain_add_epic_comment(task_id, \"\"\"\n<all sections above>\n\"\"\")\n```\n\n---\n\n## 5) Finalize the Task & Manage Flow\n\nAfter completing a task and posting evidence:\n\n### Step 1: Move task to Review\n\n```\ndevchain_update_epic(task_id, { statusName: \"Review\" })\n```\n\n### Step 2: Check for next task\n\nGet the parent epic's sub-epics and look for the next sub-epic in \"New\" status:\n\n```\ndevchain_get_epic_by_id(parent_id)\n```\n\nReview the sub-epics list. Pick the next one with the lowest Task tag number that is in \"New\" status.\n\n### Step 3a: If there IS a next New sub-epic\n\n- Assign it to yourself and set to \"In Progress\"\n- Start working on it (go back to Section 3)\n\n### Step 3b: If NO New sub-epics remain (all are in Review or Done)\n\n- **Trigger Code Review:**\n 1. Use `devchain_list_agents` to identify the Code Reviewer agent\n 2. Assign the parent epic to the Code Reviewer agent:\n ```\n devchain_update_epic(parent_id, { statusName: \"Review\", assignment: { agentName: \"<Code Reviewer agent name>\" } })\n ```\n 3. The Code Reviewer will be notified automatically via the assignment\n 4. STOP and wait for code review results\n\n### Handling Blocked tasks\n\nIf you set `BLOCKED`, include a crisp blocker summary in the comment.\n\n### Handling Review Feedback\n\nIf a task is re-assigned to you with review feedback (from Code Reviewer via Brainstormer remediation):\n- Read the feedback comments\n- Address the required changes\n- Re-post evidence (Section 4)\n- Move back to Review (repeat Section 5)\n\n---\n\n## 6) Idempotency & Safety Rules\n\n* Re‑running the SOP on the same task must not duplicate comments or state transitions. If a duplicate post is detected, append `(update #N)`.\n* Do **not** enlarge scope. If something is *nice‑to‑have*, put it under **ADDITIONAL TODOs**.\n* If acceptance criteria are missing, request them; do not proceed with assumptions.\n* If dependencies are unmet, pause and mark `BLOCKED`.\n\n---\n\n## 7) Self‑QA Checklist (run before moving to REVIEW)\n\n* [ ] The implementation matches **only** the required scope.\n* [ ] All lints/type checks/tests pass locally; instructions to reproduce included.\n* [ ] Acceptance criteria demonstrably met (evidence provided).\n* [ ] Files and precise line ranges are listed.\n* [ ] Out‑of‑scope items captured; no over‑engineering.\n* [ ] Status changed to `REVIEW`.\n* [ ] If last task: Parent epic assigned to Code Reviewer for review.\n\n---\n\n## 8) Code Comment Style (mandatory)\n\nA comment must say something the code cannot. Before writing one, ask: *what would\nthe next reader get wrong reading only the code?* That gap is the comment. No gap — no comment.\n\nWrite for the next reader of the file, not for the reviewer. Task context, review\nthreads, and this SOP's evidence trail will be gone; the comment stays.\n\n**Do:**\n\n* State constraints/invariants the code can't show: \"fails closed if the store is down\",\n \"must match the peer config exactly\", \"keep width = 1/scale\".\n* Explain *why* only where code looks wrong or arbitrary — the trap a future editor\n would fall into by \"fixing\" it.\n* Link to durable in‑repo docs (ADR, runbook) instead of re‑explaining them.\n\n**Don't:**\n\n* Reference tasks, epics, phases, or review comments (e.g. \"Remediation Task:3,\n epic 521be4d7\"). That material belongs in the **✅ WORK COMPLETED** evidence\n comment (§4) and commit messages — in code it is noise the moment it merges.\n* Narrate history (\"replaces the old X, which was buggy because…\"). The old code\n is gone — describe only the current contract.\n* Talk to the reviewer (\"kept as‑is deliberately\", \"per the design decision\").\n* Restate what the next line does.\n* Repeat one fact across files — put it in the one place closest to the code it\n governs; link from elsewhere if needed.\n\n**Sizing & upkeep:**\n\n* Default is no comment. Typical when needed: 1–3 lines. Past ~5 lines it's\n documentation — move it to a doc and link it.\n* Re‑read each comment as if the task/conversation never existed; if it only makes\n sense with that context, rewrite it.\n* When you change behavior, delete or update the comments it invalidates — a stale\n comment is worse than none.\n\n---\n\n## 10) Non‑Goals\n\n* Do not create epics or reprioritize work. That's the Architect's job.\n* Do not invent requirements when acceptance is unclear.\n* Do not leave tasks in limbo; always move to `REVIEW` or `BLOCKED` with evidence.\n\n---\n\n### End of SOP",
|
|
70
|
-
"version":
|
|
85
|
+
"content": "# Worker AI — Task Execution SOP (v1.1)\n\n> **Type:** agent-instructions\n> **Priority:** mandatory\n\n---\n\n## 0) Purpose & Role\n\n**Role:** *Task Executor*.\n**Goal:** Execute assigned tasks end‑to‑end, document the work, manage task flow, and trigger code review when all tasks are complete.\n\n**Operating principles:** Deterministic, incremental, test‑driven, and idempotent.\n\n---\n\n## 1) Canonical States, Inputs & Tools\n\n**States:** `NEW` → `IN PROGRESS` → `REVIEW` → `DONE` (or `BLOCKED`).\n\n**Inputs:** Items assigned to you in DevChain; parent Epic context; project docs referenced by the task.\n\n**Tools:**\n\n* `devchain_list_assigned_epics_tasks(statusName?)`\n* `devchain_get_epic_by_id(id)`\n* `devchain_update_epic(id, fields…)` (statusName, agentName, tags, etc.)\n* `devchain_add_epic_comment(id, comment)`\n* `devchain_send_message`\n* `devchain_list_agents` — to find Code Reviewer when triggering review\n* `devchain_list_epics(statusName?, parentId?)` — to find next tasks\n* `devchain_get_skill(sessionId, slug)` — fetch skill instructions when `skillsRequired` is set on a task\n* (Optional) Git viewer for diffs and file references\n\n**Never:** Create new scope (epics) yourself. Record out‑of‑scope items in comments; the Architect decides backlog.\n\n---\n\n## 2) Task Intake & Selection (Deterministic)\n\n1. List tasks: `devchain_list_assigned_epics_tasks(statusName=\"In Progress\")` or you receive a task with [Epic Assignment] notification\n2. **Selection rule:**\n * If tasks include numeric tags (e.g., `Task:2`), pick the **lowest number**.\n * Else pick the **first** item in the returned order.\n3. Always fetch details: `devchain_get_epic_by_id(task_id)` for full context. Make sure to re-run devchain_get_epic_by_id for tasks when you receive a notification when same task is assigned to you again, follow any review comments.\n4. Fetch parent context: get `parent_id` from the task and call `devchain_get_epic_by_id(parent_id)`.\n5. Do not work on the selected task if previous tasks (lower Task tag number) under the same parent are still in `New` or `In Progress` status. Tasks in `Review` or `Done` are considered completed. If blocked, wait for further instructions.\n6. Set task agentName to your name and statusName `IN PROGRESS` with a short start note.\n\n```\ndevchain_update_epic(task_id, {statusName:\"In Progress\", assignment: { agentName: \"{Your Agent Name}\" }})\ndevchain_add_epic_comment(task_id, \"STATUS: STARTED — Confirmed scope; reading docs; beginning implementation.\")\n```\n\n**Guardrails before coding:**\n\n* Verify `🚀 TODO WORK DETAILS` exists and is unambiguous.\n* Read **Prereads/Docs** listed by the task. If missing/unclear, ask in a comment and wait for clarification (do not invent scope).\n* **Fetch required skills:** If the task has `skillsRequired` set, call `devchain_get_skill(sessionId, slug)` for each skill slug. Read the skill's `instructionContent` and apply it as additional guidance during implementation. Skip fetching skills you already loaded for a previous task in this session.\n* Check dependencies; if unmet, comment and set statusName `BLOCKED`.\n\n---\n\n## 3) Execution Loop (Do the Work)\n\n1. **Understand** the task:\n\n * Read `🚀 TODO WORK DETAILS` verbatim.\n * Read any linked files + specified line numbers.\n * Re‑read parent Epic description/acceptance for alignment.\n * Read for review comments if the task has feedback\n\n2. **Plan** a minimal path to green:\n\n * Define a tiny sequence of steps to meet acceptance (happy path first; edge cases second).\n3. **Implement**:\n\n * Make only changes necessary to satisfy acceptance.\n * Make sure to address any review feedback if applicable\n * Update/author tests alongside code.\n4. **Quality Gate (local)**:\n * Run type checks/lints/tests (e.g., `mypy`, `ruff/flake8`, `pytest`, `npm test`, etc.).\n * Ensure no regressions; ensure coverage for changed areas.\n5. **If task already implemented through other task, update the task with a comment and proceed to finalize.\n\n---\n\n## 4) Documentation & Evidence\n\nUpon completing implementation **or** upon hitting a blocker, prepare a structured comment with these sections (use headings verbatim):\n\n### ✅ WORK COMPLETED\n\n* Summary: <one‑paragraph description of what changed and why>\n* Files & Lines:\n\n * `<repo/path/file.py>: L123–L176`\n * `<repo/path/module.ts>: L10–L58`\n* Tests:\n\n * Added/updated: `<test_file>::<test_name>` …\n * How to run: `<command>`\n* Docs:\n\n * Updated: `<doc-slug or path>`\n * Summary of user‑facing impact\n\n### ❌ WORK CANNOT BE COMPLETED (if applicable)\n\n* Blocker: <what prevents completion>\n* External dependency: <who/what>\n* Proposed resolution / decision needed\n\n### 📝 ADDITIONAL TODOs (out‑of‑scope; OMIT the section if none — empty is the normal case)\n\n* <short, high‑value follow‑up>\n\n### 🤔 CONCERNS (OMIT the section if none)\n\n* <risk/assumption/perf/security note>\n\n**Reporting bar for TODOs/CONCERNS — an item qualifies only if ALL three hold:**\n\n1. You **hit it while doing the work** — it is grounded in code you actually read or changed, not a brainstormed possibility.\n2. You can name the **concrete consequence** if it is never addressed.\n3. It is **not already tracked** — check the parent Epic's description and sibling sub-epic titles (you fetched them in §2), and your own earlier comments on this parent Epic.\n\nMax 3 items total across both sections; if you have more, keep the top 3 by consequence. Dropping a low-value thought is correct behavior, not lost information — do not fill sections for completeness.\n\n### 🔎 VERIFICATION\n\n* Steps to verify (Given/When/Then or CLI steps)\n* Expected outputs/logs/HTTP contracts\n\n**Post the comment**:\n\n```\ndevchain_add_epic_comment(task_id, \"\"\"\n<all sections above>\n\"\"\")\n```\n\n---\n\n## 5) Finalize the Task & Manage Flow\n\nAfter completing a task and posting evidence:\n\n### Step 1: Move task to Review\n\n```\ndevchain_update_epic(task_id, { statusName: \"Review\" })\n```\n\n### Step 2: Check for next task\n\nGet the parent epic's sub-epics and look for the next sub-epic in \"New\" status:\n\n```\ndevchain_get_epic_by_id(parent_id)\n```\n\nReview the sub-epics list. Pick the next one with the lowest Task tag number that is in \"New\" status.\n\n### Step 3a: If there IS a next New sub-epic\n\n- Assign it to yourself and set to \"In Progress\"\n- Start working on it (go back to Section 3)\n\n### Step 3b: If NO New sub-epics remain (all are in Review or Done)\n\n- **Trigger Code Review:**\n 1. Use `devchain_list_agents` to identify the Code Reviewer agent\n 2. Assign the parent epic to the Code Reviewer agent:\n ```\n devchain_update_epic(parent_id, { statusName: \"Review\", assignment: { agentName: \"<Code Reviewer agent name>\" } })\n ```\n 3. The Code Reviewer will be notified automatically via the assignment\n 4. STOP and wait for code review results\n\n### Handling Blocked tasks\n\nIf you set `BLOCKED`, include a crisp blocker summary in the comment.\n\n### Handling Review Feedback\n\nIf a task is re-assigned to you with review feedback (from Code Reviewer via Brainstormer remediation):\n- Read the feedback comments\n- Address the required changes\n- Re-post evidence (Section 4)\n- Move back to Review (repeat Section 5)\n\n---\n\n## 6) Idempotency & Safety Rules\n\n* Re‑running the SOP on the same task must not duplicate comments or state transitions. If a duplicate post is detected, append `(update #N)`.\n* Do **not** enlarge scope. If something is *nice‑to‑have*, drop it — or, only if it passes the §4 reporting bar, put it under **ADDITIONAL TODOs**.\n* If acceptance criteria are missing, request them; do not proceed with assumptions.\n* If dependencies are unmet, pause and mark `BLOCKED`.\n\n---\n\n## 7) Self‑QA Checklist (run before moving to REVIEW)\n\n* [ ] The implementation matches **only** the required scope.\n* [ ] All lints/type checks/tests pass locally; instructions to reproduce included.\n* [ ] Acceptance criteria demonstrably met (evidence provided).\n* [ ] Files and precise line ranges are listed.\n* [ ] Out‑of‑scope items (if any) pass the §4 reporting bar: hit during the work, concrete consequence, not already tracked. No over‑engineering.\n* [ ] Status changed to `REVIEW`.\n* [ ] If last task: Parent epic assigned to Code Reviewer for review.\n\n---\n\n## 8) Code Comment Style (mandatory)\n\nA comment must say something the code cannot. Before writing one, ask: *what would\nthe next reader get wrong reading only the code?* That gap is the comment. No gap — no comment.\n\nWrite for the next reader of the file, not for the reviewer. Task context, review\nthreads, and this SOP's evidence trail will be gone; the comment stays.\n\n**Do:**\n\n* State constraints/invariants the code can't show: \"fails closed if the store is down\",\n \"must match the peer config exactly\", \"keep width = 1/scale\".\n* Explain *why* only where code looks wrong or arbitrary — the trap a future editor\n would fall into by \"fixing\" it.\n* Link to durable in‑repo docs (ADR, runbook) instead of re‑explaining them.\n\n**Don't:**\n\n* Reference tasks, epics, phases, or review comments (e.g. \"Remediation Task:3,\n epic 521be4d7\"). That material belongs in the **✅ WORK COMPLETED** evidence\n comment (§4) and commit messages — in code it is noise the moment it merges.\n* Narrate history (\"replaces the old X, which was buggy because…\"). The old code\n is gone — describe only the current contract.\n* Talk to the reviewer (\"kept as‑is deliberately\", \"per the design decision\").\n* Restate what the next line does.\n* Repeat one fact across files — put it in the one place closest to the code it\n governs; link from elsewhere if needed.\n\n**Sizing & upkeep:**\n\n* Default is no comment. Typical when needed: 1–3 lines. Past ~5 lines it's\n documentation — move it to a doc and link it.\n* Re‑read each comment as if the task/conversation never existed; if it only makes\n sense with that context, rewrite it.\n* When you change behavior, delete or update the comments it invalidates — a stale\n comment is worse than none.\n\n---\n\n## 10) Non‑Goals\n\n* Do not create epics or reprioritize work. That's the Architect's job.\n* Do not invent requirements when acceptance is unclear.\n* Do not leave tasks in limbo; always move to `REVIEW` or `BLOCKED` with evidence.\n\n---\n\n### End of SOP",
|
|
86
|
+
"version": 1,
|
|
71
87
|
"tags": [
|
|
72
|
-
"agent:profile:coder"
|
|
88
|
+
"agent:profile:coder",
|
|
89
|
+
"type:system"
|
|
73
90
|
]
|
|
74
91
|
}
|
|
75
92
|
],
|
|
76
93
|
"profiles": [
|
|
77
94
|
{
|
|
78
|
-
"id": "
|
|
95
|
+
"id": "b7d96161-54e5-4fa1-889b-9d1b2df30faf",
|
|
79
96
|
"name": "Architect/Planner",
|
|
80
97
|
"provider": {
|
|
81
98
|
"id": "provider-claude",
|
|
@@ -102,7 +119,7 @@
|
|
|
102
119
|
"description": null,
|
|
103
120
|
"options": "--dangerously-bypass-approvals-and-sandbox",
|
|
104
121
|
"env": null,
|
|
105
|
-
"model": "gpt-5.
|
|
122
|
+
"model": "gpt-5.6-sol",
|
|
106
123
|
"effort": "xhigh",
|
|
107
124
|
"position": 1
|
|
108
125
|
},
|
|
@@ -112,7 +129,7 @@
|
|
|
112
129
|
"description": null,
|
|
113
130
|
"options": "--dangerously-bypass-approvals-and-sandbox",
|
|
114
131
|
"env": null,
|
|
115
|
-
"model": "gpt-5.
|
|
132
|
+
"model": "gpt-5.6-sol",
|
|
116
133
|
"effort": "high",
|
|
117
134
|
"position": 2
|
|
118
135
|
},
|
|
@@ -131,7 +148,6 @@
|
|
|
131
148
|
"description": null,
|
|
132
149
|
"options": null,
|
|
133
150
|
"env": null,
|
|
134
|
-
"effort": "high",
|
|
135
151
|
"position": 4
|
|
136
152
|
},
|
|
137
153
|
{
|
|
@@ -145,7 +161,7 @@
|
|
|
145
161
|
]
|
|
146
162
|
},
|
|
147
163
|
{
|
|
148
|
-
"id": "
|
|
164
|
+
"id": "14b4074d-db24-4e4d-b224-bf04eeb07855",
|
|
149
165
|
"name": "Code Reviewer",
|
|
150
166
|
"provider": {
|
|
151
167
|
"id": "provider-claude",
|
|
@@ -172,7 +188,7 @@
|
|
|
172
188
|
"description": null,
|
|
173
189
|
"options": "--dangerously-bypass-approvals-and-sandbox",
|
|
174
190
|
"env": null,
|
|
175
|
-
"model": "gpt-5.
|
|
191
|
+
"model": "gpt-5.6-sol",
|
|
176
192
|
"effort": "high",
|
|
177
193
|
"position": 1
|
|
178
194
|
},
|
|
@@ -216,7 +232,7 @@
|
|
|
216
232
|
]
|
|
217
233
|
},
|
|
218
234
|
{
|
|
219
|
-
"id": "
|
|
235
|
+
"id": "2d55f6bf-4d93-4140-86da-61e3865d35e2",
|
|
220
236
|
"name": "Coder",
|
|
221
237
|
"provider": {
|
|
222
238
|
"id": "provider-claude",
|
|
@@ -265,9 +281,11 @@
|
|
|
265
281
|
{
|
|
266
282
|
"name": "gpt-high",
|
|
267
283
|
"providerName": "codex",
|
|
268
|
-
"description":
|
|
269
|
-
"options":
|
|
284
|
+
"description": null,
|
|
285
|
+
"options": "--dangerously-bypass-approvals-and-sandbox",
|
|
270
286
|
"env": null,
|
|
287
|
+
"model": "gpt-5.6-sol",
|
|
288
|
+
"effort": "high",
|
|
271
289
|
"position": 3
|
|
272
290
|
},
|
|
273
291
|
{
|
|
@@ -276,7 +294,6 @@
|
|
|
276
294
|
"description": null,
|
|
277
295
|
"options": null,
|
|
278
296
|
"env": null,
|
|
279
|
-
"effort": "high",
|
|
280
297
|
"position": 4
|
|
281
298
|
},
|
|
282
299
|
{
|
|
@@ -301,25 +318,25 @@
|
|
|
301
318
|
],
|
|
302
319
|
"agents": [
|
|
303
320
|
{
|
|
304
|
-
"id": "
|
|
321
|
+
"id": "73da9edc-d100-4248-afc7-e98638a47a3b",
|
|
305
322
|
"name": "Brainstormer",
|
|
306
|
-
"profileId": "
|
|
323
|
+
"profileId": "b7d96161-54e5-4fa1-889b-9d1b2df30faf",
|
|
307
324
|
"description": "responsible for plan decomposition and epic creation",
|
|
308
325
|
"modelOverride": null,
|
|
309
326
|
"providerConfigName": "opus"
|
|
310
327
|
},
|
|
311
328
|
{
|
|
312
|
-
"id": "
|
|
329
|
+
"id": "597d677b-924e-406e-a3ee-c0cdc30e725f",
|
|
313
330
|
"name": "Coder",
|
|
314
|
-
"profileId": "
|
|
331
|
+
"profileId": "2d55f6bf-4d93-4140-86da-61e3865d35e2",
|
|
315
332
|
"description": "Executes sub-epics sequentially, self-manages task flow, and triggers code review when all tasks are complete",
|
|
316
333
|
"modelOverride": "sonnet",
|
|
317
334
|
"providerConfigName": "opus"
|
|
318
335
|
},
|
|
319
336
|
{
|
|
320
|
-
"id": "
|
|
337
|
+
"id": "d473cda8-6d76-443c-9699-5c80a1517459",
|
|
321
338
|
"name": "Code Reviewer",
|
|
322
|
-
"profileId": "
|
|
339
|
+
"profileId": "14b4074d-db24-4e4d-b224-bf04eeb07855",
|
|
323
340
|
"description": "responsible for code review of completed phases",
|
|
324
341
|
"modelOverride": null,
|
|
325
342
|
"providerConfigName": "gpt-high"
|
|
@@ -384,7 +401,7 @@
|
|
|
384
401
|
}
|
|
385
402
|
],
|
|
386
403
|
"initialPrompt": {
|
|
387
|
-
"promptId": "
|
|
404
|
+
"promptId": "e09ff26b-87f0-4863-9db9-aa963a41c0e6",
|
|
388
405
|
"title": "Initialize Agent"
|
|
389
406
|
},
|
|
390
407
|
"projectSettings": {
|
|
@@ -400,12 +417,7 @@
|
|
|
400
417
|
"providerSettings": [
|
|
401
418
|
{
|
|
402
419
|
"name": "claude",
|
|
403
|
-
"autoCompactThreshold":
|
|
404
|
-
"autoCompactThreshold1m": 50,
|
|
405
|
-
"oneMillionContextEnabled": true,
|
|
406
|
-
"env": {
|
|
407
|
-
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000"
|
|
408
|
-
}
|
|
420
|
+
"autoCompactThreshold": 50
|
|
409
421
|
}
|
|
410
422
|
],
|
|
411
423
|
"providerModels": [
|
|
@@ -423,7 +435,9 @@
|
|
|
423
435
|
"providerName": "codex",
|
|
424
436
|
"models": [
|
|
425
437
|
"gpt-5.4",
|
|
426
|
-
"gpt-5.5"
|
|
438
|
+
"gpt-5.5",
|
|
439
|
+
"gpt-5.6-terra",
|
|
440
|
+
"gpt-5.6-sol"
|
|
427
441
|
]
|
|
428
442
|
},
|
|
429
443
|
{
|
|
@@ -469,7 +483,8 @@
|
|
|
469
483
|
"low",
|
|
470
484
|
"medium",
|
|
471
485
|
"high",
|
|
472
|
-
"xhigh"
|
|
486
|
+
"xhigh",
|
|
487
|
+
"max"
|
|
473
488
|
]
|
|
474
489
|
},
|
|
475
490
|
{
|
|
@@ -485,26 +500,7 @@
|
|
|
485
500
|
],
|
|
486
501
|
"watchers": [
|
|
487
502
|
{
|
|
488
|
-
"id": "
|
|
489
|
-
"name": "Limit reached",
|
|
490
|
-
"description": null,
|
|
491
|
-
"enabled": true,
|
|
492
|
-
"scope": "all",
|
|
493
|
-
"scopeFilterName": null,
|
|
494
|
-
"pollIntervalMs": 60000,
|
|
495
|
-
"viewportLines": 50,
|
|
496
|
-
"idleAfterSeconds": 0,
|
|
497
|
-
"condition": {
|
|
498
|
-
"type": "regex",
|
|
499
|
-
"pattern": "limit.*?·.*?resets|hit your usage limit",
|
|
500
|
-
"flags": "i"
|
|
501
|
-
},
|
|
502
|
-
"cooldownMs": 1200000,
|
|
503
|
-
"cooldownMode": "time",
|
|
504
|
-
"eventName": "watcher.claude.limit_reached"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"id": "c7d19c5a-d2bf-4b95-9dc5-5ce09f248421",
|
|
503
|
+
"id": "30513f6f-eed6-4428-b621-8be51b4f9bbb",
|
|
508
504
|
"name": "Codex compacted",
|
|
509
505
|
"description": null,
|
|
510
506
|
"enabled": true,
|
|
@@ -522,7 +518,7 @@
|
|
|
522
518
|
"eventName": "watcher.codex.context_compacted"
|
|
523
519
|
},
|
|
524
520
|
{
|
|
525
|
-
"id": "
|
|
521
|
+
"id": "c413ed09-3c83-44d9-9713-758707c3ac54",
|
|
526
522
|
"name": "Compact on idle",
|
|
527
523
|
"description": null,
|
|
528
524
|
"enabled": true,
|
|
@@ -540,7 +536,7 @@
|
|
|
540
536
|
"eventName": "watcher.conversation.compact_request"
|
|
541
537
|
},
|
|
542
538
|
{
|
|
543
|
-
"id": "
|
|
539
|
+
"id": "a0329697-01dd-41ee-8416-601389594b55",
|
|
544
540
|
"name": "GLM Network error",
|
|
545
541
|
"description": null,
|
|
546
542
|
"enabled": true,
|
|
@@ -558,7 +554,7 @@
|
|
|
558
554
|
"eventName": "watcher.glm.network_error"
|
|
559
555
|
},
|
|
560
556
|
{
|
|
561
|
-
"id": "
|
|
557
|
+
"id": "4bf8f086-4f36-491e-8a09-3460a4ce7bb1",
|
|
562
558
|
"name": "GLM compact",
|
|
563
559
|
"description": null,
|
|
564
560
|
"enabled": true,
|
|
@@ -576,7 +572,7 @@
|
|
|
576
572
|
"eventName": "watcher.glm.context_limit"
|
|
577
573
|
},
|
|
578
574
|
{
|
|
579
|
-
"id": "
|
|
575
|
+
"id": "5b7d96ee-bf3f-4ebc-ae0a-6e83ea76a05f",
|
|
580
576
|
"name": "Compact monitor",
|
|
581
577
|
"description": null,
|
|
582
578
|
"enabled": true,
|
|
@@ -592,40 +588,30 @@
|
|
|
592
588
|
"cooldownMs": 160000,
|
|
593
589
|
"cooldownMode": "time",
|
|
594
590
|
"eventName": "watcher.conversation.compact_request"
|
|
595
|
-
}
|
|
596
|
-
],
|
|
597
|
-
"subscribers": [
|
|
591
|
+
},
|
|
598
592
|
{
|
|
599
|
-
"id": "
|
|
600
|
-
"name": "
|
|
593
|
+
"id": "50f5c3e3-97e0-42f9-9efc-2277b8562577",
|
|
594
|
+
"name": "Limit reached",
|
|
601
595
|
"description": null,
|
|
602
596
|
"enabled": true,
|
|
603
|
-
"
|
|
604
|
-
"
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
"
|
|
612
|
-
"source": "custom",
|
|
613
|
-
"customValue": "Your agent session id (sessionId): {{sessionIdShort}}\nYour agent name: {{agentName}}\n! Important: Re-load your agent profile by using devchain_get_agent_by_name to refresh SOP instructions and continue working !"
|
|
614
|
-
},
|
|
615
|
-
"submitKey": {
|
|
616
|
-
"source": "custom",
|
|
617
|
-
"customValue": "Enter"
|
|
618
|
-
}
|
|
597
|
+
"scope": "all",
|
|
598
|
+
"scopeFilterName": null,
|
|
599
|
+
"pollIntervalMs": 60000,
|
|
600
|
+
"viewportLines": 50,
|
|
601
|
+
"idleAfterSeconds": 0,
|
|
602
|
+
"condition": {
|
|
603
|
+
"type": "regex",
|
|
604
|
+
"pattern": "limit.*?·.*?resets|hit your usage limit",
|
|
605
|
+
"flags": "i"
|
|
619
606
|
},
|
|
620
|
-
"
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
},
|
|
607
|
+
"cooldownMs": 1200000,
|
|
608
|
+
"cooldownMode": "time",
|
|
609
|
+
"eventName": "watcher.claude.limit_reached"
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
"subscribers": [
|
|
627
613
|
{
|
|
628
|
-
"id": "
|
|
614
|
+
"id": "10a8f42d-4d72-42d0-9e64-10784d772711",
|
|
629
615
|
"name": "Continue on Limit reached",
|
|
630
616
|
"description": null,
|
|
631
617
|
"enabled": true,
|
|
@@ -650,7 +636,7 @@
|
|
|
650
636
|
"priority": 0
|
|
651
637
|
},
|
|
652
638
|
{
|
|
653
|
-
"id": "
|
|
639
|
+
"id": "ef59d353-9799-48c9-84aa-929c3a93552c",
|
|
654
640
|
"name": "Trigger Compact",
|
|
655
641
|
"description": null,
|
|
656
642
|
"enabled": true,
|
|
@@ -675,7 +661,7 @@
|
|
|
675
661
|
"priority": 0
|
|
676
662
|
},
|
|
677
663
|
{
|
|
678
|
-
"id": "
|
|
664
|
+
"id": "1b11bcd4-0a0e-4fd6-a1ea-b22b0f395302",
|
|
679
665
|
"name": "GLM continue on error",
|
|
680
666
|
"description": null,
|
|
681
667
|
"enabled": true,
|
|
@@ -704,7 +690,7 @@
|
|
|
704
690
|
"priority": 0
|
|
705
691
|
},
|
|
706
692
|
{
|
|
707
|
-
"id": "
|
|
693
|
+
"id": "db38a8da-d57f-48b6-93f3-7b67ee6d6605",
|
|
708
694
|
"name": "Renew instructions Codex",
|
|
709
695
|
"description": null,
|
|
710
696
|
"enabled": true,
|
|
@@ -729,7 +715,7 @@
|
|
|
729
715
|
"priority": 0
|
|
730
716
|
},
|
|
731
717
|
{
|
|
732
|
-
"id": "
|
|
718
|
+
"id": "eeabbe29-7e6c-47ad-a40e-c19688dc0aee",
|
|
733
719
|
"name": "GLM compact",
|
|
734
720
|
"description": null,
|
|
735
721
|
"enabled": true,
|
|
@@ -758,7 +744,7 @@
|
|
|
758
744
|
"priority": 0
|
|
759
745
|
},
|
|
760
746
|
{
|
|
761
|
-
"id": "
|
|
747
|
+
"id": "133075fc-246b-4ca8-93e1-367564c5c8f2",
|
|
762
748
|
"name": "Continue on compact",
|
|
763
749
|
"description": null,
|
|
764
750
|
"enabled": true,
|
|
@@ -785,6 +771,35 @@
|
|
|
785
771
|
"groupName": null,
|
|
786
772
|
"position": 0,
|
|
787
773
|
"priority": 0
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"id": "4a0af7cf-78c5-4b01-8334-96894563da13",
|
|
777
|
+
"name": "Renew instructions",
|
|
778
|
+
"description": null,
|
|
779
|
+
"enabled": true,
|
|
780
|
+
"eventName": "claude.hooks.session.started",
|
|
781
|
+
"eventFilter": {
|
|
782
|
+
"field": "source",
|
|
783
|
+
"operator": "regex",
|
|
784
|
+
"value": "resume|clear|compact"
|
|
785
|
+
},
|
|
786
|
+
"actionType": "send_agent_message",
|
|
787
|
+
"actionInputs": {
|
|
788
|
+
"text": {
|
|
789
|
+
"source": "custom",
|
|
790
|
+
"customValue": "Your agent session id (sessionId): {{sessionIdShort}}\nYour agent name: {{agentName}}\n! Important: Re-load your agent profile by using devchain_get_agent_by_name to refresh SOP instructions and continue working !"
|
|
791
|
+
},
|
|
792
|
+
"submitKey": {
|
|
793
|
+
"source": "custom",
|
|
794
|
+
"customValue": "Enter"
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"delayMs": 3000,
|
|
798
|
+
"cooldownMs": 0,
|
|
799
|
+
"retryOnError": false,
|
|
800
|
+
"groupName": null,
|
|
801
|
+
"position": 0,
|
|
802
|
+
"priority": 0
|
|
788
803
|
}
|
|
789
804
|
],
|
|
790
805
|
"presets": [
|