oh-my-agent-commandcode 0.0.0-stage → 20.38.4
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 +35 -2
- package/filter-test-output.sh +52 -0
- package/mods/oma.ts +347 -0
- package/package.json +30 -4
- package/skills/_shared/conditional/experiment-ledger.md +28 -0
- package/skills/_shared/conditional/exploration-loop.md +22 -0
- package/skills/_shared/conditional/quality-score.md +33 -0
- package/skills/_shared/core/anti-ai-prose.md +191 -0
- package/skills/_shared/core/api-contracts/README.md +28 -0
- package/skills/_shared/core/api-contracts/template.md +90 -0
- package/skills/_shared/core/clarification-protocol.md +23 -0
- package/skills/_shared/core/code-intelligence.md +46 -0
- package/skills/_shared/core/collaboration-policy.md +28 -0
- package/skills/_shared/core/common-checklist.md +28 -0
- package/skills/_shared/core/context-budget.md +22 -0
- package/skills/_shared/core/context-loading.md +34 -0
- package/skills/_shared/core/difficulty-guide.md +26 -0
- package/skills/_shared/core/execution-policy.md +31 -0
- package/skills/_shared/core/lessons-learned.md +33 -0
- package/skills/_shared/core/prompt-structure.md +18 -0
- package/skills/_shared/core/quality-principles.md +11 -0
- package/skills/_shared/core/session-metrics.md +35 -0
- package/skills/_shared/core/skill-routing.md +39 -0
- package/skills/_shared/core/test-approach.md +54 -0
- package/skills/_shared/core/vendor-detection.md +52 -0
- package/skills/_shared/runtime/memory-protocol.md +118 -0
- package/skills/_shared/runtime/result-contract.md +64 -0
- package/skills/_shared/ui-interaction-quality.md +133 -0
- package/skills/oma-academic-writing/SKILL.md +181 -0
- package/skills/oma-academic-writing/resources/abstract-guide.md +51 -0
- package/skills/oma-academic-writing/resources/academic-verb-tiers.md +42 -0
- package/skills/oma-academic-writing/resources/anti-ai-checklist.md +52 -0
- package/skills/oma-academic-writing/resources/hedging-guide.md +132 -0
- package/skills/oma-academic-writing/resources/sentence-structure-reference.md +151 -0
- package/skills/oma-architecture/SKILL.md +203 -0
- package/skills/oma-architecture/resources/api-evolution.md +41 -0
- package/skills/oma-architecture/resources/checklist.md +42 -0
- package/skills/oma-architecture/resources/execution-protocol.md +115 -0
- package/skills/oma-architecture/resources/methodology-selection.md +92 -0
- package/skills/oma-architecture/resources/migration-patterns.md +28 -0
- package/skills/oma-architecture/resources/output-templates.md +111 -0
- package/skills/oma-architecture/resources/stakeholder-synthesis.md +80 -0
- package/skills/oma-backend/SKILL.md +202 -0
- package/skills/oma-backend/resources/checklist.md +45 -0
- package/skills/oma-backend/resources/error-playbook.md +97 -0
- package/skills/oma-backend/resources/execution-protocol.md +39 -0
- package/skills/oma-backend/resources/orm-reference.md +61 -0
- package/skills/oma-backend/variants/node/api-template.ts +315 -0
- package/skills/oma-backend/variants/node/snippets.md +475 -0
- package/skills/oma-backend/variants/node/stack.yaml +21 -0
- package/skills/oma-backend/variants/node/tech-stack.md +33 -0
- package/skills/oma-backend/variants/python/api-template.py +378 -0
- package/skills/oma-backend/variants/python/snippets.md +199 -0
- package/skills/oma-backend/variants/python/stack.yaml +18 -0
- package/skills/oma-backend/variants/python/tech-stack.md +45 -0
- package/skills/oma-backend/variants/rust/api-template.rs +635 -0
- package/skills/oma-backend/variants/rust/snippets.md +471 -0
- package/skills/oma-backend/variants/rust/stack.yaml +20 -0
- package/skills/oma-backend/variants/rust/tech-stack.md +36 -0
- package/skills/oma-backend/variants/stack.schema.json +73 -0
- package/skills/oma-brainstorm/SKILL.md +166 -0
- package/skills/oma-brainstorm/resources/triz-lite.md +117 -0
- package/skills/oma-coordination/SKILL.md +171 -0
- package/skills/oma-db/SKILL.md +201 -0
- package/skills/oma-db/resources/anti-patterns.md +177 -0
- package/skills/oma-db/resources/checklist.md +67 -0
- package/skills/oma-db/resources/document-templates.md +107 -0
- package/skills/oma-db/resources/error-playbook.md +50 -0
- package/skills/oma-db/resources/examples.md +170 -0
- package/skills/oma-db/resources/execution-protocol.md +127 -0
- package/skills/oma-db/resources/iso-controls.md +98 -0
- package/skills/oma-db/resources/migration-playbook.md +93 -0
- package/skills/oma-db/resources/query-tuning.md +57 -0
- package/skills/oma-db/resources/vector-db.md +159 -0
- package/skills/oma-debug/SKILL.md +146 -0
- package/skills/oma-debug/resources/bug-report-template.md +327 -0
- package/skills/oma-debug/resources/checklist.md +31 -0
- package/skills/oma-debug/resources/common-patterns.md +734 -0
- package/skills/oma-debug/resources/debugging-checklist.md +364 -0
- package/skills/oma-debug/resources/error-playbook.md +94 -0
- package/skills/oma-debug/resources/execution-protocol.md +40 -0
- package/skills/oma-design/SKILL.md +135 -0
- package/skills/oma-design/resources/asset-strategy.md +34 -0
- package/skills/oma-design/resources/checklist.md +63 -0
- package/skills/oma-design/resources/data-grid.md +48 -0
- package/skills/oma-design/resources/design-md-spec.md +107 -0
- package/skills/oma-design/resources/design-tokens.md +53 -0
- package/skills/oma-design/resources/error-playbook.md +18 -0
- package/skills/oma-design/resources/execution-protocol.md +95 -0
- package/skills/oma-design/resources/external-design-skills.md +130 -0
- package/skills/oma-design/resources/getdesign-fetcher.md +104 -0
- package/skills/oma-design/resources/product-interface-review.md +59 -0
- package/skills/oma-design/resources/redesign-protocol.md +52 -0
- package/skills/oma-design/resources/stitch-integration.md +244 -0
- package/skills/oma-dev-workflow/SKILL.md +375 -0
- package/skills/oma-dev-workflow/resources/affected-checks.py +58 -0
- package/skills/oma-dev-workflow/resources/api-workflows.md +58 -0
- package/skills/oma-dev-workflow/resources/database-patterns.md +107 -0
- package/skills/oma-dev-workflow/resources/i18n-patterns.md +63 -0
- package/skills/oma-dev-workflow/resources/release-coordination.md +240 -0
- package/skills/oma-dev-workflow/resources/tooling-profiles.md +217 -0
- package/skills/oma-dev-workflow/resources/troubleshooting.md +78 -0
- package/skills/oma-dev-workflow/resources/validation-pipeline.md +246 -0
- package/skills/oma-docs/SKILL.md +77 -0
- package/skills/oma-docs/resources/commands.md +76 -0
- package/skills/oma-explanation/SKILL.md +212 -0
- package/skills/oma-explanation/resources/document-structure.md +115 -0
- package/skills/oma-explanation/resources/draft-format.md +199 -0
- package/skills/oma-explanation/resources/html-contract.md +102 -0
- package/skills/oma-frontend/SKILL.md +227 -0
- package/skills/oma-frontend/resources/angular-rules.md +110 -0
- package/skills/oma-frontend/resources/checklist.md +76 -0
- package/skills/oma-frontend/resources/error-playbook.md +125 -0
- package/skills/oma-frontend/resources/execution-protocol.md +46 -0
- package/skills/oma-frontend/resources/snippets.md +354 -0
- package/skills/oma-frontend/resources/specialized-visual-implementation.md +193 -0
- package/skills/oma-frontend/resources/tailwind-rules.md +83 -0
- package/skills/oma-frontend/resources/tech-stack.md +156 -0
- package/skills/oma-hwp/SKILL.md +166 -0
- package/skills/oma-hwp/config/hwp-config.yaml +35 -0
- package/skills/oma-hwp/resources/balanced-tables.ts +39 -0
- package/skills/oma-hwp/resources/execution-protocol.md +145 -0
- package/skills/oma-hwp/resources/flatten-tables.ts +101 -0
- package/skills/oma-hwp/resources/package.json +13 -0
- package/skills/oma-hwp/resources/troubleshooting.md +70 -0
- package/skills/oma-hwp/resources/tsconfig.json +10 -0
- package/skills/oma-hwp/resources/turndown-plugin-gfm.d.ts +9 -0
- package/skills/oma-image/SKILL.md +142 -0
- package/skills/oma-image/config/image-config.yaml +70 -0
- package/skills/oma-image/resources/checklist.md +18 -0
- package/skills/oma-image/resources/execution-protocol.md +117 -0
- package/skills/oma-image/resources/invocation.md +105 -0
- package/skills/oma-image/resources/prompt-tips.md +71 -0
- package/skills/oma-image/resources/vendor-matrix.md +90 -0
- package/skills/oma-market/SKILL.md +142 -0
- package/skills/oma-market/resources/checklist.md +12 -0
- package/skills/oma-market/resources/error-playbook.md +12 -0
- package/skills/oma-market/resources/execution-protocol.md +60 -0
- package/skills/oma-market/resources/frameworks/pestel.md +101 -0
- package/skills/oma-market/resources/frameworks/porters-5f.md +90 -0
- package/skills/oma-market/resources/frameworks/swot.md +61 -0
- package/skills/oma-market/resources/intent-rules.md +35 -0
- package/skills/oma-market/resources/output-laws.md +53 -0
- package/skills/oma-mobile/SKILL.md +168 -0
- package/skills/oma-mobile/resources/checklist.md +77 -0
- package/skills/oma-mobile/resources/error-playbook.md +198 -0
- package/skills/oma-mobile/resources/execution-protocol.md +47 -0
- package/skills/oma-mobile/resources/screen-template.dart +331 -0
- package/skills/oma-mobile/resources/screen-template.swift +239 -0
- package/skills/oma-mobile/resources/screen-template.tsx +179 -0
- package/skills/oma-mobile/resources/tech-stack.md +69 -0
- package/skills/oma-mobile/variants/README.md +45 -0
- package/skills/oma-mobile/variants/flutter/api-template.dart +461 -0
- package/skills/oma-mobile/variants/flutter/snippets.md +1353 -0
- package/skills/oma-mobile/variants/flutter/stack.yaml +21 -0
- package/skills/oma-mobile/variants/flutter/tech-stack.md +201 -0
- package/skills/oma-mobile/variants/kotlin-android/api-template.kt +182 -0
- package/skills/oma-mobile/variants/kotlin-android/snippets.md +871 -0
- package/skills/oma-mobile/variants/kotlin-android/stack.yaml +32 -0
- package/skills/oma-mobile/variants/kotlin-android/tech-stack.md +159 -0
- package/skills/oma-mobile/variants/react-native/api-template.ts +531 -0
- package/skills/oma-mobile/variants/react-native/snippets.md +1014 -0
- package/skills/oma-mobile/variants/react-native/stack.yaml +22 -0
- package/skills/oma-mobile/variants/react-native/tech-stack.md +192 -0
- package/skills/oma-mobile/variants/stack.schema.json +68 -0
- package/skills/oma-mobile/variants/swift-ios/api-template.swift +165 -0
- package/skills/oma-mobile/variants/swift-ios/snippets.md +1028 -0
- package/skills/oma-mobile/variants/swift-ios/stack.yaml +25 -0
- package/skills/oma-mobile/variants/swift-ios/tech-stack.md +174 -0
- package/skills/oma-observability/SKILL.md +225 -0
- package/skills/oma-observability/resources/anti-patterns.md +555 -0
- package/skills/oma-observability/resources/boundaries/cross-application.md +348 -0
- package/skills/oma-observability/resources/boundaries/multi-tenant.md +290 -0
- package/skills/oma-observability/resources/boundaries/release.md +372 -0
- package/skills/oma-observability/resources/boundaries/slo.md +225 -0
- package/skills/oma-observability/resources/checklist.md +123 -0
- package/skills/oma-observability/resources/examples.md +448 -0
- package/skills/oma-observability/resources/execution-protocol.md +166 -0
- package/skills/oma-observability/resources/incident-forensics.md +348 -0
- package/skills/oma-observability/resources/intent-rules.md +307 -0
- package/skills/oma-observability/resources/layers/L3-network.md +281 -0
- package/skills/oma-observability/resources/layers/L4-transport.md +299 -0
- package/skills/oma-observability/resources/layers/L7-application/crash-analytics.md +359 -0
- package/skills/oma-observability/resources/layers/L7-application/mobile-rum.md +278 -0
- package/skills/oma-observability/resources/layers/L7-application/waf.md +246 -0
- package/skills/oma-observability/resources/layers/L7-application/web-rum.md +350 -0
- package/skills/oma-observability/resources/layers/mesh.md +368 -0
- package/skills/oma-observability/resources/matrix.md +177 -0
- package/skills/oma-observability/resources/meta-observability.md +605 -0
- package/skills/oma-observability/resources/observability-as-code.md +666 -0
- package/skills/oma-observability/resources/signals/audit.md +310 -0
- package/skills/oma-observability/resources/signals/cost.md +303 -0
- package/skills/oma-observability/resources/signals/logs.md +263 -0
- package/skills/oma-observability/resources/signals/metrics.md +478 -0
- package/skills/oma-observability/resources/signals/privacy.md +351 -0
- package/skills/oma-observability/resources/signals/profiles.md +245 -0
- package/skills/oma-observability/resources/signals/traces.md +360 -0
- package/skills/oma-observability/resources/standards.md +214 -0
- package/skills/oma-observability/resources/transport/collector-topology.md +308 -0
- package/skills/oma-observability/resources/transport/otlp-grpc-vs-http.md +256 -0
- package/skills/oma-observability/resources/transport/sampling-recipes.md +297 -0
- package/skills/oma-observability/resources/transport/udp-statsd-mtu.md +167 -0
- package/skills/oma-observability/resources/vendor-categories.md +352 -0
- package/skills/oma-orchestration/SKILL.md +302 -0
- package/skills/oma-orchestration/config/cli-config.yaml +92 -0
- package/skills/oma-orchestration/resources/memory-schema.md +232 -0
- package/skills/oma-orchestration/resources/subagent-prompt-template.md +30 -0
- package/skills/oma-orchestration/scripts/parallel-run.sh +6 -0
- package/skills/oma-orchestration/scripts/spawn-agent.sh +5 -0
- package/skills/oma-orchestration/scripts/verify.sh +20 -0
- package/skills/oma-orchestration/templates/backend-task.md +19 -0
- package/skills/oma-orchestration/templates/debug-task.md +16 -0
- package/skills/oma-orchestration/templates/frontend-task.md +18 -0
- package/skills/oma-orchestration/templates/mobile-task.md +18 -0
- package/skills/oma-orchestration/templates/qa-task.md +16 -0
- package/skills/oma-orchestration/templates/tasks-example.yaml +15 -0
- package/skills/oma-pdf/SKILL.md +162 -0
- package/skills/oma-pdf/config/pdf-config.yaml +27 -0
- package/skills/oma-pdf/resources/execution-protocol.md +127 -0
- package/skills/oma-pm/SKILL.md +157 -0
- package/skills/oma-pm/resources/error-playbook.md +75 -0
- package/skills/oma-pm/resources/examples.md +439 -0
- package/skills/oma-pm/resources/execution-protocol.md +62 -0
- package/skills/oma-pm/resources/iso-planning.md +110 -0
- package/skills/oma-pm/resources/plan-phase-protocol.md +66 -0
- package/skills/oma-pm/resources/task-template.json +86 -0
- package/skills/oma-qa/SKILL.md +141 -0
- package/skills/oma-qa/resources/checklist.md +339 -0
- package/skills/oma-qa/resources/error-playbook.md +98 -0
- package/skills/oma-qa/resources/execution-protocol.md +169 -0
- package/skills/oma-qa/resources/iso-quality.md +82 -0
- package/skills/oma-qa/resources/verify-ship-protocol.md +116 -0
- package/skills/oma-recap/SKILL.md +245 -0
- package/skills/oma-recap/resources/output-formats.md +83 -0
- package/skills/oma-refactor/SKILL.md +184 -0
- package/skills/oma-refactor/resources/definition.md +108 -0
- package/skills/oma-refactor/resources/governance.md +33 -0
- package/skills/oma-refactor/resources/hotspots.py +44 -0
- package/skills/oma-refactor/resources/measurement.md +93 -0
- package/skills/oma-scholar/SKILL.md +276 -0
- package/skills/oma-scholar/config/scholar-config.yaml +79 -0
- package/skills/oma-scholar/resources/api-endpoints.md +174 -0
- package/skills/oma-scholar/resources/checklist.md +92 -0
- package/skills/oma-scholar/resources/execution-protocol.md +224 -0
- package/skills/oma-scholar/resources/fallback-providers.md +143 -0
- package/skills/oma-scholar/resources/setup-openalex.md +85 -0
- package/skills/oma-scholar/resources/sidecar-spec.md +341 -0
- package/skills/oma-scholar/resources/upstream-spec-cache.md +972 -0
- package/skills/oma-scm/SKILL.md +103 -0
- package/skills/oma-scm/resources/cm-operations.md +56 -0
- package/skills/oma-scm/resources/codeowners-playbook.md +45 -0
- package/skills/oma-scm/resources/conventional-commits.md +108 -0
- package/skills/oma-scm/resources/merge-risk.md +76 -0
- package/skills/oma-scm/resources/onboarding-risk-signals.md +71 -0
- package/skills/oma-search/SKILL.md +125 -0
- package/skills/oma-search/resources/checklist.md +36 -0
- package/skills/oma-search/resources/error-playbook.md +66 -0
- package/skills/oma-search/resources/examples.md +80 -0
- package/skills/oma-search/resources/execution-protocol.md +86 -0
- package/skills/oma-search/resources/intent-rules.md +47 -0
- package/skills/oma-search/resources/trust-registry.md +53 -0
- package/skills/oma-security/SKILL.md +172 -0
- package/skills/oma-security/resources/artex.md +108 -0
- package/skills/oma-security/resources/ci.md +134 -0
- package/skills/oma-security/resources/cisco-source.md +108 -0
- package/skills/oma-security/resources/deepsec-config.md +45 -0
- package/skills/oma-security/resources/deepsec-matchers.md +35 -0
- package/skills/oma-security/resources/deepsec-scanning.md +45 -0
- package/skills/oma-security/resources/deepsec-setup.md +41 -0
- package/skills/oma-security/resources/findings-contract.md +408 -0
- package/skills/oma-security/resources/mcp-scanning.md +122 -0
- package/skills/oma-security/resources/skill-scanning.md +106 -0
- package/skills/oma-security/resources/validation.md +71 -0
- package/skills/oma-skill-creation/SKILL.md +84 -0
- package/skills/oma-skill-creation/resources/prompt-evaluation.md +36 -0
- package/skills/oma-skill-creation/resources/ssl-lite-template.md +108 -0
- package/skills/oma-skill-creation/resources/validation-checklist.md +101 -0
- package/skills/oma-slide/SKILL.md +277 -0
- package/skills/oma-slide/resources/animation-patterns.md +245 -0
- package/skills/oma-slide/resources/assets/deck-stage.js +514 -0
- package/skills/oma-slide/resources/assets/viewport-base.css +257 -0
- package/skills/oma-slide/resources/canva-integration.md +203 -0
- package/skills/oma-slide/resources/checklist.md +46 -0
- package/skills/oma-slide/resources/design-doctrine.md +260 -0
- package/skills/oma-slide/resources/fixed-stage.md +232 -0
- package/skills/oma-slide/resources/generation-protocol.md +393 -0
- package/skills/oma-slide/resources/native-pptx.md +84 -0
- package/skills/oma-slide/resources/selection-index.json +461 -0
- package/skills/oma-slide/resources/style-presets.LICENSE +10 -0
- package/skills/oma-slide/resources/style-presets.md +520 -0
- package/skills/oma-tf-infra/SKILL.md +201 -0
- package/skills/oma-tf-infra/resources/checklist.md +53 -0
- package/skills/oma-tf-infra/resources/cost-optimization.md +574 -0
- package/skills/oma-tf-infra/resources/error-playbook.md +68 -0
- package/skills/oma-tf-infra/resources/examples.md +38 -0
- package/skills/oma-tf-infra/resources/execution-protocol.md +129 -0
- package/skills/oma-tf-infra/resources/iso-42001-infra.md +229 -0
- package/skills/oma-tf-infra/resources/multi-cloud-examples.md +241 -0
- package/skills/oma-tf-infra/resources/policy-testing-examples.md +332 -0
- package/skills/oma-translation/SKILL.md +229 -0
- package/skills/oma-translation/resources/anti-ai-patterns.md +104 -0
- package/skills/oma-translation/resources/lang/_template.md +73 -0
- package/skills/oma-translation/resources/lang/en.md +123 -0
- package/skills/oma-translation/resources/lang/ja.md +274 -0
- package/skills/oma-translation/resources/lang/ko.md +228 -0
- package/skills/oma-translation/resources/lang/zh.md +285 -0
- package/skills/oma-translation/resources/style-skills.md +104 -0
- package/skills/oma-translation/resources/translation-rubric.md +126 -0
- package/skills/oma-video/SKILL.md +229 -0
- package/skills/oma-video/config/video-config.yaml +60 -0
- package/skills/oma-video/resources/checklist.md +26 -0
- package/skills/oma-video/resources/execution-protocol.md +122 -0
- package/skills/oma-video/resources/existing-media.md +185 -0
- package/skills/oma-video/resources/hyperframes-authoring/README.md +44 -0
- package/skills/oma-video/resources/hyperframes-authoring/demo.md +31 -0
- package/skills/oma-video/resources/hyperframes-authoring/explainer.md +10 -0
- package/skills/oma-video/resources/hyperframes-authoring/shorts.md +10 -0
- package/skills/oma-video/resources/motion-principles.md +81 -0
- package/skills/oma-video/resources/mpt/driver.py +301 -0
- package/skills/oma-video/resources/prompt-tips.md +75 -0
- package/skills/oma-video/resources/script-schema.md +81 -0
- package/skills/oma-video/resources/sound-design.md +127 -0
- package/skills/oma-video/resources/strudel/package.json +11 -0
- package/skills/oma-video/resources/strudel/page.html +87 -0
- package/skills/oma-video/resources/strudel/render.mjs +295 -0
- package/skills/oma-video/resources/vendor-matrix.md +124 -0
- package/skills/oma-voice/SKILL.md +249 -0
- package/skills/oma-voice/config/voice-config.yaml +30 -0
- package/skills/oma-voice/resources/audio-processing.md +119 -0
- package/skills/oma-voice/resources/checklist.md +47 -0
- package/skills/oma-voice/resources/execution-protocol.md +215 -0
- package/skills/oma-voice/resources/prompt-tips.md +43 -0
- package/skills/oma-voice/resources/voice-matrix.md +51 -0
- package/skills/oma-voice/resources/voicestudio.md +87 -0
package/README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
#
|
|
1
|
+
# oh-my-agent-commandcode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[oh-my-agent](https://github.com/first-fluke/oh-my-agent) for
|
|
4
|
+
[Command Code](https://commandcode.ai) as a mod package: the oma hook bridge
|
|
5
|
+
(`mods/oma.ts`) plus every oh-my-agent skill (`skills/`), loaded together by
|
|
6
|
+
one `cmd mods add`.
|
|
7
|
+
|
|
8
|
+
Requires the `oma` CLI on PATH (`npm install -g oh-my-agent`). Every hook
|
|
9
|
+
fails open: without `oma` the mod changes nothing.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cmd mods add oh-my-agent-commandcode # this project
|
|
15
|
+
cmd mods add -g oh-my-agent-commandcode # your user
|
|
16
|
+
cmd mods add ./path/to/commandcode-mod # a local checkout or `oma emit` output
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Try it without installing: `cmd --mod ./path/to/commandcode-mod/mods/oma.ts`.
|
|
20
|
+
Review what it registers first: `cmd mods inspect ./path/to/commandcode-mod`.
|
|
21
|
+
|
|
22
|
+
## What the mod does
|
|
23
|
+
|
|
24
|
+
| Command Code hook | oh-my-agent handler |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `transformInput` | keyword-detector (workflow activation) and skill-injector; the prompt passes through unchanged |
|
|
27
|
+
| `appendSystemPrompt` | injects the detected context into the system prompt |
|
|
28
|
+
| `onSessionStart` | code-intelligence-primer and state-boundary |
|
|
29
|
+
| `beforeToolCall` (`shell_command`) | scm-guard (blocks staging likely secrets), test-filter (failures-only test output) |
|
|
30
|
+
| `onStop` | persistent-mode keeps an unfinished workflow running |
|
|
31
|
+
|
|
32
|
+
Each hook runs `oma hook script --vendor commandcode --script <name>`; the
|
|
33
|
+
handler logic lives in the installed CLI, so updating `oma` updates the
|
|
34
|
+
behaviour. A project where `oma link` already registered
|
|
35
|
+
`.commandcode/settings.json` hooks keeps those; this mod adds the prompt and
|
|
36
|
+
tool hooks the settings file cannot express.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# filter-test-output.sh — Strip passing test indicators, keep failures and summaries
|
|
3
|
+
# Pipe usage: test_command 2>&1 | bash filter-test-output.sh
|
|
4
|
+
#
|
|
5
|
+
# Supported: vitest, jest, mocha, pytest, go test, cargo test, rspec,
|
|
6
|
+
# flutter/dart test, swift test, dotnet test, gradle/mvn test,
|
|
7
|
+
# mix test, phpunit
|
|
8
|
+
# Bypass: OMA_TEST_FILTER=0
|
|
9
|
+
|
|
10
|
+
if [[ "${OMA_TEST_FILTER:-1}" == "0" ]]; then
|
|
11
|
+
cat
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
awk '
|
|
16
|
+
# vitest/jest/mocha: remove individual passing tests
|
|
17
|
+
/^[[:space:]]*[✓√✔][[:space:]]/ { next }
|
|
18
|
+
|
|
19
|
+
# jest: remove PASS file headers
|
|
20
|
+
/^[[:space:]]*PASS[[:space:]]/ { next }
|
|
21
|
+
|
|
22
|
+
# go test: remove passing tests and ok package lines
|
|
23
|
+
/^--- PASS:/ { next }
|
|
24
|
+
/^[[:space:]]*ok[[:space:]]+[a-zA-Z]/ { next }
|
|
25
|
+
|
|
26
|
+
# pytest: remove PASSED lines
|
|
27
|
+
/PASSED[[:space:]]*$/ { next }
|
|
28
|
+
|
|
29
|
+
# cargo test: remove "test ... ok" lines
|
|
30
|
+
/^test .+ \.\.\. ok$/ { next }
|
|
31
|
+
|
|
32
|
+
# flutter/dart: remove passing tests (+N without -N, excluding summary)
|
|
33
|
+
/^[0-9][0-9]:[0-9][0-9] \+[0-9]+: / && !/\-[0-9]+/ && !/All tests/ { next }
|
|
34
|
+
|
|
35
|
+
# swift: remove passed test cases
|
|
36
|
+
/Test Case .* passed/ { next }
|
|
37
|
+
|
|
38
|
+
# dotnet: remove individual Passed lines (keep "Passed!" summary)
|
|
39
|
+
/^[[:space:]]*Passed[[:space:]]/ && !/Passed!/ { next }
|
|
40
|
+
|
|
41
|
+
# gradle/mvn: remove individual test pass indicators
|
|
42
|
+
/^[[:space:]]*Tests run:.*Failures: 0.*Errors: 0/ { next }
|
|
43
|
+
|
|
44
|
+
# phpunit: remove dots-only progress lines
|
|
45
|
+
/^[.]+$/ { next }
|
|
46
|
+
|
|
47
|
+
# rspec: remove passing example dots (single-char lines)
|
|
48
|
+
/^[.]+[[:space:]]*$/ { next }
|
|
49
|
+
|
|
50
|
+
# keep everything else
|
|
51
|
+
{ print }
|
|
52
|
+
'
|
package/mods/oma.ts
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* oh-my-agent — Command Code (commandcode.ai) mod bridge.
|
|
3
|
+
*
|
|
4
|
+
* SSOT source. `oma emit --target commandcode-mod` copies this file to
|
|
5
|
+
* `commandcode-mod/mods/oma.ts`, the entry `package.json#commandcode.mods`
|
|
6
|
+
* lists, so `cmd mods add oh-my-agent-commandcode` (or a local path) loads it.
|
|
7
|
+
*
|
|
8
|
+
* Command Code's settings-file hooks (`.agents/hooks/variants/commandcode.json`)
|
|
9
|
+
* cover SessionStart / PostToolUse / Stop only — there is no prompt-submit
|
|
10
|
+
* hook. A mod sees the full lifecycle through `cmd.hooks({...})`, so this
|
|
11
|
+
* bridge maps the Command Code ModApi hooks onto oma's vendor-agnostic core
|
|
12
|
+
* handlers the same way the opencode bridge does: every handler runs as a
|
|
13
|
+
* subprocess of the installed `oma` CLI (`oma hook script --vendor commandcode
|
|
14
|
+
* --script <name>`), which answers in the commandcode dialect (Claude-shaped
|
|
15
|
+
* JSON: `hookSpecificOutput.additionalContext`, `updatedInput`,
|
|
16
|
+
* `permissionDecision`, `{decision: "block", reason}`). Extraction is
|
|
17
|
+
* defensive (top-level OR `hookSpecificOutput`).
|
|
18
|
+
*
|
|
19
|
+
* Dependency-free: no `@commandcode/harness` import (the types are bundled
|
|
20
|
+
* with the CLI, not installable), and the ModApi shape is satisfied
|
|
21
|
+
* structurally. Fail-open everywhere: a missing `oma` binary, a timeout or
|
|
22
|
+
* malformed output leaves the host unchanged. Command Code also catches a
|
|
23
|
+
* throwing hook (`mod_error`), so nothing here can crash a session.
|
|
24
|
+
*
|
|
25
|
+
* Hook mapping:
|
|
26
|
+
* transformInput ← UserPromptSubmit
|
|
27
|
+
* Runs keyword-detector + skill-injector on the typed prompt and stashes
|
|
28
|
+
* the returned context. Returns `{action: "continue"}` — the prompt
|
|
29
|
+
* itself is never rewritten.
|
|
30
|
+
* appendSystemPrompt ← context injection
|
|
31
|
+
* Appends the stashed session-start and prompt context to the system
|
|
32
|
+
* prompt. The value only changes when a new prompt is typed or a session
|
|
33
|
+
* starts, so it stays byte-stable across the rounds of one run (the
|
|
34
|
+
* provider prompt cache keys off the bytes).
|
|
35
|
+
* onSessionStart ← SessionStart
|
|
36
|
+
* Runs code-intelligence-primer + state-boundary (the commandcode
|
|
37
|
+
* SessionStart chain) and stashes their context.
|
|
38
|
+
* beforeToolCall ← PreToolUse (shell_command only)
|
|
39
|
+
* scm-guard first: a deny becomes `{block: true, additionalContext}`
|
|
40
|
+
* (the reason becomes the tool result the model sees). Then test-filter
|
|
41
|
+
* rewrites test-runner invocations via `{input: {...input, command}}`.
|
|
42
|
+
* onStop ← Stop (persistent-mode)
|
|
43
|
+
* Runs persistent-mode; a block decision becomes `{continue: true,
|
|
44
|
+
* reason}` — Command Code's documented force-continue channel (capped at
|
|
45
|
+
* 8 consecutive continuations by the host; persistent-mode's own
|
|
46
|
+
* reinforcement cap terminates first). The run-end hook cannot alter
|
|
47
|
+
* the result, so it is not used for this.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
import { spawnSync } from "node:child_process";
|
|
51
|
+
import { fileURLToPath } from "node:url";
|
|
52
|
+
|
|
53
|
+
/** persistent-mode may run a goal stop gate (25s cap); the rest keep 5s. */
|
|
54
|
+
const PERSISTENT_MODE_TIMEOUT_MS = 30_000;
|
|
55
|
+
const DEFAULT_TIMEOUT_MS = 5_000;
|
|
56
|
+
|
|
57
|
+
/** Command Code's shell tool (`cmd mods inspect` and the bundled examples). */
|
|
58
|
+
const SHELL_TOOLS = new Set(["shell_command", "bash"]);
|
|
59
|
+
|
|
60
|
+
// ── Structural ModApi subset ──────────────────────────────────
|
|
61
|
+
|
|
62
|
+
type TransformInputResult =
|
|
63
|
+
| { action: "continue" }
|
|
64
|
+
| { action: "transform"; text: string }
|
|
65
|
+
| { action: "handled"; message?: string };
|
|
66
|
+
|
|
67
|
+
interface BeforeToolCallResult {
|
|
68
|
+
block?: boolean;
|
|
69
|
+
additionalContext?: string;
|
|
70
|
+
input?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface OmaModHooks {
|
|
74
|
+
transformInput?: (args: {
|
|
75
|
+
text: string;
|
|
76
|
+
}) =>
|
|
77
|
+
| TransformInputResult
|
|
78
|
+
| undefined
|
|
79
|
+
| Promise<TransformInputResult | undefined>;
|
|
80
|
+
appendSystemPrompt?: (args: {
|
|
81
|
+
state?: unknown;
|
|
82
|
+
}) => string | undefined | Promise<string | undefined>;
|
|
83
|
+
onSessionStart?: (args: { source?: string }) => void | Promise<void>;
|
|
84
|
+
beforeToolCall?: (args: {
|
|
85
|
+
toolCallId?: string;
|
|
86
|
+
toolName: string;
|
|
87
|
+
input: Record<string, unknown>;
|
|
88
|
+
state?: unknown;
|
|
89
|
+
}) =>
|
|
90
|
+
| BeforeToolCallResult
|
|
91
|
+
| undefined
|
|
92
|
+
| Promise<BeforeToolCallResult | undefined>;
|
|
93
|
+
onStop?: (args: {
|
|
94
|
+
state?: unknown;
|
|
95
|
+
stopReason?: string;
|
|
96
|
+
turnNumber?: number;
|
|
97
|
+
lastAssistantText?: string;
|
|
98
|
+
}) =>
|
|
99
|
+
| { continue?: boolean; reason?: string }
|
|
100
|
+
| undefined
|
|
101
|
+
| Promise<{ continue?: boolean; reason?: string } | undefined>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** The ModApi members this bridge touches; the real `ModApi` is a superset. */
|
|
105
|
+
export interface OmaModApi {
|
|
106
|
+
cwd?: string;
|
|
107
|
+
hooks: (hooks: OmaModHooks) => unknown;
|
|
108
|
+
on?: (
|
|
109
|
+
event: string,
|
|
110
|
+
handler: (event: Record<string, unknown>) => void,
|
|
111
|
+
) => unknown;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ── Subprocess dispatch ───────────────────────────────────────
|
|
115
|
+
|
|
116
|
+
/** Directory of this mod; exported so test-filter can find filter-test-output.sh. */
|
|
117
|
+
function bridgeDir(): string {
|
|
118
|
+
try {
|
|
119
|
+
return fileURLToPath(new URL("..", import.meta.url));
|
|
120
|
+
} catch {
|
|
121
|
+
return "";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Run one oma core handler through the installed CLI: JSON on stdin, JSON on
|
|
127
|
+
* stdout. Fail-open (null) on any error. `cwd` is the Command Code workspace
|
|
128
|
+
* root so the handler resolves the project the same way every other vendor
|
|
129
|
+
* does. A non-zero exit (persistent-mode blocks with exit 2) is expected and
|
|
130
|
+
* stdout is still parsed.
|
|
131
|
+
*/
|
|
132
|
+
function runCore(
|
|
133
|
+
script: string,
|
|
134
|
+
payload: Record<string, unknown>,
|
|
135
|
+
cwd: string,
|
|
136
|
+
timeoutMs = DEFAULT_TIMEOUT_MS,
|
|
137
|
+
): Record<string, unknown> | null {
|
|
138
|
+
try {
|
|
139
|
+
const bin = process.env.OMA_BIN || "oma";
|
|
140
|
+
const dir = bridgeDir();
|
|
141
|
+
const res = spawnSync(
|
|
142
|
+
bin,
|
|
143
|
+
["hook", "script", "--vendor", "commandcode", "--script", script],
|
|
144
|
+
{
|
|
145
|
+
input: JSON.stringify(payload),
|
|
146
|
+
cwd,
|
|
147
|
+
encoding: "utf-8",
|
|
148
|
+
timeout: timeoutMs,
|
|
149
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
150
|
+
env: dir ? { ...process.env, OMA_HOOK_BRIDGE_DIR: dir } : process.env,
|
|
151
|
+
// A bare binary name on Windows resolves through PATHEXT (`oma.cmd`,
|
|
152
|
+
// `oma.exe`) only via the shell; the args are fixed literals.
|
|
153
|
+
shell: process.platform === "win32" && !/[\\/]/.test(bin),
|
|
154
|
+
},
|
|
155
|
+
);
|
|
156
|
+
const out = (res.stdout ?? "").trim();
|
|
157
|
+
if (!out) return null;
|
|
158
|
+
return JSON.parse(out) as Record<string, unknown>;
|
|
159
|
+
} catch {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// ── Dialect extraction ────────────────────────────────────────
|
|
165
|
+
|
|
166
|
+
function extractAdditionalContext(
|
|
167
|
+
out: Record<string, unknown> | null,
|
|
168
|
+
): string | null {
|
|
169
|
+
if (!out) return null;
|
|
170
|
+
if (typeof out.additionalContext === "string" && out.additionalContext) {
|
|
171
|
+
return out.additionalContext;
|
|
172
|
+
}
|
|
173
|
+
const hso = out.hookSpecificOutput;
|
|
174
|
+
if (hso && typeof hso === "object") {
|
|
175
|
+
const nested = (hso as Record<string, unknown>).additionalContext;
|
|
176
|
+
if (typeof nested === "string" && nested) return nested;
|
|
177
|
+
}
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function extractUpdatedInput(
|
|
182
|
+
out: Record<string, unknown> | null,
|
|
183
|
+
): Record<string, unknown> | null {
|
|
184
|
+
if (!out) return null;
|
|
185
|
+
const read = (v: unknown): Record<string, unknown> | null =>
|
|
186
|
+
v && typeof v === "object" && !Array.isArray(v)
|
|
187
|
+
? (v as Record<string, unknown>)
|
|
188
|
+
: null;
|
|
189
|
+
const direct = read(out.updatedInput);
|
|
190
|
+
if (direct) return direct;
|
|
191
|
+
const hso = out.hookSpecificOutput;
|
|
192
|
+
if (hso && typeof hso === "object") {
|
|
193
|
+
return read((hso as Record<string, unknown>).updatedInput);
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function extractDenyReason(out: Record<string, unknown> | null): string | null {
|
|
199
|
+
if (!out) return null;
|
|
200
|
+
const hso = out.hookSpecificOutput;
|
|
201
|
+
if (hso && typeof hso === "object") {
|
|
202
|
+
const h = hso as Record<string, unknown>;
|
|
203
|
+
if (h.permissionDecision === "deny") {
|
|
204
|
+
return typeof h.permissionDecisionReason === "string" &&
|
|
205
|
+
h.permissionDecisionReason
|
|
206
|
+
? h.permissionDecisionReason
|
|
207
|
+
: "Blocked by oma scm-guard.";
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (out.permission === "deny" || out.decision === "deny") {
|
|
211
|
+
const reason = out.user_message ?? out.reason;
|
|
212
|
+
return typeof reason === "string" && reason
|
|
213
|
+
? reason
|
|
214
|
+
: "Blocked by oma scm-guard.";
|
|
215
|
+
}
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// ── Mod factory ───────────────────────────────────────────────
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* oh-my-agent Command Code mod.
|
|
223
|
+
*
|
|
224
|
+
* @satisfies ModFactory
|
|
225
|
+
*/
|
|
226
|
+
export default function omaMod(cmd: OmaModApi): void {
|
|
227
|
+
const cwd = cmd.cwd || process.cwd();
|
|
228
|
+
|
|
229
|
+
// The host session id arrives on `run_start` (and `session_start`), which
|
|
230
|
+
// fire AFTER the first transformInput. persistent-mode state is keyed by
|
|
231
|
+
// session, so the id is locked at first dispatch: a real id learned before
|
|
232
|
+
// then wins, otherwise a per-process fallback keeps every handler of this
|
|
233
|
+
// session on one key.
|
|
234
|
+
const fallbackSessionId = `commandcode-${process.pid}-${Date.now().toString(36)}`;
|
|
235
|
+
let hostSessionId = "";
|
|
236
|
+
let lockedSessionId = "";
|
|
237
|
+
const sessionId = (): string => {
|
|
238
|
+
if (!lockedSessionId) lockedSessionId = hostSessionId || fallbackSessionId;
|
|
239
|
+
return lockedSessionId;
|
|
240
|
+
};
|
|
241
|
+
const learnSessionId = (event: Record<string, unknown>): void => {
|
|
242
|
+
const id = event.sessionId;
|
|
243
|
+
if (typeof id === "string" && id && !hostSessionId) hostSessionId = id;
|
|
244
|
+
};
|
|
245
|
+
try {
|
|
246
|
+
cmd.on?.("run_start", learnSessionId);
|
|
247
|
+
cmd.on?.("session_start", learnSessionId);
|
|
248
|
+
} catch {
|
|
249
|
+
// Observation only — never fail the factory.
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
let sessionContext = "";
|
|
253
|
+
let promptContext = "";
|
|
254
|
+
|
|
255
|
+
cmd.hooks({
|
|
256
|
+
onSessionStart: ({ source }) => {
|
|
257
|
+
const payload = {
|
|
258
|
+
prompt: "",
|
|
259
|
+
cwd,
|
|
260
|
+
sessionId: sessionId(),
|
|
261
|
+
hook_event_name: "SessionStart",
|
|
262
|
+
...(source ? { source } : {}),
|
|
263
|
+
};
|
|
264
|
+
const parts: string[] = [];
|
|
265
|
+
for (const script of [
|
|
266
|
+
"code-intelligence-primer.ts",
|
|
267
|
+
"state-boundary.ts",
|
|
268
|
+
]) {
|
|
269
|
+
const ctx = extractAdditionalContext(runCore(script, payload, cwd));
|
|
270
|
+
if (ctx) parts.push(ctx);
|
|
271
|
+
}
|
|
272
|
+
sessionContext = parts.join("\n\n");
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
transformInput: ({ text }) => {
|
|
276
|
+
const payload = {
|
|
277
|
+
prompt: text,
|
|
278
|
+
cwd,
|
|
279
|
+
sessionId: sessionId(),
|
|
280
|
+
hook_event_name: "UserPromptSubmit",
|
|
281
|
+
};
|
|
282
|
+
const parts: string[] = [];
|
|
283
|
+
for (const script of ["keyword-detector.ts", "skill-injector.ts"]) {
|
|
284
|
+
const ctx = extractAdditionalContext(runCore(script, payload, cwd));
|
|
285
|
+
if (ctx) parts.push(ctx);
|
|
286
|
+
}
|
|
287
|
+
// Overwrite — even with "" — so a previous prompt's context is never
|
|
288
|
+
// re-injected for this one.
|
|
289
|
+
promptContext = parts.join("\n\n");
|
|
290
|
+
return { action: "continue" };
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
appendSystemPrompt: () => {
|
|
294
|
+
const joined = [sessionContext, promptContext]
|
|
295
|
+
.filter(Boolean)
|
|
296
|
+
.join("\n\n");
|
|
297
|
+
return joined || undefined;
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
beforeToolCall: ({ toolName, input }) => {
|
|
301
|
+
if (!SHELL_TOOLS.has(toolName)) return undefined;
|
|
302
|
+
const command = input?.command;
|
|
303
|
+
if (typeof command !== "string" || !command) return undefined;
|
|
304
|
+
const payload = {
|
|
305
|
+
tool_name: "Bash",
|
|
306
|
+
tool_input: { command },
|
|
307
|
+
cwd,
|
|
308
|
+
sessionId: sessionId(),
|
|
309
|
+
hook_event_name: "PreToolUse",
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
const denyReason = extractDenyReason(
|
|
313
|
+
runCore("scm-guard.ts", payload, cwd),
|
|
314
|
+
);
|
|
315
|
+
if (denyReason) return { block: true, additionalContext: denyReason };
|
|
316
|
+
|
|
317
|
+
const updated = extractUpdatedInput(
|
|
318
|
+
runCore("test-filter.ts", payload, cwd),
|
|
319
|
+
);
|
|
320
|
+
const rewritten = updated?.command;
|
|
321
|
+
if (typeof rewritten === "string" && rewritten && rewritten !== command) {
|
|
322
|
+
return { input: { ...input, command: rewritten } };
|
|
323
|
+
}
|
|
324
|
+
return undefined;
|
|
325
|
+
},
|
|
326
|
+
|
|
327
|
+
onStop: ({ lastAssistantText }) => {
|
|
328
|
+
const pm = runCore(
|
|
329
|
+
"persistent-mode.ts",
|
|
330
|
+
{
|
|
331
|
+
cwd,
|
|
332
|
+
sessionId: sessionId(),
|
|
333
|
+
hook_event_name: "Stop",
|
|
334
|
+
...(lastAssistantText ? { response: lastAssistantText } : {}),
|
|
335
|
+
},
|
|
336
|
+
cwd,
|
|
337
|
+
PERSISTENT_MODE_TIMEOUT_MS,
|
|
338
|
+
);
|
|
339
|
+
if (pm?.decision !== "block") return undefined;
|
|
340
|
+
const reason =
|
|
341
|
+
typeof pm.reason === "string" && pm.reason
|
|
342
|
+
? pm.reason
|
|
343
|
+
: "The active OMA workflow is not complete. Continue executing it.";
|
|
344
|
+
return { continue: true, reason };
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-agent-commandcode",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "20.38.4",
|
|
4
|
+
"description": "oh-my-agent hooks and skills for Command Code",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://firstfluke.com/oh-my-agent",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/first-fluke/oh-my-agent"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"cmd-mod",
|
|
14
|
+
"cmd-mod-hook",
|
|
15
|
+
"agent-skills",
|
|
16
|
+
"oh-my-agent"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"mods",
|
|
20
|
+
"skills",
|
|
21
|
+
"filter-test-output.sh",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"commandcode": {
|
|
25
|
+
"mods": [
|
|
26
|
+
"./mods/oma.ts"
|
|
27
|
+
],
|
|
28
|
+
"skills": [
|
|
29
|
+
"./skills"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Experiment Ledger
|
|
2
|
+
|
|
3
|
+
Load when comparing an actual hypothesis with a baseline or another approach. Routine implementation, formatting, and every failed check do not require experiment bookkeeping.
|
|
4
|
+
|
|
5
|
+
## Location and ownership
|
|
6
|
+
|
|
7
|
+
Use `../runtime/memory-protocol.md` for the configured coordination store. The default is `.agents/state/memories/experiment-ledger-{sessionId}.md`. The coordinator maintains the shared ledger; parallel agents write task/run-scoped results for the coordinator to merge, avoiding concurrent edits to the same table. Reuse an existing experiment artifact when it already carries the evidence.
|
|
8
|
+
|
|
9
|
+
## Record a comparison
|
|
10
|
+
|
|
11
|
+
1. State the hypothesis, affected scope, baseline revision, and success criteria before changing behavior.
|
|
12
|
+
2. Capture comparable baseline and candidate measurements as described in `quality-score.md`. Preserve required binary checks and raw evidence paths.
|
|
13
|
+
3. Record the decision and reason: retain, repair, discard, or inconclusive. A missing or noisy measurement is not a loss. Do not rank unrelated tasks or agents by average score delta.
|
|
14
|
+
4. If discarding, remove only changes owned by that experiment after inspecting the diff. Preserve user edits, other agents' work, and useful failure evidence.
|
|
15
|
+
|
|
16
|
+
Suggested fields, not a parsed schema:
|
|
17
|
+
|
|
18
|
+
| Experiment / task / run | Hypothesis | Baseline evidence | Candidate evidence | Required checks | Decision and reason | Changed paths |
|
|
19
|
+
|---|---|---|---|---|---|---|
|
|
20
|
+
| IDs from active run | Specific mechanism | Revision and report | Revision and report | pass / fail / missing | retain / repair / discard / inconclusive | Owned files |
|
|
21
|
+
|
|
22
|
+
Keep units and comparison criteria beside metric deltas. A scalar composite is optional only when the project already defines and computes it; there is no OMA default formula.
|
|
23
|
+
|
|
24
|
+
## End of an experiment
|
|
25
|
+
|
|
26
|
+
Summarize the selected approach, unresolved limits, and evidence. A discarded attempt becomes a lesson only when its cause and reusable prevention are understood (`../core/lessons-learned.md`). Do not generate lessons or modify canonical skills from a numeric threshold.
|
|
27
|
+
|
|
28
|
+
The ledger records work; it does not grant more retries, spending, commits, or permission to remove workspaces. Those follow the active task budget and `../core/execution-policy.md`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Hypothesis Exploration
|
|
2
|
+
|
|
3
|
+
Load when the user requests alternative approaches, or when the same issue persists after repeated relevant recovery and a different mechanism is worth testing. A failed check count is a prompt to reassess the cause, not an unconditional launch signal. Do not activate for an obvious fix or a noisy metric delta.
|
|
4
|
+
|
|
5
|
+
## Scope and budget
|
|
6
|
+
|
|
7
|
+
Use the task's existing aggregate attempt and cost budget. Each hypothesis consumes an attempt; exploration never replenishes retries. For a comparison round, reserve all intended attempts before starting. If the existing workflow requires a multi-candidate round and fewer than two attempts remain, preserve evidence and report the unresolved result instead of starting a partial round. Explicit user, runtime, and workflow limits take precedence; this guide does not add turn quotas or file-count caps.
|
|
8
|
+
|
|
9
|
+
## Procedure
|
|
10
|
+
|
|
11
|
+
1. Inspect prior failure evidence. State distinct causal hypotheses and the smallest experiment that distinguishes them. Use only as many alternatives as the uncertainty and budget justify; the active workflow may specify the candidate count.
|
|
12
|
+
2. Identify ownership, baseline revision, required checks, comparison metrics, and artifact paths before editing. Include tests and related files needed to evaluate the mechanism; a fixed file limit must not hide impact.
|
|
13
|
+
3. Isolate alternatives. In authorized multi-agent work, use separate prepared workspaces and preserve the plan task ID and unique run ID in each result. In sequential work, preserve a baseline and apply only the experiment's scoped diff. Do not use a blanket stash, reset, checkout, or cleanup against a workspace with unrelated changes.
|
|
14
|
+
4. Run relevant checks and comparable measurements under `quality-score.md`. Missing evidence remains missing; a candidate with failing required checks cannot win through a higher aggregate score.
|
|
15
|
+
5. Select a candidate only when it satisfies the required behavior and comparison criteria. Apply its owned changes to the target, then refresh affected verification on the integrated result. Preserve diagnostic evidence from other candidates; do not delete unrelated work or an active workspace.
|
|
16
|
+
6. Record the comparison and decision in `experiment-ledger.md`. If no candidate resolves the issue, report the evidence and remaining limitation. Continue only within the existing recovery budget and authorized scope.
|
|
17
|
+
|
|
18
|
+
## Workflow integration
|
|
19
|
+
|
|
20
|
+
`/work`, `/orchestrate`, and `/ultrawork` retain their dispatch, required review, and recovery limits. They call this procedure after reassessing a repeated failure, then re-evaluate the failed gate using actual acceptance evidence. This guide does not start a workflow or delegate work by itself.
|
|
21
|
+
|
|
22
|
+
Use `../runtime/result-contract.md` for task/run/claim identity and `../core/execution-policy.md` for authorization, clarification, and completion.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Quality Measurements
|
|
2
|
+
|
|
3
|
+
Load when the task or active workflow needs a measured baseline or experiment comparison with defined metrics. The mere presence of tests or lint does not activate a scoring phase. Ordinary verification uses the applicable checks directly.
|
|
4
|
+
|
|
5
|
+
## Preserve independent acceptance gates
|
|
6
|
+
|
|
7
|
+
Tests, authorization/security requirements, and project acceptance criteria remain independent gates. A performance improvement cannot offset a correctness or security failure. Do not assign default weights, convert checklist completion into a security score, or trigger rollback from an arbitrary grade.
|
|
8
|
+
|
|
9
|
+
<!-- oma-docs:ignore-start -->
|
|
10
|
+
OMA does not implement a loader for `.agents/config/quality-score.yaml` or a universal composite scorer. If a project already provides a scoring command, record its formula, inputs, applicability, and output; do not infer configuration support from a sample path. A project composite may supplement the evidence but cannot waive mandatory checks.
|
|
11
|
+
<!-- oma-docs:ignore-end -->
|
|
12
|
+
|
|
13
|
+
## Measure a comparable baseline
|
|
14
|
+
|
|
15
|
+
1. Define the behavior, metric, units, direction, scope, and acceptance threshold from the task or project. Use the same command, dataset, environment, and measurement method before and after.
|
|
16
|
+
2. Reuse still-current verification artifacts. When new measurements are needed, capture the command's exit status and structured output (JSON, JUnit, SARIF, LCOV, or project equivalent). Do not infer totals from truncated console text.
|
|
17
|
+
3. Record the artifact path and revision/run identity with the result. Mark unavailable measurements as missing with a reason; estimates are labeled and excluded from measured comparisons.
|
|
18
|
+
4. Compare each applicable measure and check result. For noisy metrics, use the project's sampling/tolerance method; a single timing sample does not prove a regression.
|
|
19
|
+
5. Keep a change when it meets required behavior and comparison criteria. Investigate a regression before deciding whether to repair or discard the experiment; preserve unrelated work. Record a material tradeoff when requirements permit it.
|
|
20
|
+
|
|
21
|
+
For an actual experiment, use `experiment-ledger.md`. Ordinary test passes do not require a ledger row or a new measurement at every phase. Re-measure only affected metrics after relevant changes, failures, or uncertainty.
|
|
22
|
+
|
|
23
|
+
## Evidence record
|
|
24
|
+
|
|
25
|
+
Use existing result artifacts or a compact table such as:
|
|
26
|
+
|
|
27
|
+
| Measure | Baseline | Candidate | Method / evidence | Verdict |
|
|
28
|
+
|---|---|---|---|---|
|
|
29
|
+
| Required tests | pass | pass | exact command, exit status, report paths | pass |
|
|
30
|
+
| Request p95 latency | measured ms | measured ms | same workload, environment, sample method | within target / regression / inconclusive |
|
|
31
|
+
| Security finding | finding ID | remediation status | reproduction and verification paths | resolved / unresolved |
|
|
32
|
+
|
|
33
|
+
Report missing evidence without inventing a score. Authorization, builds, verification, and completion follow `../core/execution-policy.md`.
|