dsh-compound-engineering 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +160 -2
- package/README.zh.md +161 -0
- package/cordis.patch.yml +6 -0
- package/lib/frontmatter.js +167 -0
- package/lib/index.js +46 -0
- package/lib/provider.js +201 -0
- package/package.json +62 -4
- package/skills/CODING_STANDARDS.md +68 -0
- package/skills/ce-babysit-pr/SKILL.md +59 -0
- package/skills/ce-babysit-pr/references/branch-currency.md +22 -0
- package/skills/ce-babysit-pr/references/envelope.md +44 -0
- package/skills/ce-babysit-pr/references/pipeline.md +15 -0
- package/skills/ce-babysit-pr/references/report.md +20 -0
- package/skills/ce-babysit-pr/references/settle.md +37 -0
- package/skills/ce-babysit-pr/references/setup.md +33 -0
- package/skills/ce-babysit-pr/references/stack-commands.md +39 -0
- package/skills/ce-babysit-pr/references/stack.md +43 -0
- package/skills/ce-babysit-pr/references/tick.md +102 -0
- package/skills/ce-babysit-pr/references/watch-loop.md +222 -0
- package/skills/ce-babysit-pr/scripts/pr-snapshot +3656 -0
- package/skills/ce-bakeoff/SKILL.md +48 -0
- package/skills/ce-bakeoff/references/candidates.md +37 -0
- package/skills/ce-bakeoff/references/judging.md +19 -0
- package/skills/ce-bakeoff/references/output.md +11 -0
- package/skills/ce-bakeoff/references/verification.md +15 -0
- package/skills/ce-brainstorm/SKILL.md +69 -0
- package/skills/ce-brainstorm/references/agents/slack-researcher.md +127 -0
- package/skills/ce-brainstorm/references/approaches.md +57 -0
- package/skills/ce-brainstorm/references/bakeoff.md +9 -0
- package/skills/ce-brainstorm/references/blindspot-pass.md +70 -0
- package/skills/ce-brainstorm/references/brainstorm-sections.md +458 -0
- package/skills/ce-brainstorm/references/dialogue.md +89 -0
- package/skills/ce-brainstorm/references/handoff.md +187 -0
- package/skills/ce-brainstorm/references/html-rendering.md +638 -0
- package/skills/ce-brainstorm/references/interaction-rules.md +33 -0
- package/skills/ce-brainstorm/references/markdown-rendering.md +242 -0
- package/skills/ce-brainstorm/references/model-tiers.md +13 -0
- package/skills/ce-brainstorm/references/output-mode.md +26 -0
- package/skills/ce-brainstorm/references/phase-0.md +104 -0
- package/skills/ce-brainstorm/references/plan-write.md +32 -0
- package/skills/ce-brainstorm/references/product-pressure-test.md +42 -0
- package/skills/ce-brainstorm/references/reasoning-elevation.md +124 -0
- package/skills/ce-brainstorm/references/settled-decisions.md +45 -0
- package/skills/ce-brainstorm/references/synthesis-summary.md +149 -0
- package/skills/ce-brainstorm/references/universal-brainstorming.md +72 -0
- package/skills/ce-brainstorm/references/verdict-routing.md +26 -0
- package/skills/ce-brainstorm/references/visual-probes.md +164 -0
- package/skills/ce-brainstorm/scripts/elevation-dispatch.sh +288 -0
- package/skills/ce-brainstorm/scripts/light-webserver.js +1275 -0
- package/skills/ce-brainstorm/scripts/packs-resolve.py +737 -0
- package/skills/ce-brainstorm/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-code-review/SKILL.md +40 -0
- package/skills/ce-code-review/references/action-class-rubric.md +67 -0
- package/skills/ce-code-review/references/cross-model-recovery.md +38 -0
- package/skills/ce-code-review/references/cross-model-review.md +191 -0
- package/skills/ce-code-review/references/depth-paths.md +32 -0
- package/skills/ce-code-review/references/diff-scope.md +59 -0
- package/skills/ce-code-review/references/dispatch-reviewers.md +135 -0
- package/skills/ce-code-review/references/findings-schema.json +125 -0
- package/skills/ce-code-review/references/finish-input.md +118 -0
- package/skills/ce-code-review/references/finish-review.md +202 -0
- package/skills/ce-code-review/references/intent-and-plan.md +73 -0
- package/skills/ce-code-review/references/modes-and-output.md +156 -0
- package/skills/ce-code-review/references/persona-catalog.md +66 -0
- package/skills/ce-code-review/references/personas/adversarial-reviewer.md +111 -0
- package/skills/ce-code-review/references/personas/agent-native-reviewer.md +173 -0
- package/skills/ce-code-review/references/personas/api-contract-reviewer.md +44 -0
- package/skills/ce-code-review/references/personas/correctness-reviewer.md +48 -0
- package/skills/ce-code-review/references/personas/data-migration-reviewer.md +111 -0
- package/skills/ce-code-review/references/personas/deployment-verification-agent.md +157 -0
- package/skills/ce-code-review/references/personas/julik-frontend-races-reviewer.md +45 -0
- package/skills/ce-code-review/references/personas/learnings-researcher.md +260 -0
- package/skills/ce-code-review/references/personas/maintainability-reviewer.md +85 -0
- package/skills/ce-code-review/references/personas/performance-reviewer.md +45 -0
- package/skills/ce-code-review/references/personas/previous-comments-reviewer.md +59 -0
- package/skills/ce-code-review/references/personas/project-standards-reviewer.md +77 -0
- package/skills/ce-code-review/references/personas/reliability-reviewer.md +49 -0
- package/skills/ce-code-review/references/personas/security-reviewer.md +50 -0
- package/skills/ce-code-review/references/personas/swift-ios-reviewer.md +99 -0
- package/skills/ce-code-review/references/personas/testing-reviewer.md +51 -0
- package/skills/ce-code-review/references/review-output-template.md +172 -0
- package/skills/ce-code-review/references/scope.md +176 -0
- package/skills/ce-code-review/references/select-and-route.md +93 -0
- package/skills/ce-code-review/references/subagent-template.md +206 -0
- package/skills/ce-code-review/references/validator-batch-template.md +67 -0
- package/skills/ce-code-review/scripts/cross-model-adversarial-review.sh +1275 -0
- package/skills/ce-code-review/scripts/findings-mechanics.py +274 -0
- package/skills/ce-code-review/scripts/packs-resolve.py +737 -0
- package/skills/ce-code-review/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-code-review/scripts/review-scope.py +419 -0
- package/skills/ce-code-review/scripts/run-log.py +280 -0
- package/skills/ce-commit/SKILL.md +60 -0
- package/skills/ce-commit-push-pr/SKILL.md +69 -0
- package/skills/ce-commit-push-pr/references/apply-and-handoff.md +79 -0
- package/skills/ce-commit-push-pr/references/branch-creation.md +47 -0
- package/skills/ce-commit-push-pr/references/commit-and-push.md +26 -0
- package/skills/ce-commit-push-pr/references/compose.md +29 -0
- package/skills/ce-commit-push-pr/references/context.md +42 -0
- package/skills/ce-commit-push-pr/references/gh-stack-cli.md +83 -0
- package/skills/ce-commit-push-pr/references/pr-description-writing.md +208 -0
- package/skills/ce-commit-push-pr/references/stack-submit.md +81 -0
- package/skills/ce-compound/SKILL.md +79 -0
- package/skills/ce-compound/assets/resolution-template.md +96 -0
- package/skills/ce-compound/references/agents/best-practices-researcher.md +115 -0
- package/skills/ce-compound/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-compound/references/agents/framework-docs-researcher.md +93 -0
- package/skills/ce-compound/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-compound/references/agents/performance-oracle.md +108 -0
- package/skills/ce-compound/references/agents/security-sentinel.md +91 -0
- package/skills/ce-compound/references/agents/session-historian.md +82 -0
- package/skills/ce-compound/references/assembly.md +127 -0
- package/skills/ce-compound/references/concepts-vocabulary.md +98 -0
- package/skills/ce-compound/references/enhancement.md +42 -0
- package/skills/ce-compound/references/grounding-validation.md +89 -0
- package/skills/ce-compound/references/lightweight.md +56 -0
- package/skills/ce-compound/references/modes.md +13 -0
- package/skills/ce-compound/references/refresh-and-discoverability.md +96 -0
- package/skills/ce-compound/references/report.md +115 -0
- package/skills/ce-compound/references/research.md +144 -0
- package/skills/ce-compound/references/schema.yaml +236 -0
- package/skills/ce-compound/references/session-history.md +73 -0
- package/skills/ce-compound/references/yaml-schema.md +130 -0
- package/skills/ce-compound/scripts/packs-resolve.py +737 -0
- package/skills/ce-compound/scripts/session-history/__pycache__/dsh_session.cpython-314.pyc +0 -0
- package/skills/ce-compound/scripts/session-history/discover-sessions.sh +290 -0
- package/skills/ce-compound/scripts/session-history/discover_dsh.py +123 -0
- package/skills/ce-compound/scripts/session-history/dsh_session.py +225 -0
- package/skills/ce-compound/scripts/session-history/extract-errors.py +178 -0
- package/skills/ce-compound/scripts/session-history/extract-metadata.py +301 -0
- package/skills/ce-compound/scripts/session-history/extract-skeleton.py +346 -0
- package/skills/ce-compound/scripts/validate-doc-claims.py +497 -0
- package/skills/ce-compound/scripts/validate-frontmatter.py +137 -0
- package/skills/ce-compound-refresh/SKILL.md +88 -0
- package/skills/ce-compound-refresh/assets/resolution-template.md +96 -0
- package/skills/ce-compound-refresh/references/classify.md +42 -0
- package/skills/ce-compound-refresh/references/commit.md +7 -0
- package/skills/ce-compound-refresh/references/concepts-vocabulary.md +116 -0
- package/skills/ce-compound-refresh/references/discoverability.md +15 -0
- package/skills/ce-compound-refresh/references/investigate.md +23 -0
- package/skills/ce-compound-refresh/references/modes.md +27 -0
- package/skills/ce-compound-refresh/references/per-action-flows.md +142 -0
- package/skills/ce-compound-refresh/references/report.md +23 -0
- package/skills/ce-compound-refresh/references/schema.yaml +236 -0
- package/skills/ce-compound-refresh/references/scope.md +18 -0
- package/skills/ce-compound-refresh/references/worth-audit.md +35 -0
- package/skills/ce-compound-refresh/references/yaml-schema.md +130 -0
- package/skills/ce-compound-refresh/scripts/validate-doc-claims.py +497 -0
- package/skills/ce-compound-refresh/scripts/validate-frontmatter.py +137 -0
- package/skills/ce-debug/SKILL.md +122 -0
- package/skills/ce-debug/references/anti-patterns.md +91 -0
- package/skills/ce-debug/references/defense-in-depth.md +39 -0
- package/skills/ce-debug/references/fix.md +21 -0
- package/skills/ce-debug/references/investigate.md +114 -0
- package/skills/ce-debug/references/investigation-techniques.md +384 -0
- package/skills/ce-debug/references/pipeline-mode.md +78 -0
- package/skills/ce-debug/references/post-fix-handoff.md +60 -0
- package/skills/ce-debug/references/return-to-caller.md +57 -0
- package/skills/ce-doc-review/SKILL.md +75 -0
- package/skills/ce-doc-review/references/bulk-preview.md +146 -0
- package/skills/ce-doc-review/references/cross-model-review.md +207 -0
- package/skills/ce-doc-review/references/decision-primer.md +47 -0
- package/skills/ce-doc-review/references/dispatch.md +56 -0
- package/skills/ce-doc-review/references/document-intake.md +44 -0
- package/skills/ce-doc-review/references/findings-schema.json +85 -0
- package/skills/ce-doc-review/references/modes.md +20 -0
- package/skills/ce-doc-review/references/open-questions-defer.md +158 -0
- package/skills/ce-doc-review/references/persona-selection.md +41 -0
- package/skills/ce-doc-review/references/personas/adversarial-document-reviewer.md +109 -0
- package/skills/ce-doc-review/references/personas/coherence-reviewer.md +69 -0
- package/skills/ce-doc-review/references/personas/design-lens-reviewer.md +48 -0
- package/skills/ce-doc-review/references/personas/feasibility-reviewer.md +50 -0
- package/skills/ce-doc-review/references/personas/product-lens-reviewer.md +85 -0
- package/skills/ce-doc-review/references/personas/scope-guardian-reviewer.md +83 -0
- package/skills/ce-doc-review/references/personas/security-lens-reviewer.md +41 -0
- package/skills/ce-doc-review/references/personas/whole-doc-reviewer.md +25 -0
- package/skills/ce-doc-review/references/rendering-floor.md +175 -0
- package/skills/ce-doc-review/references/review-output-template.md +123 -0
- package/skills/ce-doc-review/references/subagent-template.md +188 -0
- package/skills/ce-doc-review/references/synthesis-and-presentation.md +350 -0
- package/skills/ce-doc-review/references/walkthrough.md +347 -0
- package/skills/ce-doc-review/scripts/cross-model-doc-review.sh +1270 -0
- package/skills/ce-doc-review/scripts/packs-resolve.py +737 -0
- package/skills/ce-doc-review/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-dogfood/SKILL.md +66 -0
- package/skills/ce-dogfood/agents/openai.yaml +2 -0
- package/skills/ce-dogfood/references/dogfood-report-template.md +97 -0
- package/skills/ce-dogfood/references/phases.md +167 -0
- package/skills/ce-dogfood/references/test-matrix-taxonomy.md +62 -0
- package/skills/ce-dogfood/scripts/packs-resolve.py +737 -0
- package/skills/ce-explain/SKILL.md +81 -0
- package/skills/ce-explain/references/agents/behavior-trace-scout.md +19 -0
- package/skills/ce-explain/references/agents/work-recap-scout.md +23 -0
- package/skills/ce-explain/references/check-in.md +18 -0
- package/skills/ce-explain/references/destinations.md +35 -0
- package/skills/ce-explain/references/explainer-html.md +29 -0
- package/skills/ce-explain/references/explainer-markdown.md +24 -0
- package/skills/ce-explain/references/intake.md +50 -0
- package/skills/ce-explain/references/orchestration.md +46 -0
- package/skills/ce-handoff/SKILL.md +54 -0
- package/skills/ce-handoff/references/create.md +88 -0
- package/skills/ce-handoff/references/resume.md +46 -0
- package/skills/ce-ideate/SKILL.md +75 -0
- package/skills/ce-ideate/references/agents/issue-intelligence-analyst.md +166 -0
- package/skills/ce-ideate/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-ideate/references/agents/slack-researcher.md +127 -0
- package/skills/ce-ideate/references/agents/web-researcher.md +121 -0
- package/skills/ce-ideate/references/decomposition.md +39 -0
- package/skills/ce-ideate/references/divergent-ideation.md +112 -0
- package/skills/ce-ideate/references/grounding.md +138 -0
- package/skills/ce-ideate/references/html-rendering.md +638 -0
- package/skills/ce-ideate/references/ideation-sections.md +191 -0
- package/skills/ce-ideate/references/issue-intelligence.md +44 -0
- package/skills/ce-ideate/references/markdown-rendering.md +242 -0
- package/skills/ce-ideate/references/output-mode.md +34 -0
- package/skills/ce-ideate/references/post-ideation-workflow.md +169 -0
- package/skills/ce-ideate/references/scope-gates.md +148 -0
- package/skills/ce-ideate/references/universal-ideation.md +119 -0
- package/skills/ce-ideate/references/user-research-artifacts.md +28 -0
- package/skills/ce-ideate/references/web-research-cache.md +56 -0
- package/skills/ce-noslop/SKILL.md +45 -0
- package/skills/ce-noslop/references/patterns.md +61 -0
- package/skills/ce-noslop/references/terminology.md +3 -0
- package/skills/ce-optimize/SKILL.md +64 -0
- package/skills/ce-optimize/references/agents/learnings-researcher.md +247 -0
- package/skills/ce-optimize/references/agents/repo-research-analyst.md +258 -0
- package/skills/ce-optimize/references/example-expensive-benchmark-spec.yaml +88 -0
- package/skills/ce-optimize/references/example-hard-spec.yaml +64 -0
- package/skills/ce-optimize/references/example-judge-spec.yaml +83 -0
- package/skills/ce-optimize/references/example-text-target-spec.yaml +80 -0
- package/skills/ce-optimize/references/experiment-log-schema.yaml +563 -0
- package/skills/ce-optimize/references/experiment-prompt-template.md +143 -0
- package/skills/ce-optimize/references/judge-prompt-template.md +117 -0
- package/skills/ce-optimize/references/loop.md +286 -0
- package/skills/ce-optimize/references/measurement.md +168 -0
- package/skills/ce-optimize/references/optimize-spec-schema.yaml +570 -0
- package/skills/ce-optimize/references/persistence.md +93 -0
- package/skills/ce-optimize/references/spec.md +107 -0
- package/skills/ce-optimize/references/text-targets.md +51 -0
- package/skills/ce-optimize/references/usage-guide.md +147 -0
- package/skills/ce-optimize/references/wrap-up.md +54 -0
- package/skills/ce-optimize/scripts/decide.mjs +676 -0
- package/skills/ce-optimize/scripts/experiment-worktree.sh +330 -0
- package/skills/ce-optimize/scripts/measure.sh +140 -0
- package/skills/ce-optimize/scripts/parallel-probe.sh +134 -0
- package/skills/ce-plan/SKILL.md +60 -0
- package/skills/ce-plan/references/agents/agent-native-planning-strategist.md +66 -0
- package/skills/ce-plan/references/agents/architecture-strategist.md +46 -0
- package/skills/ce-plan/references/agents/best-practices-researcher.md +118 -0
- package/skills/ce-plan/references/agents/data-integrity-guardian.md +68 -0
- package/skills/ce-plan/references/agents/framework-docs-researcher.md +97 -0
- package/skills/ce-plan/references/agents/git-history-analyzer.md +40 -0
- package/skills/ce-plan/references/agents/learnings-researcher.md +268 -0
- package/skills/ce-plan/references/agents/pattern-recognition-specialist.md +55 -0
- package/skills/ce-plan/references/agents/performance-oracle.md +108 -0
- package/skills/ce-plan/references/agents/repo-research-analyst.md +262 -0
- package/skills/ce-plan/references/agents/security-sentinel.md +91 -0
- package/skills/ce-plan/references/agents/slack-researcher.md +131 -0
- package/skills/ce-plan/references/agents/spec-flow-analyzer.md +84 -0
- package/skills/ce-plan/references/agents/web-researcher.md +125 -0
- package/skills/ce-plan/references/approach-altitude.md +55 -0
- package/skills/ce-plan/references/bakeoff.md +9 -0
- package/skills/ce-plan/references/deepening-workflow.md +263 -0
- package/skills/ce-plan/references/final-review.md +134 -0
- package/skills/ce-plan/references/html-rendering.md +638 -0
- package/skills/ce-plan/references/intake.md +158 -0
- package/skills/ce-plan/references/markdown-rendering.md +242 -0
- package/skills/ce-plan/references/output-contracts.md +29 -0
- package/skills/ce-plan/references/output-mode.md +45 -0
- package/skills/ce-plan/references/plan-handoff.md +116 -0
- package/skills/ce-plan/references/plan-sections.md +489 -0
- package/skills/ce-plan/references/reasoning-elevation.md +124 -0
- package/skills/ce-plan/references/research.md +211 -0
- package/skills/ce-plan/references/resume.md +61 -0
- package/skills/ce-plan/references/settled-decisions.md +45 -0
- package/skills/ce-plan/references/structure.md +207 -0
- package/skills/ce-plan/references/synthesis-summary.md +260 -0
- package/skills/ce-plan/references/universal-planning.md +170 -0
- package/skills/ce-plan/scripts/elevation-dispatch.sh +288 -0
- package/skills/ce-plan/scripts/packs-resolve.py +737 -0
- package/skills/ce-plan/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-polish/SKILL.md +22 -0
- package/skills/ce-polish/agents/openai.yaml +2 -0
- package/skills/ce-polish/references/dev-server-astro.md +58 -0
- package/skills/ce-polish/references/dev-server-detection.md +40 -0
- package/skills/ce-polish/references/dev-server-next.md +61 -0
- package/skills/ce-polish/references/dev-server-nuxt.md +58 -0
- package/skills/ce-polish/references/dev-server-procfile.md +59 -0
- package/skills/ce-polish/references/dev-server-rails.md +50 -0
- package/skills/ce-polish/references/dev-server-remix.md +58 -0
- package/skills/ce-polish/references/dev-server-sveltekit.md +58 -0
- package/skills/ce-polish/references/dev-server-vite.md +48 -0
- package/skills/ce-polish/references/install-riffrec.md +35 -0
- package/skills/ce-polish/references/launch-json-schema.md +177 -0
- package/skills/ce-polish/references/live-loop.md +98 -0
- package/skills/ce-polish/references/live-remote.md +35 -0
- package/skills/ce-polish/references/live-start.md +93 -0
- package/skills/ce-polish/references/live-stream-contract.md +253 -0
- package/skills/ce-polish/references/run.md +67 -0
- package/skills/ce-polish/scripts/detect-project-type.sh +277 -0
- package/skills/ce-polish/scripts/detect-riffrec.sh +225 -0
- package/skills/ce-polish/scripts/live-endpoint.js +2841 -0
- package/skills/ce-polish/scripts/read-launch-json.sh +117 -0
- package/skills/ce-polish/scripts/resolve-package-manager.sh +95 -0
- package/skills/ce-polish/scripts/resolve-port.sh +307 -0
- package/skills/ce-pov/SKILL.md +64 -0
- package/skills/ce-pov/references/agents/external-evidence-researcher.md +26 -0
- package/skills/ce-pov/references/agents/pov-peer.md +43 -0
- package/skills/ce-pov/references/agents/precedent-activity-scout.md +21 -0
- package/skills/ce-pov/references/agents/project-grounding-scout.md +32 -0
- package/skills/ce-pov/references/boundaries.md +36 -0
- package/skills/ce-pov/references/cross-model-panel.md +596 -0
- package/skills/ce-pov/references/followup.md +9 -0
- package/skills/ce-pov/references/grounding.md +47 -0
- package/skills/ce-pov/references/intake.md +61 -0
- package/skills/ce-pov/references/invocation.md +47 -0
- package/skills/ce-pov/references/method.md +68 -0
- package/skills/ce-pov/references/pov-schema.json +56 -0
- package/skills/ce-pov/references/report.md +7 -0
- package/skills/ce-pov/scripts/cross-model-pov.sh +1110 -0
- package/skills/ce-pov/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-product-pulse/SKILL.md +81 -0
- package/skills/ce-product-pulse/agents/openai.yaml +2 -0
- package/skills/ce-product-pulse/references/config.md +20 -0
- package/skills/ce-product-pulse/references/interview.md +260 -0
- package/skills/ce-product-pulse/references/report-template.md +89 -0
- package/skills/ce-product-pulse/references/run.md +46 -0
- package/skills/ce-product-pulse/references/setup.md +43 -0
- package/skills/ce-promote/SKILL.md +90 -0
- package/skills/ce-promote/agents/openai.yaml +2 -0
- package/skills/ce-promote/references/spiral-cli.md +149 -0
- package/skills/ce-proof/SKILL.md +65 -0
- package/skills/ce-proof/references/api.md +176 -0
- package/skills/ce-proof/references/workflows.md +124 -0
- package/skills/ce-prototype/SKILL.md +59 -0
- package/skills/ce-prototype/assets/annotate.css +206 -0
- package/skills/ce-prototype/assets/annotate.js +837 -0
- package/skills/ce-prototype/references/annotation-loop.md +32 -0
- package/skills/ce-prototype/references/build.md +39 -0
- package/skills/ce-prototype/references/craft-floor.md +43 -0
- package/skills/ce-prototype/references/preview.md +118 -0
- package/skills/ce-prototype/references/scoping.md +38 -0
- package/skills/ce-prototype/references/write-back.md +37 -0
- package/skills/ce-prototype/scripts/light-webserver.js +1275 -0
- package/skills/ce-resolve-pr-feedback/SKILL.md +60 -0
- package/skills/ce-resolve-pr-feedback/references/agents/pr-comment-resolver.md +59 -0
- package/skills/ce-resolve-pr-feedback/references/evaluation-rubric.md +141 -0
- package/skills/ce-resolve-pr-feedback/references/full-mode.md +336 -0
- package/skills/ce-resolve-pr-feedback/references/pipeline-mode.md +23 -0
- package/skills/ce-resolve-pr-feedback/references/resume.md +60 -0
- package/skills/ce-resolve-pr-feedback/references/return-to-caller.md +111 -0
- package/skills/ce-resolve-pr-feedback/references/targeted-mode.md +48 -0
- package/skills/ce-resolve-pr-feedback/scripts/get-pr-comments +176 -0
- package/skills/ce-resolve-pr-feedback/scripts/get-thread-for-comment +84 -0
- package/skills/ce-resolve-pr-feedback/scripts/pending-feedback.py +287 -0
- package/skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread +57 -0
- package/skills/ce-resolve-pr-feedback/scripts/resolve-pr-thread +23 -0
- package/skills/ce-retune/SKILL.md +42 -0
- package/skills/ce-retune/agents/openai.yaml +2 -0
- package/skills/ce-retune/references/baseline-mining.md +122 -0
- package/skills/ce-retune/references/corpus-audit.md +128 -0
- package/skills/ce-retune/references/cut-passes.md +129 -0
- package/skills/ce-retune/references/halt-taxonomy.md +123 -0
- package/skills/ce-retune/references/noise-floor.md +131 -0
- package/skills/ce-retune/references/workflow-shapes.md +73 -0
- package/skills/ce-riffrec-feedback-analysis/SKILL.md +33 -0
- package/skills/ce-riffrec-feedback-analysis/references/analyzer.md +18 -0
- package/skills/ce-riffrec-feedback-analysis/references/compound-engineering-feedback-format.md +116 -0
- package/skills/ce-riffrec-feedback-analysis/references/extensive-analysis.md +98 -0
- package/skills/ce-riffrec-feedback-analysis/references/install-riffrec.md +27 -0
- package/skills/ce-riffrec-feedback-analysis/references/quick-bug-report.md +38 -0
- package/skills/ce-riffrec-feedback-analysis/scripts/analyze_riffrec_zip.py +1306 -0
- package/skills/ce-setup/SKILL.md +103 -0
- package/skills/ce-setup/agents/openai.yaml +2 -0
- package/skills/ce-setup/assets/compounding-directive.md +11 -0
- package/skills/ce-setup/assets/noslop-directive.md +7 -0
- package/skills/ce-setup/assets/pack-rule-template.md +11 -0
- package/skills/ce-setup/references/acpx-cache-warm.md +14 -0
- package/skills/ce-setup/references/config-template.yaml +210 -0
- package/skills/ce-setup/references/legacy-codex-tool-map.md +15 -0
- package/skills/ce-setup/references/pack-scaffold.md +45 -0
- package/skills/ce-setup/references/repo-fixes.md +121 -0
- package/skills/ce-setup/scripts/check-health +929 -0
- package/skills/ce-setup/scripts/packs-resolve.py +737 -0
- package/skills/ce-simplify-code/SKILL.md +76 -0
- package/skills/ce-simplify-code/references/personas/code-quality-reviewer.md +17 -0
- package/skills/ce-simplify-code/references/personas/code-reuse-reviewer.md +7 -0
- package/skills/ce-simplify-code/references/personas/comment-reviewer.md +24 -0
- package/skills/ce-simplify-code/references/personas/efficiency-reviewer.md +11 -0
- package/skills/ce-simplify-code/references/personas/test-value-reviewer.md +23 -0
- package/skills/ce-simplify-code/references/reviewer-dispatch.md +11 -0
- package/skills/ce-simplify-code/references/standalone-report.md +25 -0
- package/skills/ce-strategy/SKILL.md +61 -0
- package/skills/ce-strategy/references/grounding.md +22 -0
- package/skills/ce-strategy/references/interview.md +179 -0
- package/skills/ce-strategy/references/strategy-template.md +94 -0
- package/skills/ce-strategy/references/update-run.md +33 -0
- package/skills/ce-sweep/SKILL.md +93 -0
- package/skills/ce-sweep/agents/openai.yaml +2 -0
- package/skills/ce-sweep/references/agents/media-analyzer.md +54 -0
- package/skills/ce-sweep/references/interview.md +208 -0
- package/skills/ce-sweep/references/model-tiers.md +13 -0
- package/skills/ce-sweep/references/plan-template.md +62 -0
- package/skills/ce-sweep/references/run.md +126 -0
- package/skills/ce-sweep/references/sources/email.md +57 -0
- package/skills/ce-sweep/references/sources/github-issues.md +59 -0
- package/skills/ce-sweep/references/sources/slack.md +61 -0
- package/skills/ce-sweep/references/state-schema.md +157 -0
- package/skills/ce-sweep/references/subagent-template.md +60 -0
- package/skills/ce-sweep/scripts/analyze_riffrec_zip.py +1306 -0
- package/skills/ce-sweep/scripts/sweep-state.py +793 -0
- package/skills/ce-test-browser/SKILL.md +50 -0
- package/skills/ce-test-browser/references/agent-browser-driver.md +47 -0
- package/skills/ce-test-browser/references/pipeline-orchestration.md +45 -0
- package/skills/ce-test-browser/references/route-and-report.md +129 -0
- package/skills/ce-test-browser/scripts/resolve-port.sh +41 -0
- package/skills/ce-test-xcode/SKILL.md +26 -0
- package/skills/ce-test-xcode/agents/openai.yaml +2 -0
- package/skills/ce-test-xcode/references/setup-and-build.md +32 -0
- package/skills/ce-test-xcode/references/test-and-report.md +64 -0
- package/skills/ce-work/SKILL.md +62 -0
- package/skills/ce-work/references/agents/figma-design-sync.md +27 -0
- package/skills/ce-work/references/agents/implementation-worker.md +17 -0
- package/skills/ce-work/references/cross-model-execution.md +191 -0
- package/skills/ce-work/references/execution-engines.md +64 -0
- package/skills/ce-work/references/execution-strategy.md +73 -0
- package/skills/ce-work/references/implementation-loop.md +107 -0
- package/skills/ce-work/references/implementation-result-schema.json +52 -0
- package/skills/ce-work/references/input-triage.md +50 -0
- package/skills/ce-work/references/non-code-execution.md +23 -0
- package/skills/ce-work/references/return-to-caller.md +33 -0
- package/skills/ce-work/references/review-findings-followup.md +82 -0
- package/skills/ce-work/references/shipping-workflow.md +89 -0
- package/skills/ce-work/references/tracker-defer.md +150 -0
- package/skills/ce-work/references/work-intake.md +51 -0
- package/skills/ce-work/references/workspace-setup.md +27 -0
- package/skills/ce-work/scripts/__pycache__/unit_workspace_jobs.cpython-314.pyc +0 -0
- package/skills/ce-work/scripts/__pycache__/unit_workspace_state.cpython-314.pyc +0 -0
- package/skills/ce-work/scripts/cross-model-work.sh +1385 -0
- package/skills/ce-work/scripts/peer-job-runner.py +2594 -0
- package/skills/ce-work/scripts/unit-workspace.py +215 -0
- package/skills/ce-work/scripts/unit_workspace_ignored.py +93 -0
- package/skills/ce-work/scripts/unit_workspace_integration.py +677 -0
- package/skills/ce-work/scripts/unit_workspace_jobs.py +1216 -0
- package/skills/ce-work/scripts/unit_workspace_lifecycle.py +981 -0
- package/skills/ce-work/scripts/unit_workspace_state.py +1379 -0
- package/skills/ce-work/scripts/unit_workspace_transaction.py +612 -0
- package/skills/ce-worktree/SKILL.md +54 -0
- package/skills/lfg/SKILL.md +59 -0
- package/skills/lfg/references/debug-return.md +25 -0
- package/skills/lfg/references/intake.md +30 -0
- package/skills/lfg/references/next-work-handoff.md +96 -0
- package/skills/lfg/references/plan-brief.md +36 -0
- package/skills/lfg/references/review-followup.md +78 -0
- package/skills/lfg/references/shipping.md +65 -0
- package/skills/lfg/references/stage-routing.md +49 -0
- package/skills/lfg/references/task-visibility.md +11 -0
- package/skills/lfg/references/tracker-defer.md +150 -0
- package/skills/lfg/references/work-return.md +27 -0
- package/skills/wtf/SKILL.md +33 -0
- package/skills/wtf/agents/openai.yaml +2 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Universal Planning Workflow
|
|
2
|
+
|
|
3
|
+
This file is loaded when ce-plan detects a non-software task (Phase 0.1b). It replaces the software-specific phases (0.2 through 5.1) with a domain-agnostic planning workflow.
|
|
4
|
+
|
|
5
|
+
## Before starting: verify classification
|
|
6
|
+
|
|
7
|
+
The detection stub in SKILL.md routes here for anything that isn't clearly software. Verify the classification is correct before proceeding:
|
|
8
|
+
|
|
9
|
+
- **Is this actually a software task?** The key distinction is task-type, not topic-domain. A study guide about Rust is non-software (producing educational content). A Rust library refactor is software (modifying code). If this is actually software, return to Phase 0.2 in the main SKILL.md.
|
|
10
|
+
- **Is this a trivial single-fact lookup?** Only a question answerable from one fact with no research, retrieval, or judgment skips planning — answer it directly and stop, in the user's terms. Do not narrate that it "isn't a planning task" or explain the routing; that is process exhaust (see Veil of value below). Examples: "zsh: command not found: brew", "what's the capital of France." A question that needs multiple steps, any retrieval, or synthesis to answer well does **not** qualify: it is an answer-seeking task (see Disposition below), not a quick-help exit. When unsure, do not exit.
|
|
11
|
+
- **Pipeline mode?** If invoked from `lfg` or any `disable-model-invocation` context: tell the user this is a non-software task, `lfg` requires the software-only `ce-work` path, and they should invoke `ce-plan` directly for non-software planning. For this user-runnable output, default to `/ce-plan`; use `$ce-plan` only on Codex or a host explicitly documented as dollar-prefixed. Render only the invocation as inline code and output one form only, then stop.
|
|
12
|
+
- **Unified artifact guard.** Universal-planning outputs are not software implementation plans. Do not label them `artifact_contract: ce-unified-plan/v1` and do not produce an implementation launch block unless the deliverable itself is a complete software implementation plan with Product Contract, Planning Contract, Implementation Units, Verification Contract, and Definition of Done.
|
|
13
|
+
|
|
14
|
+
Once past these checks, commit to the task — do not bail because it looks like a "lookup" or "research question." The user invoked the planning tool on purpose. Then choose the disposition below.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Disposition: plan-seeking vs. answer-seeking
|
|
19
|
+
|
|
20
|
+
Two kinds of task land here, with different deliverables:
|
|
21
|
+
|
|
22
|
+
- **Plan-seeking** — the deliverable is a *plan*: a trip itinerary, a study curriculum, an event runbook, a project plan. The plan is the artifact, saved or shared. → Follow Steps 1-3 below.
|
|
23
|
+
- **Answer-seeking** — the deliverable is an *answer*: an investigative or analytical question ("how often does X happen — is it a big deal?", "how does our approach compare to Y?", "should we Z?"). No one wants a saved plan document for this; planning is the means to a good answer, not the output. → Follow the **Answer-seeking flow** below; skip the Step 3 artifact handling.
|
|
24
|
+
|
|
25
|
+
If a request blends both ("research X, then plan Y"), do the answer-seeking research first, then produce the plan artifact.
|
|
26
|
+
|
|
27
|
+
Commit to one disposition before reading further, and follow only that flow: a plan-seeking task still produces its plan document (Steps 1-3) and does not stop at a chat answer; an answer-seeking task does not write a plan file.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Answer-seeking flow
|
|
32
|
+
|
|
33
|
+
The planning instinct still applies — but the plan is *working scaffold*, not an artifact. State it in chat to steer the work and show the human the approach; execute it; discard it. No plan file is written.
|
|
34
|
+
|
|
35
|
+
### State a brief plan-of-attack, then proceed
|
|
36
|
+
|
|
37
|
+
Say how the question will be answered, right-sized to it: a light question gets a one-line approach; a multi-part analytical question gets a short bulleted plan (a few steps). This is **non-blocking** — announce the approach and continue immediately. Do not ask the user to approve the plan; the stated approach is itself the checkpoint, and the user can interrupt if the framing is wrong. Stop to ask only on a genuine fork the agent cannot resolve (e.g., "his personal account or the org's?").
|
|
38
|
+
|
|
39
|
+
### Execute the plan
|
|
40
|
+
|
|
41
|
+
Carry out the approach. When the answer depends on facts the model can't reliably supply from memory — current data, recent events, specifics that drift — gather them using the **Research decomposition pattern** under Step 1 below (decompose into focused questions, dispatch in parallel via the platform's subagent/web primitive, collate). Skip research for anything the model already knows well.
|
|
42
|
+
|
|
43
|
+
**Ground answers about the user's own code, repo, or named artifacts in the actual sources — not memory.** When the question references local code, a specific file, a named CLI or service, or "our X", read those sources first (and any resource the user named — see Core Principle 8 in SKILL.md). "The model already knows the topic" covers general knowledge only, never the contents of the user's codebase: a comparison or recommendation about local code that was never read is ungrounded. Inspect, then answer.
|
|
44
|
+
|
|
45
|
+
**Execution here is research and analysis only — never code.** Reading code and artifacts to understand them is in-bounds research; writing or running code to change the system is not — that belongs in `ce-work`. This keeps the planning/execution boundary intact.
|
|
46
|
+
|
|
47
|
+
### Deliver the answer
|
|
48
|
+
|
|
49
|
+
Answer in chat. Do **not** write a plan file and do **not** run the Step 3 save/share menu by default. If the investigation produced something the user might want to keep (a comparison table, a sourced summary), offer to save it; otherwise just give the answer. In headless or non-interactive runs, skip the offer and deliver the answer.
|
|
50
|
+
|
|
51
|
+
### Veil of value: what to show, what to hide
|
|
52
|
+
|
|
53
|
+
The plan-of-attack and the answer are for the caller; the skill's internal machinery is not. Edit for relevance the way an expert consultant does — they tell you their thinking about your problem, not which template their back office applied.
|
|
54
|
+
|
|
55
|
+
- **Show** (question-domain — reads as value): the approach to the user's actual question, in the user's terms.
|
|
56
|
+
- **Hide** (skill-domain — process exhaust): which skill, mode, or phase is running; whether a plan file was or wasn't written; the routing or disposition decision itself.
|
|
57
|
+
- **Never hide** (audit content — affects trust in the answer): caveats, gaps, and uncertainty. "I could only pull his last ~100 stars, so this is partial" or "this is my read, not a hard signal" is not junk — it is what a good assistant says out loud. The veil hides plumbing, never the limits of the answer.
|
|
58
|
+
|
|
59
|
+
Register example, for "how often does he star things — is this a big deal?":
|
|
60
|
+
|
|
61
|
+
> Wrong: "Quick note first: `ce-plan` builds implementation plans, so I ignored the template and just answered the question. Here's what the data says..."
|
|
62
|
+
|
|
63
|
+
Leaks the skill's name, narrates an internal routing decision, apologizes for deviating — the caller sees the tool's machinery.
|
|
64
|
+
|
|
65
|
+
> Right: "Let me size this up — I'll check how active a starrer he is overall, his recent cadence, and the kinds of repos he tends to star, then weigh where this one lands. [gathers data] Yes, this is a real signal: ..."
|
|
66
|
+
|
|
67
|
+
Same underlying process; none of the machinery shows. The caller sees thinking about their question.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 1: Assess Ambiguity and Research Need
|
|
72
|
+
|
|
73
|
+
Evaluate two things before planning:
|
|
74
|
+
|
|
75
|
+
**Would 1-3 quick questions meaningfully improve this plan?**
|
|
76
|
+
|
|
77
|
+
- **Default: ask 1-3 questions** via Step 1b when the answers would change the plan's structure or content. Always include a final option like "Skip — just make the plan with reasonable assumptions" so the user can opt out instantly.
|
|
78
|
+
- **Skip questions entirely** only when the request already specifies all major variables or the task is simple enough that reasonable assumptions cover it well.
|
|
79
|
+
|
|
80
|
+
**Research need — does this plan depend on facts that change faster than training data?**
|
|
81
|
+
|
|
82
|
+
| Research need | Signals | Action |
|
|
83
|
+
|--------------|---------|--------|
|
|
84
|
+
| **None** | Generic, timeless, or conceptual plan (study curriculum methodology, project management approach, personal goal breakdown) | Skip research. Model knowledge is sufficient. After structuring the plan, offer: "I based this on general knowledge. Want me to search for [specific thing research would improve]?" — e.g., sourced recipes, current product recommendations, expert frameworks. Only if the user accepts. |
|
|
85
|
+
| **Recommended** | Plan references specific locations, venues, dates, prices, schedules, seasonal availability, or current events — anything where stale information would break the plan (closed restaurants, changed prices, cancelled events, wrong seasonal dates). | Research before planning. Decompose into 2-5 focused research questions and dispatch parallel web searches. In Claude Code, use the Agent tool with `model: "haiku"` for each search to reduce cost. Collate findings before structuring the plan. |
|
|
86
|
+
|
|
87
|
+
If the user's or project's active instructions or the live prompt name a model for this subagent, use that model instead of the default tier above. They can name it by the subagent's tier, by its prompt-asset name, or for the subagents being dispatched. Without such an instruction, a model configured for this subagent's role takes precedence over the default tier.
|
|
88
|
+
|
|
89
|
+
When research is recommended, do it — don't just offer. Stale recommendations (closed restaurants, rethemed attractions, outdated prices) are worse than no recommendations. The user invoked `ce-plan` because they want a good plan, not a disclaimer about training data.
|
|
90
|
+
|
|
91
|
+
**Research decomposition pattern:**
|
|
92
|
+
1. Identify 2-5 independent research questions based on the task. Good questions target facts the model is least confident about: current prices, hours, availability, recent changes, seasonal specifics.
|
|
93
|
+
2. Dispatch parallel research. Prefer user-named surfaces first per Core Principle 8 in SKILL.md; fall back to web search for questions those surfaces don't cover.
|
|
94
|
+
3. Collate findings into a brief research summary before proceeding to planning.
|
|
95
|
+
|
|
96
|
+
Example for "plan a date night in Seattle this Saturday":
|
|
97
|
+
- "Best restaurants open late Saturday in Capitol Hill Seattle 2026"
|
|
98
|
+
- "Events happening in Seattle [specific date]"
|
|
99
|
+
- "Seattle waterfront current status and hours"
|
|
100
|
+
|
|
101
|
+
## Step 1b: Focused Q&A
|
|
102
|
+
|
|
103
|
+
Ask up to 3 questions targeting the unknowns that would most change the plan. Use the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery primitive to load that capability — do not search for another host's tool name. Fall back to numbered options on the host's user-visible chat surface only when no such tool is in the list or a real question call errors. Never silently skip the question.
|
|
104
|
+
|
|
105
|
+
**How to ask well:**
|
|
106
|
+
- Offer informed options, not open-ended blanks. Instead of "When are you going?", try "Mid-week visits have 30-40% shorter lines — are you flexible on timing?" The question should give the user a frame of reference, not just extract information.
|
|
107
|
+
- Use multi-select when several independent choices can be captured in one question. This is compact and respects the user's time.
|
|
108
|
+
- Always include a final option like **"Skip — just make the plan with reasonable assumptions"** so the user can opt out at any point.
|
|
109
|
+
|
|
110
|
+
Focus on the unknowns specific to this task that would change what the plan recommends or how it's structured. Do not ask more than 3 — after that, proceed with assumptions for anything remaining.
|
|
111
|
+
|
|
112
|
+
## Step 2: Structure the Plan
|
|
113
|
+
|
|
114
|
+
Create a structured plan guided by these quality principles. Do NOT use the software plan template (implementation units, test scenarios, file paths, etc.).
|
|
115
|
+
|
|
116
|
+
### Format: when to prescribe vs. present options
|
|
117
|
+
|
|
118
|
+
Not every plan should be a single linear path. Match the format to the task:
|
|
119
|
+
|
|
120
|
+
| Task type | Best format | Why |
|
|
121
|
+
|-----------|------------|-----|
|
|
122
|
+
| **High personal preference** (food, entertainment, activities, gifts) | Curated options per category — present 2-3 choices and let the user compose | Preferences vary; a single pick may miss. Options respect the user's taste. |
|
|
123
|
+
| **Logical sequence** (study plan, project timeline, multi-day trip logistics) | Single prescriptive path with clear ordering | Sequencing matters; options at each step create decision paralysis. |
|
|
124
|
+
| **Hybrid** (event with fixed structure but variable details) | Fixed structure with choice points marked | The skeleton is set but specific vendors/venues/activities are options. |
|
|
125
|
+
|
|
126
|
+
Example: A date night plan should present 2-3 restaurant options, 2-3 activity options, and a suggested flow — not pick one restaurant and build the whole evening around it. A study plan should prescribe a single weekly progression — not present 3 different curricula to choose from.
|
|
127
|
+
|
|
128
|
+
### Formatting: bullets over prose
|
|
129
|
+
|
|
130
|
+
- Prefer bullets and tables for actionable content (steps, options, logistics, budgets)
|
|
131
|
+
- Use prose only for context, rationale, or explanations that connect the dots
|
|
132
|
+
- Plans are for scanning and executing, not reading cover-to-cover
|
|
133
|
+
|
|
134
|
+
### Quality principles
|
|
135
|
+
|
|
136
|
+
- **Actionable steps**: Each step is specific enough to execute without further research
|
|
137
|
+
- **Sequenced by dependency**: Steps are in the right order, with dependencies noted
|
|
138
|
+
- **Time-aware**: When relevant, include timing, durations, deadlines, or phases
|
|
139
|
+
- **Resource-identified**: Specify what's needed — tools, materials, people, budget, locations
|
|
140
|
+
- **Contingency-aware**: For important decisions, note alternatives or what to do if plans change
|
|
141
|
+
- **Appropriately detailed**: Match detail to task complexity. A weekend trip needs less structure than a 3-month curriculum. A dinner plan should be concise, not a 200-line document.
|
|
142
|
+
- **Domain-appropriate format**: Choose a structure that fits the domain:
|
|
143
|
+
- Itinerary for travel (day-by-day, with times and locations)
|
|
144
|
+
- Syllabus or curriculum for study plans (topics, resources, milestones)
|
|
145
|
+
- Runbook for events (timeline, responsibilities, logistics)
|
|
146
|
+
- Project plan for business or operational tasks (phases, owners, deliverables)
|
|
147
|
+
- Research plan for investigations (questions, methods, sources)
|
|
148
|
+
- Options menu for preference-driven tasks (curated picks per category)
|
|
149
|
+
|
|
150
|
+
## Step 3: Save or Share
|
|
151
|
+
|
|
152
|
+
After structuring the plan, ask the user how they want to receive it using the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Fall back to numbered options on the host's user-visible chat surface only when no such tool is in the list or a real question call errors. Never silently skip the question.
|
|
153
|
+
|
|
154
|
+
**Question:** "Plan ready. How would you like to receive it?"
|
|
155
|
+
|
|
156
|
+
**Options:**
|
|
157
|
+
|
|
158
|
+
1. **Save to disk** — Write the plan as a markdown file. Ask where:
|
|
159
|
+
- `<root>/plans/` (only show if this directory exists)
|
|
160
|
+
- Current working directory
|
|
161
|
+
- `/tmp`
|
|
162
|
+
- A custom path
|
|
163
|
+
- Use filename convention: `YYYY-MM-DD-HHMM-<descriptive-name>-plan.md`, taking `HHMM` from the local wall-clock time at write; reserve the path atomically and, on collision, retry with the smallest available numeric suffix before the extension rather than overwriting
|
|
164
|
+
- Start the document with a `# Title` heading, followed by `Created: YYYY-MM-DD` on the next line. No YAML frontmatter.
|
|
165
|
+
|
|
166
|
+
2. **Publish to Proof — shareable link** — Publish the doc to Every's Proof editor and get a shareable link to read, comment on, or share with others. Load the `ce-proof` skill to create the shared document and return the URL. One-way: nothing syncs back to disk.
|
|
167
|
+
|
|
168
|
+
3. **Save to disk AND publish to Proof** — Do both: write the markdown file to disk and publish a shareable Proof copy for review. The local file stays canonical.
|
|
169
|
+
|
|
170
|
+
Do not offer `ce-work` (software-only) or issue creation (not applicable to non-software plans).
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# elevation-dispatch.sh — off-host model-elevation worker for ce-plan / ce-brainstorm.
|
|
3
|
+
#
|
|
4
|
+
# Runs one reasoning-heavy step on a user-chosen model via the Claude CLI, as a
|
|
5
|
+
# detached job supervised by peer-job-runner.py. Streams NDJSON so the idle
|
|
6
|
+
# window observes genuine progress, not just liveness — a buffered format would
|
|
7
|
+
# make a healthy long run byte-identical to a wedged one. See
|
|
8
|
+
# docs/solutions/skill-design/cli-output-buffering-for-progress-detection.md.
|
|
9
|
+
#
|
|
10
|
+
# Read-only posture (R7): the CLI is allowlisted to Read/Glob/Grep plus
|
|
11
|
+
# WebSearch/WebFetch, so writes, shell, skills, and MCP are unavailable; the
|
|
12
|
+
# model reads the repo and web to verify its brief and returns prose.
|
|
13
|
+
#
|
|
14
|
+
# Usage:
|
|
15
|
+
# elevation-dispatch.sh <model> <prompt-file> <result-path>
|
|
16
|
+
# elevation-dispatch.sh --emit-adapter <model> # print argv, no model call (test hook)
|
|
17
|
+
#
|
|
18
|
+
# NOTE ON THE FUNCTION NAMED run_codex_cmd: it is NOT codex-specific here. It is
|
|
19
|
+
# the $PEERLOG byte-growth idle loop that implements R11's primary supervision
|
|
20
|
+
# signal (run_timeout_cmd, hard-cap-only, would leave a stalled run undetected).
|
|
21
|
+
# It keeps that name because the shared heartbeat-parity regex in
|
|
22
|
+
# tests/peer-job-runner-parity.test.ts uses `run_codex_cmd()` as the terminator
|
|
23
|
+
# that forces BOTH heartbeat functions into the byte-compared kernel; renaming it
|
|
24
|
+
# would weaken that cross-skill guard.
|
|
25
|
+
|
|
26
|
+
set -uo pipefail
|
|
27
|
+
trap '' HUP
|
|
28
|
+
|
|
29
|
+
ACTIVE_PEER_PID=""
|
|
30
|
+
RUN_SUCCEEDED=false
|
|
31
|
+
|
|
32
|
+
log() { printf '[elevation] %s\n' "$*" >&2; }
|
|
33
|
+
|
|
34
|
+
EFFORT="high" # settled: elevation runs at high effort
|
|
35
|
+
|
|
36
|
+
# Read-only tool posture (R7): the available built-in set, not a denylist. The
|
|
37
|
+
# elevated step reads the repo (Read/Glob/Grep) and may check current facts on
|
|
38
|
+
# the web (WebSearch/WebFetch) while authoring; it never needs Write/Bash/Task or
|
|
39
|
+
# any mutating tool. Its output is returned prose, not a file write.
|
|
40
|
+
ALLOWED=(Read Glob Grep WebSearch WebFetch)
|
|
41
|
+
|
|
42
|
+
build_cmd() { # <model> <handoff-dir> -> sets CMD array (claude CLI, streaming, read-only)
|
|
43
|
+
# --safe-mode suppresses the user environment's hooks, plugins, and MCP
|
|
44
|
+
# servers; --disable-slash-commands blocks skills. --tools RESTRICTS the
|
|
45
|
+
# available built-in set to this list — Write/Edit/Bash are not present at all.
|
|
46
|
+
# This is the real read-only boundary: --allowedTools ALONE only pre-approves
|
|
47
|
+
# (verified — it leaves every other tool available), so --allowedTools here
|
|
48
|
+
# just lets --permission-mode dontAsk run these five without a prompt instead
|
|
49
|
+
# of denying them.
|
|
50
|
+
local csv; csv="$(IFS=,; printf '%s' "${ALLOWED[*]}")"
|
|
51
|
+
# Grant read access to ONLY the single per-run handoff dir ($2, where the
|
|
52
|
+
# orchestrator co-located the prompt and evidence), which sits outside the
|
|
53
|
+
# launch dir. Claude's file access defaults to the launch dir and is extended
|
|
54
|
+
# via --add-dir. Adding the whole OS temp root ($TMPDIR / /tmp) instead would
|
|
55
|
+
# expose every other same-user scratch file and credential to the elevated
|
|
56
|
+
# model; the scoped dir does not. Read-only (only Read/Glob/Grep available).
|
|
57
|
+
local add_dirs=()
|
|
58
|
+
[ -n "${2:-}" ] && add_dirs=(--add-dir "$2")
|
|
59
|
+
# --no-session-persistence: this is a one-shot background model call, so the
|
|
60
|
+
# prompt and scratch-file references must not be saved as a resumable session
|
|
61
|
+
# on disk (matches the other scripted Claude peer routes in this repo).
|
|
62
|
+
CMD=(claude -p --model "$1" --effort "$EFFORT"
|
|
63
|
+
--output-format stream-json --verbose
|
|
64
|
+
--safe-mode --no-session-persistence --disable-slash-commands --strict-mcp-config
|
|
65
|
+
--permission-mode dontAsk
|
|
66
|
+
"${add_dirs[@]}"
|
|
67
|
+
--tools "$csv" --allowedTools "${ALLOWED[@]}"
|
|
68
|
+
--max-turns "${ELEVATION_MAX_TURNS:-30}")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# Test hook: print the argv the worker would exec, without calling a model.
|
|
72
|
+
# Accepts an optional handoff dir ($3) so the emitted argv shows the scoped
|
|
73
|
+
# --add-dir; without it the flag is omitted (no dir to grant).
|
|
74
|
+
if [ "${1:-}" = "--emit-adapter" ]; then
|
|
75
|
+
[ -n "${2:-}" ] || { log "--emit-adapter requires <model>"; exit 2; }
|
|
76
|
+
build_cmd "$2" "${3:-}"
|
|
77
|
+
printf '%s\0' "${CMD[@]}"
|
|
78
|
+
exit 0
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
MODEL="${1:?model required}"
|
|
82
|
+
PROMPT_FILE="${2:?prompt-file required}"
|
|
83
|
+
RESULT_PATH="${3:?result-path required}"
|
|
84
|
+
[ -f "$PROMPT_FILE" ] || { log "prompt file not found: $PROMPT_FILE"; exit 2; }
|
|
85
|
+
|
|
86
|
+
# The orchestrator co-locates the prompt and every evidence file in one private
|
|
87
|
+
# per-run dir; grant the elevated model read access to just that dir (resolved
|
|
88
|
+
# to an absolute path), never the whole OS temp root. Pure-bash dirname (no
|
|
89
|
+
# external `dirname`): strip the last /component, defaulting to cwd if none.
|
|
90
|
+
HANDOFF_DIR="${PROMPT_FILE%/*}"
|
|
91
|
+
[ "$HANDOFF_DIR" = "$PROMPT_FILE" ] && HANDOFF_DIR="."
|
|
92
|
+
HANDOFF_DIR="$(cd "$HANDOFF_DIR" 2>/dev/null && pwd || printf '%s' "$HANDOFF_DIR")"
|
|
93
|
+
|
|
94
|
+
# jq builds every result envelope; it is only an optional capability (ce-setup),
|
|
95
|
+
# so preflight it here rather than spending the CLI call and failing to parse.
|
|
96
|
+
# Exit 0 with a failure envelope, NOT nonzero: the runner classifies a nonzero
|
|
97
|
+
# exit as `failed`, and its `result` command then refuses to emit the artifact,
|
|
98
|
+
# so the recovery flow could never read this envelope. Exit 0 makes the job
|
|
99
|
+
# `done`, the envelope's status:failed is read, and it degrades to inline.
|
|
100
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
101
|
+
log "jq not found on PATH; cannot parse the elevated result — degrading to inline"
|
|
102
|
+
printf '{"status":"failed","requested_model":"%s","evidence":"jq unavailable on PATH"}' "$MODEL" > "$RESULT_PATH" 2>/dev/null || true
|
|
103
|
+
exit 0
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
PEERLOG="$(mktemp "${TMPDIR:-/tmp}/elevation-peer-XXXXXX")"
|
|
107
|
+
|
|
108
|
+
# Idle window is the primary stall signal; the hard cap is a raised backstop (R11).
|
|
109
|
+
# Keep this inner cap >= the runner's CE_PEER_HARD_SECS so it never reaps a
|
|
110
|
+
# healthy run before the outer supervisor's own raised backstop.
|
|
111
|
+
IDLE_SECS="${CE_ELEVATION_IDLE_SECS:-180}"
|
|
112
|
+
HARD_SECS="${CE_ELEVATION_HARD_SECS:-5400}"
|
|
113
|
+
POLL_SECS="${CE_ELEVATION_POLL_SECS:-5}" # $PEERLOG growth poll interval
|
|
114
|
+
|
|
115
|
+
reap() {
|
|
116
|
+
local pid="$1" grp
|
|
117
|
+
if kill -TERM -- -"$pid" 2>/dev/null; then grp=1; else kill -TERM "$pid" 2>/dev/null; grp=0; fi
|
|
118
|
+
for _ in 1 2 3 4 5; do
|
|
119
|
+
if [ "$grp" = 1 ]; then kill -0 -- -"$pid" 2>/dev/null || return 0
|
|
120
|
+
else kill -0 "$pid" 2>/dev/null || return 0; fi
|
|
121
|
+
sleep 1
|
|
122
|
+
done
|
|
123
|
+
if [ "$grp" = 1 ]; then kill -KILL -- -"$pid" 2>/dev/null; else kill -KILL "$pid" 2>/dev/null; fi
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
on_term() {
|
|
127
|
+
if [ -n "${_HEARTBEAT_PID:-}" ]; then
|
|
128
|
+
stop_heartbeat
|
|
129
|
+
fi
|
|
130
|
+
if [ -n "${ACTIVE_PEER_PID:-}" ]; then
|
|
131
|
+
log "received TERM/INT; reaping peer process group $ACTIVE_PEER_PID"
|
|
132
|
+
reap "$ACTIVE_PEER_PID" 2>/dev/null || true
|
|
133
|
+
ACTIVE_PEER_PID=""
|
|
134
|
+
fi
|
|
135
|
+
exit 0
|
|
136
|
+
}
|
|
137
|
+
trap 'on_term' TERM INT
|
|
138
|
+
|
|
139
|
+
write_result() { # <json-string> -> atomic publish to RESULT_PATH
|
|
140
|
+
local tmp="${RESULT_PATH}.tmp.$$"
|
|
141
|
+
printf '%s' "$1" > "$tmp" && mv -f "$tmp" "$RESULT_PATH"
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
# Bounded stderr/stdout tail for a failed run. tail -c avoids the macOS bash
|
|
145
|
+
# negative-slice bug that erased sub-300-char evidence in the review worker.
|
|
146
|
+
bounded_failure_evidence() { tail -c 800 "$PEERLOG" 2>/dev/null || true; }
|
|
147
|
+
|
|
148
|
+
# Expected served-id prefix for a requested model alias, or empty if unknown.
|
|
149
|
+
model_prefix() { # <requested> -> prefix | ""
|
|
150
|
+
case "$1" in
|
|
151
|
+
fable) printf 'claude-fable-' ;;
|
|
152
|
+
opus) printf 'claude-opus-' ;;
|
|
153
|
+
sonnet) printf 'claude-sonnet-' ;;
|
|
154
|
+
haiku) printf 'claude-haiku-' ;;
|
|
155
|
+
claude-*) printf '%s' "$1" ;;
|
|
156
|
+
esac
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
# Requested family vs served id (R6/R16). matched | mismatch | unverified.
|
|
160
|
+
classify_receipt() { # <requested> <served>
|
|
161
|
+
local served="$2" prefix
|
|
162
|
+
{ [ -z "$served" ] || [ "$served" = "unverified" ]; } && { printf 'unverified'; return; }
|
|
163
|
+
prefix="$(model_prefix "$1")"
|
|
164
|
+
[ -z "$prefix" ] && { printf 'unverified'; return; }
|
|
165
|
+
case "$served" in
|
|
166
|
+
"$prefix"*) printf 'matched' ;;
|
|
167
|
+
*) printf 'mismatch' ;;
|
|
168
|
+
esac
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
# --- liveness heartbeat -----------------------------------------------------
|
|
172
|
+
# Emits one stderr line every CROSS_MODEL_HEARTBEAT_SECS so the OUTER
|
|
173
|
+
# peer-job-runner idle window (out.log byte-growth) sees the supervising script
|
|
174
|
+
# as alive during a long model call. It writes to stderr, NOT $PEERLOG, so it
|
|
175
|
+
# never masks this worker's OWN $PEERLOG idle detection (run_codex_cmd below) —
|
|
176
|
+
# a stalled model still stops growing $PEERLOG and is reaped. This block is
|
|
177
|
+
# byte-identical across all peer workers (kernel parity, tests/peer-job-runner-parity.test.ts).
|
|
178
|
+
_HEARTBEAT_PID=""
|
|
179
|
+
start_heartbeat() {
|
|
180
|
+
local every="${CROSS_MODEL_HEARTBEAT_SECS:-60}" parent_pid="$$"
|
|
181
|
+
# Floor to 1s: a non-numeric or 0 value would make `sleep` return instantly and
|
|
182
|
+
# spin the loop, flooding out.log into the runner's byte cap.
|
|
183
|
+
case "$every" in ''|*[!0-9]*) every=60 ;; esac; [ "$every" -lt 1 ] && every=1
|
|
184
|
+
_HEARTBEAT_READY=0
|
|
185
|
+
trap '_HEARTBEAT_READY=1' USR1
|
|
186
|
+
# Callers restore set +m after launching the peer, so without this the
|
|
187
|
+
# heartbeat inherits the worker pgid and kill -- -PID cannot reach the sleep.
|
|
188
|
+
local prev_m; case "$-" in *m*) prev_m=1;; *) prev_m=0;; esac
|
|
189
|
+
set -m
|
|
190
|
+
( local t0 n sleeper=""
|
|
191
|
+
trap 'kill "${sleeper:-}" 2>/dev/null || true; exit 0' TERM INT
|
|
192
|
+
kill -USR1 "$parent_pid"
|
|
193
|
+
t0="$(date +%s)"
|
|
194
|
+
while kill -0 "$parent_pid" 2>/dev/null; do
|
|
195
|
+
sleep "$every" & sleeper=$!
|
|
196
|
+
wait "$sleeper" 2>/dev/null || exit 0
|
|
197
|
+
sleeper=""
|
|
198
|
+
kill -0 "$parent_pid" 2>/dev/null || break
|
|
199
|
+
n="$(date +%s)"; log "peer alive ($(( n - t0 ))s elapsed)"
|
|
200
|
+
done ) &
|
|
201
|
+
_HEARTBEAT_PID=$!
|
|
202
|
+
[ "$prev_m" = 0 ] && set +m
|
|
203
|
+
while [ "$_HEARTBEAT_READY" != 1 ] && kill -0 "$_HEARTBEAT_PID" 2>/dev/null; do sleep 0.01 || true; done
|
|
204
|
+
trap - USR1
|
|
205
|
+
}
|
|
206
|
+
stop_heartbeat() {
|
|
207
|
+
if [ -n "$_HEARTBEAT_PID" ]; then
|
|
208
|
+
# Leader-only TERM is deferred until the inner `wait $sleeper` returns, so
|
|
209
|
+
# the default 60s interval would block this wait. Signal the process group.
|
|
210
|
+
kill -- -"$_HEARTBEAT_PID" 2>/dev/null || kill "$_HEARTBEAT_PID" 2>/dev/null || true
|
|
211
|
+
wait "$_HEARTBEAT_PID" 2>/dev/null || true
|
|
212
|
+
fi
|
|
213
|
+
_HEARTBEAT_PID=""
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
run_codex_cmd() {
|
|
217
|
+
RUN_SUCCEEDED=false
|
|
218
|
+
local prev; case "$-" in *m*) prev=1;; *) prev=0;; esac
|
|
219
|
+
set -m
|
|
220
|
+
command "${CMD[@]}" < "$PROMPT_FILE" > "$PEERLOG" 2>&1 &
|
|
221
|
+
local pid=$!
|
|
222
|
+
ACTIVE_PEER_PID="$pid"
|
|
223
|
+
[ "$prev" = 0 ] && set +m
|
|
224
|
+
start_heartbeat
|
|
225
|
+
local start last=-1 lastchg now size
|
|
226
|
+
start="$(date +%s)"; lastchg="$start"
|
|
227
|
+
while kill -0 "$pid" 2>/dev/null; do
|
|
228
|
+
sleep "$POLL_SECS"; now="$(date +%s)"; size="$(wc -c <"$PEERLOG" 2>/dev/null || echo 0)"
|
|
229
|
+
[ "$size" != "$last" ] && { last="$size"; lastchg="$now"; }
|
|
230
|
+
if [ $(( now - lastchg )) -ge "$IDLE_SECS" ]; then
|
|
231
|
+
log "elevated call idle ${IDLE_SECS}s; reaping"; reap "$pid"; break
|
|
232
|
+
fi
|
|
233
|
+
if [ $(( now - start )) -ge "$HARD_SECS" ]; then
|
|
234
|
+
log "elevated call exceeded hard cap ${HARD_SECS}s; reaping"; reap "$pid"; break
|
|
235
|
+
fi
|
|
236
|
+
done
|
|
237
|
+
if wait "$pid" 2>/dev/null; then RUN_SUCCEEDED=true
|
|
238
|
+
else log "elevated call exited non-zero or was reaped"; fi
|
|
239
|
+
reap "$pid" 2>/dev/null || true
|
|
240
|
+
stop_heartbeat
|
|
241
|
+
ACTIVE_PEER_PID=""
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
# --- main -------------------------------------------------------------------
|
|
245
|
+
build_cmd "$MODEL" "$HANDOFF_DIR"
|
|
246
|
+
run_codex_cmd
|
|
247
|
+
|
|
248
|
+
# The stream-json terminal event is the LAST line whose type is "result". Match
|
|
249
|
+
# on it rather than `tail -1`, so a diagnostic written to stderr after the result
|
|
250
|
+
# (an update notice, wrapper output) does not become the "result" we parse.
|
|
251
|
+
EVENT="$(grep -a '"type":"result"' "$PEERLOG" 2>/dev/null | tail -1 || true)"
|
|
252
|
+
PREFIX="$(model_prefix "$MODEL")"
|
|
253
|
+
# jq `keys` is sorted, so keys[0] is not necessarily the served model when
|
|
254
|
+
# modelUsage carries an auxiliary model too; prefer the requested family's key.
|
|
255
|
+
SERVED="$(printf '%s' "$EVENT" | jq -r --arg p "$PREFIX" \
|
|
256
|
+
'(.modelUsage // {} | keys) as $k
|
|
257
|
+
| (if $p != "" then first($k[] | select(startswith($p))) else empty end) // $k[0] // "unverified"' \
|
|
258
|
+
2>/dev/null || printf 'unverified')"
|
|
259
|
+
# Ship "ok" only on a clean success — a terminal event carries .result even when
|
|
260
|
+
# truncated/errored (subtype error_*, is_error true). HAS_OUTPUT is a tiny jq
|
|
261
|
+
# flag, so the plan text is never loaded into a shell variable or an argv.
|
|
262
|
+
SUBTYPE="$(printf '%s' "$EVENT" | jq -r '.subtype // empty' 2>/dev/null || true)"
|
|
263
|
+
IS_ERROR="$(printf '%s' "$EVENT" | jq -r '.is_error // false' 2>/dev/null || printf 'true')"
|
|
264
|
+
HAS_OUTPUT="$(printf '%s' "$EVENT" | jq -r 'if (.result // "") == "" then "no" else "yes" end' 2>/dev/null || printf 'no')"
|
|
265
|
+
|
|
266
|
+
if [ "$RUN_SUCCEEDED" = true ] && [ "$HAS_OUTPUT" = "yes" ] \
|
|
267
|
+
&& [ "$SUBTYPE" = "success" ] && [ "$IS_ERROR" != "true" ]; then
|
|
268
|
+
RECEIPT="$(classify_receipt "$MODEL" "$SERVED")"
|
|
269
|
+
# Build the envelope by piping the event THROUGH jq, which reads .result
|
|
270
|
+
# internally — never pass the plan text as an argv --arg, which would exceed
|
|
271
|
+
# ARG_MAX for a large Deep plan.
|
|
272
|
+
tmp="${RESULT_PATH}.tmp.$$"
|
|
273
|
+
if printf '%s' "$EVENT" | jq --arg m "$MODEL" --arg s "$SERVED" --arg r "$RECEIPT" \
|
|
274
|
+
'{status:"ok", requested_model:$m, served_model:$s, receipt:$r, output:.result}' \
|
|
275
|
+
> "$tmp" 2>/dev/null; then
|
|
276
|
+
mv -f "$tmp" "$RESULT_PATH"
|
|
277
|
+
log "elevated step complete: requested=$MODEL served=$SERVED receipt=$RECEIPT"
|
|
278
|
+
else
|
|
279
|
+
rm -f "$tmp"
|
|
280
|
+
write_result "$(jq -n --arg m "$MODEL" '{status:"failed", requested_model:$m, evidence:"result envelope build failed"}')"
|
|
281
|
+
log "elevated step: result envelope build failed"
|
|
282
|
+
fi
|
|
283
|
+
else
|
|
284
|
+
write_result "$(jq -n --arg m "$MODEL" --arg e "$(bounded_failure_evidence)" \
|
|
285
|
+
'{status:"failed", requested_model:$m, evidence:$e}')"
|
|
286
|
+
log "elevated step failed; wrote failure envelope"
|
|
287
|
+
fi
|
|
288
|
+
rm -f "$PEERLOG"
|