specdojo 0.4.6 → 0.5.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/.github/agents/specdojo-orchestrator.md +14 -9
- package/CHANGELOG.md +62 -0
- package/dist/catalog/document-target.js +75 -0
- package/dist/commands/agent.js +2 -80
- package/dist/commands/init.js +3 -0
- package/dist/commands/night-orchestrator.js +33 -4
- package/dist/dashboard/dashboard.js +5 -6
- package/dist/dashboard/timeline-build.js +5 -1
- package/dist/dashboard/timeline.js +6 -3
- package/dist/docs/yaml-pages.js +17 -17
- package/dist/exec/agent-config.js +28 -16
- package/dist/exec/agent-plan.js +108 -0
- package/dist/exec/commands.js +3 -3
- package/dist/exec/core.js +2 -0
- package/dist/exec/grade-checkpoint.js +12 -0
- package/dist/exec/pipeline-state.js +5 -2
- package/dist/exec/plans-core.js +7 -67
- package/dist/exec/plans-generation.js +28 -7
- package/dist/exec/plans-grade-findings.js +16 -0
- package/dist/exec/plans-planning.js +43 -0
- package/dist/exec/plans-storage.js +5 -2
- package/dist/exec/project.js +4 -1
- package/dist/exec/register.js +82 -6
- package/dist/exec/repo-integration-sync.js +9 -0
- package/dist/exec/repo-integration.js +17 -2
- package/dist/exec/repo-trace.js +17 -4
- package/dist/exec/results.js +2 -0
- package/dist/exec/run/lifecycle-commands.js +2 -0
- package/dist/exec/run/register-core.js +11 -0
- package/dist/exec/run/register-mode.js +19 -1
- package/dist/exec/run/register-resume.js +23 -0
- package/dist/exec/run/register-state.js +4 -1
- package/dist/exec/run/register-worktree.js +28 -1
- package/dist/exec/run/schedule-prepare.js +7 -1
- package/dist/exec/strategy.js +2 -0
- package/dist/exec/task-repos.js +18 -4
- package/dist/exec/worktree-command.js +8 -1
- package/dist/exec/worktree-ops-commit.js +7 -1
- package/dist/exec/worktree-ops-merge.js +40 -1
- package/dist/grade/apply.js +13 -7
- package/dist/grade/command-inspect.js +2 -1
- package/dist/grade/command-run.js +39 -0
- package/dist/grade/grade.js +3 -1
- package/dist/grade/markdown.js +11 -6
- package/dist/grade/pipeline-state.js +8 -6
- package/dist/grade/plan.js +14 -10
- package/dist/grade/run.js +307 -0
- package/dist/grade/target-discovery.js +1 -1
- package/dist/grade/targets.js +44 -22
- package/dist/register/approach.js +35 -0
- package/dist/register/catalog-status.js +49 -0
- package/dist/register/core.js +5 -0
- package/dist/register/create-commands.js +83 -5
- package/dist/register/deliverable-target.js +215 -0
- package/dist/register/dependency.js +123 -0
- package/dist/register/derivation.js +2 -2
- package/dist/register/epic.js +42 -0
- package/dist/register/event-merge.js +5 -2
- package/dist/register/events.js +8 -0
- package/dist/register/external-project.js +4 -0
- package/dist/register/item.js +18 -0
- package/dist/register/maintenance-commands.js +7 -1
- package/dist/register/planning.js +37 -0
- package/dist/register/register.js +5 -1
- package/dist/register/renumber.js +12 -4
- package/dist/register/views.js +55 -4
- package/dist/review/grade.js +19 -17
- package/dist/schedule/schedule.js +3 -1
- package/dist/schedule/strategy-generate-scope.js +5 -1
- package/dist/schedule/strategy-generate.js +1 -0
- package/dist/schedule/strategy-profiles.js +1 -1
- package/dist/shared/agent-plan.js +1 -0
- package/dist/shared/agent-types.js +3 -0
- package/dist/shared/grade-result.js +23 -5
- package/dist/shared/markdownlint-config.js +38 -0
- package/dist/shared/markdownlint-scaffold.js +2 -9
- package/dist/shared/provider-scaffold.js +5 -3
- package/dist/shared/specdojo-config.js +10 -3
- package/dist/shared/specdojo-gitignore.js +4 -0
- package/dist/specdojo.js +5 -1
- package/docs/ja/specdojo/exec-templates/xep-catalog-planning-template.md +24 -0
- package/docs/ja/specdojo/exec-templates/xep-strategy-planning-template.md +24 -0
- package/docs/ja/specdojo/exec-templates/xrp-freeform-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-fully-guided-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-recipe-guided-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-recipe-maintenance-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-retrofit-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-rulebook-maintenance-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-sample-maintenance-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-template-maintenance-template.md +2 -2
- package/docs/ja/specdojo/exec-templates/xrp-template.md +2 -2
- package/docs/ja/specdojo/guides/docs-editing-guide.md +14 -1
- package/docs/ja/specdojo/guides/docs-structure-guide.md +10 -8
- package/docs/ja/specdojo/guides/exec-config-guide.md +44 -12
- package/docs/ja/specdojo/guides/exec-operation-guide.md +20 -15
- package/docs/ja/specdojo/guides/orchestrator-operation-guide.md +19 -1
- package/docs/ja/specdojo/guides/plan-result-lifecycle-guide.md +3 -1
- package/docs/ja/specdojo/guides/practice-system-composition-guide.md +2 -0
- package/docs/ja/specdojo/guides/quick-start-guide.md +59 -16
- package/docs/ja/specdojo/guides/register-operation-guide.md +44 -15
- package/docs/ja/specdojo/guides/remote-host-development-guide.md +15 -1
- package/docs/ja/specdojo/guides/review-guide.md +2 -2
- package/docs/ja/specdojo/guides/ryu-guide.md +12 -0
- package/docs/ja/specdojo/guides/specdojo-overview-guide.md +16 -16
- package/docs/ja/specdojo/guides/timeline-design-guide.md +37 -33
- package/docs/ja/specdojo/recipes/tsd-recipe.md +198 -0
- package/docs/ja/specdojo/references/command-reference.md +92 -29
- package/docs/ja/specdojo/references/specdojo-config-reference.md +49 -16
- package/docs/ja/specdojo/rulebooks/atc-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/atc-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/bac-rulebook.md +5 -4
- package/docs/ja/specdojo/rulebooks/bdd-rulebook.md +3 -2
- package/docs/ja/specdojo/rulebooks/bds-rulebook.md +4 -3
- package/docs/ja/specdojo/rulebooks/bes-index-rulebook.md +8 -7
- package/docs/ja/specdojo/rulebooks/bes-rulebook.md +4 -3
- package/docs/ja/specdojo/rulebooks/bps-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/br-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/ccd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cdfd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cdfd-overview-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cdfd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cdfd-uc-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cdsd-rulebook.md +3 -2
- package/docs/ja/specdojo/rulebooks/cld-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/cnd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cnd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cop-index-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/cop-rulebook.md +3 -2
- package/docs/ja/specdojo/rulebooks/cpd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cpd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cstd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cxd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/cxd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/dct-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/dct-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/dec-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/dmd-index-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/dmd-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/etc-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/etc-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/gl-rulebook.md +9 -6
- package/docs/ja/specdojo/rulebooks/ifd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/ifx-api-rulebook.md +3 -1
- package/docs/ja/specdojo/rulebooks/ifx-cmd-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/ifx-file-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/ifx-index-rulebook.md +2 -0
- package/docs/ja/specdojo/rulebooks/ifx-msg-rulebook.md +4 -2
- package/docs/ja/specdojo/rulebooks/imp-business-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/imp-data-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/imp-interface-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/imp-operations-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/imp-test-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/itc-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/itc-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/mip-index-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/mm-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/mtp-rulebook.md +4 -3
- package/docs/ja/specdojo/rulebooks/nfr-availability-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/nfr-index-rulebook.md +10 -9
- package/docs/ja/specdojo/rulebooks/nfr-integrity-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/nfr-maintainability-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/nfr-operations-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/nfr-performance-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/nfr-reliability-rulebook.md +10 -9
- package/docs/ja/specdojo/rulebooks/nfr-security-safety-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/nfr-usability-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/ntp-rulebook.md +7 -6
- package/docs/ja/specdojo/rulebooks/opd-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/opd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/opr-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/opr-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/otp-index-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/otp-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/pjr-rulebook.md +56 -36
- package/docs/ja/specdojo/rulebooks/pm-change-request-log-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-communication-plan-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-issue-log-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-members-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-organization-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-plan-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-quality-management-plan-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-raci-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-risk-register-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pm-roles-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/pr-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-assumptions-constraints-dependencies-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-charter-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-comparison-of-alternatives-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-issues-and-approach-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-overview-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-scope-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-stakeholder-register-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/prj-success-criteria-and-acceptance-criteria-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/sac-rulebook.md +3 -2
- package/docs/ja/specdojo/rulebooks/sch-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/sf-index-rulebook.md +7 -6
- package/docs/ja/specdojo/rulebooks/sf-rulebook.md +4 -3
- package/docs/ja/specdojo/rulebooks/sld-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/stc-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/stc-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/stsd-mermaid-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/stsd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/sysd-critical-flows-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/sysd-cross-cutting-policy-rulebook.md +9 -8
- package/docs/ja/specdojo/rulebooks/sysd-index-rulebook.md +2 -1
- package/docs/ja/specdojo/rulebooks/sysd-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/tml-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/trc-requirements-to-specs-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/trc-requirements-to-tests-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/tsd-index-rulebook.md +80 -61
- package/docs/ja/specdojo/rulebooks/tsd-rulebook.md +111 -63
- package/docs/ja/specdojo/rulebooks/tsp-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/uis-rulebook.md +3 -2
- package/docs/ja/specdojo/rulebooks/utc-index-rulebook.md +1 -0
- package/docs/ja/specdojo/rulebooks/utc-rulebook.md +1 -0
- package/docs/ja/specdojo/samples/atc-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/atc-sample.md +1 -1
- package/docs/ja/specdojo/samples/bac-sample.md +1 -1
- package/docs/ja/specdojo/samples/bdd-sample.yaml +1 -1
- package/docs/ja/specdojo/samples/bds-sample.md +1 -1
- package/docs/ja/specdojo/samples/bes-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/bes-sample.md +1 -1
- package/docs/ja/specdojo/samples/ccd-sample.md +1 -1
- package/docs/ja/specdojo/samples/cdfd-sample.md +1 -1
- package/docs/ja/specdojo/samples/cdfd-uc-sample.md +1 -1
- package/docs/ja/specdojo/samples/cdsd-sample.md +1 -1
- package/docs/ja/specdojo/samples/cld-sample.md +1 -1
- package/docs/ja/specdojo/samples/cnd-sample.md +1 -1
- package/docs/ja/specdojo/samples/cop-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/cop-sample.md +1 -1
- package/docs/ja/specdojo/samples/cpd-sample.md +1 -1
- package/docs/ja/specdojo/samples/cstd-sample.md +1 -1
- package/docs/ja/specdojo/samples/cxd-sample.md +1 -1
- package/docs/ja/specdojo/samples/dmd-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/dmd-sample.md +1 -1
- package/docs/ja/specdojo/samples/etc-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/etc-sample.md +1 -1
- package/docs/ja/specdojo/samples/gl-sample.yaml +2 -0
- package/docs/ja/specdojo/samples/ifd-sample.md +1 -1
- package/docs/ja/specdojo/samples/ifx-api-sample.yaml +1 -0
- package/docs/ja/specdojo/samples/ifx-cmd-sample.yaml +1 -1
- package/docs/ja/specdojo/samples/ifx-file-sample.md +1 -1
- package/docs/ja/specdojo/samples/ifx-index-sample.yaml +1 -0
- package/docs/ja/specdojo/samples/ifx-msg-sample.yaml +2 -1
- package/docs/ja/specdojo/samples/itc-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/itc-sample.md +1 -1
- package/docs/ja/specdojo/samples/mtp-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-availability-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-integrity-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-maintainability-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-operations-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-performance-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-reliability-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-security-safety-sample.md +1 -1
- package/docs/ja/specdojo/samples/nfr-usability-sample.md +1 -1
- package/docs/ja/specdojo/samples/ntp-sample.md +1 -1
- package/docs/ja/specdojo/samples/opd-sample.md +1 -1
- package/docs/ja/specdojo/samples/opr-sample.md +1 -1
- package/docs/ja/specdojo/samples/otp-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/otp-sample.md +1 -1
- package/docs/ja/specdojo/samples/prj-stakeholder-register-sample.md +1 -1
- package/docs/ja/specdojo/samples/sac-sample.md +1 -1
- package/docs/ja/specdojo/samples/sf-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/sf-sample.md +1 -1
- package/docs/ja/specdojo/samples/sld-sample.md +1 -1
- package/docs/ja/specdojo/samples/stc-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/stc-sample.md +1 -1
- package/docs/ja/specdojo/samples/stsd-sample.md +1 -1
- package/docs/ja/specdojo/samples/sysd-critical-flows-sample.md +1 -1
- package/docs/ja/specdojo/samples/sysd-cross-cutting-policy-sample.md +1 -1
- package/docs/ja/specdojo/samples/sysd-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/tsd-index-sample.md +22 -16
- package/docs/ja/specdojo/samples/tsd-sample.md +241 -21
- package/docs/ja/specdojo/samples/tsp-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/uis-sample.md +1 -1
- package/docs/ja/specdojo/samples/utc-index-sample.md +1 -1
- package/docs/ja/specdojo/samples/utc-sample.md +1 -1
- package/docs/ja/specdojo/standards/document-metadata-standard.md +28 -3
- package/docs/ja/specdojo/standards/id-and-file-naming-standard.md +2 -0
- package/docs/ja/specdojo/standards/rulebook-authoring-standard.md +16 -11
- package/docs/ja/specdojo/standards/sample-authoring-standard.md +1 -0
- package/docs/ja/specdojo/templates/ifx-cmd-template.yaml +1 -1
- package/docs/ja/specdojo/templates/pjr-dependent-items-template.md +22 -0
- package/docs/ja/specdojo/templates/pjr-epic-items-template.md +22 -0
- package/docs/ja/specdojo/templates/pjr-epic-template.md +44 -0
- package/docs/ja/specdojo/templates/pjr-index-template.md +4 -2
- package/docs/specdojo/schemas/v1/bdd.schema.yaml +1 -1
- package/docs/specdojo/schemas/v1/deliverable-frontmatter.schema.yaml +24 -16
- package/docs/specdojo/schemas/v1/exec-common.schema.yaml +4 -1
- package/docs/specdojo/schemas/v1/exec-plan-frontmatter.schema.yaml +1 -1
- package/docs/specdojo/schemas/v1/gl.schema.yaml +8 -0
- package/docs/specdojo/schemas/v1/grade-pipeline-state.schema.yaml +1 -1
- package/docs/specdojo/schemas/v1/ifx-cmd.schema.yaml +5 -1
- package/docs/specdojo/schemas/v1/pipeline-state.schema.yaml +2 -1
- package/docs/specdojo/schemas/v1/register-events.schema.yaml +20 -0
- package/docs/specdojo/schemas/v1/register-item-frontmatter.schema.yaml +73 -4
- package/docs/specdojo/schemas/v1/rulebook-frontmatter.schema.yaml +5 -0
- package/docs/specdojo/schemas/v1/specdojo-config.schema.yaml +21 -3
- package/package.json +2 -2
- package/templates/antigravity/orchestrator.md +14 -9
- package/templates/claude/agents/specdojo-orchestrator.md +14 -9
- package/templates/codex/agents/specdojo-orchestrator.toml +14 -9
- package/templates/codex/orchestrator.md +14 -9
- package/templates/copilot/README.md +2 -1
- package/templates/devcontainer/devcontainer.json +1 -0
- package/templates/init-agent-members.yaml +46 -3
- package/templates/opencode/README.md +118 -14
- package/templates/opencode/agents/specdojo-orchestrator.md +15 -10
- package/templates/opencode/opencode.json +25 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { defaultExecDefaultsPath, loadExecDefaultsConfig, resolveMemberCommand, resolveRateLimitDetection, resolveRateLimitPolicy, } from "./agent-config.js";
|
|
4
|
+
import { resolveProjectPaths } from "./project.js";
|
|
5
|
+
import { selectCandidates } from "./run/shared.js";
|
|
6
|
+
import { executeAgent, loadRosterForExecutionPath } from "./run/agent.js";
|
|
7
|
+
import { gitEnvironment } from "../shared/git-environment.js";
|
|
8
|
+
import { resolveAgentMember as resolveRosterAgentMember, specdojoRootDir, loadMemberRoster, getProjectExecutionPath, loadConfig, } from "../shared/specdojo-config.js";
|
|
9
|
+
// Rate limit は通常失敗と異なり、呼び出し側が処理済みにせず中断・再開する必要がある。
|
|
10
|
+
// shell script が出力文字列を解析せず分岐できるよう、一時失敗を表す専用コードにする。
|
|
11
|
+
export const AGENT_RUN_RATE_LIMIT_EXIT_CODE = 75;
|
|
12
|
+
/** Select a grading executor using the same roster eligibility and priority as exec. */
|
|
13
|
+
export function resolveGradingPlanActor(opts) {
|
|
14
|
+
const { config } = loadConfig();
|
|
15
|
+
const projectId = opts.project ?? config?.current_project ?? Object.keys(config?.projects ?? {})[0];
|
|
16
|
+
const project = projectId ? config?.projects[projectId] : undefined;
|
|
17
|
+
if (!project)
|
|
18
|
+
throw new Error(`Unknown project: ${projectId}`);
|
|
19
|
+
const roster = loadMemberRoster(specdojoRootDir(), project);
|
|
20
|
+
const defaults = loadExecDefaultsConfig(opts.execDefaultsPath ?? defaultExecDefaultsPath(), getProjectExecutionPath(project));
|
|
21
|
+
let nickname = opts.by;
|
|
22
|
+
if (!nickname) {
|
|
23
|
+
const candidates = selectCandidates({ capabilities: [], stage_role: "executor" }, roster, "review", undefined, defaults);
|
|
24
|
+
const legacy = selectCandidates({ capabilities: [] }, roster, "review", undefined, defaults);
|
|
25
|
+
nickname = (candidates[0] ?? legacy[0])?.nickname;
|
|
26
|
+
}
|
|
27
|
+
if (!nickname)
|
|
28
|
+
throw new Error("No runnable grading agent in agent-members.yaml; supply --by");
|
|
29
|
+
const found = resolveAgentMember(roster, nickname);
|
|
30
|
+
if ("error" in found)
|
|
31
|
+
throw new Error(found.error);
|
|
32
|
+
if (found.member.stage_role === "reporter" || found.member.mode === "report")
|
|
33
|
+
throw new Error(`Grading agent must be an executor: ${nickname}`);
|
|
34
|
+
const command = resolveAgentCommand(defaults, found.member);
|
|
35
|
+
if ("error" in command)
|
|
36
|
+
throw new Error(command.error);
|
|
37
|
+
return found.member.nickname;
|
|
38
|
+
}
|
|
39
|
+
export function resolveAgentMember(roster, nickname) {
|
|
40
|
+
const directMembers = roster?.members.filter((candidate) => {
|
|
41
|
+
return candidate.type === "agent" && candidate.nickname === nickname;
|
|
42
|
+
});
|
|
43
|
+
if (directMembers && directMembers.length > 1) {
|
|
44
|
+
return { error: `--by agent nickname is not unique in agent-members.yaml: ${nickname}` };
|
|
45
|
+
}
|
|
46
|
+
const member = resolveRosterAgentMember(roster, nickname);
|
|
47
|
+
if (!member) {
|
|
48
|
+
return { error: `--by agent nickname not found in agent-members.yaml: ${nickname}` };
|
|
49
|
+
}
|
|
50
|
+
if (member.disabled) {
|
|
51
|
+
return { error: `--by agent is disabled in agent-members.yaml: ${nickname}` };
|
|
52
|
+
}
|
|
53
|
+
return { member };
|
|
54
|
+
}
|
|
55
|
+
export function resolveAgentCommand(execDefaults, member) {
|
|
56
|
+
let command;
|
|
57
|
+
try {
|
|
58
|
+
command = resolveMemberCommand(execDefaults, member);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
62
|
+
}
|
|
63
|
+
if (!command) {
|
|
64
|
+
return { error: `--by agent has no resolvable command: ${member.nickname}` };
|
|
65
|
+
}
|
|
66
|
+
return { command };
|
|
67
|
+
}
|
|
68
|
+
export function readAgentPlan(planPath) {
|
|
69
|
+
const absolutePath = resolve(planPath);
|
|
70
|
+
if (!existsSync(absolutePath)) {
|
|
71
|
+
throw new Error(`--plan not found: ${planPath}`);
|
|
72
|
+
}
|
|
73
|
+
const prompt = readFileSync(absolutePath, "utf8");
|
|
74
|
+
if (!prompt.trim()) {
|
|
75
|
+
throw new Error(`--plan is empty: ${planPath}`);
|
|
76
|
+
}
|
|
77
|
+
return prompt;
|
|
78
|
+
}
|
|
79
|
+
export function writeAgentOutput(outPath, stdout) {
|
|
80
|
+
const absolutePath = resolve(outPath);
|
|
81
|
+
mkdirSync(dirname(absolutePath), { recursive: true });
|
|
82
|
+
writeFileSync(absolutePath, stdout, "utf8");
|
|
83
|
+
return absolutePath;
|
|
84
|
+
}
|
|
85
|
+
export async function runAgentPlan(opts) {
|
|
86
|
+
const prompt = readAgentPlan(opts.planPath);
|
|
87
|
+
const paths = resolveProjectPaths({ project: opts.project });
|
|
88
|
+
const roster = loadRosterForExecutionPath(paths.executionPath);
|
|
89
|
+
const memberResult = resolveAgentMember(roster, opts.nickname);
|
|
90
|
+
if ("error" in memberResult)
|
|
91
|
+
throw new Error(memberResult.error);
|
|
92
|
+
const { member } = memberResult;
|
|
93
|
+
const execDefaults = loadExecDefaultsConfig(opts.execDefaultsPath ?? defaultExecDefaultsPath(), paths.executionPath);
|
|
94
|
+
const commandResult = resolveAgentCommand(execDefaults, member);
|
|
95
|
+
if ("error" in commandResult)
|
|
96
|
+
throw new Error(commandResult.error);
|
|
97
|
+
const { command } = commandResult;
|
|
98
|
+
if (opts.dryRun) {
|
|
99
|
+
process.stdout.write(`${command}\n`);
|
|
100
|
+
return { command, actor: member.nickname };
|
|
101
|
+
}
|
|
102
|
+
const execution = await executeAgent(command, prompt, resolveRateLimitDetection(execDefaults, member.provider), member.provider, resolveRateLimitPolicy(execDefaults, member.provider)?.cooldown_seconds, specdojoRootDir(), {
|
|
103
|
+
...gitEnvironment(),
|
|
104
|
+
SPECDOJO_SCHEDULE_PATH: paths.schedulePath,
|
|
105
|
+
SPECDOJO_EXECUTION_PATH: paths.executionPath,
|
|
106
|
+
}, opts.quiet);
|
|
107
|
+
return { execution, command, actor: member.nickname };
|
|
108
|
+
}
|
package/dist/exec/commands.js
CHANGED
|
@@ -10,7 +10,7 @@ import { displayWidth, nowUtcIsoSeconds, padEndDisplay, requireNonEmpty } from "
|
|
|
10
10
|
import { archivePlan, buildInPlaceStem, generateDeliverablePlan, generateSinglePlan, resolveDeliverableTarget, stemFromPlanPath, } from "./plans.js";
|
|
11
11
|
import { runProviderScaffold, specdojoPackageRootDir } from "../shared/provider-scaffold.js";
|
|
12
12
|
import { generateRegisterPlan, normalizePjrId, resolveRegisterRunTarget } from "./register.js";
|
|
13
|
-
import { scaffoldViewpoints } from "../review/plan.js";
|
|
13
|
+
import { commonViewpointsPath, scaffoldViewpoints } from "../review/plan.js";
|
|
14
14
|
import { registerCycleCommand, registerResumeCommand, registerRunCommand, registerSlotsCommand, } from "./run/run.js";
|
|
15
15
|
import { buildTaskView } from "./task-view.js";
|
|
16
16
|
import { registerExecWorktreeCommands } from "./worktree-command.js";
|
|
@@ -466,7 +466,7 @@ export function registerExecCommands(program) {
|
|
|
466
466
|
if (!project)
|
|
467
467
|
throw new Error(`Unknown project: ${projectId}`);
|
|
468
468
|
const baseDir = specdojoRootDir();
|
|
469
|
-
const commonPath =
|
|
469
|
+
const commonPath = commonViewpointsPath();
|
|
470
470
|
const viewpointsRel = getProjectViewpointsPath(project);
|
|
471
471
|
if (viewpointsRel) {
|
|
472
472
|
const outputPath = pathResolve(baseDir, viewpointsRel);
|
|
@@ -484,7 +484,7 @@ export function registerExecCommands(program) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
else {
|
|
487
|
-
process.stdout.write(`viewpoints_path not set for project '${projectId}'
|
|
487
|
+
process.stdout.write(`viewpoints_path not set for project '${projectId}'; using specdojo:pm-review-viewpoints (${commonPath}).\n`);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
catch (error) {
|
package/dist/exec/core.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { repoRelative, worktreeStatusPaths } from "../shared/git.js";
|
|
3
|
+
/** Include canonical grade sidecars, including deletions, in the execution checkpoint. */
|
|
4
|
+
export function gradeCheckpointPaths(context) {
|
|
5
|
+
const execution = repoRelative(context.repoRoot, context.executionPath);
|
|
6
|
+
return worktreeStatusPaths(context.repoRoot)
|
|
7
|
+
.filter((path) => isGradeCheckpointPath(path, execution))
|
|
8
|
+
.map((path) => resolve(context.repoRoot, path));
|
|
9
|
+
}
|
|
10
|
+
export function isGradeCheckpointPath(path, execution) {
|
|
11
|
+
return ["results", "criteria", "pipeline"].some((kind) => path.startsWith(`${execution}/grade/${kind}/`));
|
|
12
|
+
}
|
|
@@ -77,6 +77,7 @@ function isRepoIntegrationState(value) {
|
|
|
77
77
|
return ((repo.status === "pending" ||
|
|
78
78
|
repo.status === "merged" ||
|
|
79
79
|
repo.status === "unchanged" ||
|
|
80
|
+
repo.status === "branch-only" ||
|
|
80
81
|
repo.status === "failed") &&
|
|
81
82
|
(typeof repo.commit === "string" || repo.commit === null) &&
|
|
82
83
|
(typeof repo.merged_at === "string" || repo.merged_at === null) &&
|
|
@@ -176,13 +177,15 @@ export function updatePipelineRepoIntegration(state, repo, patch, updatedAt) {
|
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
179
|
/**
|
|
179
|
-
* Names of
|
|
180
|
+
* Names of repositories whose handling completed (`merged`, `unchanged` or `branch-only`) under
|
|
180
181
|
* `stages.integrate.repos`. A state without per-repository records yields an empty set.
|
|
181
182
|
*/
|
|
182
183
|
export function integratedRepoNames(state) {
|
|
183
184
|
const repos = state.stages.integrate?.repos ?? {};
|
|
184
185
|
return new Set(Object.entries(repos)
|
|
185
|
-
.filter(([, entry]) => entry.status === "merged" ||
|
|
186
|
+
.filter(([, entry]) => entry.status === "merged" ||
|
|
187
|
+
entry.status === "unchanged" ||
|
|
188
|
+
entry.status === "branch-only")
|
|
186
189
|
.map(([name]) => name));
|
|
187
190
|
}
|
|
188
191
|
function resolveArtifactRef(worktreePath, ref) {
|
package/dist/exec/plans-core.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { deliverableDocId, loadPlanCatalogDocs as loadCatalogDocs, } from "../catalog/document-target.js";
|
|
2
|
+
export { deliverableDocId, resolveDeliverableByDocId, loadPlanCatalogDocs as loadCatalogDocs, } from "../catalog/document-target.js";
|
|
1
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
4
|
import { basename, join, relative, resolve } from "node:path";
|
|
3
5
|
import { load } from "../shared/yaml.js";
|
|
@@ -5,14 +7,15 @@ import { specdojoRootDir } from "../shared/specdojo-config.js";
|
|
|
5
7
|
import { kataDirsForKinds, resolveIncludedRulebooks, resolveKataRefs } from "../kata/kata.js";
|
|
6
8
|
import { resolveBasePath, resolveDeliverablePath } from "../catalog/paths.js";
|
|
7
9
|
import { isDctPlanFileName } from "../catalog/plan.js";
|
|
8
|
-
import { buildSpecdojoFrontmatter
|
|
10
|
+
import { buildSpecdojoFrontmatter } from "../docs/frontmatter-namespace.js";
|
|
9
11
|
import { qualifyPracticeId, SPECDOJO_PRACTICE_AUTHORITY } from "../shared/practice-id.js";
|
|
10
12
|
import { MISSING } from "../shared/plan-templates.js";
|
|
11
13
|
export { MISSING, execTemplatePath, execTemplatesDir, injectCommonConventions, loadPlanTemplate, } from "../shared/plan-templates.js";
|
|
12
14
|
import { resolveViewpointsDoc, viewpointAppliesToDocument } from "../review/plan.js";
|
|
13
15
|
import { listFilesRecursive, nowUtcIsoSeconds, randomHex, tsForFilenameUtc } from "./shared.js";
|
|
14
|
-
import {
|
|
16
|
+
import { gradeResultPathForDocument, readGradeResultForDocument } from "../shared/grade-result.js";
|
|
15
17
|
import { renderReviewGradeSummary, reviewGradeFreshness } from "../review/grade.js";
|
|
18
|
+
import { planGradeFindingText } from "./plans-grade-findings.js";
|
|
16
19
|
export function execDocId(projectId, prefix, localBase) {
|
|
17
20
|
const localId = `${prefix}-${localBase.toLowerCase()}`;
|
|
18
21
|
return projectId ? `${projectId}:${localId}` : localId;
|
|
@@ -84,28 +87,6 @@ export function findDeliverableInfo(catalogPath, localId) {
|
|
|
84
87
|
}
|
|
85
88
|
return null;
|
|
86
89
|
}
|
|
87
|
-
export function loadCatalogDocs(catalogPath) {
|
|
88
|
-
if (!catalogPath || !existsSync(catalogPath))
|
|
89
|
-
return [];
|
|
90
|
-
// Catalog scans walk subdirectories, so agent judgment plans (plans/dct-plan-*.yaml)
|
|
91
|
-
// must be excluded; they share the dct- prefix but carry no catalog structure.
|
|
92
|
-
const files = listFilesRecursive(catalogPath)
|
|
93
|
-
.filter((f) => {
|
|
94
|
-
const name = f.split("/").pop() ?? "";
|
|
95
|
-
return /^dct-.+\.ya?ml$/i.test(name) && !isDctPlanFileName(name);
|
|
96
|
-
})
|
|
97
|
-
.sort();
|
|
98
|
-
const docs = [];
|
|
99
|
-
for (const filePath of files) {
|
|
100
|
-
try {
|
|
101
|
-
docs.push(load(readFileSync(filePath, "utf8")));
|
|
102
|
-
}
|
|
103
|
-
catch {
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return docs;
|
|
108
|
-
}
|
|
109
90
|
function resolvedDeliverablesInCatalog(catalogPath) {
|
|
110
91
|
const deliverables = [];
|
|
111
92
|
const visit = (sections, parentBase, domain) => {
|
|
@@ -130,25 +111,6 @@ function resolvedDeliverablesInCatalog(catalogPath) {
|
|
|
130
111
|
}
|
|
131
112
|
return deliverables;
|
|
132
113
|
}
|
|
133
|
-
// Register targets use document IDs rather than schedule local_ids. Resolve the document ID
|
|
134
|
-
// back to its catalog entry so register-originated approach plans can share schedule rendering.
|
|
135
|
-
export function resolveDeliverableByDocId(catalogPath, projectId, targetId) {
|
|
136
|
-
const matches = resolvedDeliverablesInCatalog(catalogPath).filter((target) => {
|
|
137
|
-
const docId = deliverableDocId(projectId, target.info.deliverable.local_id, target.info.resolvedPath);
|
|
138
|
-
return (targetId === docId ||
|
|
139
|
-
targetId === target.localId ||
|
|
140
|
-
targetId === qualifiedDocId(projectId, target.localId));
|
|
141
|
-
});
|
|
142
|
-
if (matches.length === 0) {
|
|
143
|
-
throw new Error(`catalog deliverable target not found for document id: ${targetId}`);
|
|
144
|
-
}
|
|
145
|
-
if (matches.length > 1) {
|
|
146
|
-
throw new Error(`ambiguous catalog deliverable target for document id ${targetId}: ${matches
|
|
147
|
-
.map((match) => match.localId)
|
|
148
|
-
.join(", ")}`);
|
|
149
|
-
}
|
|
150
|
-
return matches[0];
|
|
151
|
-
}
|
|
152
114
|
/** Resolve a project-repository-relative file path to its catalog entry, if any. */
|
|
153
115
|
export function findDeliverableByPath(catalogPath, targetPath) {
|
|
154
116
|
const normalized = targetPath.replaceAll("\\", "/").replace(/^\/+/, "");
|
|
@@ -267,7 +229,7 @@ export function gradeFindingsText(projectId, targetPath) {
|
|
|
267
229
|
if (!result || result.findings.length === 0)
|
|
268
230
|
return "- なし";
|
|
269
231
|
return result.findings
|
|
270
|
-
.map((finding) => `- ${finding.id}
|
|
232
|
+
.map((finding) => `- ${finding.id} ${planGradeFindingText(finding)}`)
|
|
271
233
|
.join("\n");
|
|
272
234
|
}
|
|
273
235
|
catch {
|
|
@@ -333,7 +295,7 @@ export function gradeResultRef(projectId, subjectPath) {
|
|
|
333
295
|
export function kataRefState(refPath) {
|
|
334
296
|
if (refPath === MISSING)
|
|
335
297
|
return "unresolved";
|
|
336
|
-
return existsSync(
|
|
298
|
+
return existsSync(resolve(specdojoRootDir(), refPath)) ? "existing" : "missing";
|
|
337
299
|
}
|
|
338
300
|
// 対象成果物の depends_on を、依存先 doc の [[id]] 参照の入れ子リストで提示する。
|
|
339
301
|
// id は依存先の frontmatter、未作成なら配置規約から解決する。agent へ plan を渡すときに
|
|
@@ -478,28 +440,6 @@ const TARGET_REF_KINDS = {
|
|
|
478
440
|
function qualifiedDocId(projectId, localId) {
|
|
479
441
|
return projectId ? `${projectId}:${localId}` : localId;
|
|
480
442
|
}
|
|
481
|
-
// 成果物の doc id は、既存文書では frontmatter を正本とする。author 前など文書が
|
|
482
|
-
// 未作成の場合は配置規約に従い、product 配下だけをローカル ID、projects 配下を含む
|
|
483
|
-
// その他の配置を従来どおり project 修飾 ID とする。
|
|
484
|
-
export function deliverableDocId(projectId, localId, resolvedPath) {
|
|
485
|
-
if (resolvedPath) {
|
|
486
|
-
const absolutePath = resolve(specdojoRootDir(), resolvedPath);
|
|
487
|
-
if (existsSync(absolutePath)) {
|
|
488
|
-
try {
|
|
489
|
-
const id = readSpecdojoNamespace(readFileSync(absolutePath, "utf8")).id;
|
|
490
|
-
if (typeof id === "string" && id.trim())
|
|
491
|
-
return id.trim();
|
|
492
|
-
}
|
|
493
|
-
catch {
|
|
494
|
-
// 読み取り不能・不正 frontmatter は配置によるフォールバックへ進む。
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
const normalizedPath = resolvedPath.replaceAll("\\", "/").replace(/^\/+/, "");
|
|
498
|
-
if (/^docs\/[a-z]{2}\/product(?:\/|$)/.test(normalizedPath))
|
|
499
|
-
return localId;
|
|
500
|
-
}
|
|
501
|
-
return qualifiedDocId(projectId, localId);
|
|
502
|
-
}
|
|
503
443
|
// タスクが対象とする文書の doc id リスト。先頭は対象成果物(配置に対応する doc id)、
|
|
504
444
|
// 以降は approach に応じて変更・確定しうる実践の型の doc id。いずれも doc-index で
|
|
505
445
|
// パスへ解決できる id にし、schedule やファイル名の命名規約に依存せず対象を機械的に
|
|
@@ -5,6 +5,7 @@ import { resolveDeliverableSchemaRef, resolveKataRefs } from "../kata/kata.js";
|
|
|
5
5
|
import { formatMarkdownFile } from "./format.js";
|
|
6
6
|
import { expandTemplate } from "./shared.js";
|
|
7
7
|
import { isAuthoringApproach } from "../kata/authoring.js";
|
|
8
|
+
import { isPlanningApproach } from "../register/planning.js";
|
|
8
9
|
import { MISSING, applicableReviewCriteria, crossDeliverableTargetDetails, deliverableDependsOn, deliverableName, deliverableOverview, deliverablePath, doneCriteriaChecklist, doneCriteriaGoals, doneCriteriaItems, execDocId, findDeliverableInfo, frontmatter, gradeFindingsText, gradeFindingTargetPath, gradeResultRef, gradeTargetKind, implementationEvidence, injectCommonConventions, kataRefState, loadPlanTemplate, loadRoles, loadViewpoints, ownerRoleFields, phaseDescriptionText, projectContextSection, repoRelativePath, reviewDoneCriteriaRows, reviewGradeSummaryText, rulebookIncludesText, targetDocIds, targetDocIdsForTask, } from "./plans-core.js";
|
|
9
10
|
function buildEditPlanMarkdown(template, task, deliverable, roleMap, vpMap, projectId, catalogPath, projectContext, resultRef, stem, crossDeliverables = new Map(), planOverrides) {
|
|
10
11
|
const cpm = task.cpm;
|
|
@@ -39,7 +40,9 @@ function buildEditPlanMarkdown(template, task, deliverable, roleMap, vpMap, proj
|
|
|
39
40
|
_DELIVERABLE_DEPENDS_ON_: deliverableDependsOn(deliverable, projectId, catalogPath),
|
|
40
41
|
_PROJECT_CONTEXT_: projectContextSection(projectContext, deliverable, task.approach, projectId),
|
|
41
42
|
_DELIVERABLE_OVERVIEW_: deliverableOverview(deliverable),
|
|
42
|
-
_IMPLEMENTATION_EVIDENCE_:
|
|
43
|
+
_IMPLEMENTATION_EVIDENCE_: deliverable?.catalogless
|
|
44
|
+
? "個票に指定された実装のパスを読み取り専用の調査入力とする。パスが未指定なら実装反映の前に個票へ明記する。"
|
|
45
|
+
: implementationEvidence(deliverable),
|
|
43
46
|
_DELIVERABLE_PATH_: deliverablePath(deliverable),
|
|
44
47
|
_RESULT_REF_: resultRef,
|
|
45
48
|
_RULEBOOK_REF_: refs.rulebook,
|
|
@@ -54,7 +57,9 @@ function buildEditPlanMarkdown(template, task, deliverable, roleMap, vpMap, proj
|
|
|
54
57
|
_OWNER_ROLE_LABEL_: ownerRole.label,
|
|
55
58
|
_OWNER_ROLE_NOTE_: ownerRole.note,
|
|
56
59
|
_OWNER_ROLE_VIEWPOINTS_: ownerRole.viewpoints,
|
|
57
|
-
_DONE_CRITERIA_GOALS_:
|
|
60
|
+
_DONE_CRITERIA_GOALS_: deliverable?.catalogless
|
|
61
|
+
? "カタログの `done_criteria` はない。個票の完了条件と rulebook を完了基準とする。"
|
|
62
|
+
: doneCriteriaGoals(criteria, task.owner),
|
|
58
63
|
_DONE_CRITERIA_CHECKLIST_: doneCriteriaChecklist(criteria),
|
|
59
64
|
_DONE_CRITERIA_ITEMS_: doneCriteriaItems(criteria),
|
|
60
65
|
_GRADE_FINDINGS_: gradeFindingsText(projectId, gradeFindingTargetPath(task.approach, deliverable, refs)),
|
|
@@ -68,13 +73,26 @@ function buildEditPlanMarkdown(template, task, deliverable, roleMap, vpMap, proj
|
|
|
68
73
|
.map((example) => `- \`${example.id}\`: ${example.name}(\`${example.path}\`、${example.catalog ? "現在の参照" : "参照更新"}: \`${example.currentReference}\`)`)
|
|
69
74
|
.join("\n") || "- なし(kata だけを新規作成する)",
|
|
70
75
|
};
|
|
71
|
-
const
|
|
76
|
+
const effectiveTemplate = deliverable?.catalogless
|
|
77
|
+
? template
|
|
78
|
+
.split("\n")
|
|
79
|
+
.filter((line) => !["recipe", "sample", "template"].some((kind) => refs[kind] === MISSING && line.includes(`_${kind.toUpperCase()}_REF_`)))
|
|
80
|
+
.join("\n")
|
|
81
|
+
: template;
|
|
82
|
+
let body = expandTemplate(effectiveTemplate, values);
|
|
83
|
+
if (deliverable?.catalogless && task.approach === "retrofit") {
|
|
84
|
+
body = body.replace("成果物カタログの `evidence_refs` から展開した", "個票に明記する");
|
|
85
|
+
}
|
|
72
86
|
if (!planOverrides?.additionalConditions)
|
|
73
87
|
return body;
|
|
74
88
|
const section = [
|
|
75
89
|
"## 個票の追加完了条件",
|
|
76
90
|
"",
|
|
77
|
-
|
|
91
|
+
isPlanningApproach(task.approach)
|
|
92
|
+
? "次の生成手順・完了条件と、個票が定める追加条件を満たす。"
|
|
93
|
+
: deliverable?.catalogless
|
|
94
|
+
? "個票が定める次の条件と rulebook を満たす。"
|
|
95
|
+
: "成果物カタログの `done_criteria` に加え、登録簿の個票が定める次の条件も満たす。",
|
|
78
96
|
"",
|
|
79
97
|
planOverrides.additionalConditions.trim(),
|
|
80
98
|
"",
|
|
@@ -132,8 +150,9 @@ function buildReviewPlanMarkdown(template, task, deliverable, criteria, vpMap, p
|
|
|
132
150
|
}
|
|
133
151
|
async function writeTaskPlan(ctx, task, override) {
|
|
134
152
|
const mode = task.mode ?? "edit";
|
|
135
|
-
if (isAuthoringApproach(task.approach)
|
|
136
|
-
|
|
153
|
+
if ((isAuthoringApproach(task.approach) || isPlanningApproach(task.approach)) &&
|
|
154
|
+
override?.origin !== "register") {
|
|
155
|
+
throw new Error(`Approach ${task.approach} is register-only because schedule targets cannot express its target contract`);
|
|
137
156
|
}
|
|
138
157
|
const localId = task.local_id;
|
|
139
158
|
const targetLocalIds = [...new Set(task.target_local_ids ?? [])];
|
|
@@ -158,7 +177,9 @@ async function writeTaskPlan(ctx, task, override) {
|
|
|
158
177
|
throw new Error(`Task ${task.id} has execution: human; claim it to create and use its result instead of a plan.`);
|
|
159
178
|
}
|
|
160
179
|
const planTask = { ...task, mode };
|
|
161
|
-
if (task.approach === "retrofit" &&
|
|
180
|
+
if (task.approach === "retrofit" &&
|
|
181
|
+
!deliverable?.catalogless &&
|
|
182
|
+
implementationEvidence(deliverable) === MISSING) {
|
|
162
183
|
throw new Error(`Task ${task.id} uses approach: retrofit but the target deliverable has no evidence_refs.`);
|
|
163
184
|
}
|
|
164
185
|
const template = loadPlanTemplate(mode, task.approach, ctx.templateCache);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { gradeFindingDisplayMessage } from "../shared/grade-result.js";
|
|
2
|
+
// 引用した文書や finding 本文の Markdown を、plan 自身のリンクとして解釈させない。
|
|
3
|
+
function inlineCode(value) {
|
|
4
|
+
const text = value.replace(/\r\n?|\n/g, " ").trim();
|
|
5
|
+
const longestRun = Math.max(0, ...(text.match(/`+/g) ?? []).map((run) => run.length));
|
|
6
|
+
const delimiter = "`".repeat(longestRun + 1);
|
|
7
|
+
// 端のバッククォートと区切りが結合しないよう、表示時に除去される空白を加える。
|
|
8
|
+
const padding = /^`|`$/.test(text) ? " " : "";
|
|
9
|
+
return `${delimiter}${padding}${text}${padding}${delimiter}`;
|
|
10
|
+
}
|
|
11
|
+
export function planGradeFindingText(finding) {
|
|
12
|
+
const anchor = inlineCode(JSON.stringify(finding.anchor));
|
|
13
|
+
const message = inlineCode(gradeFindingDisplayMessage(finding));
|
|
14
|
+
// register の箇条書き先頭でも [判定情報]: 本文 が参照リンク定義にならないようにする。
|
|
15
|
+
return `\\[${finding.severity}/${finding.rule}; line=${finding.line}; anchor=${anchor}\\]: ${message}`;
|
|
16
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { join, relative } from "node:path";
|
|
3
|
+
import { loadCatalogDocs } from "../catalog/build.js";
|
|
4
|
+
import { loadTemplatesForDomain, resolvePlanPath } from "../catalog/plan.js";
|
|
5
|
+
import { resolveSpecdojoPath } from "../docs/template-resolution.js";
|
|
6
|
+
import { resolveKataRefs } from "../kata/kata.js";
|
|
7
|
+
import { planningTarget } from "../register/planning.js";
|
|
8
|
+
import { getProjectSchedulePath, getProjectTimelinePath, } from "../shared/specdojo-config.js";
|
|
9
|
+
export function planningPlanFields(opts) {
|
|
10
|
+
const unit = planningTarget(opts.approach, opts.target);
|
|
11
|
+
const path = (file) => relative(opts.repoRoot, file).replaceAll("\\", "/");
|
|
12
|
+
const catalogs = existsSync(opts.catalogPath) ? loadCatalogDocs(opts.catalogPath) : [];
|
|
13
|
+
const catalogRefs = catalogs
|
|
14
|
+
.map(({ doc, filePath }) => `- \`${doc.id}\`: \`${path(filePath)}\`(domain: \`${doc.domain}\`)`)
|
|
15
|
+
.join("\n") || "- なし。必要な上流入力を個票から確認する。";
|
|
16
|
+
const catalog = opts.approach === "catalog-planning";
|
|
17
|
+
const refs = resolveKataRefs(catalog ? "specdojo:dct-rulebook" : "specdojo:sch-rulebook");
|
|
18
|
+
const common = [
|
|
19
|
+
`### 作業単位と既存カタログ`,
|
|
20
|
+
"",
|
|
21
|
+
`対象: \`${opts.target}\`(project: \`${opts.projectId}\`)。既存カタログは読み取り、scope と依存関係の判断に取り込む。`,
|
|
22
|
+
"",
|
|
23
|
+
catalogRefs,
|
|
24
|
+
"",
|
|
25
|
+
"### 参照する実践の型",
|
|
26
|
+
"",
|
|
27
|
+
...Object.entries(refs).map(([kind, ref]) => `- ${kind}: \`${ref}\``),
|
|
28
|
+
"",
|
|
29
|
+
];
|
|
30
|
+
const projectArg = `--project ${opts.projectId}`;
|
|
31
|
+
if (catalog) {
|
|
32
|
+
const templates = loadTemplatesForDomain(resolveSpecdojoPath("docs/ja/specdojo/templates"), unit, opts.repoRoot);
|
|
33
|
+
if (templates.length === 0)
|
|
34
|
+
throw new Error(`No catalog template found for domain '${unit}'`);
|
|
35
|
+
const plan = path(resolvePlanPath(opts.catalogPath, unit));
|
|
36
|
+
common.push("### 判定・生成手順と完了条件", "", ...templates.map((template) => `- domain の雛形: \`${template.template.id}\`(\`${template.relPath}\`)`), "", `1. \`specdojo catalog plan prompt ${projectArg} --domain ${unit}\` を実行し、その入力文書・判定規約に従う。データフローがない場合は、個票が指定する上流資料を \`--input <path>\` で明示する。入力不足なら停止して必要資料を申し送る。`, "2. agent の判定を YAML に出力する。インスタンス・根拠・除外・未確定事項を記録する。既存カタログと kata を優先して参照し、テンプレート由来の構造を独自に再作成しない。", `3. \`specdojo catalog plan scaffold ${projectArg} --domain ${unit} --from <agent-output>.yaml\` で \`${plan}\` に検証保存する。prompt に入力を追加した場合は同じ \`--input\` を渡す。`, `4. \`specdojo catalog plan validate ${projectArg} --domain ${unit}\` を通す。blocking な \`open_questions\` を解消する。`, `5. \`specdojo catalog scaffold ${projectArg} --domain ${unit} --plan\` で \`dct-${unit}.yaml\`(物理分割時は全 part)を生成する。\`dct-index.yaml\` の \`size\` がない場合は個票の範囲に合わせて \`--size <small|medium|large>\` を明示する。既存ファイルは差分を確認し、必要な場合だけ \`--force\` を使う。`, `6. \`specdojo catalog validate ${projectArg}\` を通す。先に \`dct-index.yaml\` の全 domain の索引を整備し、生成した domain を登録する(物理分割も同じ domain の一項目とする)。判定計画とカタログの保存、参照・依存・完了条件の整合を完了基準とする。`, "7. 個票の作業内容・対応結果と実行記録に判断・検証結果を記録する。todo の close は runner と人が行う。close 後の `timeline build` が domain を `primary` と導く。`tml-index.yaml` は変更しない。");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const strategy = join(getProjectSchedulePath(opts.project), `sch-strategy-${unit}.yaml`).replaceAll("\\", "/");
|
|
40
|
+
common.push("### scope・intent の宣言と完了条件", "", `1. \`${join(getProjectTimelinePath(opts.project), "tml-index.yaml").replaceAll("\\", "/")}\` があれば対象 track の domains と依存・着手順を確認する。\`timeline build\` の register 由来の状態と既存カタログも確認する。`, `2. \`${strategy}\` に \`scope.catalogs\`(ID・リポジトリルートからのパス)、\`scope.include_kinds\` と \`approach_rules\` を宣言する。既存 scope の意図を保ち、各成果物の \`local_ids\` と \`intent\`(例: author-deliverable / bootstrap-kata-set / confirm-deliverable)、必要時の \`kata_target\` / \`bootstrap_scope\` を根拠付きで決める。`, "3. 主担当を `owner_rules` または生成時の `--owner` / `--default-owner` で明示する。`done_criteria.roles` を主担当と解釈しない。必要な kata の grade が不足なら先に評価し、不明な判断を推測で補わない。", `4. \`specdojo schedule strategy generate ${projectArg} --track ${unit}\` を実行し、scope・intent・担当・依存関係に関するエラーを解消する。既存 strategy の変更は差分を確認し、必要な場合だけ \`--force\` を指定する。`, `5. \`specdojo schedule build ${projectArg} --track ${unit}\` を通し、\`sch-track-${unit}.yaml\` が生成され、scope の成果物とタスクの対応・依存が一致することを確認する。`, "6. strategy と track の保存、scope 全件の intent と担当の解決、生成・検証の成功を完了基準とし、個票の作業内容・対応結果と実行記録へ判断と検証を記録する。カタログ本体と `tml-index.yaml` は変更しない。");
|
|
41
|
+
}
|
|
42
|
+
return { refs, conditions: common.join("\n") };
|
|
43
|
+
}
|
|
@@ -3,8 +3,9 @@ import { join, relative } from "node:path";
|
|
|
3
3
|
import { specdojoRootDir } from "../shared/specdojo-config.js";
|
|
4
4
|
import { nowUtcIsoSeconds, randomHex, tsForFilenameUtc } from "./shared.js";
|
|
5
5
|
import { readSpecdojoNamespace } from "../docs/frontmatter-namespace.js";
|
|
6
|
-
import {
|
|
6
|
+
import { gradeResultPathForDocument, readGradeResultForDocument } from "../shared/grade-result.js";
|
|
7
7
|
import { lookupDocIndex } from "../docs/doc-index.js";
|
|
8
|
+
import { planGradeFindingText } from "./plans-grade-findings.js";
|
|
8
9
|
export function archivePlan(opts, dependencies = {}) {
|
|
9
10
|
const plansDir = join(opts.executionPath, "exec", "plans");
|
|
10
11
|
const from = join(plansDir, `${opts.slug}-plan.md`);
|
|
@@ -43,6 +44,8 @@ const PLAN_APPROACHES = [
|
|
|
43
44
|
"recipe-guided",
|
|
44
45
|
"freeform",
|
|
45
46
|
"bootstrap",
|
|
47
|
+
"catalog-planning",
|
|
48
|
+
"strategy-planning",
|
|
46
49
|
"rulebook-authoring",
|
|
47
50
|
"recipe-authoring",
|
|
48
51
|
"sample-authoring",
|
|
@@ -132,7 +135,7 @@ export function registerGradeFindingsText(projectId, ticketPath) {
|
|
|
132
135
|
lines.push(` - 他 ${result.findings.length - MAX_FINDINGS} 件の finding があります。詳細はサイドカーを参照してください。`);
|
|
133
136
|
break;
|
|
134
137
|
}
|
|
135
|
-
lines.push(` -
|
|
138
|
+
lines.push(` - ${planGradeFindingText(finding)}`);
|
|
136
139
|
findingCount++;
|
|
137
140
|
}
|
|
138
141
|
docCount++;
|
package/dist/exec/project.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { join, resolve } from "node:path";
|
|
2
2
|
import { getProjectCatalogPath, getProjectContext, getProjectExecutionPath, getProjectRolesPath, getProjectSchedulePath, getProjectViewpointsPath, loadConfig, loadEnv, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
3
|
+
import { commonViewpointsPath } from "../review/plan.js";
|
|
3
4
|
function projectBaseDir() {
|
|
4
5
|
return specdojoRootDir();
|
|
5
6
|
}
|
|
@@ -65,7 +66,9 @@ export function resolveProjectPaths(opts) {
|
|
|
65
66
|
executionPath: resolveProjectRelative(baseDir, getProjectExecutionPath(project)),
|
|
66
67
|
catalogPath: catalogPath ? resolveProjectRelative(baseDir, catalogPath) : undefined,
|
|
67
68
|
rolesPath: rolesPath ? resolveProjectRelative(baseDir, rolesPath) : undefined,
|
|
68
|
-
viewpointsPath: viewpointsPath
|
|
69
|
+
viewpointsPath: viewpointsPath
|
|
70
|
+
? resolveProjectRelative(baseDir, viewpointsPath)
|
|
71
|
+
: commonViewpointsPath(),
|
|
69
72
|
projectContext: getProjectContext(project),
|
|
70
73
|
};
|
|
71
74
|
}
|
package/dist/exec/register.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveRegisterDeliverableTarget, } from "../register/deliverable-target.js";
|
|
1
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
3
|
import { basename, extname, join, relative, resolve } from "node:path";
|
|
3
4
|
import { findRegisterItem, loadRegisterItems, PJR_ID_RE, resolveRegisterPaths, TERMINAL_STATUSES_SET, VALID_PRIORITIES, VALID_STATUSES, VALID_TYPES, } from "../register/register.js";
|
|
@@ -14,6 +15,8 @@ import { formatMarkdownFile } from "./format.js";
|
|
|
14
15
|
import { loadConfig, specdojoRootDir } from "../shared/specdojo-config.js";
|
|
15
16
|
import { resolveAuthoringSources, } from "../register/authoring-sources.js";
|
|
16
17
|
import { repoEnvironmentVariableName } from "./task-repos.js";
|
|
18
|
+
import { isPlanningApproach } from "../register/planning.js";
|
|
19
|
+
import { planningPlanFields } from "./plans-planning.js";
|
|
17
20
|
const EDIT_TYPES = new Set(["todo", "issue", "change-request"]);
|
|
18
21
|
const INVESTIGATE_TYPES = new Set(["question", "risk"]);
|
|
19
22
|
export function registerItemCategory(itemType) {
|
|
@@ -324,6 +327,51 @@ function catalogSource(catalogPath, projectId, source) {
|
|
|
324
327
|
}
|
|
325
328
|
return findDeliverableByPath(catalogPath, source.path);
|
|
326
329
|
}
|
|
330
|
+
function cataloglessPlanFields(resolved, item, targetId, ticketPath) {
|
|
331
|
+
let targets = [targetId];
|
|
332
|
+
let conditionsText = "";
|
|
333
|
+
if (resolved.catalogless) {
|
|
334
|
+
conditionsText =
|
|
335
|
+
"カタログの `done_criteria` はない。個票の完了条件と rulebook を完了基準とする。";
|
|
336
|
+
if (item.approach === "bootstrap") {
|
|
337
|
+
targets = [targetId, ...(resolved.kataIds ?? [])];
|
|
338
|
+
conditionsText += `\n\n成果物の frontmatter に \`specdojo.id: ${targetId}\` と \`specdojo.rulebook: ${resolved.info.deliverable.rulebook}\` を記入する。未作成の kata は次の ID とパスで整備し、recipe・sample・template の ID を rulebook frontmatter に宣言する。不要な型は作らず \`not-needed\` と宣言する。\n\n`;
|
|
339
|
+
conditionsText += (resolved.kataIds ?? [])
|
|
340
|
+
.map((id, index) => {
|
|
341
|
+
const kind = ["rulebook", "recipe", "sample", "template"][index];
|
|
342
|
+
return `- \`${id}\`: \`${kind ? resolved.refs?.[kind] : ""}\`(未作成 / missing)`;
|
|
343
|
+
})
|
|
344
|
+
.join("\n");
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
conditionsText += `\n\n成果物の frontmatter に \`specdojo.id: ${targetId}\` と \`specdojo.rulebook: ${resolved.info.deliverable.rulebook}\` を維持・記入する。`;
|
|
348
|
+
}
|
|
349
|
+
if (item.approach === "finalize" || item.approach === "bootstrap-finalize") {
|
|
350
|
+
if (item.approach === "bootstrap-finalize")
|
|
351
|
+
targets = [targetId, ...(resolved.kataIds ?? [])];
|
|
352
|
+
const conditions = registerCompletionConditions(item, ticketPath);
|
|
353
|
+
const checklist = conditions
|
|
354
|
+
.split(/\r?\n/)
|
|
355
|
+
.filter((line) => line.trim())
|
|
356
|
+
.map((line) => {
|
|
357
|
+
const text = line.replace(/^\s*(?:[-*+]\s+(?:\[[ xX]\]\s*)?|\d+\.\s*)/, "");
|
|
358
|
+
return `- [ ] ${text}`;
|
|
359
|
+
})
|
|
360
|
+
.join("\n");
|
|
361
|
+
conditionsText += `\n\n### 人による確定のチェック表\n\n${checklist}\n\n### 確定対象\n\n- [ ] 成果物: \`${resolved.info.resolvedPath}\``;
|
|
362
|
+
if (item.approach === "bootstrap-finalize") {
|
|
363
|
+
conditionsText +=
|
|
364
|
+
"\n" +
|
|
365
|
+
(resolved.kataTargets ?? [])
|
|
366
|
+
.map(({ id, path }) => `- [ ] \`${id}\`: \`${path}\`(frontmatter から辿った kata)`)
|
|
367
|
+
.join("\n");
|
|
368
|
+
}
|
|
369
|
+
conditionsText +=
|
|
370
|
+
"\n\n人が各条件と確定対象を確認する。agent は成果物の `status` を `ready` へ変更しない。";
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return { targets, conditions: conditionsText };
|
|
374
|
+
}
|
|
327
375
|
export async function generateRegisterPlan(opts) {
|
|
328
376
|
const { item } = opts;
|
|
329
377
|
const category = requireRunnableRegisterItem(item);
|
|
@@ -336,6 +384,8 @@ export async function generateRegisterPlan(opts) {
|
|
|
336
384
|
approach: item.approach,
|
|
337
385
|
targets: item.targets,
|
|
338
386
|
sources: item.sources,
|
|
387
|
+
targetPath: item.targetPath,
|
|
388
|
+
targetRulebook: item.targetRulebook,
|
|
339
389
|
});
|
|
340
390
|
const [targetId] = item.targets ?? [];
|
|
341
391
|
if (!targetId)
|
|
@@ -344,8 +394,23 @@ export async function generateRegisterPlan(opts) {
|
|
|
344
394
|
const maintenanceKind = MAINTENANCE_TARGET_KIND[item.approach];
|
|
345
395
|
let deliverable = null;
|
|
346
396
|
let refs;
|
|
397
|
+
let cataloglessConditions = "";
|
|
398
|
+
let planTargets = [targetId];
|
|
347
399
|
let authoring;
|
|
348
|
-
if (
|
|
400
|
+
if (isPlanningApproach(item.approach)) {
|
|
401
|
+
const project = loadConfig(specdojoRootDir()).config?.projects[opts.projectId] ?? {};
|
|
402
|
+
const fields = planningPlanFields({
|
|
403
|
+
repoRoot: specdojoRootDir(),
|
|
404
|
+
projectId: opts.projectId,
|
|
405
|
+
project,
|
|
406
|
+
catalogPath: opts.catalogPath ?? "",
|
|
407
|
+
approach: item.approach,
|
|
408
|
+
target: targetId,
|
|
409
|
+
});
|
|
410
|
+
refs = fields.refs;
|
|
411
|
+
cataloglessConditions = fields.conditions;
|
|
412
|
+
}
|
|
413
|
+
else if (newKataKind) {
|
|
349
414
|
const sourceRefs = [...(item.targets ?? []).slice(1), ...(item.sources ?? [])];
|
|
350
415
|
const project = loadConfig(specdojoRootDir()).config?.projects[opts.projectId] ?? {};
|
|
351
416
|
const resolvedSources = resolveAuthoringSources({
|
|
@@ -412,10 +477,20 @@ export async function generateRegisterPlan(opts) {
|
|
|
412
477
|
refs = { ...refs, [maintenanceKind]: indexedDocumentPath(targetId) };
|
|
413
478
|
}
|
|
414
479
|
else {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
480
|
+
const resolved = resolveRegisterDeliverableTarget({
|
|
481
|
+
repoRoot: specdojoRootDir(),
|
|
482
|
+
projectId: opts.projectId,
|
|
483
|
+
catalogPath: opts.catalogPath,
|
|
484
|
+
approach: item.approach,
|
|
485
|
+
targetId,
|
|
486
|
+
targetPath: item.targetPath,
|
|
487
|
+
targetRulebook: item.targetRulebook,
|
|
488
|
+
});
|
|
489
|
+
deliverable = resolved.info;
|
|
490
|
+
refs = resolved.refs;
|
|
491
|
+
const fields = cataloglessPlanFields(resolved, item, targetId, ticketPath);
|
|
492
|
+
planTargets = fields.targets;
|
|
493
|
+
cataloglessConditions = fields.conditions;
|
|
419
494
|
}
|
|
420
495
|
const planPath = await generateRegisterApproachPlan({
|
|
421
496
|
executionPath: opts.executionPath,
|
|
@@ -429,11 +504,12 @@ export async function generateRegisterPlan(opts) {
|
|
|
429
504
|
description: item.description,
|
|
430
505
|
...(item.owner && item.owner !== "-" && item.owner !== "_TODO_" ? { owner: item.owner } : {}),
|
|
431
506
|
approach: item.approach,
|
|
432
|
-
targets:
|
|
507
|
+
targets: planTargets,
|
|
433
508
|
deliverable,
|
|
434
509
|
...(refs ? { refs } : {}),
|
|
435
510
|
...(authoring ? { authoring } : {}),
|
|
436
511
|
additionalConditions: [
|
|
512
|
+
cataloglessConditions,
|
|
437
513
|
registerCompletionConditions(item, ticketPath),
|
|
438
514
|
registerAutopilotConstraints(item),
|
|
439
515
|
]
|