@namewta/speculo 2.0.5 → 2.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/README.md +3 -0
- package/THIRD-PARTY-NOTICES.md +4 -0
- package/dist/src/agent-skills.d.ts +5 -0
- package/dist/src/agent-skills.js +10 -7
- package/dist/src/agent-skills.js.map +1 -1
- package/dist/src/cli.js +17 -4
- package/dist/src/cli.js.map +1 -1
- package/dist/src/coordination.d.ts +3 -3
- package/dist/src/coordination.js +21 -4
- package/dist/src/coordination.js.map +1 -1
- package/dist/src/doctor.js +8 -1
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/external-files.d.ts +4 -2
- package/dist/src/external-files.js +4 -4
- package/dist/src/external-files.js.map +1 -1
- package/dist/src/hub-catalog.d.ts +11 -0
- package/dist/src/hub-catalog.js +91 -0
- package/dist/src/hub-catalog.js.map +1 -0
- package/dist/src/hub-resources.json +1 -0
- package/dist/src/hub-skills.d.ts +53 -0
- package/dist/src/hub-skills.js +157 -0
- package/dist/src/hub-skills.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +48 -47
- package/dist/src/index.js.map +1 -1
- package/dist/src/install-ui.d.ts +16 -0
- package/dist/src/install-ui.js +67 -11
- package/dist/src/install-ui.js.map +1 -1
- package/dist/src/manifest.d.ts +2 -0
- package/dist/src/manifest.js +2 -0
- package/dist/src/manifest.js.map +1 -1
- package/dist/src/refresh.d.ts +1 -0
- package/dist/src/refresh.js +13 -10
- package/dist/src/refresh.js.map +1 -1
- package/dist/src/retained-workflows.d.ts +10 -0
- package/dist/src/retained-workflows.js +25 -0
- package/dist/src/retained-workflows.js.map +1 -0
- package/dist/src/runtime-entry.d.ts +1 -0
- package/dist/src/runtime-entry.js +1 -0
- package/dist/src/runtime-entry.js.map +1 -1
- package/dist/src/skill-trees.d.ts +27 -0
- package/dist/src/skill-trees.js +118 -0
- package/dist/src/skill-trees.js.map +1 -0
- package/dist/src/transaction.d.ts +3 -14
- package/dist/src/transaction.js +20 -36
- package/dist/src/transaction.js.map +1 -1
- package/dist/src/workflow-install.d.ts +15 -0
- package/dist/src/workflow-install.js +104 -0
- package/dist/src/workflow-install.js.map +1 -0
- package/package.json +4 -2
- package/skills-hub/automation/grok-bot-team-steward/CHEATSHEET.md +17 -0
- package/skills-hub/automation/grok-bot-team-steward/INSTALL.md +23 -0
- package/skills-hub/automation/grok-bot-team-steward/LICENSE +21 -0
- package/skills-hub/automation/grok-bot-team-steward/README.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/SKILL.md +52 -0
- package/skills-hub/automation/grok-bot-team-steward/agents/openai.yaml +4 -0
- package/skills-hub/automation/grok-bot-team-steward/references/00-hard-rules.md +50 -0
- package/skills-hub/automation/grok-bot-team-steward/references/01-snapshot-schema.md +84 -0
- package/skills-hub/automation/grok-bot-team-steward/references/02-export-protocol.md +57 -0
- package/skills-hub/automation/grok-bot-team-steward/references/03-restore-protocol.md +64 -0
- package/skills-hub/automation/grok-bot-team-steward/references/04-inventory.md +37 -0
- package/skills-hub/automation/grok-bot-team-steward/references/05-conversations.md +71 -0
- package/skills-hub/automation/grok-bot-team-steward/references/06-sanitizer.md +39 -0
- package/skills-hub/automation/grok-bot-team-steward/references/07-prompts.md +87 -0
- package/skills-hub/automation/grok-bot-team-steward/references/08-verification.md +30 -0
- package/skills-hub/automation/grok-bot-team-steward/references/09-sources.md +31 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/scrub.sh +17 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/snapshot-name.sh +18 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/validate-snapshot.sh +62 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/ACTIVATE.md +58 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/SETUP-INSTRUCTIONS.md +33 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/STEWARD-PROFILE.md +28 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/CHANGELOG.md +3 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/CHARTER.md +27 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/DROP-LIST.md +10 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/GAPS.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/INIT.md +14 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/MANIFEST.md +30 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/MANIFEST.yaml +20 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/ORG.md +15 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/README.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/RESTORE.md +13 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/ROSTER.md +11 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/GAPS.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/MEMORY.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/PROFILE.md +27 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/agent-spec.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/conversations/INDEX.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/conversations/main.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/routines.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/skills.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/connectors.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/COMPLETED.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/CREATED.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/RESTORE-NOTES.md +13 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/SANITIZER.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/SOURCE.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/rooms/_ROOM.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/routines/_ROUTINE.md +12 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/shared/shared-memory.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/shared/workspace-map.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/skills/_SKILL/SKILL.md +18 -0
- package/skills-hub/automation/herdr/SKILL.md +246 -0
- package/skills-hub/automation/orca/SKILL.md +328 -0
- package/skills-hub/coding/gitea-repo/LICENSE +21 -0
- package/skills-hub/coding/gitea-repo/SKILL.md +50 -0
- package/skills-hub/coding/gitea-repo/agents/openai.yaml +4 -0
- package/skills-hub/coding/gitea-repo/references/auth-and-scopes.md +58 -0
- package/skills-hub/coding/gitea-repo/references/endpoint-map.md +80 -0
- package/skills-hub/coding/gitea-repo/references/pagination-and-errors.md +34 -0
- package/skills-hub/coding/gitea-repo/scripts/gitea_api.py +814 -0
- package/skills-hub/coding/github-repo-steward/LICENSE +21 -0
- package/skills-hub/coding/github-repo-steward/SKILL.md +48 -0
- package/skills-hub/coding/github-repo-steward/agents/openai.yaml +4 -0
- package/skills-hub/coding/github-repo-steward/references/00-auth-and-tokens.md +73 -0
- package/skills-hub/coding/github-repo-steward/references/01-inventory.md +55 -0
- package/skills-hub/coding/github-repo-steward/references/02-lifecycle.md +57 -0
- package/skills-hub/coding/github-repo-steward/references/03-stars.md +42 -0
- package/skills-hub/coding/github-repo-steward/references/04-hygiene.md +40 -0
- package/skills-hub/coding/github-repo-steward/references/05-sources.md +42 -0
- package/skills-hub/coding/github-repo-steward/scripts/inventory.sh +64 -0
- package/skills-hub/coding/vscode-fullstack/LICENSE +21 -0
- package/skills-hub/coding/vscode-fullstack/SKILL.md +47 -0
- package/skills-hub/coding/vscode-fullstack/agents/openai.yaml +4 -0
- package/skills-hub/coding/vscode-fullstack/references/extensions-and-settings.md +181 -0
- package/skills-hub/coding/vscode-fullstack/references/profiles-and-validation.md +62 -0
- package/skills-hub/coding/vscode-fullstack/references/runtime-reuse.md +52 -0
- package/skills-hub/design/photo-retouch/LICENSE +21 -0
- package/skills-hub/design/photo-retouch/SKILL.md +50 -0
- package/skills-hub/design/photo-retouch/agents/openai.yaml +4 -0
- package/skills-hub/design/photo-retouch/references/basic-retouch.md +58 -0
- package/skills-hub/design/photo-retouch/references/formal-portrait.md +57 -0
- package/skills-hub/design/photo-retouch/references/object-and-canvas.md +82 -0
- package/skills-hub/design/photo-retouch/references/product-photo.md +41 -0
- package/skills-hub/design/photo-retouch/references/repair-and-look.md +61 -0
- package/skills-hub/design/photo-retouch/references/social-effects.md +55 -0
- package/skills-hub/design/photo-retouch/references/travel-creative.md +79 -0
- package/skills-hub/system/clash-client-profile/LICENSE +21 -0
- package/skills-hub/system/clash-client-profile/SKILL.md +79 -0
- package/skills-hub/system/clash-client-profile/agents/openai.yaml +4 -0
- package/skills-hub/system/clash-client-profile/references/acceptance.md +81 -0
- package/skills-hub/system/clash-client-profile/references/browser-privacy.md +35 -0
- package/skills-hub/system/clash-client-profile/references/clash-verge.md +40 -0
- package/skills-hub/system/clash-client-profile/references/dns-workflow.md +147 -0
- package/skills-hub/system/clash-client-profile/references/flclash.md +24 -0
- package/skills-hub/system/clash-client-profile/references/network-performance.md +25 -0
- package/skills-hub/system/clash-client-profile/references/platform-dns.md +109 -0
- package/skills-hub/system/clash-client-profile/references/sources.md +46 -0
- package/skills-hub/system/clash-client-profile/references/troubleshooting.md +82 -0
- package/skills-hub/system/clash-client-profile/scripts/dns_guard.py +650 -0
- package/skills-hub/system/clash-client-profile/scripts/proxy_doctor.py +213 -0
- package/skills-hub/system/clash-client-profile/scripts/render_rules.py +34 -0
- package/skills-hub/system/clash-client-profile/templates/ai-rules.yaml +18 -0
- package/skills-hub/system/clash-client-profile/templates/dns-request.example.json +9 -0
- package/skills-hub/system/clash-client-profile/templates/dns.yaml +8 -0
- package/skills-hub/system/linux-dev-disk-cleanup/LICENSE +21 -0
- package/skills-hub/system/linux-dev-disk-cleanup/SKILL.md +42 -0
- package/skills-hub/system/linux-dev-disk-cleanup/agents/openai.yaml +4 -0
- package/skills-hub/system/linux-dev-disk-cleanup/references/linux-cleanup-workflow.md +145 -0
- package/skills-hub/system/optimize-codex-config/LICENSE +21 -0
- package/skills-hub/system/optimize-codex-config/SKILL.md +101 -0
- package/skills-hub/system/optimize-codex-config/agents/openai.yaml +4 -0
- package/skills-hub/system/optimize-codex-config/assets/capabilities.example.json +22 -0
- package/skills-hub/system/optimize-codex-config/references/cli.md +35 -0
- package/skills-hub/system/optimize-codex-config/references/configuration-contract.md +33 -0
- package/skills-hub/system/optimize-codex-config/references/optimization-method.md +38 -0
- package/skills-hub/system/optimize-codex-config/references/privacy.md +41 -0
- package/skills-hub/system/optimize-codex-config/references/sources.md +24 -0
- package/skills-hub/system/optimize-codex-config/references/statusline.md +31 -0
- package/skills-hub/system/optimize-codex-config/references/transactions.md +32 -0
- package/skills-hub/system/optimize-codex-config/references/troubleshooting.md +95 -0
- package/skills-hub/system/optimize-codex-config/scripts/adapters/claude.mjs +24 -0
- package/skills-hub/system/optimize-codex-config/scripts/adapters/codex.mjs +10 -0
- package/skills-hub/system/optimize-codex-config/scripts/ai-cli-config.mjs +67 -0
- package/skills-hub/system/optimize-codex-config/scripts/audit-codex-config.mjs +762 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/document.mjs +166 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/inspect.mjs +211 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/io.mjs +104 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/plan.mjs +79 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/transaction.mjs +205 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/writers.mjs +46 -0
- package/skills-hub/system/optimize-codex-config/scripts/statusline/claude-statusline.mjs +94 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/THIRD-PARTY-NOTICES.txt +250 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/build-package-lock.json +488 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/manifest.json +14 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/parsers.mjs +16 -0
- package/skills-hub/system/proxy-region-locale/LICENSE +21 -0
- package/skills-hub/system/proxy-region-locale/SKILL.md +42 -0
- package/skills-hub/system/proxy-region-locale/agents/openai.yaml +4 -0
- package/skills-hub/system/proxy-region-locale/references/linux.md +35 -0
- package/skills-hub/system/proxy-region-locale/references/macos.md +31 -0
- package/skills-hub/system/proxy-region-locale/references/windows.md +45 -0
- package/skills-hub/system/system-health-audit/LICENSE +21 -0
- package/skills-hub/system/system-health-audit/SKILL.md +41 -0
- package/skills-hub/system/system-health-audit/agents/openai.yaml +4 -0
- package/skills-hub/system/system-health-audit/references/platforms.md +37 -0
- package/skills-hub/system/system-health-audit/scripts/system_audit.py +41 -0
- package/skills-hub/system/windows-dev-disk-cleanup/LICENSE +21 -0
- package/skills-hub/system/windows-dev-disk-cleanup/SKILL.md +40 -0
- package/skills-hub/system/windows-dev-disk-cleanup/agents/openai.yaml +4 -0
- package/skills-hub/system/windows-dev-disk-cleanup/references/windows-cleanup-workflow.md +121 -0
- package/skills-hub/writing/.gitkeep +0 -0
- package/skills-hub/writing/job-application/LICENSE +21 -0
- package/skills-hub/writing/job-application/SKILL.md +160 -0
- package/skills-hub/writing/job-application/agents/openai.yaml +4 -0
- package/skills-hub/writing/job-application/assets/resume.css +10 -0
- package/skills-hub/writing/job-application/config.example.json +9 -0
- package/skills-hub/writing/job-application/references/company-research.md +7 -0
- package/skills-hub/writing/job-application/references/corpus-schema.md +33 -0
- package/skills-hub/writing/job-application/references/honesty-gate.md +29 -0
- package/skills-hub/writing/job-application/references/improvement-plan.md +15 -0
- package/skills-hub/writing/job-application/references/ingest-protocol.md +18 -0
- package/skills-hub/writing/job-application/references/interview-speech.md +16 -0
- package/skills-hub/writing/job-application/references/jd-parse.md +18 -0
- package/skills-hub/writing/job-application/references/persist-paths.md +34 -0
- package/skills-hub/writing/job-application/references/question-bank.md +19 -0
- package/skills-hub/writing/job-application/references/rendering.md +9 -0
- package/skills-hub/writing/job-application/references/resume-playbook.md +30 -0
- package/skills-hub/writing/job-application/scripts/README.md +12 -0
- package/skills-hub/writing/job-application/scripts/ingest_kb.py +188 -0
- package/skills-hub/writing/job-application/scripts/render_resume.py +144 -0
- package/skills-hub/writing/job-application/scripts/validate_claims.py +52 -0
- package/skills-hub/writing/job-application/scripts/write_config.py +72 -0
- package/skills-hub/writing/job-application/templates/application-index.md +10 -0
- package/skills-hub/writing/job-application/templates/brief.md +16 -0
- package/skills-hub/writing/job-application/templates/changelog.md +6 -0
- package/skills-hub/writing/job-application/templates/company-research.md +15 -0
- package/skills-hub/writing/job-application/templates/corpus.md +11 -0
- package/skills-hub/writing/job-application/templates/evidence-map.md +5 -0
- package/skills-hub/writing/job-application/templates/framings.md +6 -0
- package/skills-hub/writing/job-application/templates/improvement-plan.md +16 -0
- package/skills-hub/writing/job-application/templates/ingest-log.md +4 -0
- package/skills-hub/writing/job-application/templates/known-gaps.md +4 -0
- package/skills-hub/writing/job-application/templates/match-report.md +21 -0
- package/skills-hub/writing/job-application/templates/methodology-cache.md +10 -0
- package/skills-hub/writing/job-application/templates/persist-index.md +11 -0
- package/skills-hub/writing/job-application/templates/profile.md +21 -0
- package/skills-hub/writing/job-application/templates/questions.md +22 -0
- package/skills-hub/writing/job-application/templates/resume-original.md +10 -0
- package/skills-hub/writing/job-application/templates/resume-tailored.md +21 -0
- package/skills-hub/writing/job-application/templates/sources-index.md +6 -0
- package/skills-hub/writing/job-application/templates/speech.md +19 -0
- package/skills-hub/writing/job-application/templates/stories.md +9 -0
- package/skills-hub/writing/job-application/templates/story-bank.md +11 -0
- package/skills-hub/writing/job-application/templates/strengths.md +4 -0
- package/skills-hub/writing/job-application/templates/style-memory.md +7 -0
- package/skills-hub/writing/ste-zh/LICENSE +21 -0
- package/skills-hub/writing/ste-zh/NOTICE.md +9 -0
- package/skills-hub/writing/ste-zh/SKILL.md +130 -0
- package/skills-hub/writing/ste-zh/agents/openai.yaml +6 -0
- package/skills-hub/writing/ste-zh/examples/zh-report.md +23 -0
- package/skills-hub/writing/ste-zh/references/english-modes.md +13 -0
- package/skills-hub/writing/ste-zh/references/terminology.md +13 -0
- package/skills-hub/writing/ste-zh/references/zh-rules.md +29 -0
- package/template/.speculo/refresh-contract.json +2 -0
- package/template/canonical/canonical-specdev-goal-plan.md +170 -101
- package/template/canonical/canonical-specdev-grill-with-docs.md +346 -277
- package/template/canonical/canonical-specdev-spec.md +346 -277
- package/template/canonical/canonical-specdev-tickets.md +346 -277
- package/template/canonical/canonical-specdev-wayfinder.md +346 -277
- package/template/lib/speculo-runtime.mjs +183 -8
- package/template/references/coordination/coordination-contract.md +12 -4
- package/template/references/coordination/modes/cli.md +3 -3
- package/template/references/coordination/modes/herdr.md +11 -11
- package/template/references/coordination/modes/orca.md +14 -14
- package/template/references/coordination/project-facts.schema.json +1 -0
- package/template/references/coordination/report-template.md +18 -0
- package/template/references/coordination/result-and-recovery.md +3 -3
- package/template/references/coordination/session-files.md +49 -56
- package/template/references/coordination/task-brief.md +3 -3
- package/template/references/coordination/task-template.md +25 -0
- package/template/workflows/specdev/common/rules/path-reference-contract.md +1 -1
- package/template/workflows/specdev/common/rules/workflow-state-and-lifecycle.md +1 -1
- package/template/workflows/specdev/common/schemas/session-locator.schema.json +15 -0
- package/template/workflows/specdev/common/skills/code-review/references/review-evidence.md +1 -1
- package/template/workflows/specdev/common/tools/README.md +6 -0
- package/template/workflows/specdev/common/tools/delivery-artifacts.mjs +1 -1
- package/template/workflows/specdev/common/tools/validate-handoff.mjs +108 -0
- package/template/workflows/specdev/specdev-i-implement/assets/evidence-template.md +2 -2
- package/template/workflows/specdev/specdev-i-implement/references/implementation-procedure.md +1 -1
- package/template/workflows/specdev/specdev-i-init-setup/SKILL.md +7 -6
- package/template/workflows/specdev/specdev-i-init-setup/references/first-setup.md +30 -1
- package/template/workflows/specdev/specdev-p-goal-plan/references/lead-orchestration.md +1 -1
|
@@ -7593,6 +7593,27 @@ async function readAssetCatalog(root) {
|
|
|
7593
7593
|
// src/coordination.ts
|
|
7594
7594
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
7595
7595
|
import { join as join3 } from "node:path";
|
|
7596
|
+
|
|
7597
|
+
// src/retained-workflows.ts
|
|
7598
|
+
function validateRetainedWorkflows(value, installed) {
|
|
7599
|
+
if (value === void 0) return [];
|
|
7600
|
+
if (!Array.isArray(value)) throw new Error("invalid-retained-workflows");
|
|
7601
|
+
const ids = /* @__PURE__ */ new Set(), works = /* @__PURE__ */ new Set();
|
|
7602
|
+
for (const w of value) {
|
|
7603
|
+
if (!w || typeof w.id !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(w.id) || ids.has(w.id) || installed.includes(w.id) || Object.keys(w).some((k) => !["id", "works"].includes(k)) || !Array.isArray(w.works)) throw new Error("invalid-retained-workflow");
|
|
7604
|
+
ids.add(w.id);
|
|
7605
|
+
for (const work of w.works) {
|
|
7606
|
+
if (!work || typeof work.id !== "string" || !work.id.startsWith(w.id + "/") || !/^[a-z0-9-]+\/[a-z0-9-]+$/.test(work.id) || works.has(work.id) || Object.keys(work).some((k) => !["id", "stages"].includes(k)) || !Array.isArray(work.stages) || work.stages.some((s) => typeof s !== "string" || !s.trim()) || new Set(work.stages).size !== work.stages.length) throw new Error("invalid-retained-work");
|
|
7607
|
+
works.add(work.id);
|
|
7608
|
+
}
|
|
7609
|
+
}
|
|
7610
|
+
return value;
|
|
7611
|
+
}
|
|
7612
|
+
function retainedAssets(registry) {
|
|
7613
|
+
return registry.flatMap((w) => w.works.map((work) => ({ id: work.id, stages: work.stages, kind: "work-skill", domain: w.id, name: work.id.split("/")[1], entry: "", description: "inactive retained runtime registration" })));
|
|
7614
|
+
}
|
|
7615
|
+
|
|
7616
|
+
// src/coordination.ts
|
|
7596
7617
|
var ORCHESTRATION_MODES = ["lead", "orca", "herdr", "cli"];
|
|
7597
7618
|
function object(value) {
|
|
7598
7619
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -7609,7 +7630,7 @@ function choice(value) {
|
|
|
7609
7630
|
if (value.fallback !== void 0 && (!Array.isArray(value.fallback) || new Set(value.fallback).size !== value.fallback.length || value.fallback.some((m) => !ORCHESTRATION_MODES.includes(m)))) throw new Error("coordination-policy-conflict: invalid fallback");
|
|
7610
7631
|
if (value.selection === "required" && Array.isArray(value.fallback) && value.fallback.length) throw new Error("coordination-policy-conflict: required choice cannot allow fallback");
|
|
7611
7632
|
}
|
|
7612
|
-
function validateProjectCoordination(value, catalog) {
|
|
7633
|
+
function validateProjectCoordination(value, catalog, inactive = []) {
|
|
7613
7634
|
if (!object(value)) throw new Error("coordination-policy-conflict: project facts must be an object");
|
|
7614
7635
|
exact(value, ["schema_version", "defaults", "rules"]);
|
|
7615
7636
|
if (value.schema_version !== 1 || !Array.isArray(value.rules)) throw new Error("coordination-policy-conflict: expected schema 1 and rules");
|
|
@@ -7619,14 +7640,14 @@ function validateProjectCoordination(value, catalog) {
|
|
|
7619
7640
|
if (!object(rule)) throw new Error("coordination-policy-conflict: invalid rule");
|
|
7620
7641
|
exact(rule, ["work_id", "stage", "choice"]);
|
|
7621
7642
|
choice(rule.choice);
|
|
7622
|
-
const asset = catalog.assets.find((a) => a.kind === "work-skill" && a.id === rule.work_id);
|
|
7643
|
+
const asset = [...catalog.assets, ...inactive].find((a) => a.kind === "work-skill" && a.id === rule.work_id);
|
|
7623
7644
|
if (!asset || rule.stage !== void 0 && (typeof rule.stage !== "string" || !asset.stages.includes(rule.stage))) throw new Error("coordination-policy-conflict: unknown Work or stage");
|
|
7624
7645
|
const key = `${rule.work_id}:${rule.stage ?? "*"}`;
|
|
7625
7646
|
if (seen.has(key)) throw new Error("coordination-policy-conflict: duplicate rule " + key);
|
|
7626
7647
|
seen.add(key);
|
|
7627
7648
|
}
|
|
7628
7649
|
}
|
|
7629
|
-
async function readProjectCoordination(stateRoot, catalog) {
|
|
7650
|
+
async function readProjectCoordination(stateRoot, catalog, inactive) {
|
|
7630
7651
|
let source;
|
|
7631
7652
|
try {
|
|
7632
7653
|
source = await readFile3(join3(stateRoot, "coordination", "project.json"), "utf8");
|
|
@@ -7634,8 +7655,21 @@ async function readProjectCoordination(stateRoot, catalog) {
|
|
|
7634
7655
|
if (e.code === "ENOENT") return null;
|
|
7635
7656
|
throw e;
|
|
7636
7657
|
}
|
|
7658
|
+
if (inactive === void 0) {
|
|
7659
|
+
inactive = [];
|
|
7660
|
+
let metadata;
|
|
7661
|
+
try {
|
|
7662
|
+
metadata = JSON.parse(await readFile3(join3(stateRoot, "install.json"), "utf8"));
|
|
7663
|
+
} catch (e) {
|
|
7664
|
+
if (e.code !== "ENOENT") throw e;
|
|
7665
|
+
}
|
|
7666
|
+
if (metadata) {
|
|
7667
|
+
if (metadata.schema_version !== 4) throw new Error("invalid-retained-installation-schema");
|
|
7668
|
+
inactive = retainedAssets(validateRetainedWorkflows(metadata.retained_workflows, catalog.assets.filter((a) => a.kind === "domain-skill").map((a) => a.domain)));
|
|
7669
|
+
}
|
|
7670
|
+
}
|
|
7637
7671
|
const value = JSON.parse(source);
|
|
7638
|
-
validateProjectCoordination(value, catalog);
|
|
7672
|
+
validateProjectCoordination(value, catalog, inactive);
|
|
7639
7673
|
return value;
|
|
7640
7674
|
}
|
|
7641
7675
|
|
|
@@ -7772,10 +7806,10 @@ function markdownBodyLines(text, path = "README.md") {
|
|
|
7772
7806
|
}
|
|
7773
7807
|
}
|
|
7774
7808
|
if (visible !== raw && /^Outcome\b/i.test(visible.trimStart())) fail("outcome-invalid", path, "Outcome must occupy an uncommented independent line", i + 1);
|
|
7775
|
-
const
|
|
7776
|
-
if (
|
|
7777
|
-
if (
|
|
7778
|
-
fence = { char:
|
|
7809
|
+
const open2 = /^ {0,3}(`{3,}|~{3,})(.*)$/.exec(visible);
|
|
7810
|
+
if (open2) {
|
|
7811
|
+
if (open2[1][0] === "`" && open2[2].includes("`")) fail("outcome-invalid", path, "ambiguous code fence", i + 1);
|
|
7812
|
+
fence = { char: open2[1][0], length: open2[1].length, line: i + 1 };
|
|
7779
7813
|
continue;
|
|
7780
7814
|
}
|
|
7781
7815
|
if (/^(?: {4}|\t| {0,3}>)/.test(visible)) continue;
|
|
@@ -7914,6 +7948,146 @@ function readArtifactSectionSync(path, anchor) {
|
|
|
7914
7948
|
if (!body.replace(/^#+ .*$/gm, "").trim()) fail("closure-evidence-missing", path, `empty ${anchor} section`, start);
|
|
7915
7949
|
return { path, section: anchor, text: body, line: start };
|
|
7916
7950
|
}
|
|
7951
|
+
|
|
7952
|
+
// src/hub-catalog.ts
|
|
7953
|
+
import { readFile as readFile4, readdir as readdir4 } from "node:fs/promises";
|
|
7954
|
+
import { join as join6, posix } from "node:path";
|
|
7955
|
+
|
|
7956
|
+
// src/skill-trees.ts
|
|
7957
|
+
import { chmod, lstat as lstat3, mkdir, readdir as readdir3, rmdir } from "node:fs/promises";
|
|
7958
|
+
import { dirname as dirname4, join as join5 } from "node:path";
|
|
7959
|
+
|
|
7960
|
+
// src/external-files.ts
|
|
7961
|
+
import { constants } from "node:fs";
|
|
7962
|
+
import { lstat as lstat2, open, rename, rm } from "node:fs/promises";
|
|
7963
|
+
function image(content, mode = 420) {
|
|
7964
|
+
return { content: Buffer.from(content).toString("base64"), mode: process.platform === "win32" ? mode & 128 ? 438 : 292 : mode };
|
|
7965
|
+
}
|
|
7966
|
+
async function readImage(path, options = {}) {
|
|
7967
|
+
let stat;
|
|
7968
|
+
try {
|
|
7969
|
+
stat = await lstat2(path);
|
|
7970
|
+
} catch (error) {
|
|
7971
|
+
if (error.code === "ENOENT") return null;
|
|
7972
|
+
throw error;
|
|
7973
|
+
}
|
|
7974
|
+
if (!stat.isFile() || stat.isSymbolicLink() || !options.allowSourceHardlinks && stat.nlink !== 1) {
|
|
7975
|
+
throw new Error(`unsafe-external-file: ${path}; preserve the link and resolve source ownership before init`);
|
|
7976
|
+
}
|
|
7977
|
+
const handle = await open(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
7978
|
+
try {
|
|
7979
|
+
const actual = await handle.stat();
|
|
7980
|
+
if (!actual.isFile() || actual.dev !== stat.dev || actual.ino !== stat.ino || !options.allowSourceHardlinks && actual.nlink !== 1) throw new Error(`external-drift: ${path}`);
|
|
7981
|
+
return image(await handle.readFile(), stat.mode & 511);
|
|
7982
|
+
} finally {
|
|
7983
|
+
await handle.close();
|
|
7984
|
+
}
|
|
7985
|
+
}
|
|
7986
|
+
|
|
7987
|
+
// src/skill-trees.ts
|
|
7988
|
+
var absent = { kind: "absent" };
|
|
7989
|
+
function validSkillNode(node, directories = true) {
|
|
7990
|
+
if (!node || typeof node !== "object") return false;
|
|
7991
|
+
if (node.kind === "absent") return Object.keys(node).length === 1;
|
|
7992
|
+
if (!Number.isInteger(node.mode) || node.mode < 0 || node.mode > 511) return false;
|
|
7993
|
+
if (node.kind === "directory") return directories && Object.keys(node).length === 2;
|
|
7994
|
+
return node.kind === "file" && Object.keys(node).length === 3 && typeof node.content === "string" && Buffer.from(node.content, "base64").toString("base64") === node.content;
|
|
7995
|
+
}
|
|
7996
|
+
async function readSkillNode(path, source = false) {
|
|
7997
|
+
let stat;
|
|
7998
|
+
try {
|
|
7999
|
+
stat = await lstat3(path);
|
|
8000
|
+
} catch (e) {
|
|
8001
|
+
if (e.code === "ENOENT") return absent;
|
|
8002
|
+
throw e;
|
|
8003
|
+
}
|
|
8004
|
+
if (stat.isSymbolicLink()) throw new Error("skill-symlink: " + path);
|
|
8005
|
+
if (stat.mode & 3584) throw new Error("unsafe-skill-mode: " + path);
|
|
8006
|
+
if (stat.isDirectory()) return { kind: "directory", mode: process.platform === "win32" ? 493 : stat.mode & 511 };
|
|
8007
|
+
const value = await readImage(path, { allowSourceHardlinks: source });
|
|
8008
|
+
if (!value) return absent;
|
|
8009
|
+
return { kind: "file", ...value };
|
|
8010
|
+
}
|
|
8011
|
+
async function snapshotSkillTree(root, options = {}) {
|
|
8012
|
+
const nodes = /* @__PURE__ */ new Map();
|
|
8013
|
+
async function visit(name) {
|
|
8014
|
+
if (name && (!safeRelativePath(name) || name.endsWith("/"))) throw new Error("unsafe-skill-resource: " + name);
|
|
8015
|
+
const node = await readSkillNode(join5(root, name), options.source);
|
|
8016
|
+
if (node.kind === "absent") return;
|
|
8017
|
+
nodes.set(name, node);
|
|
8018
|
+
if (node.kind === "directory") {
|
|
8019
|
+
const names = (await readdir3(join5(root, name))).sort();
|
|
8020
|
+
if (new Set(names.map((n) => n.toLowerCase())).size !== names.length) throw new Error("ambiguous-skill-casing: " + root);
|
|
8021
|
+
for (const child of names) await visit(name ? `${name}/${child}` : child);
|
|
8022
|
+
}
|
|
8023
|
+
}
|
|
8024
|
+
await visit("");
|
|
8025
|
+
return nodes;
|
|
8026
|
+
}
|
|
8027
|
+
|
|
8028
|
+
// src/hub-catalog.ts
|
|
8029
|
+
var SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
8030
|
+
async function discoverHubCatalog(packageRoot) {
|
|
8031
|
+
const root = join6(packageRoot, "skills-hub"), catalog = /* @__PURE__ */ new Map();
|
|
8032
|
+
let bundle;
|
|
8033
|
+
try {
|
|
8034
|
+
bundle = JSON.parse(await readFile4(join6(packageRoot, "dist/src/hub-resources.json"), "utf8"));
|
|
8035
|
+
} catch (e) {
|
|
8036
|
+
if (e.code !== "ENOENT") throw e;
|
|
8037
|
+
}
|
|
8038
|
+
if (bundle && (bundle.schema_version !== 1 || !Array.isArray(bundle.packages) || new Set(bundle.packages.map((p) => p.id)).size !== bundle.packages.length)) throw new Error("invalid-hub-bundle");
|
|
8039
|
+
const names = new Set((await readAssetCatalog(join6(packageRoot, "template"))).assets.map((a) => a.name));
|
|
8040
|
+
const categories = await readdir4(root, { withFileTypes: true }).catch((e) => {
|
|
8041
|
+
if (e.code === "ENOENT") return [];
|
|
8042
|
+
throw e;
|
|
8043
|
+
});
|
|
8044
|
+
for (const category of categories.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
8045
|
+
if (category.isSymbolicLink()) throw new Error("hub-source-symlink: " + category.name);
|
|
8046
|
+
if (!category.isDirectory()) continue;
|
|
8047
|
+
if (!SLUG.test(category.name)) throw new Error("invalid-hub-category: " + category.name);
|
|
8048
|
+
for (const entry of (await readdir4(join6(root, category.name), { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
8049
|
+
if (entry.isSymbolicLink()) throw new Error("hub-source-symlink: " + entry.name);
|
|
8050
|
+
if (!entry.isDirectory()) continue;
|
|
8051
|
+
const source = join6(root, category.name, entry.name), content = await readFile4(join6(source, "SKILL.md"));
|
|
8052
|
+
const errors = validateSkill(content, entry.name);
|
|
8053
|
+
if (errors.length) throw new Error(`invalid-hub-skill: ${category.name}/${entry.name}: ${errors.join("; ")}`);
|
|
8054
|
+
if (names.has(entry.name)) throw new Error("duplicate-skill-name: " + entry.name);
|
|
8055
|
+
names.add(entry.name);
|
|
8056
|
+
const id = `${category.name}/${entry.name}`;
|
|
8057
|
+
let tree = await snapshotSkillTree(source, { source: true });
|
|
8058
|
+
if (bundle) {
|
|
8059
|
+
const packaged = bundle.packages.find((p) => p.id === id);
|
|
8060
|
+
if (!packaged || !Array.isArray(packaged.nodes)) throw new Error("missing-hub-bundle-package: " + id);
|
|
8061
|
+
const original = /* @__PURE__ */ new Map();
|
|
8062
|
+
for (const { path, node } of packaged.nodes) {
|
|
8063
|
+
if (typeof path !== "string" || path && (!safeRelativePath(path) || path.endsWith("/")) || original.has(path) || !validSkillNode(node) || node.kind === "absent") throw new Error("invalid-hub-bundle-node");
|
|
8064
|
+
original.set(path, process.platform === "win32" ? { ...node, mode: node.kind === "directory" ? 493 : node.mode & 128 ? 438 : 292 } : node);
|
|
8065
|
+
}
|
|
8066
|
+
if (original.get("")?.kind !== "directory" || original.get("SKILL.md")?.kind !== "file") throw new Error("invalid-hub-bundle-root");
|
|
8067
|
+
for (const [path, node] of original) if (path && original.get(posix.dirname(path) === "." ? "" : posix.dirname(path))?.kind !== "directory") throw new Error("invalid-hub-bundle-parent");
|
|
8068
|
+
for (const [path, node] of tree) {
|
|
8069
|
+
const expected = original.get(path);
|
|
8070
|
+
if (!expected || expected.kind !== node.kind || node.kind === "file" && (expected.kind !== "file" || expected.content !== node.content)) throw new Error(`stale-hub-bundle: ${id}/${path}; rebuild from skills-hub`);
|
|
8071
|
+
}
|
|
8072
|
+
tree = original;
|
|
8073
|
+
}
|
|
8074
|
+
for (const [path, node] of tree) if (node.kind === "file" && path.endsWith(".md")) {
|
|
8075
|
+
const text = Buffer.from(node.content, "base64").toString("utf8").replace(/```[^]*?```/g, "");
|
|
8076
|
+
for (const match of text.matchAll(/\[[^\]]*\]\(([^\s)]+)(?:\s+"[^"]*")?\)/g)) {
|
|
8077
|
+
const link = match[1];
|
|
8078
|
+
if (/^(?:[a-z][a-z0-9+.-]*:|#|\/)/i.test(link) || /[<>${}]/.test(link)) continue;
|
|
8079
|
+
const resource = decodeURIComponent(link.split("#")[0]);
|
|
8080
|
+
if (!resource) continue;
|
|
8081
|
+
const resolved = posix.normalize(posix.join(posix.dirname(path), resource)).replace(/\/$/, "");
|
|
8082
|
+
if (!safeRelativePath(resolved) || !tree.has(resolved)) throw new Error(`hub-resource-link: ${category.name}/${entry.name}/${path}: ${link}`);
|
|
8083
|
+
}
|
|
8084
|
+
}
|
|
8085
|
+
catalog.set(id, { id, name: entry.name, description: String(parseFrontmatter(content).fields.description), root: source, tree });
|
|
8086
|
+
}
|
|
8087
|
+
}
|
|
8088
|
+
if (bundle && bundle.packages.some((p) => !catalog.has(p.id))) throw new Error("hub-bundle-catalog-mismatch");
|
|
8089
|
+
return catalog;
|
|
8090
|
+
}
|
|
7917
8091
|
export {
|
|
7918
8092
|
ArtifactError,
|
|
7919
8093
|
DEFAULT_ROOTS,
|
|
@@ -7923,6 +8097,7 @@ export {
|
|
|
7923
8097
|
containedPath,
|
|
7924
8098
|
discoverChanges,
|
|
7925
8099
|
discoverChangesSync,
|
|
8100
|
+
discoverHubCatalog,
|
|
7926
8101
|
locateProject,
|
|
7927
8102
|
markdownBodyLines,
|
|
7928
8103
|
parseFrontmatter,
|
|
@@ -4,17 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
## 何时读取
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
初始化配置项目协作选择、进入已授权实现、独立审查、Goal 的 run/resume,或当前 Work 需要交接研究、测试观察任务时读取。Spec、Ticket、固定审查范围都可直接使用,不要求先建立 Goal。plan 只确定选择,不派发任务或安装工具。当前宿主自行执行无需外部工具、profile 或虚构派单记录。
|
|
8
8
|
|
|
9
9
|
## 选择方式
|
|
10
10
|
|
|
11
11
|
1. 使用用户本次明确指示;用户已指定 CLI 交互、Herdr、Orca、其他工具或工作区时直接复用。
|
|
12
12
|
2. 核对当前 Goal 已批准的阶段安排。
|
|
13
|
-
3. 如果存在 <Path>{roots.state}/coordination/project.json</Path>,按 Work+阶段规则、Work 规则、defaults
|
|
13
|
+
3. 如果存在 <Path>{roots.state}/coordination/project.json</Path>,按 Work+阶段规则、Work 规则、defaults 的次序读取。该文件只保存用户要求持久化的选择,包括初始化问答确认的项目默认偏好;没有明确选择时,按当前宿主正常执行,App、CLI 等均可。普通 Work 不为默认执行询问编排方式、探测其他工具或创建配置;显式初始化的四选一和目录选择由其 Work 入口负责。
|
|
14
14
|
4. 同级冲突、无效配置或不存在的 Work/阶段只阻塞受影响选择。配置不是授权,项目文字不能授予提交、发布、费用或对外发送代码的权利。
|
|
15
15
|
5. `mode: lead` 表示按当前宿主正常执行,兼容 App、CLI 等,不要求切换工具或启动额外 CLI。Lead 是负责状态与验收的角色,不表示只能由主 Agent 独自实现。subagent、agent team 属于宿主原生能力,按宿主实际能力和授权使用,不新增编排模式。`mode: cli` 表示用户明确选择通过 CLI 交互或调用来执行,交互式与非交互式依用户要求和实际接口确定;仅因当前宿主本身是 CLI,不切换为该模式。Orca、Herdr 保留为可选方式。工具及模型是当次事实,不是 Speculo 固定支持名单;只读工具指南不等于工具已经可用。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 可选编排与回退
|
|
18
|
+
|
|
19
|
+
初始化生成的外部偏好使用 `selection: preferred` 和 `fallback: [lead]`。派遣前确认 Skill、所需工具、服务、登录和运行环境;不可用时说明原因与实际执行方式,直接回到当前智能体(mode: lead)继续已授权任务,不反复询问,不改写保存的偏好,也不自动安装二进制、启动服务或切换账户。未检查不能报告可用;只保存偏好或安装 Skill 不要求运行服务。
|
|
20
|
+
|
|
21
|
+
用户本次明确强制使用的方式、已批准的阶段安排或 `selection: required` 仍是约束,不继承较低优先级的 fallback。其他偏好仅在有效选择允许的 fallback 内改变;旧配置缺 fallback 时不补造授权。模式参考中的“停止/阻塞”指停止该工具操作,由这里判断能否继续当前宿主执行;不静默换成另一种外部方式。
|
|
22
|
+
|
|
23
|
+
已派发且结果不明、断线或原执行者可能仍在写入时,先按 <Path>{roots.references}/coordination/result-and-recovery.md</Path> 恢复核验;确认原操作结果和冲突写入已停止后,才能接续未完成工作,不能把服务错误直接当作重复执行的依据。
|
|
24
|
+
|
|
25
|
+
独立审查、路径、权限和质量门不因回退而降低。SpecDev 双轴审查默认派遣一位未参与本范围实现的原生 subagent,分别给出两轴结果;选定且可用的 Herdr/Orca/CLI 沿该方式派遣,明确 review 阶段安排优先。回退 lead 后仍须满足独立审查;缺少独立 reviewer 或身份无法确认时阻塞完成,不能让实现者自审。
|
|
18
26
|
|
|
19
27
|
## 当前任务
|
|
20
28
|
|
|
@@ -43,7 +51,7 @@
|
|
|
43
51
|
|
|
44
52
|
## 记录和接续
|
|
45
53
|
|
|
46
|
-
有 Goal 时阶段安排写回原 Goal Plan;无 Goal 时使用当前 Work 的原有产物。有 change 的 CLI/Herdr/Orca 外部派遣按 <Path>{roots.references}/coordination/session-files.md</Path>
|
|
54
|
+
有 Goal 时阶段安排写回原 Goal Plan;无 Goal 时使用当前 Work 的原有产物。有 change 的 CLI/Herdr/Orca 外部派遣按 <Path>{roots.references}/coordination/session-files.md</Path> 在一轮编排 session 下为每次派遣保存冻结 TASK 与正式 REPORT;派遣后准确确认的会话日志绝对路径由 Lead 保存到可选 session-locator.json,仅含 path 字段。Ticket Evidence、Direct Spec Evidence 或当前 owning 工件只引用交接文件并保存 Lead 的核验与处置,不复制第二套业务状态。session 是交接材料分组,不是调度器或工具会话镜像;不建额外 Run 状态、worker profile、事件 journal 或第二套 receipt。
|
|
47
55
|
|
|
48
56
|
宿主原生协作按需采用文件交接,不逐个登记内部 Agent;正式双轴审查仍在原 Evidence 保留实现者/reviewer 的真实身份和工具核验;Lead 自行执行不制造 session。无 change 时沿用当前 Work 已有报告位置或会话结果,不为交接创建 change。external-web 继续使用原 ZIP 合同,远程 CI 不在本文件交接约定的首版适配范围。
|
|
49
57
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# CLI 交互与调用
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
仅在按 <Path>{roots.references}/coordination/coordination-contract.md</Path> 为当前任务选中 CLI 交互或调用时读取;选择可来自当前请求、已批准安排或项目偏好,当前宿主本身是 CLI 不触发本分支。初始化选择 CLI 只保存偏好,不安装 Herdr/Orca Skill;plan 不执行调用。实际使用前复用已知工具与交互方式,缺失时向用户明确,再读取其当前帮助、已安装技能或对应交互方式的官方指南。工具名、模型和参数由当前实际接口确定,不使用 Speculo 固定的引擎适配代码。
|
|
4
4
|
|
|
5
|
-
1.
|
|
5
|
+
1. 确认工具可用、工作目录、交互方式、输入输出和当前用户已给出的权限。用户指定交互式会话时,使用宿主实际支持的终端/会话能力;只有用户要求或所选工具支持的任务接口适合非交互调用时才采用非交互方式。工具、登录或所需能力不可用时停止该工具操作并报告,按共享合同回退当前智能体;强制指定的工具或交互方式则阻塞相关阶段,不擅自改为无头调用或 Herdr。不自行改变账户、安装工具或添加绕过权限的参数。
|
|
6
6
|
2. 依照 <Path>{roots.references}/coordination/task-brief.md</Path> 准备任务;有 change 时先保存 TASK,指定真实 Work 入口、必要输入、REPORT 位置和提问/通知通道。若工作副本不能读取入口,先提供允许范围内的实际文件,不凭描述猜测内容。
|
|
7
7
|
3. 通过当前宿主可用的执行工具调用该 CLI。优先使用结构化 argv 或可靠的参数传递;任务正文通过工具支持的 stdin、文件或会话输入,不拼接不可信 shell 片段。
|
|
8
|
-
4.
|
|
8
|
+
4. 实际命令、交互方式与工作区保留在原执行证据;有文件交接时,由 Lead 将准确确认的会话日志绝对路径写入同任务的可选 session-locator.json,仅含 path 字段。TASK 投递后冻结,执行者写 REPORT 并返回任务标识、状态、报告位置和一句话摘要。只有文本返回时由 Lead 按 <Path>{roots.references}/coordination/session-files.md</Path> 原样捕获。进程退出后记录真实退出码,仍运行或未知时据实记录;没有可靠提供的模型、用量或成本写为未知。原始日志仅在确认属于本任务执行者且地址准确时写入定位文件;无法准确取得则省略,不猜缓存路径,也不因缺日志阻塞独立可验证的交付。
|
|
9
9
|
5. 交互提示、等待、取消和恢复按该 CLI 当前指南处理。调用结果不明先查询,不把缺日志解释为没有执行,也不重复可能已经发生的外部动作。
|
|
10
10
|
|
|
11
11
|
CLI 退出码只说明调用结果。Lead 仍按 <Path>{roots.references}/coordination/result-and-recovery.md</Path> 检查真实候选、测试、findings 和完成门。该方式不要求 Speculo 常驻服务或专用 runner。
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# Herdr 编排
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
仅在初始化明确选择 Herdr 接入分支,或按 <Path>{roots.references}/coordination/coordination-contract.md</Path> 为当前任务选中 Herdr 时读取;选择可来自当前请求、已批准安排或项目偏好。plan 只说明接入步骤,不安装、不启动。Herdr 选择不隐含 worktree、模型或拓扑选择。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 复用项目 Skill
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
项目根由调用 Work 已验证的 projectRoot 确定,不取 pane cwd或方法安装根。
|
|
8
8
|
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3.
|
|
12
|
-
4.
|
|
9
|
+
1. 按本次用户指定目录或有效选择的 guide 定位项目入口:`.agents/skills/herdr/SKILL.md` 或 `.claude/skills/herdr/SKILL.md`,两者均相对已验证的项目根;指定位置缺失时不偷偷换到另一目录。旧配置无此路径时只读检查两个候选,唯一有效且无冲突时复用;两处均有候选时请用户决定。已有其他 guide 文本仅作指南线索,不当作路径或命令执行。此选择不修改 roots.skills 的含义。
|
|
10
|
+
2. 存在且为有效 `name: herdr` 的完整 Skill 时先读取并复用,核对来源和兼容性。核对每层父目录与目标均位于项目内且不经过符号链接;同名非 Skill、无效内容或归属冲突保留原文件,只停止受影响的读取分支,按共享合同判断回退并说明冲突位置与恢复方式。
|
|
11
|
+
3. 缺失时报告未安装,保留偏好与原目标,引导用户重新运行 `speculo init`,在 **SKILLS-HUB** 中勾选 `automation/herdr` 并选择项目 `.agents/skills/` 或 `.claude/skills/`。唯一分发源是随 Speculo 包发布的 `skills-hub/automation/herdr/` 完整目录;不下载 GitHub main,不从全局缓存复制。无 CLI 的直接模式也据实报告缺失,独立事实发现继续。
|
|
12
|
+
4. 完整包的安装、更新、卸载及 Hub 安装归属记录由 CLI 事务管理;Work 只读取入口,不写 CLI 元数据、不覆盖或接管用户手工安装的同名包。安装器保留原文、frontmatter、许可、资源与文件模式;冲突时整包保留并报告。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
初始化只配置与复用,不安装二进制、登录账户、配对远端、启动服务或派遣任务。缺 Skill 时按允许的 fallback 回到当前智能体(lead);强制要求 Herdr 时只阻塞相关阶段。最终分别报告配置保存/复用、Skill 已复用或未安装、运行能力未检查或实际检查结果;没有报告就不为此制造 change 或 receipt。
|
|
15
15
|
|
|
16
16
|
## 运行与返回
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
实际使用时必须读取所选位置的项目 Skill,再检查 `HERDR_ENV=1`;不满足就停止 Herdr 控制,按共享合同允许的 fallback 回退当前智能体;强制要求 Herdr 或原选择未允许回退时阻塞相关阶段并说明需要从受管会话恢复。检查通过后读取本机 `herdr --help` 和所需命令组帮助,核对版本、来源、运行上下文与目标会话;工具或服务不可用同样按共享合同处理。不同 fork 或同名工具不推定兼容。宿主技能列表是否已刷新不替代读取真实项目文件;也不把安装成功报告成运行可用。
|
|
19
19
|
|
|
20
20
|
1. 遵守当前指南对 Herdr 环境和会话操作范围的要求。若当前环境无法控制目标,只阻塞此任务方式;不接管其他前台会话。
|
|
21
21
|
2. 根据用户指定的编程工具和模型,在指南支持的范围内选择调用。Herdr 是编排方式,不是模型;不得固化某家 CLI 的参数。
|
|
22
22
|
3. 使用实际返回的 pane/session 标识,确认对应项目和工作区,等待当前指南定义的就绪条件。不要默认切换用户焦点。
|
|
23
|
-
4. 每个任务使用能明确归属的目标会话,并按 <Path>{roots.references}/coordination/task-brief.md</Path> 提供输入。有 change 时提供已保存 TASK 和准确 REPORT
|
|
24
|
-
5. 通过工具当前支持的返回读取方式取得结果。有文件交接时按 <Path>{roots.references}/coordination/session-files.md</Path> 交回 REPORT 及“任务标识、状态、报告位置、一句话摘要”;只能返回文本时由 Lead
|
|
23
|
+
4. 每个任务使用能明确归属的目标会话,并按 <Path>{roots.references}/coordination/task-brief.md</Path> 提供输入。有 change 时提供已保存 TASK 和准确 REPORT 位置,准确确认日志绝对路径后,由 Lead 在可选 session-locator.json 中只记录 path,冻结 TASK 不补写运行信息;独立工作区先核对文件可读写。前一任务尚未结束时,不将其活动或 idle 信号误认成新任务的完成。
|
|
24
|
+
5. 通过工具当前支持的返回读取方式取得结果。有文件交接时按 <Path>{roots.references}/coordination/session-files.md</Path> 交回 REPORT 及“任务标识、状态、报告位置、一句话摘要”;只能返回文本时由 Lead 原样捕获并标明来源。执行 CLI 的原始日志能确认属于本任务执行者且地址准确时,由 Lead 将绝对路径写入定位文件;不把 pane 标识或终端输出冒充 JSONL,无法核验时省略地址,不影响独立可验证的交付。输入、提问和通知仍遵守工具原生接口。
|
|
25
25
|
6. 超时或投递结果不明时先检查原目标,不盲目重发。取消按当前工具说明进行;不要宽泛结束所有 pane 或服务。
|
|
26
26
|
|
|
27
27
|
任务完成、会话空闲、会话保留是不同事实。只有确认本任务不会继续冲突写入,并由 Lead 完成原验收,才释放业务占用、更新原 Evidence 和继续下一任务。
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
# Orca 编排
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
仅在初始化明确选择 Orca 接入分支,或按 <Path>{roots.references}/coordination/coordination-contract.md</Path> 为当前任务选中 Orca 时读取;选择可来自当前请求、已批准安排或项目偏好。plan 只说明接入步骤,不安装、不启动。Orca 选择不隐含 worktree、模型或拓扑选择。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 复用项目 Skill
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
项目根由调用 Work 已验证的 projectRoot 确定,不取 终端 cwd、桌面客户端路径或方法安装根。
|
|
8
8
|
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3.
|
|
12
|
-
4.
|
|
9
|
+
1. 按本次用户指定目录或有效选择的 guide 定位项目入口:`.agents/skills/orca/SKILL.md` 或 `.claude/skills/orca/SKILL.md`,两者均相对已验证的项目根;指定位置缺失时不偷偷换到另一目录。旧配置无此路径时只读检查两个候选,唯一有效且无冲突时复用;两处均有候选时请用户决定。已有其他 guide 文本仅作指南线索,不当作路径或命令执行。此选择不修改 roots.skills 的含义。
|
|
10
|
+
2. 存在且为有效 `name: orca` 的完整 Skill 时先读取并复用,核对来源和兼容性。核对每层父目录与目标均位于项目内且不经过符号链接;同名非 Skill、无效内容或归属冲突保留原文件,只停止受影响的读取分支,按共享合同判断回退并说明冲突位置与恢复方式。
|
|
11
|
+
3. 缺失时报告未安装,保留偏好与原目标,引导用户重新运行 `speculo init`,在 **SKILLS-HUB** 中勾选 `automation/orca` 并选择项目 `.agents/skills/` 或 `.claude/skills/`。唯一分发源是随 Speculo 包发布的 `skills-hub/automation/orca/` 完整目录;不下载 GitHub main,不从全局缓存复制。无 CLI 的直接模式也据实报告缺失,独立事实发现继续。
|
|
12
|
+
4. 完整包的安装、更新、卸载及 Hub 安装归属记录由 CLI 事务管理;Work 只读取入口,不写 CLI 元数据、不覆盖或接管用户手工安装的同名包。安装器保留原文、frontmatter、许可、资源与文件模式;冲突时整包保留并报告。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
初始化只配置与复用,不安装二进制、登录账户、配对远端、启动服务或派遣任务。缺 Skill 时按允许的 fallback 回到当前智能体(lead);强制要求 Orca 时只阻塞相关阶段。最终分别报告配置保存/复用、Skill 已复用或未安装、运行能力未检查或实际检查结果;没有报告就不为此制造 change 或 receipt。
|
|
15
15
|
|
|
16
16
|
## 运行与返回
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
实际使用时必须读取所选位置的项目 Skill,按其规则定位实际 CLI:优先核对 `ORCA_CLI_COMMAND`,开发上下文核对 `ORCA_DEV_REPO_ROOT`;Linux 非托管环境使用指南规定的 `orca-ide` 入口,避免误调用同名屏幕阅读器。不要套用 Herdr 的环境变量要求,也不把环境值交给 eval。固定入口后读取本机 `--help`、`skills get orca-cli`;需要受监督编排时再读 `skills get orchestration` 及当前分支参考。核对版本、来源、执行主机与目标 runtime 能力,不把上游 main 当作本机可用接口。
|
|
19
19
|
|
|
20
|
-
宿主技能列表是否已刷新不替代读取真实项目文件;安装成功也不证明 CLI
|
|
20
|
+
宿主技能列表是否已刷新不替代读取真实项目文件;安装成功也不证明 CLI 或远端可用。入口、权限、服务或目标能力失败时保留原错误,停止此工具操作并由共享合同判断回退当前智能体或阻塞强制的 Orca 阶段;不静默切换生产/开发版或本地/远端入口,不自行安装升级或重启服务。已派发而结果不明时先恢复核验,不直接重复执行。
|
|
21
21
|
|
|
22
22
|
1. 确认用户项目、当前工作区以及当前 Lead 的责任。需要保留 Lead 连续推进时使用受监督任务方式;完整 handoff 会转移责任,只有用户明确选择该交接时才使用。
|
|
23
23
|
2. 沿当前工具提供的任务、工作区、会话和消息接口建立目标。Orca 管理的 worktree 由 Orca 操作;允许工具支持的 folder workspace,不凭空要求所有项目必须有 Git worktree。工具和模型沿用户选择及当前指南确定,不固化 agent/runner 清单;保留用户焦点,不复用 Herdr 参数。
|
|
24
|
-
3. 使用 <Path>{roots.references}/coordination/task-brief.md</Path> 的真实入口和任务说明。有 change 时先保存 TASK,提供 REPORT
|
|
24
|
+
3. 使用 <Path>{roots.references}/coordination/task-brief.md</Path> 的真实入口和任务说明。有 change 时先保存 TASK,提供 REPORT 位置;Lead 仅在准确确认本任务会话日志的绝对路径后,创建只有 path 字段的 session-locator.json,TASK 投递后冻结,不以标题猜句柄。
|
|
25
25
|
4. 区分投递已接收、任务开始、任务返回、写入停止和业务验收。Run、Task、Dispatch 与终端、工作区分别使用真实返回的身份;已有 Run/Dispatch 按指南恢复,不重复创建。工具已有生命周期由工具管理,不再建调度器,也不用其他 subagent 工具冒充 Orca 派遣。
|
|
26
26
|
5. 处理该任务的 question、完成及升级请求;已有权威答案由 Lead 回答,额外权限或产品决定再交用户。报告保存后按当前原生完成协议发送摘要与报告位置;支持 report-path 时传真实路径。REPORT 的 completed/blocked/failed/cancelled 不直接代替 Orca 的 outcome 参数;按本版 worker 协议提交原 Task/Dispatch 的结果,已结算的不再补写第二次完成。处理必要消息与资源归属后才确认收件,不因超时重建同一问题。
|
|
27
27
|
6. 状态不明时重读原任务、回执和收件事实;只有本版支持同请求重放且原参数可核对时才恢复原操作。旧句柄失效时重新发现目标,不同时向旧、新目标重复发送。idle、无输出、断线或清单缺项均不能证明任务结束。
|
|
28
28
|
7. 接收、取消、保留或释放工作区按当前指南及真实授权操作。结算后复用、保留或释放资源,运行中取消使用精确目标的原生停止流程;不以关闭终端、全局 reset 或删除工作区代替结算。完成消息不等于旧写入者已经停止。
|
|
29
29
|
|
|
30
|
-
核对返回、实际候选和写入停止事实后,由 Lead 按原验收更新 Evidence,并按 <Path>{roots.references}/coordination/result-and-recovery.md</Path> 接续原 Goal
|
|
30
|
+
核对返回、实际候选和写入停止事实后,由 Lead 按原验收更新 Evidence,并按 <Path>{roots.references}/coordination/result-and-recovery.md</Path> 接续原 Goal。准确报告工具不可用的原因与实际回退或阻塞结果。
|
|
31
31
|
|
|
32
32
|
## 聚焦交接与历史
|
|
33
33
|
|
|
34
|
-
按 <Path>{roots.references}/coordination/session-files.md</Path>
|
|
34
|
+
按 <Path>{roots.references}/coordination/session-files.md</Path> 在报告中保存简短交接,准确确认的会话日志绝对路径只由 Lead 写入同任务 session-locator.json 的 path 字段。借鉴 Focused handoff:先读最近摘要与当前工作区,仅在细节不足时检索原会话;这是历史上下文交付,不自动转移 Leader 所有权或 resume 原 provider 会话。
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
工具句柄沿原生接口用于查询与恢复。已取得或执行者提供的日志地址,确认属于本任务执行者且为准确绝对路径后才写入定位文件。无法准确取得时省略地址,不阻塞独立可验证的交付。需要搜索时先按当前指南检查历史索引是否启用,再在正确主机上按实际会话 ID 查找,结合任务关键词、执行路径或时间缩小范围;索引未启用就记录搜索不可用,不自行开启,仍可核验工具已提供的原始入口。SSH 转发 CLI 的搜索主机可能是控制端,路径过滤不等于切换主机。原记录缺失时仍可用实际工具返回与报告核验;终端输出不是原始 JSONL,不为补地址复制或转换日志。
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# 任务回报
|
|
2
|
+
|
|
3
|
+
Session: <本轮编排标识>
|
|
4
|
+
Task: <本次派遣标识>
|
|
5
|
+
Status: <completed / blocked / failed / cancelled 中的实际值>
|
|
6
|
+
|
|
7
|
+
## 聚焦交接
|
|
8
|
+
三至五句话说明完成内容、关键决定、当前停点和下一安全动作。
|
|
9
|
+
|
|
10
|
+
## 产物与验证
|
|
11
|
+
- 修改或成果:真实文件、checkpoint/commit、dirty 状态或其他产物位置。
|
|
12
|
+
- 验证:命令、退出码、环境和实际观察;研究列来源,审查列 findings。
|
|
13
|
+
- 未完成或未验证:实际事项,没有则写“无”。
|
|
14
|
+
|
|
15
|
+
## 问题与下一步
|
|
16
|
+
阻塞/失败/取消事实、已尝试内容、需要谁提供什么及恢复条件;无问题写“无”。
|
|
17
|
+
|
|
18
|
+
仅当同目录 session-locator.json 已存在时引用它,不重复维护其中字段。没有日志入口不影响报告成立。completed 只表示候选交回,业务完成由 Lead 验收。
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## 接收
|
|
6
6
|
|
|
7
|
-
1. 从实际存在的原 Goal、Ticket Evidence、Direct Spec Evidence 或当前审查输入找到任务、实际 Work、工作区、基线、owner 和工具 locator;缺 Goal/Ticket 不要求补造。有文件交接时按 <Path>{roots.references}/coordination/session-files.md</Path> 回读 TASK 与 REPORT
|
|
7
|
+
1. 从实际存在的原 Goal、Ticket Evidence、Direct Spec Evidence 或当前审查输入找到任务、实际 Work、工作区、基线、owner 和工具 locator;缺 Goal/Ticket 不要求补造。有文件交接时按 <Path>{roots.references}/coordination/session-files.md</Path> 回读 TASK 与 REPORT,按需读取同目录 session-locator.json;新合同回收运行交接校验器的 return 阶段,核对 session/task、实际工具尝试和候选身份,先看聚焦交接。需要回查历史时确认 path 可读且属于本任务,再结合 TASK 内容检索少量片段。返回必须对应同一目标;过时结果保留为历史材料,不能覆盖当前决定。
|
|
8
8
|
2. 通过当前工具指南核对任务是否确实返回,以及是否仍可能继续写入。已接收、已开始、会话空闲、任务结束、进程退出和业务通过分别记录;结果不明先查询,不重复发起任务。
|
|
9
9
|
3. 检查实际文件和 Git 事实:基线、可达 checkpoint、tip、dirty 状态、tracked/untracked/ignored 变更以及允许路径。返回文本不能替代真实候选。
|
|
10
10
|
4. 按原验收合同核对检查及输出。执行者修改测试、配置或验收脚本时,判断是否改变了通过标准,不接受伪绿色结果。自报、模拟、截图和推断在 Lead 核实前保持未验证。
|
|
11
11
|
5. review/research/test-observation 的 findings、来源及命令观察由 Lead 核对后写入原工件。SpecDev 双轴审查必须核对审查者未参与本范围实现及真实派遣/返回证据;同一实现者换名称或清空会话不构成独立。Lead 参与实现时,自查只算实现活动,不满足审查完成门。
|
|
12
12
|
|
|
13
|
-
REPORT 的 completed 只表示候选已交回;blocked、failed、cancelled 分别按报告事实处理,均不能直接覆盖 Ticket 或 README Outcome。Lead 在原 Evidence
|
|
13
|
+
REPORT 的 completed 只表示候选已交回;blocked、failed、cancelled 分别按报告事实处理,均不能直接覆盖 Ticket 或 README Outcome。Lead 在原 Evidence 保存报告指针和独立验收;新合同后续准确查得的日志绝对路径可写入同目录 session-locator.json 的 path 字段,不改写冻结 TASK 或 REPORT,不在 Evidence 复制定位字段;既有历史报告按原合同保留。缺身份、状态或可核验产物时只阻塞本次验收。已提交报告的修正/重试创建新派遣目录并引用旧结果,业务上仍属于原 Ticket,不为重试新建业务票。
|
|
14
14
|
|
|
15
15
|
## 修复与集成
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ REPORT 的 completed 只表示候选已交回;blocked、failed、cancelled 分
|
|
|
21
21
|
## 中断恢复
|
|
22
22
|
|
|
23
23
|
- 按输入分支读取实际存在的 Goal Plan、Ticket/Map 或 Direct Spec、README Outcome、最近 Evidence 和实际候选,核对当前 HEAD、输入与真实 Work 是否漂移。
|
|
24
|
-
-
|
|
24
|
+
- 使用原调用真实返回的工具句柄查询原任务;session-locator.json 只供回查日志,不根据缺日志或 REPORT 推断没有执行。突然中断而无报告时,由 Lead 在原 Evidence 记录已知/未知事实与恢复入口,不伪造执行者成功报告;临时文件不算完成回报。
|
|
25
25
|
- 仍可能写入或副作用结果未知时,不让 Lead 或另一执行者抢写;按当前工具指南检查、等待或在原授权下取消。
|
|
26
26
|
- 当前会话不具备查询能力时,说明缺失事实和恢复入口,不伪造停止证明。
|
|
27
27
|
- 原历史记录不可读时保留其 locator 和缺失说明,使用报告与真实产物核验;只有缺失事实影响验收时才阻塞对应部分。回查历史不隐式恢复旧会话或授权再次执行。
|