specdojo 0.3.1 → 0.4.1
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 +61 -2
- package/CHANGELOG.md +90 -0
- package/README.md +85 -25
- package/dist/{catalog-build-references.js → catalog/build-references.js} +4 -4
- package/dist/catalog/build-render.js +32 -0
- package/dist/{catalog-build.js → catalog/build.js} +9 -9
- package/dist/{catalog.js → catalog/catalog.js} +10 -10
- package/dist/{catalog-generate.js → catalog/generate.js} +8 -8
- package/dist/catalog/paths.js +1 -0
- package/dist/{catalog-plan-generate.js → catalog/plan-generate.js} +4 -4
- package/dist/{catalog-plan.js → catalog/plan.js} +4 -4
- package/dist/{catalog-scaffold.js → catalog/scaffold.js} +3 -3
- package/dist/{agent.js → commands/agent.js} +11 -11
- package/dist/{build-command.js → commands/build.js} +2 -2
- package/dist/{init-command.js → commands/init.js} +168 -45
- package/dist/commands/night-orchestrator.js +287 -0
- package/dist/{orchestrator.js → commands/orchestrator.js} +12 -5
- package/dist/{watch.js → commands/watch.js} +3 -3
- package/dist/{dashboard-timeline.js → dashboard/dashboard-timeline.js} +2 -2
- package/dist/{dashboard.js → dashboard/dashboard.js} +11 -10
- package/dist/{dashboard-exec-records.js → dashboard/exec-records.js} +2 -2
- package/dist/{dashboard-routines.js → dashboard/routines.js} +6 -5
- package/dist/{dashboard-shared.js → dashboard/shared.js} +1 -1
- package/dist/{timeline-build.js → dashboard/timeline-build.js} +2 -1
- package/dist/{timeline.js → dashboard/timeline.js} +1 -1
- package/dist/{deliverable.js → deliverable/deliverable.js} +5 -5
- package/dist/{deliverable-trash.js → deliverable/trash.js} +5 -5
- package/dist/{devcontainer-command.js → devcontainer/command.js} +8 -4
- package/dist/devcontainer/scaffold.js +418 -0
- package/dist/{doc-index.js → docs/doc-index.js} +1 -1
- package/dist/{frontmatter-namespace.js → docs/frontmatter-namespace.js} +1 -1
- package/dist/{index-command.js → docs/index-command.js} +1 -1
- package/dist/docs/template-resolution.js +1 -0
- package/dist/{viewpoint-document-kinds-check.js → docs/viewpoint-document-kinds-check.js} +1 -1
- package/dist/{yaml-pages-command.js → docs/yaml-pages-command.js} +1 -1
- package/dist/{yaml-pages.js → docs/yaml-pages.js} +2 -2
- package/dist/{exec-agent-config.js → exec/agent-config.js} +92 -5
- package/dist/{exec-agent-git-state.js → exec/agent-git-state.js} +1 -1
- package/dist/{exec-agent-protected-config.js → exec/agent-protected-config.js} +1 -1
- package/dist/{exec-commands.js → exec/commands.js} +22 -18
- package/dist/{exec-core.js → exec/core.js} +11 -11
- package/dist/{exec-events.js → exec/events.js} +2 -2
- package/dist/{exec-evidence.js → exec/evidence.js} +11 -6
- package/dist/exec/exec.js +2 -0
- package/dist/exec/format.js +1 -0
- package/dist/{exec-handoff.js → exec/handoff.js} +13 -12
- package/dist/{exec-limit.js → exec/limit.js} +93 -12
- package/dist/{exec-parent-validation.js → exec/parent-validation.js} +18 -4
- package/dist/{exec-pipeline-state.js → exec/pipeline-state.js} +29 -2
- package/dist/{exec-plans-core.js → exec/plans-core.js} +68 -114
- package/dist/{exec-plans-generation.js → exec/plans-generation.js} +53 -10
- package/dist/{exec-plans-storage.js → exec/plans-storage.js} +5 -5
- package/dist/{exec-plans.js → exec/plans.js} +3 -3
- package/dist/{exec-project.js → exec/project.js} +1 -1
- package/dist/{exec-protection-handoff.js → exec/protection-handoff.js} +3 -3
- package/dist/{exec-register-resume.js → exec/register-resume.js} +2 -2
- package/dist/{exec-register.js → exec/register.js} +114 -9
- package/dist/{exec-repo-integration-git.js → exec/repo-integration-git.js} +2 -2
- package/dist/{exec-repo-integration-sync.js → exec/repo-integration-sync.js} +4 -4
- package/dist/{exec-repo-integration.js → exec/repo-integration.js} +14 -11
- package/dist/{exec-repo-trace.js → exec/repo-trace.js} +3 -3
- package/dist/{exec-reporter-output.js → exec/reporter-output.js} +2 -2
- package/dist/{exec-reporter.js → exec/reporter.js} +142 -25
- package/dist/{exec-results.js → exec/results.js} +287 -31
- package/dist/{exec-run-agent-pipeline.js → exec/run/agent-pipeline.js} +35 -12
- package/dist/{exec-run-agent.js → exec/run/agent.js} +115 -28
- package/dist/{exec-run-in-place.js → exec/run/in-place.js} +56 -27
- package/dist/{exec-run-job.js → exec/run/job.js} +65 -36
- package/dist/{exec-run-lifecycle-commands.js → exec/run/lifecycle-commands.js} +30 -22
- package/dist/{exec-run-lock.js → exec/run/lock.js} +4 -3
- package/dist/{exec-run-mode-shared.js → exec/run/mode-shared.js} +3 -3
- package/dist/{exec-run-register-command.js → exec/run/register-command.js} +38 -11
- package/dist/{exec-run-register-core.js → exec/run/register-core.js} +63 -21
- package/dist/{exec-run-register-mode.js → exec/run/register-mode.js} +58 -31
- package/dist/exec/run/register-post-review.js +420 -0
- package/dist/{exec-run-register-resume.js → exec/run/register-resume.js} +48 -27
- package/dist/{exec-run-register-state.js → exec/run/register-state.js} +13 -10
- package/dist/{exec-run-register-worktree.js → exec/run/register-worktree.js} +119 -24
- package/dist/{exec-run.js → exec/run/run.js} +11 -11
- package/dist/{exec-run-schedule-mode.js → exec/run/schedule-mode.js} +17 -17
- package/dist/{exec-run-schedule-prepare.js → exec/run/schedule-prepare.js} +31 -18
- package/dist/{exec-run-schedule-task.js → exec/run/schedule-task.js} +45 -18
- package/dist/{exec-run-shared.js → exec/run/shared.js} +78 -30
- package/dist/{exec-schedule-calendar.js → exec/schedule/calendar.js} +1 -1
- package/dist/{exec-schedule-cpm.js → exec/schedule/cpm.js} +2 -2
- package/dist/{exec-schedule-gantt-chart-render.js → exec/schedule/gantt-chart-render.js} +2 -2
- package/dist/exec/schedule/gantt-chart.js +2 -0
- package/dist/{exec-schedule-hash.js → exec/schedule/hash.js} +2 -2
- package/dist/exec/schedule/index.js +1 -0
- package/dist/{exec-schedule-initial.js → exec/schedule/initial.js} +2 -2
- package/dist/{exec-schedule-progress.js → exec/schedule/progress.js} +2 -2
- package/dist/{exec-schedule-ready.js → exec/schedule/ready.js} +2 -2
- package/dist/{exec-schedule.js → exec/schedule/schedule.js} +11 -11
- package/dist/exec/shared.js +63 -0
- package/dist/exec/slot-lock.js +1 -0
- package/dist/{exec-strategy.js → exec/strategy.js} +2 -2
- package/dist/{exec-task-repos.js → exec/task-repos.js} +104 -17
- package/dist/{exec-task-view.js → exec/task-view.js} +4 -4
- package/dist/{exec-trial-commands.js → exec/trial-commands.js} +20 -22
- package/dist/{exec-trial-core.js → exec/trial-core.js} +6 -6
- package/dist/{exec-trial.js → exec/trial.js} +2 -2
- package/dist/{exec-worktree-command.js → exec/worktree-command.js} +25 -23
- package/dist/{exec-worktree-ops-commit.js → exec/worktree-ops-commit.js} +25 -60
- package/dist/{exec-worktree-ops-lifecycle.js → exec/worktree-ops-lifecycle.js} +13 -8
- package/dist/{exec-worktree-ops-merge.js → exec/worktree-ops-merge.js} +48 -7
- package/dist/{exec-worktree-ops.js → exec/worktree-ops.js} +3 -3
- package/dist/exec/worktree.js +305 -0
- package/dist/{grade-apply.js → grade/apply.js} +9 -9
- package/dist/{grade-command-apply.js → grade/command-apply.js} +7 -7
- package/dist/{grade-command-inspect.js → grade/command-inspect.js} +6 -6
- package/dist/{grade-command-plan.js → grade/command-plan.js} +5 -5
- package/dist/{grade-core.js → grade/core.js} +3 -3
- package/dist/grade/grade.js +19 -0
- package/dist/{grade-markdown.js → grade/markdown.js} +6 -6
- package/dist/{grade-pipeline-state.js → grade/pipeline-state.js} +4 -4
- package/dist/{grade-plan.js → grade/plan.js} +5 -5
- package/dist/{grade-result.js → grade/result.js} +5 -94
- package/dist/{grade-target-discovery.js → grade/target-discovery.js} +7 -7
- package/dist/{grade-targets.js → grade/targets.js} +11 -8
- package/dist/{job-definition.js → job/definition.js} +25 -6
- package/dist/{job.js → job/job.js} +12 -11
- package/dist/{kata-command.js → kata/command.js} +3 -3
- package/dist/{kata.js → kata/kata.js} +5 -5
- package/dist/register/approach.js +134 -0
- package/dist/{register-core.js → register/core.js} +26 -8
- package/dist/{register-create-commands.js → register/create-commands.js} +171 -8
- package/dist/{register-date.js → register/date.js} +1 -1
- package/dist/register/derivation.js +163 -0
- package/dist/{register-event-merge.js → register/event-merge.js} +44 -3
- package/dist/{register-events.js → register/events.js} +13 -3
- package/dist/{register-history.js → register/history.js} +7 -6
- package/dist/{register-item.js → register/item.js} +32 -5
- package/dist/register/lifecycle-lock.js +5 -0
- package/dist/{register-maintenance-commands.js → register/maintenance-commands.js} +13 -7
- package/dist/{register-migrate-timestamps.js → register/migrate-timestamps.js} +3 -3
- package/dist/{register-migration.js → register/migration.js} +5 -4
- package/dist/{register.js → register/register.js} +32 -27
- package/dist/{register-renumber.js → register/renumber.js} +38 -11
- package/dist/{register-transition-commands.js → register/transition-commands.js} +3 -3
- package/dist/{register-update.js → register/update.js} +5 -5
- package/dist/{register-views.js → register/views.js} +47 -7
- package/dist/{review-grade.js → review/grade.js} +2 -2
- package/dist/{review-plan.js → review/plan.js} +3 -3
- package/dist/{routine-definition.js → routine/definition.js} +2 -2
- package/dist/{routine.js → routine/routine.js} +49 -22
- package/dist/{schedule-approach.js → schedule/approach.js} +8 -8
- package/dist/{schedule-build.js → schedule/build.js} +7 -4
- package/dist/{schedule.js → schedule/schedule.js} +6 -6
- package/dist/{schedule-strategy-generate-document.js → schedule/strategy-generate-document.js} +2 -2
- package/dist/{schedule-strategy-generate-scope.js → schedule/strategy-generate-scope.js} +4 -4
- package/dist/{schedule-strategy-generate.js → schedule/strategy-generate.js} +10 -10
- package/dist/shared/agent-types.js +23 -0
- package/dist/shared/artifact-path.js +9 -0
- package/dist/{build-if-stale.js → shared/build-if-stale.js} +1 -1
- package/dist/{catalog-build-render.js → shared/catalog-render.js} +3 -32
- package/dist/{exec-slot-lock.js → shared/cross-process-lock.js} +3 -1
- package/dist/shared/fs.js +30 -0
- package/dist/shared/git.js +346 -0
- package/dist/shared/grade-result.js +94 -0
- package/dist/{package-paths.js → shared/package-paths.js} +3 -3
- package/dist/shared/plan-templates.js +114 -0
- package/dist/{exec-provider-scaffold.js → shared/provider-scaffold.js} +6 -3
- package/dist/shared/random.js +4 -0
- package/dist/{exec-schedule-index.js → shared/schedule-index.js} +3 -1
- package/dist/shared/schedule-paths.js +9 -0
- package/dist/{specdojo-config.js → shared/specdojo-config.js} +162 -21
- package/dist/{exec-shared.js → shared/text.js} +4 -135
- package/dist/shared/time.js +28 -0
- package/dist/shared/workspace-scaffold.js +69 -0
- package/dist/specdojo.js +22 -22
- package/docs/ja/specdojo/exec-templates/xep-common-conventions-template.md +31 -18
- package/docs/ja/specdojo/exec-templates/xep-register-investigate-template.md +1 -2
- package/docs/ja/specdojo/exec-templates/xep-register-template.md +3 -2
- package/docs/ja/specdojo/exec-templates/xer-template.md +1 -3
- package/docs/ja/specdojo/exec-templates/xrp-job-template.md +6 -4
- package/docs/ja/specdojo/exec-templates/xrp-register-post-run-template.md +46 -0
- package/docs/ja/specdojo/guides/branch-workflow-guide.md +34 -1
- package/docs/ja/specdojo/guides/docs-structure-guide.md +2 -0
- package/docs/ja/specdojo/guides/exec-config-guide.md +169 -26
- package/docs/ja/specdojo/guides/exec-operation-guide.md +184 -13
- package/docs/ja/specdojo/guides/exec-worktree-guide.md +2 -0
- package/docs/ja/specdojo/guides/orchestrator-operation-guide.md +40 -3
- package/docs/ja/specdojo/guides/quick-start-guide.md +89 -21
- package/docs/ja/specdojo/guides/register-operation-guide.md +44 -1
- package/docs/ja/specdojo/guides/remote-host-development-guide.md +61 -6
- package/docs/ja/specdojo/guides/review-guide.md +1 -1
- package/docs/ja/specdojo/guides/routine-operation-guide.md +5 -5
- package/docs/ja/specdojo/guides/specdojo-overview-guide.md +1 -1
- package/docs/ja/specdojo/guides/use-case-guide.md +1 -1
- package/docs/ja/specdojo/guides/waza-guide.md +1 -1
- package/docs/ja/specdojo/references/command-reference.md +124 -55
- package/docs/ja/specdojo/references/specdojo-config-reference.md +33 -7
- package/docs/ja/specdojo/rulebooks/pjr-rulebook.md +22 -13
- package/docs/ja/specdojo/standards/job-definition-standard.md +20 -18
- package/docs/ja/specdojo/standards/rulebook-authoring-standard.md +2 -2
- package/docs/ja/specdojo/templates/pjr-derived-items-template.md +22 -0
- package/docs/ja/specdojo/templates/pjr-index-template.md +1 -0
- package/docs/specdojo/schemas/v1/agent-members.schema.yaml +29 -2
- package/docs/specdojo/schemas/v1/exec-defaults.schema.yaml +111 -17
- package/docs/specdojo/schemas/v1/exec-evidence.schema.yaml +28 -0
- package/docs/specdojo/schemas/v1/job-run.schema.yaml +2 -2
- package/docs/specdojo/schemas/v1/job.schema.yaml +7 -0
- package/docs/specdojo/schemas/v1/pipeline-state.schema.yaml +38 -0
- package/docs/specdojo/schemas/v1/register-events.schema.yaml +5 -0
- package/docs/specdojo/schemas/v1/register-item-frontmatter.schema.yaml +91 -7
- package/docs/specdojo/schemas/v1/routine-run.schema.yaml +1 -1
- package/docs/specdojo/schemas/v1/specdojo-config.schema.yaml +36 -1
- package/package.json +17 -17
- package/templates/antigravity/README.md +6 -2
- package/templates/antigravity/agent-members-snippet.yaml +108 -12
- package/templates/antigravity/exec-defaults-snippet.yaml +8 -13
- package/templates/antigravity/orchestrator.md +61 -2
- package/templates/claude/README.md +27 -3
- package/templates/claude/agents/claude-executor.md +0 -1
- package/templates/claude/agents/claude-reporter.md +2 -1
- package/templates/claude/agents/claude-review-executor.md +0 -1
- package/templates/claude/agents/specdojo-orchestrator.md +61 -2
- package/templates/codex/README.md +40 -4
- package/templates/codex/agents/specdojo-orchestrator.toml +61 -2
- package/templates/codex/orchestrator.md +61 -2
- package/templates/devcontainer/devcontainer.json +5 -2
- package/templates/devcontainer/post-create.sh +15 -7
- package/templates/devcontainer/remote-host/specdojo-tmux.sh.sample +102 -0
- package/templates/devcontainer/remote-host/ssh-config.sample +19 -0
- package/templates/devcontainer/vim/vimrc +37 -0
- package/templates/init-agent-members.yaml +75 -25
- package/templates/init-exec-defaults.yaml +44 -9
- package/templates/opencode/README.md +17 -3
- package/templates/opencode/agents/opencode-executor.md +0 -1
- package/templates/opencode/agents/opencode-reporter.md +2 -1
- package/templates/opencode/agents/opencode-review-executor.md +0 -1
- package/templates/opencode/agents/specdojo-orchestrator.md +61 -2
- package/dist/devcontainer-scaffold.js +0 -165
- package/dist/exec-schedule-gantt-chart.js +0 -2
- package/dist/exec-worktree.js +0 -474
- package/dist/exec.js +0 -2
- package/dist/grade.js +0 -19
- package/templates/claude/agents/claude-expert-review-executor.md +0 -14
- /package/dist/{catalog-plan-prompt.js → catalog/plan-prompt.js} +0 -0
- /package/dist/{catalog-types.js → catalog/types.js} +0 -0
- /package/dist/{template-frontmatter.js → docs/template-frontmatter.js} +0 -0
- /package/dist/{role-types.js → exec/role-types.js} +0 -0
- /package/dist/{exec-schedule-gantt-chart-scope.js → exec/schedule/gantt-chart-scope.js} +0 -0
- /package/dist/{exec-types.js → exec/types.js} +0 -0
- /package/dist/{grade-command-shared.js → grade/command-shared.js} +0 -0
- /package/dist/{register-command-types.js → register/command-types.js} +0 -0
- /package/dist/{review-types.js → review/types.js} +0 -0
- /package/dist/{schedule-phase-sets.js → schedule/phase-sets.js} +0 -0
- /package/dist/{schedule-strategy-profiles.js → schedule/strategy-profiles.js} +0 -0
- /package/dist/{agent-response.js → shared/agent-response.js} +0 -0
- /package/dist/{catalog-paths.js → shared/catalog-paths.js} +0 -0
- /package/dist/{dist-freshness.js → shared/dist-freshness.js} +0 -0
- /package/dist/{git-environment.js → shared/git-environment.js} +0 -0
- /package/dist/{exec-format.js → shared/markdown-format.js} +0 -0
- /package/dist/{practice-id.js → shared/practice-id.js} +0 -0
- /package/dist/{spawn-self.js → shared/spawn-self.js} +0 -0
- /package/dist/{specdojo-gitignore.js → shared/specdojo-gitignore.js} +0 -0
- /package/dist/{template-resolution.js → shared/template-resolution.js} +0 -0
- /package/dist/{yaml-schema-modeline.js → shared/yaml-schema-modeline.js} +0 -0
- /package/dist/{yaml.js → shared/yaml.js} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { constants as osConstants } from "node:os";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { agentExtraRootArguments, resolveProductRepos } from "
|
|
5
|
-
import { loadConfig, specdojoRootDir, } from "
|
|
4
|
+
import { agentExtraRootArguments, resolveProductRepos } from "../exec/task-repos.js";
|
|
5
|
+
import { loadConfig, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
6
|
+
import { registerNightOrchestratorCommand } from "./night-orchestrator.js";
|
|
6
7
|
const ORCHESTRATOR_EXECUTABLES = {
|
|
7
8
|
claude: "claude",
|
|
8
9
|
codex: "codex",
|
|
@@ -10,6 +11,7 @@ const ORCHESTRATOR_EXECUTABLES = {
|
|
|
10
11
|
copilot: "copilot",
|
|
11
12
|
opencode: "opencode",
|
|
12
13
|
};
|
|
14
|
+
const ORCHESTRATOR_CONFIG_ROOT_ENV = "SPECDOJO_ORCHESTRATOR_CONFIG_ROOT";
|
|
13
15
|
function isRecord(value) {
|
|
14
16
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
15
17
|
}
|
|
@@ -122,18 +124,22 @@ export function buildOrchestratorLaunch(options) {
|
|
|
122
124
|
export function resolveOrchestratorLaunch(options) {
|
|
123
125
|
const env = options.env ?? process.env;
|
|
124
126
|
const rootDir = specdojoRootDir();
|
|
125
|
-
const
|
|
127
|
+
const configuredRoot = env[ORCHESTRATOR_CONFIG_ROOT_ENV]?.trim();
|
|
128
|
+
const configRootDir = configuredRoot ? resolve(rootDir, configuredRoot) : rootDir;
|
|
129
|
+
const { config, configPath } = loadConfig(configRootDir);
|
|
126
130
|
if (!config)
|
|
127
131
|
throw new Error(`No config found: ${configPath}`);
|
|
128
132
|
const projectId = resolveOrchestratorProjectId(config, options.project, env);
|
|
129
|
-
const repos = resolveProductRepos(
|
|
130
|
-
|
|
133
|
+
const repos = resolveProductRepos(configRootDir, config.projects[projectId]);
|
|
134
|
+
const launch = buildOrchestratorLaunch({
|
|
131
135
|
provider: options.provider,
|
|
132
136
|
providerArgs: options.providerArgs,
|
|
133
137
|
repoRoots: repos.map((repo) => repo.repoRoot),
|
|
134
138
|
cwd: rootDir,
|
|
135
139
|
env,
|
|
136
140
|
});
|
|
141
|
+
delete launch.env[ORCHESTRATOR_CONFIG_ROOT_ENV];
|
|
142
|
+
return launch;
|
|
137
143
|
}
|
|
138
144
|
function parseProvider(value) {
|
|
139
145
|
if (Object.hasOwn(ORCHESTRATOR_EXECUTABLES, value)) {
|
|
@@ -188,6 +194,7 @@ export function registerOrchestratorCommands(program) {
|
|
|
188
194
|
const orchestrator = program
|
|
189
195
|
.command("orchestrator")
|
|
190
196
|
.description("Launch an interactive orchestrator with declared repository access");
|
|
197
|
+
registerNightOrchestratorCommand(orchestrator);
|
|
191
198
|
orchestrator
|
|
192
199
|
.command("launch")
|
|
193
200
|
.description("Launch a provider CLI and allow only repositories declared by the project")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { watch as fsWatch, existsSync, readdirSync } from "node:fs";
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
|
-
import { getProjectCatalogPath, getProjectExecutionPath, getProjectRegisterPath, getProjectSchedulePath, loadConfig, loadEnv, specdojoRootDir, } from "
|
|
5
|
-
import { selfRunArgs } from "
|
|
6
|
-
import { isDctPlanFileName } from "
|
|
4
|
+
import { getProjectCatalogPath, getProjectExecutionPath, getProjectRegisterPath, getProjectSchedulePath, loadConfig, loadEnv, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
5
|
+
import { selfRunArgs } from "../shared/spawn-self.js";
|
|
6
|
+
import { isDctPlanFileName } from "../catalog/plan.js";
|
|
7
7
|
const VALID_SCOPES = ["exec", "catalog", "register", "index", "all"];
|
|
8
8
|
const SKIP_DIRS = new Set([".git", "node_modules", "generated", "dist", ".vitepress"]);
|
|
9
9
|
// ================================
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { addWorkingDaysToDate } from "
|
|
2
|
-
import { buildScheduleIndex, defaultScheduleCalendar } from "
|
|
1
|
+
import { addWorkingDaysToDate } from "../exec/schedule/calendar.js";
|
|
2
|
+
import { buildScheduleIndex, defaultScheduleCalendar } from "../shared/schedule-index.js";
|
|
3
3
|
import { buildTimelineWaves } from "./timeline-build.js";
|
|
4
4
|
// tml-index の tracks を order → wave に集約し、planned_start_date と稼働日カレンダーで各トラックの
|
|
5
5
|
// 予定開始日・終了日を算出する。横軸は日付であり、wave 番号ではない。
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { mkdirSync, existsSync, readFileSync, writeFileSync, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { toArtifactPath } from "../shared/artifact-path.js";
|
|
4
|
+
import { readJson } from "../shared/fs.js";
|
|
5
|
+
import { readAllEventFiles } from "../exec/events.js";
|
|
6
|
+
import { getProjectExecutionPath, getProjectRoutinesPath, getProjectSchedulePath, getProjectTimelinePath, loadConfig, loadEnv, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
7
|
+
import { resolveRegisterPaths, loadRegisterItems, } from "../register/register.js";
|
|
8
|
+
import { readRegisterEventsFromContent, registerEventFilePath, } from "../register/events.js";
|
|
8
9
|
import { buildTimelineWaves, loadTimelineIndex } from "./timeline-build.js";
|
|
9
10
|
import { buildTimelineGanttSvg, computeTimelineTrackSchedules, resolveDashboardCalendar, } from "./dashboard-timeline.js";
|
|
10
|
-
import { aggregateRoutines, buildDailyRoutineRows, formatZonedDateTime, ROUTINE_ROW_COLLAPSE_THRESHOLD, zonedDateKey, } from "./
|
|
11
|
-
import { buildExecRecordsMarkdown, collectExecRecords, EXEC_RECORDS_FILE
|
|
12
|
-
import { sanitizeDashboardCell } from "./
|
|
13
|
-
import { gradeFindingCount, parseGradeResult } from "
|
|
11
|
+
import { aggregateRoutines, buildDailyRoutineRows, formatZonedDateTime, ROUTINE_ROW_COLLAPSE_THRESHOLD, zonedDateKey, } from "./routines.js";
|
|
12
|
+
import { buildExecRecordsMarkdown, collectExecRecords, EXEC_RECORDS_FILE } from "./exec-records.js";
|
|
13
|
+
import { sanitizeDashboardCell } from "./shared.js";
|
|
14
|
+
import { gradeFindingCount, parseGradeResult } from "../grade/result.js";
|
|
14
15
|
// ================================
|
|
15
16
|
// Types
|
|
16
17
|
// ================================
|
|
@@ -177,7 +178,7 @@ function aggregateAttention(paths) {
|
|
|
177
178
|
}
|
|
178
179
|
return rows;
|
|
179
180
|
}
|
|
180
|
-
export { buildDailyRoutineRows, collapseFrequentRoutineRows, computeRoutineDue, formatZonedDateTime, readRoutineRunHistory, } from "./
|
|
181
|
+
export { buildDailyRoutineRows, collapseFrequentRoutineRows, computeRoutineDue, formatZonedDateTime, readRoutineRunHistory, } from "./routines.js";
|
|
181
182
|
// ================================
|
|
182
183
|
// Markdown rendering
|
|
183
184
|
// ================================
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { load } from "
|
|
4
|
-
import { sanitizeDashboardCell } from "./
|
|
3
|
+
import { load } from "../shared/yaml.js";
|
|
4
|
+
import { sanitizeDashboardCell } from "./shared.js";
|
|
5
5
|
export const EXEC_RECORDS_FILE = "exec-records.md";
|
|
6
6
|
function readSpecdojoFrontmatter(filePath) {
|
|
7
7
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { load } from "
|
|
4
|
-
import { readJson } from "
|
|
5
|
-
import { cronMatches, cronOccurrences, isRoutineDue, routineActionKindLabel, } from "
|
|
3
|
+
import { load } from "../shared/yaml.js";
|
|
4
|
+
import { readJson } from "../shared/fs.js";
|
|
5
|
+
import { cronMatches, cronOccurrences, isRoutineDue, routineActionKindLabel, } from "../routine/routine.js";
|
|
6
6
|
// routine ファイル(rtn-*.yaml)を読み、状態ファイル generated/routine-state.json と突き合わせて
|
|
7
7
|
// 最終実行・実行結果・due 状況を得る。CLI 出力(routine list)の転記に依存しない。
|
|
8
8
|
export function aggregateRoutines(routinesPath) {
|
|
@@ -48,7 +48,7 @@ export function readRoutineRunHistory(historyPath) {
|
|
|
48
48
|
typeof value.scheduled_for === "string" &&
|
|
49
49
|
typeof value.started_at === "string" &&
|
|
50
50
|
typeof value.completed_at === "string" &&
|
|
51
|
-
["success", "failure", "skipped"].includes(value.result) &&
|
|
51
|
+
["success", "partial", "failure", "skipped"].includes(value.result) &&
|
|
52
52
|
Array.isArray(value.job_run_ids)) {
|
|
53
53
|
entries.push(value);
|
|
54
54
|
}
|
|
@@ -162,11 +162,12 @@ export function collapseFrequentRoutineRows(rows) {
|
|
|
162
162
|
const executed = group.filter((row) => row.result !== "予定" && row.result !== "未実行");
|
|
163
163
|
const latest = [...(executed.length > 0 ? executed : group)].sort((a, b) => b.scheduledFor.localeCompare(a.scheduledFor))[0];
|
|
164
164
|
const failures = executed.filter((row) => row.result === "failure").length;
|
|
165
|
+
const partials = executed.filter((row) => row.result === "partial").length;
|
|
165
166
|
collapsed.push({
|
|
166
167
|
...latest,
|
|
167
168
|
runCount: executed.length > 0 ? executed.length : group.length,
|
|
168
169
|
jobRunIds: [],
|
|
169
|
-
result: failures > 0 ? "failure" : latest.result,
|
|
170
|
+
result: failures > 0 ? "failure" : partials > 0 ? "partial" : latest.result,
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
173
|
return collapsed;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stripTerminalControlSequences } from "
|
|
1
|
+
import { stripTerminalControlSequences } from "../shared/text.js";
|
|
2
2
|
const MAX_DASHBOARD_CELL_LENGTH = 200;
|
|
3
3
|
// dashboard の表へは event や subprocess 由来の文字列も入る。表へ埋める直前に
|
|
4
4
|
// ターミナル制御シーケンスと改行類を除き、列区切りをエスケープして長さを制限する。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync, readdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { readYaml } from "../shared/fs.js";
|
|
4
|
+
import { normalizeDateOnly } from "../shared/time.js";
|
|
4
5
|
const CATALOG_STATUSES = ["not_started", "draft", "primary"];
|
|
5
6
|
function isRecord(value) {
|
|
6
7
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import { getProjectCatalogPath, getProjectTimelinePath, loadConfig, loadEnv, specdojoRootDir, } from "
|
|
3
|
+
import { getProjectCatalogPath, getProjectTimelinePath, loadConfig, loadEnv, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
4
4
|
import { buildTimeline, renderCatalogScaffoldMarkdown, renderTimelineOrderMarkdown, } from "./timeline-build.js";
|
|
5
5
|
function resolveTimelinePaths(opts) {
|
|
6
6
|
loadEnv();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
-
import { addProjectOption, printCommandError, resolveCatalogPath } from "
|
|
3
|
-
import { runGenerate } from "
|
|
4
|
-
import { specdojoRootDir } from "
|
|
5
|
-
import { resolveSpecdojoPath } from "
|
|
6
|
-
import { applyTrash, planTrash } from "./
|
|
2
|
+
import { addProjectOption, printCommandError, resolveCatalogPath } from "../catalog/catalog.js";
|
|
3
|
+
import { runGenerate } from "../catalog/generate.js";
|
|
4
|
+
import { specdojoRootDir } from "../shared/specdojo-config.js";
|
|
5
|
+
import { resolveSpecdojoPath } from "../docs/template-resolution.js";
|
|
6
|
+
import { applyTrash, planTrash } from "./trash.js";
|
|
7
7
|
function collectCommaSeparated(value, previous) {
|
|
8
8
|
return [
|
|
9
9
|
...previous,
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
// unrelated nested `evidence_refs[].path` field.
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { basename, dirname, join, relative } from "node:path";
|
|
13
|
-
import { load } from "
|
|
14
|
-
import { isDctCatalogFileName } from "
|
|
15
|
-
import { resolveBasePath, resolveDeliverablePath } from "
|
|
16
|
-
import { readSpecdojoNamespace } from "
|
|
17
|
-
import { gitOutput } from "
|
|
13
|
+
import { load } from "../shared/yaml.js";
|
|
14
|
+
import { isDctCatalogFileName } from "../catalog/types.js";
|
|
15
|
+
import { resolveBasePath, resolveDeliverablePath } from "../catalog/paths.js";
|
|
16
|
+
import { readSpecdojoNamespace } from "../docs/frontmatter-namespace.js";
|
|
17
|
+
import { gitOutput } from "../shared/git.js";
|
|
18
18
|
function findCatalogFiles(catalogDir) {
|
|
19
19
|
return readdirSync(catalogDir).filter(isDctCatalogFileName).sort();
|
|
20
20
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { runDevcontainerScaffold } from "./
|
|
2
|
-
import { specdojoPackageRootDir } from "
|
|
3
|
-
import { specdojoRootDir } from "
|
|
1
|
+
import { runDevcontainerScaffold } from "./scaffold.js";
|
|
2
|
+
import { specdojoPackageRootDir } from "../shared/package-paths.js";
|
|
3
|
+
import { specdojoRootDir } from "../shared/specdojo-config.js";
|
|
4
4
|
export function registerDevcontainerCommands(program) {
|
|
5
5
|
const dc = program.command("devcontainer").description("Dev Container helpers");
|
|
6
6
|
dc.command("scaffold")
|
|
7
7
|
.description("Scaffold .devcontainer/ configuration for the repository")
|
|
8
|
+
.option("--preset <name>", "Apply a bundled preset (available: recommended)")
|
|
8
9
|
.option("--provider <names>", "Comma-separated list of agent providers to install (e.g. claude,codex,opencode,antigravity)", "")
|
|
9
|
-
.option("--editor <names>", "Comma-separated list of editors to install and configure (
|
|
10
|
+
.option("--editor <names>", "Comma-separated list of editors to install and configure (emacs,vim)", "")
|
|
10
11
|
.option("--ollama", "Add Ollama connection settings", false)
|
|
11
12
|
.option("--cron", "Add cron support", false)
|
|
12
13
|
.option("--tmux", "Add tmux", false)
|
|
14
|
+
.option("--workspace-name <name>", "Override the workspace parent name used under /workspaces")
|
|
13
15
|
.option("--force", "Overwrite existing .devcontainer/", false)
|
|
14
16
|
.option("--dry-run", "Show planned files without writing", false)
|
|
15
17
|
.action(async (opts) => {
|
|
@@ -17,6 +19,8 @@ export function registerDevcontainerCommands(program) {
|
|
|
17
19
|
await runDevcontainerScaffold({
|
|
18
20
|
packageRoot: specdojoPackageRootDir(),
|
|
19
21
|
repoRoot: specdojoRootDir(),
|
|
22
|
+
workspaceName: opts.workspaceName === undefined ? undefined : String(opts.workspaceName),
|
|
23
|
+
preset: opts.preset === undefined ? undefined : String(opts.preset),
|
|
20
24
|
providers: opts.provider
|
|
21
25
|
? String(opts.provider)
|
|
22
26
|
.split(",")
|