mindforge-cc 2.0.0 → 2.1.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/.agent/bin/lib/commands.cjs +959 -0
- package/.agent/bin/lib/config.cjs +421 -0
- package/.agent/bin/lib/core.cjs +1166 -0
- package/.agent/bin/lib/frontmatter.cjs +307 -0
- package/.agent/bin/lib/init.cjs +1336 -0
- package/.agent/bin/lib/milestone.cjs +252 -0
- package/.agent/bin/lib/model-profiles.cjs +68 -0
- package/.agent/bin/lib/phase.cjs +888 -0
- package/.agent/bin/lib/profile-output.cjs +952 -0
- package/.agent/bin/lib/profile-pipeline.cjs +539 -0
- package/.agent/bin/lib/roadmap.cjs +329 -0
- package/.agent/bin/lib/security.cjs +356 -0
- package/.agent/bin/lib/state.cjs +969 -0
- package/.agent/bin/lib/template.cjs +222 -0
- package/.agent/bin/lib/uat.cjs +189 -0
- package/.agent/bin/lib/verify.cjs +851 -0
- package/.agent/bin/lib/workstream.cjs +491 -0
- package/.agent/bin/mindforge-tools.cjs +897 -0
- package/.agent/file-manifest.json +219 -0
- package/.agent/hooks/mindforge-check-update.js +114 -0
- package/.agent/hooks/mindforge-context-monitor.js +156 -0
- package/.agent/hooks/mindforge-prompt-guard.js +96 -0
- package/.agent/hooks/mindforge-statusline.js +119 -0
- package/.agent/hooks/mindforge-workflow-guard.js +94 -0
- package/.agent/mindforge/add-backlog.md +32 -0
- package/.agent/mindforge/agent.md +31 -0
- package/.agent/mindforge/discuss-phase.md +1 -1
- package/.agent/mindforge/do.md +31 -0
- package/.agent/mindforge/help.md +1 -1
- package/.agent/mindforge/learn.md +3 -2
- package/.agent/mindforge/note.md +35 -0
- package/.agent/mindforge/plant-seed.md +31 -0
- package/.agent/mindforge/research.md +3 -2
- package/.agent/mindforge/review-backlog.md +34 -0
- package/.agent/mindforge/session-report.md +39 -0
- package/.agent/mindforge/steer.md +1 -1
- package/.agent/mindforge/ui-phase.md +34 -0
- package/.agent/mindforge/ui-review.md +36 -0
- package/.agent/mindforge/validate-phase.md +31 -0
- package/.agent/mindforge/workstreams.md +35 -0
- package/.agent/settings.json +38 -0
- package/.agent/skills/mindforge-add-backlog/SKILL.md +72 -0
- package/.agent/skills/mindforge-add-phase/SKILL.md +39 -0
- package/.agent/skills/mindforge-add-tests/SKILL.md +28 -0
- package/.agent/skills/mindforge-add-todo/SKILL.md +42 -0
- package/.agent/skills/mindforge-audit-milestone/SKILL.md +29 -0
- package/.agent/skills/mindforge-audit-uat/SKILL.md +20 -0
- package/.agent/skills/mindforge-autonomous/SKILL.md +33 -0
- package/.agent/skills/mindforge-check-todos/SKILL.md +40 -0
- package/.agent/skills/mindforge-cleanup/SKILL.md +19 -0
- package/.agent/skills/mindforge-complete-milestone/SKILL.md +131 -0
- package/.agent/skills/mindforge-debug/SKILL.md +163 -0
- package/.agent/skills/mindforge-discuss-phase/SKILL.md +54 -0
- package/.agent/skills/mindforge-do/SKILL.md +26 -0
- package/.agent/skills/mindforge-execute-phase/SKILL.md +49 -0
- package/.agent/skills/mindforge-fast/SKILL.md +23 -0
- package/.agent/skills/mindforge-forensics/SKILL.md +49 -0
- package/.agent/skills/mindforge-health/SKILL.md +17 -0
- package/.agent/skills/mindforge-help/SKILL.md +23 -0
- package/.agent/skills/mindforge-insert-phase/SKILL.md +28 -0
- package/.agent/skills/mindforge-join-discord/SKILL.md +19 -0
- package/.agent/skills/mindforge-list-phase-assumptions/SKILL.md +41 -0
- package/.agent/skills/mindforge-list-workspaces/SKILL.md +17 -0
- package/.agent/skills/mindforge-manager/SKILL.md +32 -0
- package/.agent/skills/mindforge-map-codebase/SKILL.md +64 -0
- package/.agent/skills/mindforge-milestone-summary/SKILL.md +44 -0
- package/.agent/skills/mindforge-new-milestone/SKILL.md +38 -0
- package/.agent/skills/mindforge-new-project/SKILL.md +36 -0
- package/.agent/skills/mindforge-new-workspace/SKILL.md +39 -0
- package/.agent/skills/mindforge-next/SKILL.md +19 -0
- package/.agent/skills/mindforge-note/SKILL.md +29 -0
- package/.agent/skills/mindforge-pause-work/SKILL.md +35 -0
- package/.agent/skills/mindforge-plan-milestone-gaps/SKILL.md +28 -0
- package/.agent/skills/mindforge-plan-phase/SKILL.md +37 -0
- package/.agent/skills/mindforge-plant-seed/SKILL.md +22 -0
- package/.agent/skills/mindforge-pr-branch/SKILL.md +21 -0
- package/.agent/skills/mindforge-profile-user/SKILL.md +38 -0
- package/.agent/skills/mindforge-progress/SKILL.md +19 -0
- package/.agent/skills/mindforge-quick/SKILL.md +38 -0
- package/.agent/skills/mindforge-reapply-patches/SKILL.md +124 -0
- package/.agent/skills/mindforge-remove-phase/SKILL.md +26 -0
- package/.agent/skills/mindforge-remove-workspace/SKILL.md +22 -0
- package/.agent/skills/mindforge-research-phase/SKILL.md +186 -0
- package/.agent/skills/mindforge-resume-work/SKILL.md +35 -0
- package/.agent/skills/mindforge-review/SKILL.md +31 -0
- package/.agent/skills/mindforge-review-backlog/SKILL.md +58 -0
- package/.agent/skills/mindforge-session-report/SKILL.md +16 -0
- package/.agent/skills/mindforge-set-profile/SKILL.md +9 -0
- package/.agent/skills/mindforge-settings/SKILL.md +32 -0
- package/.agent/skills/mindforge-ship/SKILL.md +16 -0
- package/.agent/skills/mindforge-stats/SKILL.md +16 -0
- package/.agent/skills/mindforge-thread/SKILL.md +123 -0
- package/.agent/skills/mindforge-ui-phase/SKILL.md +24 -0
- package/.agent/skills/mindforge-ui-review/SKILL.md +24 -0
- package/.agent/skills/mindforge-update/SKILL.md +35 -0
- package/.agent/skills/mindforge-validate-phase/SKILL.md +26 -0
- package/.agent/skills/mindforge-verify-work/SKILL.md +30 -0
- package/.agent/skills/mindforge-workstreams/SKILL.md +65 -0
- package/.agent/workflows/mindforge-add-phase.md +112 -0
- package/.agent/workflows/mindforge-add-tests.md +351 -0
- package/.agent/workflows/mindforge-add-todo.md +158 -0
- package/.agent/workflows/mindforge-audit-milestone.md +332 -0
- package/.agent/workflows/mindforge-audit-uat.md +109 -0
- package/.agent/workflows/mindforge-autonomous.md +815 -0
- package/.agent/workflows/mindforge-check-todos.md +177 -0
- package/.agent/workflows/mindforge-cleanup.md +152 -0
- package/.agent/workflows/mindforge-complete-milestone.md +766 -0
- package/.agent/workflows/mindforge-diagnose-issues.md +220 -0
- package/.agent/workflows/mindforge-discovery-phase.md +289 -0
- package/.agent/workflows/mindforge-discuss-phase-assumptions.md +645 -0
- package/.agent/workflows/mindforge-discuss-phase.md +1047 -0
- package/.agent/workflows/mindforge-do.md +104 -0
- package/.agent/workflows/mindforge-execute-phase.md +838 -0
- package/.agent/workflows/mindforge-execute-plan.md +509 -0
- package/.agent/workflows/mindforge-fast.md +105 -0
- package/.agent/workflows/mindforge-forensics.md +265 -0
- package/.agent/workflows/mindforge-health.md +181 -0
- package/.agent/workflows/mindforge-help.md +606 -0
- package/.agent/workflows/mindforge-insert-phase.md +130 -0
- package/.agent/workflows/mindforge-list-phase-assumptions.md +178 -0
- package/.agent/workflows/mindforge-list-workspaces.md +56 -0
- package/.agent/workflows/mindforge-manager.md +360 -0
- package/.agent/workflows/mindforge-map-codebase.md +370 -0
- package/.agent/workflows/mindforge-milestone-summary.md +223 -0
- package/.agent/workflows/mindforge-new-milestone.md +469 -0
- package/.agent/workflows/mindforge-new-project.md +1226 -0
- package/.agent/workflows/mindforge-new-workspace.md +237 -0
- package/.agent/workflows/mindforge-next.md +97 -0
- package/.agent/workflows/mindforge-node-repair.md +92 -0
- package/.agent/workflows/mindforge-note.md +156 -0
- package/.agent/workflows/mindforge-pause-work.md +176 -0
- package/.agent/workflows/mindforge-plan-milestone-gaps.md +273 -0
- package/.agent/workflows/mindforge-plan-phase.md +848 -0
- package/.agent/workflows/mindforge-plant-seed.md +169 -0
- package/.agent/workflows/mindforge-pr-branch.md +129 -0
- package/.agent/workflows/mindforge-profile-user.md +450 -0
- package/.agent/workflows/mindforge-progress.md +507 -0
- package/.agent/workflows/mindforge-quick.md +732 -0
- package/.agent/workflows/mindforge-remove-phase.md +155 -0
- package/.agent/workflows/mindforge-remove-workspace.md +90 -0
- package/.agent/workflows/mindforge-research-phase.md +74 -0
- package/.agent/workflows/mindforge-resume-project.md +325 -0
- package/.agent/workflows/mindforge-review.md +228 -0
- package/.agent/workflows/mindforge-session-report.md +146 -0
- package/.agent/workflows/mindforge-settings.md +283 -0
- package/.agent/workflows/mindforge-ship.md +228 -0
- package/.agent/workflows/mindforge-stats.md +60 -0
- package/.agent/workflows/mindforge-transition.md +671 -0
- package/.agent/workflows/mindforge-ui-phase.md +290 -0
- package/.agent/workflows/mindforge-ui-review.md +157 -0
- package/.agent/workflows/mindforge-update.md +323 -0
- package/.agent/workflows/mindforge-validate-phase.md +167 -0
- package/.agent/workflows/mindforge-verify-phase.md +254 -0
- package/.agent/workflows/mindforge-verify-work.md +623 -0
- package/.claude/commands/mindforge/add-backlog.md +32 -0
- package/.claude/commands/mindforge/agent.md +31 -0
- package/.claude/commands/mindforge/approve.md +27 -15
- package/.claude/commands/mindforge/audit.md +30 -26
- package/.claude/commands/mindforge/auto.md +29 -18
- package/.claude/commands/mindforge/benchmark.md +26 -29
- package/.claude/commands/mindforge/browse.md +24 -22
- package/.claude/commands/mindforge/complete-milestone.md +28 -14
- package/.claude/commands/mindforge/costs.md +26 -9
- package/.claude/commands/mindforge/cross-review.md +27 -13
- package/.claude/commands/mindforge/dashboard.md +35 -98
- package/.claude/commands/mindforge/debug.md +34 -126
- package/.claude/commands/mindforge/discuss-phase.md +36 -138
- package/.claude/commands/mindforge/do.md +31 -0
- package/.claude/commands/mindforge/execute-phase.md +37 -190
- package/.claude/commands/mindforge/health.md +27 -17
- package/.claude/commands/mindforge/help.md +25 -19
- package/.claude/commands/mindforge/init-org.md +37 -131
- package/.claude/commands/mindforge/init-project.md +40 -155
- package/.claude/commands/mindforge/install-skill.md +32 -15
- package/.claude/commands/mindforge/learn.md +36 -142
- package/.claude/commands/mindforge/map-codebase.md +36 -298
- package/.claude/commands/mindforge/marketplace.md +33 -120
- package/.claude/commands/mindforge/metrics.md +29 -18
- package/.claude/commands/mindforge/migrate.md +33 -40
- package/.claude/commands/mindforge/milestone.md +35 -12
- package/.claude/commands/mindforge/new-runtime.md +25 -15
- package/.claude/commands/mindforge/next.md +34 -105
- package/.claude/commands/mindforge/note.md +35 -0
- package/.claude/commands/mindforge/plan-phase.md +34 -125
- package/.claude/commands/mindforge/plant-seed.md +31 -0
- package/.claude/commands/mindforge/plugins.md +30 -36
- package/.claude/commands/mindforge/pr-review.md +32 -41
- package/.claude/commands/mindforge/profile-team.md +26 -19
- package/.claude/commands/mindforge/publish-skill.md +28 -17
- package/.claude/commands/mindforge/qa.md +27 -12
- package/.claude/commands/mindforge/quick.md +35 -135
- package/.claude/commands/mindforge/release.md +27 -8
- package/.claude/commands/mindforge/remember.md +25 -10
- package/.claude/commands/mindforge/research.md +27 -9
- package/.claude/commands/mindforge/retrospective.md +28 -22
- package/.claude/commands/mindforge/review-backlog.md +34 -0
- package/.claude/commands/mindforge/review.md +37 -157
- package/.claude/commands/mindforge/security-scan.md +34 -233
- package/.claude/commands/mindforge/session-report.md +39 -0
- package/.claude/commands/mindforge/ship.md +34 -100
- package/.claude/commands/mindforge/skills.md +36 -141
- package/.claude/commands/mindforge/status.md +30 -104
- package/.claude/commands/mindforge/steer.md +25 -10
- package/.claude/commands/mindforge/sync-confluence.md +28 -9
- package/.claude/commands/mindforge/sync-jira.md +32 -12
- package/.claude/commands/mindforge/tokens.md +25 -6
- package/.claude/commands/mindforge/ui-phase.md +34 -0
- package/.claude/commands/mindforge/ui-review.md +36 -0
- package/.claude/commands/mindforge/update.md +33 -42
- package/.claude/commands/mindforge/validate-phase.md +31 -0
- package/.claude/commands/mindforge/verify-phase.md +30 -62
- package/.claude/commands/mindforge/workspace.md +28 -25
- package/.claude/commands/mindforge/workstreams.md +35 -0
- package/.mindforge/memory/decision-library.jsonl +0 -0
- package/.mindforge/memory/knowledge-base.jsonl +7 -0
- package/.mindforge/memory/pattern-library.jsonl +1 -0
- package/.mindforge/memory/team-preferences.jsonl +4 -0
- package/.mindforge/personas/advisor-researcher.md +89 -0
- package/.mindforge/personas/analyst.md +112 -52
- package/.mindforge/personas/architect.md +100 -67
- package/.mindforge/personas/assumptions-analyzer-extend.md +87 -0
- package/.mindforge/personas/assumptions-analyzer.md +109 -0
- package/.mindforge/personas/codebase-mapper-extend.md +93 -0
- package/.mindforge/personas/codebase-mapper.md +770 -0
- package/.mindforge/personas/coverage-specialist.md +104 -0
- package/.mindforge/personas/debug-specialist.md +118 -52
- package/.mindforge/personas/debugger.md +97 -0
- package/.mindforge/personas/decision-architect.md +102 -0
- package/.mindforge/personas/developer.md +97 -85
- package/.mindforge/personas/executor.md +88 -0
- package/.mindforge/personas/integration-checker.md +92 -0
- package/.mindforge/personas/nyquist-auditor.md +84 -0
- package/.mindforge/personas/phase-researcher.md +107 -0
- package/.mindforge/personas/plan-checker.md +92 -0
- package/.mindforge/personas/planner.md +105 -0
- package/.mindforge/personas/project-researcher.md +99 -0
- package/.mindforge/personas/qa-engineer.md +113 -61
- package/.mindforge/personas/release-manager.md +102 -64
- package/.mindforge/personas/research-agent.md +109 -24
- package/.mindforge/personas/research-synthesizer.md +101 -0
- package/.mindforge/personas/roadmapper-extend.md +100 -0
- package/.mindforge/personas/roadmapper.md +103 -0
- package/.mindforge/personas/security-reviewer.md +114 -91
- package/.mindforge/personas/tech-writer.md +118 -51
- package/.mindforge/personas/ui-auditor.md +94 -0
- package/.mindforge/personas/ui-checker.md +89 -0
- package/.mindforge/personas/ui-researcher.md +99 -0
- package/.mindforge/personas/user-profiler.md +93 -0
- package/.mindforge/personas/verifier.md +101 -0
- package/.planning/ROADMAP.md +10 -0
- package/.planning/browser-daemon.log +32 -0
- package/.planning/phases/01-migrate-gsd-to-mindforge/.gitkeep +0 -0
- package/CHANGELOG.md +41 -0
- package/MINDFORGE.md +2 -0
- package/README.md +40 -3
- package/bin/installer-core.js +3 -4
- package/docs/PERSONAS.md +611 -0
- package/docs/commands-reference.md +1 -0
- package/docs/{Context → context}/Master-Context.md +6 -13
- package/docs/references/checkpoints.md +778 -0
- package/docs/{reference → references}/commands.md +53 -43
- package/docs/references/continuation-format.md +249 -0
- package/docs/references/decimal-phase-calculation.md +64 -0
- package/docs/references/git-integration.md +295 -0
- package/docs/references/git-planning-commit.md +38 -0
- package/docs/references/model-profile-resolution.md +36 -0
- package/docs/references/model-profiles.md +139 -0
- package/docs/references/phase-argument-parsing.md +61 -0
- package/docs/references/planning-config.md +202 -0
- package/docs/references/questioning.md +162 -0
- package/docs/references/tdd.md +263 -0
- package/docs/references/ui-brand.md +160 -0
- package/docs/references/user-profiling.md +681 -0
- package/docs/references/verification-patterns.md +612 -0
- package/docs/references/workstream-flag.md +58 -0
- package/docs/skills-authoring-guide.md +1 -1
- package/docs/templates/Agents/CLAUDE-MD.md +122 -0
- package/docs/templates/Agents/COPILOT-INSTRUCTIONS.md +7 -0
- package/docs/templates/Agents/DEBUGGER-PROMPT.md +91 -0
- package/docs/templates/Agents/PLANNER-PROMPT.md +117 -0
- package/docs/templates/Execution/CONTINUE-HERE.md +78 -0
- package/docs/templates/Execution/DISCUSSION-LOG.md +63 -0
- package/docs/templates/Execution/PHASE-PROMPT.md +610 -0
- package/docs/templates/Execution/STATE.md +176 -0
- package/docs/templates/Execution/SUMMARY-COMPLEX.md +59 -0
- package/docs/templates/Execution/SUMMARY-MINIMAL.md +41 -0
- package/docs/templates/Execution/SUMMARY-STANDARD.md +48 -0
- package/docs/templates/Execution/SUMMARY.md +248 -0
- package/docs/templates/Profile/DEV-PREFERENCES.md +21 -0
- package/docs/templates/Profile/USER-PROFILE.md +146 -0
- package/docs/templates/Profile/USER-SETUP.md +311 -0
- package/docs/templates/Project/DISCOVERY.md +146 -0
- package/docs/templates/Project/MILESTONE-ARCHIVE.md +123 -0
- package/docs/templates/Project/MILESTONE.md +115 -0
- package/docs/templates/Project/PROJECT.md +206 -0
- package/docs/templates/Project/REQUIREMENTS.md +231 -0
- package/docs/templates/Project/RETROSPECTIVE.md +54 -0
- package/docs/templates/Project/ROADMAP.md +202 -0
- package/docs/templates/Quality/DEBUG.md +164 -0
- package/docs/templates/Quality/UAT.md +280 -0
- package/docs/templates/Quality/UI-SPEC.md +100 -0
- package/docs/templates/Quality/VALIDATION.md +76 -0
- package/docs/templates/Quality/VERIFICATION-REPORT.md +322 -0
- package/docs/templates/System/CONFIG.json +43 -0
- package/docs/templates/System/CONTEXT.md +352 -0
- package/docs/templates/codebase/architecture.md +255 -0
- package/docs/templates/codebase/concerns.md +310 -0
- package/docs/templates/codebase/conventions.md +307 -0
- package/docs/templates/codebase/integrations.md +280 -0
- package/docs/templates/codebase/stack.md +186 -0
- package/docs/templates/codebase/structure.md +285 -0
- package/docs/templates/codebase/testing.md +480 -0
- package/docs/templates/research/ARCHITECTURE.md +204 -0
- package/docs/templates/research/FEATURES.md +147 -0
- package/docs/templates/research/PITFALLS.md +200 -0
- package/docs/templates/research/STACK.md +120 -0
- package/docs/templates/research/SUMMARY.md +170 -0
- package/docs/user-guide.md +1 -1
- package/package.json +7 -2
- /package/docs/{reference → references}/audit-events.md +0 -0
- /package/docs/{reference → references}/config-reference.md +0 -0
- /package/docs/{reference → references}/sdk-api.md +0 -0
- /package/docs/{reference → references}/skills-api.md +0 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workstream — CRUD operations for workstream namespacing
|
|
3
|
+
*
|
|
4
|
+
* Workstreams enable parallel milestones by scoping ROADMAP.md, STATE.md,
|
|
5
|
+
* REQUIREMENTS.md, and phases/ into .planning/workstreams/{name}/ directories.
|
|
6
|
+
*
|
|
7
|
+
* When no workstreams/ directory exists, MindForge operates in "flat mode" with
|
|
8
|
+
* everything at .planning/ — backward compatible with pre-workstream installs.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const { output, error, planningPaths, planningRoot, toPosixPath, getMilestoneInfo, generateSlugInternal, setActiveWorkstream, getActiveWorkstream, filterPlanFiles, filterSummaryFiles, readSubdirectories } = require('./core.cjs');
|
|
14
|
+
const { stateExtractField } = require('./state.cjs');
|
|
15
|
+
|
|
16
|
+
// ─── Migration ──────────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Migrate flat .planning/ layout to workstream mode.
|
|
20
|
+
* Moves per-workstream files (ROADMAP.md, STATE.md, REQUIREMENTS.md, phases/)
|
|
21
|
+
* into .planning/workstreams/{name}/. Shared files (PROJECT.md, config.json,
|
|
22
|
+
* milestones/, research/, codebase/, todos/) stay in place.
|
|
23
|
+
*/
|
|
24
|
+
function migrateToWorkstreams(cwd, workstreamName) {
|
|
25
|
+
if (!workstreamName || /[/\\]/.test(workstreamName) || workstreamName === '.' || workstreamName === '..') {
|
|
26
|
+
throw new Error('Invalid workstream name for migration');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const baseDir = planningRoot(cwd);
|
|
30
|
+
const wsDir = path.join(baseDir, 'workstreams', workstreamName);
|
|
31
|
+
|
|
32
|
+
if (fs.existsSync(path.join(baseDir, 'workstreams'))) {
|
|
33
|
+
throw new Error('Already in workstream mode — .planning/workstreams/ exists');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const toMove = [
|
|
37
|
+
{ name: 'ROADMAP.md', type: 'file' },
|
|
38
|
+
{ name: 'STATE.md', type: 'file' },
|
|
39
|
+
{ name: 'REQUIREMENTS.md', type: 'file' },
|
|
40
|
+
{ name: 'phases', type: 'dir' },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
fs.mkdirSync(wsDir, { recursive: true });
|
|
44
|
+
|
|
45
|
+
const filesMoved = [];
|
|
46
|
+
try {
|
|
47
|
+
for (const item of toMove) {
|
|
48
|
+
const src = path.join(baseDir, item.name);
|
|
49
|
+
if (fs.existsSync(src)) {
|
|
50
|
+
const dest = path.join(wsDir, item.name);
|
|
51
|
+
fs.renameSync(src, dest);
|
|
52
|
+
filesMoved.push(item.name);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
for (const name of filesMoved) {
|
|
57
|
+
try { fs.renameSync(path.join(wsDir, name), path.join(baseDir, name)); } catch {}
|
|
58
|
+
}
|
|
59
|
+
try { fs.rmSync(wsDir, { recursive: true }); } catch {}
|
|
60
|
+
try { fs.rmdirSync(path.join(baseDir, 'workstreams')); } catch {}
|
|
61
|
+
throw err;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return { migrated: true, workstream: workstreamName, files_moved: filesMoved };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ─── CRUD Commands ──────────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
function cmdWorkstreamCreate(cwd, name, options, raw) {
|
|
70
|
+
if (!name) {
|
|
71
|
+
error('workstream name required. Usage: workstream create <name>');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
75
|
+
if (!slug) {
|
|
76
|
+
error('Invalid workstream name — must contain at least one alphanumeric character');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const baseDir = planningRoot(cwd);
|
|
80
|
+
if (!fs.existsSync(baseDir)) {
|
|
81
|
+
error('.planning/ directory not found — run /mindforge-new-project first');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const wsRoot = path.join(baseDir, 'workstreams');
|
|
85
|
+
const wsDir = path.join(wsRoot, slug);
|
|
86
|
+
|
|
87
|
+
if (fs.existsSync(wsDir) && fs.existsSync(path.join(wsDir, 'STATE.md'))) {
|
|
88
|
+
output({ created: false, error: 'already_exists', workstream: slug, path: toPosixPath(path.relative(cwd, wsDir)) }, raw);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const isFlatMode = !fs.existsSync(wsRoot);
|
|
93
|
+
let migration = null;
|
|
94
|
+
if (isFlatMode && options.migrate !== false) {
|
|
95
|
+
const hasExistingWork = fs.existsSync(path.join(baseDir, 'ROADMAP.md')) ||
|
|
96
|
+
fs.existsSync(path.join(baseDir, 'STATE.md')) ||
|
|
97
|
+
fs.existsSync(path.join(baseDir, 'phases'));
|
|
98
|
+
|
|
99
|
+
if (hasExistingWork) {
|
|
100
|
+
const migrateName = options.migrateName || null;
|
|
101
|
+
let existingWsName;
|
|
102
|
+
if (migrateName) {
|
|
103
|
+
existingWsName = migrateName;
|
|
104
|
+
} else {
|
|
105
|
+
try {
|
|
106
|
+
const milestone = getMilestoneInfo(cwd);
|
|
107
|
+
existingWsName = generateSlugInternal(milestone.name) || 'default';
|
|
108
|
+
} catch {
|
|
109
|
+
existingWsName = 'default';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
migration = migrateToWorkstreams(cwd, existingWsName);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
output({ created: false, error: 'migration_failed', message: e.message }, raw);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
fs.mkdirSync(wsRoot, { recursive: true });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
fs.mkdirSync(wsDir, { recursive: true });
|
|
125
|
+
fs.mkdirSync(path.join(wsDir, 'phases'), { recursive: true });
|
|
126
|
+
|
|
127
|
+
const today = new Date().toISOString().split('T')[0];
|
|
128
|
+
const stateContent = [
|
|
129
|
+
'---',
|
|
130
|
+
`workstream: ${slug}`,
|
|
131
|
+
`created: ${today}`,
|
|
132
|
+
'---',
|
|
133
|
+
'',
|
|
134
|
+
'# Project State',
|
|
135
|
+
'',
|
|
136
|
+
'## Current Position',
|
|
137
|
+
'**Status:** Not started',
|
|
138
|
+
'**Current Phase:** None',
|
|
139
|
+
`**Last Activity:** ${today}`,
|
|
140
|
+
'**Last Activity Description:** Workstream created',
|
|
141
|
+
'',
|
|
142
|
+
'## Progress',
|
|
143
|
+
'**Phases Complete:** 0',
|
|
144
|
+
'**Current Plan:** N/A',
|
|
145
|
+
'',
|
|
146
|
+
'## Session Continuity',
|
|
147
|
+
'**Stopped At:** N/A',
|
|
148
|
+
'**Resume File:** None',
|
|
149
|
+
'',
|
|
150
|
+
].join('\n');
|
|
151
|
+
|
|
152
|
+
const statePath = path.join(wsDir, 'STATE.md');
|
|
153
|
+
if (!fs.existsSync(statePath)) {
|
|
154
|
+
fs.writeFileSync(statePath, stateContent, 'utf-8');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
setActiveWorkstream(cwd, slug);
|
|
158
|
+
|
|
159
|
+
const relPath = toPosixPath(path.relative(cwd, wsDir));
|
|
160
|
+
output({
|
|
161
|
+
created: true,
|
|
162
|
+
workstream: slug,
|
|
163
|
+
path: relPath,
|
|
164
|
+
state_path: relPath + '/STATE.md',
|
|
165
|
+
phases_path: relPath + '/phases',
|
|
166
|
+
migration: migration || null,
|
|
167
|
+
active: true,
|
|
168
|
+
}, raw);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function cmdWorkstreamList(cwd, raw) {
|
|
172
|
+
const wsRoot = path.join(planningRoot(cwd), 'workstreams');
|
|
173
|
+
|
|
174
|
+
if (!fs.existsSync(wsRoot)) {
|
|
175
|
+
output({ mode: 'flat', workstreams: [], message: 'No workstreams — operating in flat mode' }, raw);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const entries = fs.readdirSync(wsRoot, { withFileTypes: true });
|
|
180
|
+
const workstreams = [];
|
|
181
|
+
|
|
182
|
+
for (const entry of entries) {
|
|
183
|
+
if (!entry.isDirectory()) continue;
|
|
184
|
+
|
|
185
|
+
const wsDir = path.join(wsRoot, entry.name);
|
|
186
|
+
const phasesDir = path.join(wsDir, 'phases');
|
|
187
|
+
|
|
188
|
+
const phaseDirs = readSubdirectories(phasesDir);
|
|
189
|
+
const phaseCount = phaseDirs.length;
|
|
190
|
+
let completedCount = 0;
|
|
191
|
+
for (const d of phaseDirs) {
|
|
192
|
+
try {
|
|
193
|
+
const phaseFiles = fs.readdirSync(path.join(phasesDir, d));
|
|
194
|
+
const plans = filterPlanFiles(phaseFiles);
|
|
195
|
+
const summaries = filterSummaryFiles(phaseFiles);
|
|
196
|
+
if (plans.length > 0 && summaries.length >= plans.length) completedCount++;
|
|
197
|
+
} catch {}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
let status = 'unknown', currentPhase = null;
|
|
201
|
+
try {
|
|
202
|
+
const stateContent = fs.readFileSync(path.join(wsDir, 'STATE.md'), 'utf-8');
|
|
203
|
+
status = stateExtractField(stateContent, 'Status') || 'unknown';
|
|
204
|
+
currentPhase = stateExtractField(stateContent, 'Current Phase');
|
|
205
|
+
} catch {}
|
|
206
|
+
|
|
207
|
+
workstreams.push({
|
|
208
|
+
name: entry.name,
|
|
209
|
+
path: toPosixPath(path.relative(cwd, wsDir)),
|
|
210
|
+
has_roadmap: fs.existsSync(path.join(wsDir, 'ROADMAP.md')),
|
|
211
|
+
has_state: fs.existsSync(path.join(wsDir, 'STATE.md')),
|
|
212
|
+
status,
|
|
213
|
+
current_phase: currentPhase,
|
|
214
|
+
phase_count: phaseCount,
|
|
215
|
+
completed_phases: completedCount,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
output({ mode: 'workstream', workstreams, count: workstreams.length }, raw);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function cmdWorkstreamStatus(cwd, name, raw) {
|
|
223
|
+
if (!name) error('workstream name required. Usage: workstream status <name>');
|
|
224
|
+
if (/[/\\]/.test(name) || name === '.' || name === '..') error('Invalid workstream name');
|
|
225
|
+
|
|
226
|
+
const wsDir = path.join(planningRoot(cwd), 'workstreams', name);
|
|
227
|
+
if (!fs.existsSync(wsDir)) {
|
|
228
|
+
output({ found: false, workstream: name }, raw);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const p = planningPaths(cwd, name);
|
|
233
|
+
const relPath = toPosixPath(path.relative(cwd, wsDir));
|
|
234
|
+
|
|
235
|
+
const files = {
|
|
236
|
+
roadmap: fs.existsSync(p.roadmap),
|
|
237
|
+
state: fs.existsSync(p.state),
|
|
238
|
+
requirements: fs.existsSync(p.requirements),
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const phases = [];
|
|
242
|
+
for (const dir of readSubdirectories(p.phases).sort()) {
|
|
243
|
+
try {
|
|
244
|
+
const phaseFiles = fs.readdirSync(path.join(p.phases, dir));
|
|
245
|
+
const plans = filterPlanFiles(phaseFiles);
|
|
246
|
+
const summaries = filterSummaryFiles(phaseFiles);
|
|
247
|
+
phases.push({
|
|
248
|
+
directory: dir,
|
|
249
|
+
status: summaries.length >= plans.length && plans.length > 0 ? 'complete' :
|
|
250
|
+
plans.length > 0 ? 'in_progress' : 'pending',
|
|
251
|
+
plan_count: plans.length,
|
|
252
|
+
summary_count: summaries.length,
|
|
253
|
+
});
|
|
254
|
+
} catch {}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
let stateInfo = {};
|
|
258
|
+
try {
|
|
259
|
+
const stateContent = fs.readFileSync(p.state, 'utf-8');
|
|
260
|
+
stateInfo = {
|
|
261
|
+
status: stateExtractField(stateContent, 'Status') || 'unknown',
|
|
262
|
+
current_phase: stateExtractField(stateContent, 'Current Phase'),
|
|
263
|
+
last_activity: stateExtractField(stateContent, 'Last Activity'),
|
|
264
|
+
};
|
|
265
|
+
} catch {}
|
|
266
|
+
|
|
267
|
+
output({
|
|
268
|
+
found: true,
|
|
269
|
+
workstream: name,
|
|
270
|
+
path: relPath,
|
|
271
|
+
files,
|
|
272
|
+
phases,
|
|
273
|
+
phase_count: phases.length,
|
|
274
|
+
completed_phases: phases.filter(ph => ph.status === 'complete').length,
|
|
275
|
+
...stateInfo,
|
|
276
|
+
}, raw);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function cmdWorkstreamComplete(cwd, name, options, raw) {
|
|
280
|
+
if (!name) error('workstream name required. Usage: workstream complete <name>');
|
|
281
|
+
if (/[/\\]/.test(name) || name === '.' || name === '..') error('Invalid workstream name');
|
|
282
|
+
|
|
283
|
+
const root = planningRoot(cwd);
|
|
284
|
+
const wsRoot = path.join(root, 'workstreams');
|
|
285
|
+
const wsDir = path.join(wsRoot, name);
|
|
286
|
+
|
|
287
|
+
if (!fs.existsSync(wsDir)) {
|
|
288
|
+
output({ completed: false, error: 'not_found', workstream: name }, raw);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const active = getActiveWorkstream(cwd);
|
|
293
|
+
if (active === name) setActiveWorkstream(cwd, null);
|
|
294
|
+
|
|
295
|
+
const archiveDir = path.join(root, 'milestones');
|
|
296
|
+
const today = new Date().toISOString().split('T')[0];
|
|
297
|
+
let archivePath = path.join(archiveDir, `ws-${name}-${today}`);
|
|
298
|
+
let suffix = 1;
|
|
299
|
+
while (fs.existsSync(archivePath)) {
|
|
300
|
+
archivePath = path.join(archiveDir, `ws-${name}-${today}-${suffix++}`);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
fs.mkdirSync(archivePath, { recursive: true });
|
|
304
|
+
|
|
305
|
+
const filesMoved = [];
|
|
306
|
+
try {
|
|
307
|
+
const entries = fs.readdirSync(wsDir, { withFileTypes: true });
|
|
308
|
+
for (const entry of entries) {
|
|
309
|
+
fs.renameSync(path.join(wsDir, entry.name), path.join(archivePath, entry.name));
|
|
310
|
+
filesMoved.push(entry.name);
|
|
311
|
+
}
|
|
312
|
+
} catch (err) {
|
|
313
|
+
for (const fname of filesMoved) {
|
|
314
|
+
try { fs.renameSync(path.join(archivePath, fname), path.join(wsDir, fname)); } catch {}
|
|
315
|
+
}
|
|
316
|
+
try { fs.rmSync(archivePath, { recursive: true }); } catch {}
|
|
317
|
+
if (active === name) setActiveWorkstream(cwd, name);
|
|
318
|
+
output({ completed: false, error: 'archive_failed', message: err.message, workstream: name }, raw);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
try { fs.rmdirSync(wsDir); } catch {}
|
|
323
|
+
|
|
324
|
+
let remainingWs = 0;
|
|
325
|
+
try {
|
|
326
|
+
remainingWs = fs.readdirSync(wsRoot, { withFileTypes: true }).filter(e => e.isDirectory()).length;
|
|
327
|
+
if (remainingWs === 0) fs.rmdirSync(wsRoot);
|
|
328
|
+
} catch {}
|
|
329
|
+
|
|
330
|
+
output({
|
|
331
|
+
completed: true,
|
|
332
|
+
workstream: name,
|
|
333
|
+
archived_to: toPosixPath(path.relative(cwd, archivePath)),
|
|
334
|
+
remaining_workstreams: remainingWs,
|
|
335
|
+
reverted_to_flat: remainingWs === 0,
|
|
336
|
+
}, raw);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// ─── Active Workstream Commands ──────────────────────────────────────────────
|
|
340
|
+
|
|
341
|
+
function cmdWorkstreamSet(cwd, name, raw) {
|
|
342
|
+
if (!name) {
|
|
343
|
+
setActiveWorkstream(cwd, null);
|
|
344
|
+
output({ active: null, cleared: true }, raw);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
|
|
349
|
+
output({ active: null, error: 'invalid_name', message: 'Workstream name must be alphanumeric, hyphens, and underscores only' }, raw);
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
const wsDir = path.join(planningRoot(cwd), 'workstreams', name);
|
|
354
|
+
if (!fs.existsSync(wsDir)) {
|
|
355
|
+
output({ active: null, error: 'not_found', workstream: name }, raw);
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
setActiveWorkstream(cwd, name);
|
|
360
|
+
output({ active: name, set: true }, raw, name);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function cmdWorkstreamGet(cwd, raw) {
|
|
364
|
+
const active = getActiveWorkstream(cwd);
|
|
365
|
+
const wsRoot = path.join(planningRoot(cwd), 'workstreams');
|
|
366
|
+
output({ active, mode: fs.existsSync(wsRoot) ? 'workstream' : 'flat' }, raw, active || 'none');
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
function cmdWorkstreamProgress(cwd, raw) {
|
|
370
|
+
const root = planningRoot(cwd);
|
|
371
|
+
const wsRoot = path.join(root, 'workstreams');
|
|
372
|
+
|
|
373
|
+
if (!fs.existsSync(wsRoot)) {
|
|
374
|
+
output({ mode: 'flat', workstreams: [], message: 'No workstreams — operating in flat mode' }, raw);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
const active = getActiveWorkstream(cwd);
|
|
379
|
+
const entries = fs.readdirSync(wsRoot, { withFileTypes: true });
|
|
380
|
+
const workstreams = [];
|
|
381
|
+
|
|
382
|
+
for (const entry of entries) {
|
|
383
|
+
if (!entry.isDirectory()) continue;
|
|
384
|
+
|
|
385
|
+
const wsDir = path.join(wsRoot, entry.name);
|
|
386
|
+
const phasesDir = path.join(wsDir, 'phases');
|
|
387
|
+
|
|
388
|
+
const phaseDirsProgress = readSubdirectories(phasesDir);
|
|
389
|
+
const phaseCount = phaseDirsProgress.length;
|
|
390
|
+
let completedCount = 0, totalPlans = 0, completedPlans = 0;
|
|
391
|
+
for (const d of phaseDirsProgress) {
|
|
392
|
+
try {
|
|
393
|
+
const phaseFiles = fs.readdirSync(path.join(phasesDir, d));
|
|
394
|
+
const plans = filterPlanFiles(phaseFiles);
|
|
395
|
+
const summaries = filterSummaryFiles(phaseFiles);
|
|
396
|
+
totalPlans += plans.length;
|
|
397
|
+
completedPlans += Math.min(summaries.length, plans.length);
|
|
398
|
+
if (plans.length > 0 && summaries.length >= plans.length) completedCount++;
|
|
399
|
+
} catch {}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
let roadmapPhaseCount = phaseCount;
|
|
403
|
+
try {
|
|
404
|
+
const roadmapContent = fs.readFileSync(path.join(wsDir, 'ROADMAP.md'), 'utf-8');
|
|
405
|
+
const phaseMatches = roadmapContent.match(/^###?\s+Phase\s+\d/gm);
|
|
406
|
+
if (phaseMatches) roadmapPhaseCount = phaseMatches.length;
|
|
407
|
+
} catch {}
|
|
408
|
+
|
|
409
|
+
let status = 'unknown', currentPhase = null;
|
|
410
|
+
try {
|
|
411
|
+
const stateContent = fs.readFileSync(path.join(wsDir, 'STATE.md'), 'utf-8');
|
|
412
|
+
status = stateExtractField(stateContent, 'Status') || 'unknown';
|
|
413
|
+
currentPhase = stateExtractField(stateContent, 'Current Phase');
|
|
414
|
+
} catch {}
|
|
415
|
+
|
|
416
|
+
workstreams.push({
|
|
417
|
+
name: entry.name,
|
|
418
|
+
active: entry.name === active,
|
|
419
|
+
status,
|
|
420
|
+
current_phase: currentPhase,
|
|
421
|
+
phases: `${completedCount}/${roadmapPhaseCount}`,
|
|
422
|
+
plans: `${completedPlans}/${totalPlans}`,
|
|
423
|
+
progress_percent: roadmapPhaseCount > 0 ? Math.round((completedCount / roadmapPhaseCount) * 100) : 0,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
output({ mode: 'workstream', active, workstreams, count: workstreams.length }, raw);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// ─── Collision Detection ────────────────────────────────────────────────────
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Return other workstreams that are NOT complete.
|
|
434
|
+
* Used to detect whether the milestone has active parallel work
|
|
435
|
+
* when a workstream finishes its last phase.
|
|
436
|
+
*/
|
|
437
|
+
function getOtherActiveWorkstreams(cwd, excludeWs) {
|
|
438
|
+
const wsRoot = path.join(planningRoot(cwd), 'workstreams');
|
|
439
|
+
if (!fs.existsSync(wsRoot)) return [];
|
|
440
|
+
|
|
441
|
+
const entries = fs.readdirSync(wsRoot, { withFileTypes: true });
|
|
442
|
+
const others = [];
|
|
443
|
+
|
|
444
|
+
for (const entry of entries) {
|
|
445
|
+
if (!entry.isDirectory() || entry.name === excludeWs) continue;
|
|
446
|
+
|
|
447
|
+
const wsDir = path.join(wsRoot, entry.name);
|
|
448
|
+
const statePath = path.join(wsDir, 'STATE.md');
|
|
449
|
+
|
|
450
|
+
let status = 'unknown', currentPhase = null;
|
|
451
|
+
try {
|
|
452
|
+
const content = fs.readFileSync(statePath, 'utf-8');
|
|
453
|
+
status = stateExtractField(content, 'Status') || 'unknown';
|
|
454
|
+
currentPhase = stateExtractField(content, 'Current Phase');
|
|
455
|
+
} catch {}
|
|
456
|
+
|
|
457
|
+
if (status.toLowerCase().includes('milestone complete') ||
|
|
458
|
+
status.toLowerCase().includes('archived')) {
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
const phasesDir = path.join(wsDir, 'phases');
|
|
463
|
+
const phaseDirsOther = readSubdirectories(phasesDir);
|
|
464
|
+
const phaseCount = phaseDirsOther.length;
|
|
465
|
+
let completedCount = 0;
|
|
466
|
+
for (const d of phaseDirsOther) {
|
|
467
|
+
try {
|
|
468
|
+
const phaseFiles = fs.readdirSync(path.join(phasesDir, d));
|
|
469
|
+
const plans = filterPlanFiles(phaseFiles);
|
|
470
|
+
const summaries = filterSummaryFiles(phaseFiles);
|
|
471
|
+
if (plans.length > 0 && summaries.length >= plans.length) completedCount++;
|
|
472
|
+
} catch {}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
others.push({ name: entry.name, status, current_phase: currentPhase, phases: `${completedCount}/${phaseCount}` });
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
return others;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
module.exports = {
|
|
482
|
+
migrateToWorkstreams,
|
|
483
|
+
cmdWorkstreamCreate,
|
|
484
|
+
cmdWorkstreamList,
|
|
485
|
+
cmdWorkstreamStatus,
|
|
486
|
+
cmdWorkstreamComplete,
|
|
487
|
+
cmdWorkstreamSet,
|
|
488
|
+
cmdWorkstreamGet,
|
|
489
|
+
cmdWorkstreamProgress,
|
|
490
|
+
getOtherActiveWorkstreams,
|
|
491
|
+
};
|