@mediadatafusion/pi-workflow-suite 0.0.11 → 0.0.13
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/CHANGELOG.md +42 -0
- package/README.md +26 -17
- package/VERSION +1 -1
- package/agents/codebase-research.md +7 -5
- package/agents/general-worker.md +9 -7
- package/agents/implementation-planning.md +5 -3
- package/agents/quality-validation.md +9 -8
- package/agents/workflow-orchestrator.md +9 -7
- package/config/prompts/execute-approved-plan.md +12 -2
- package/config/prompts/mission-final-validation.md +38 -5
- package/config/prompts/mission-plan.md +17 -1
- package/config/prompts/mission-repair.md +16 -2
- package/config/prompts/mission-review-prompt.md +19 -6
- package/config/prompts/mission-run.md +18 -5
- package/config/prompts/validate-approved-plan.md +57 -3
- package/config/prompts/workflow-plan-prompt.md +11 -1
- package/config/prompts/workflow-repair.md +18 -2
- package/config/prompts/workflow-reviewer-prompt.md +25 -9
- package/config/prompts/workflow-summary.md +1 -4
- package/config/workflow-settings.example.json +13 -11
- package/extensions/subagent/index.ts +41 -18
- package/extensions/subagent/repolock-guard.ts +224 -4
- package/extensions/subagent/runner.ts +136 -12
- package/extensions/workflow-model-router.ts +124 -41
- package/extensions/workflow-modes.ts +3791 -967
- package/extensions/workflow-settings-capabilities.ts +10 -0
- package/extensions/workflow-state.ts +77 -10
- package/extensions/workflow-subagent-policy.ts +13 -1
- package/extensions/workflow-summary.ts +8 -19
- package/extensions/workflow-tool-guard.ts +326 -35
- package/extensions/workflow-validation-classifier.ts +46 -4
- package/extensions/workflow-web-tools.ts +361 -1
- package/package.json +8 -5
- package/scripts/audit-live.sh +1 -1
- package/scripts/build-package-export.mjs +8 -13
- package/scripts/check-clean-release-tree.sh +3 -2
- package/scripts/check-package-media.mjs +78 -0
- package/scripts/install-to-live.sh +2 -0
- package/scripts/package-media-config.mjs +28 -0
- package/scripts/prepare-package-readme.mjs +19 -18
- package/scripts/quarantine-live-junk.sh +1 -1
- package/scripts/verify-live.sh +9 -1
- package/skills/implementation-planning/SKILL.md +1 -1
- package/skills/safe-execution/SKILL.md +1 -1
- package/skills/validation-review/SKILL.md +1 -1
|
@@ -2,26 +2,21 @@
|
|
|
2
2
|
import { existsSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { dirname, resolve } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { packageMediaUrl, packageMediaUrls } from './package-media-config.mjs';
|
|
5
6
|
|
|
6
7
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
7
8
|
const repoRoot = resolve(scriptDir, '..');
|
|
8
9
|
const readmePath = resolve(repoRoot, 'README.md');
|
|
9
10
|
const backupPath = resolve(repoRoot, '.package-readme.source.md');
|
|
10
11
|
const publishMarkerPath = resolve(repoRoot, '.package-readme.publish');
|
|
11
|
-
const mediaVersion = '0.0.6';
|
|
12
|
-
|
|
13
|
-
function mediaCdn(assetPath) {
|
|
14
|
-
return `https://cdn.jsdelivr.net/npm/@mediadatafusion/pi-workflow-suite@${mediaVersion}/${assetPath}`;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
12
|
function buildPackageReadme(sourceReadme) {
|
|
18
13
|
const headerBlock = `# Pi Workflow Suite\n\n${
|
|
19
|
-
``
|
|
20
15
|
}\n\n${[
|
|
21
|
-
`[](#installation)`,
|
|
17
|
+
`[](#quick-start)`,
|
|
18
|
+
`[](#core-commands)`,
|
|
19
|
+
`[](#settings-reference)`,
|
|
25
20
|
].join(' ')}\n\n**Workflow Suite Version:** `;
|
|
26
21
|
|
|
27
22
|
let readme = sourceReadme.replace(
|
|
@@ -29,7 +24,7 @@ function buildPackageReadme(sourceReadme) {
|
|
|
29
24
|
headerBlock,
|
|
30
25
|
);
|
|
31
26
|
|
|
32
|
-
const packageMediaBlock = `## Quick Demo\n\nSee Pi Workflow Suite in action: structured workflow modes, settings, runtime status, and guided execution inside Pi.\n\n[](${packageMediaUrls.demoMp4})\n\n## Screenshots\n\n${[
|
|
33
28
|
['Pi Workflow Suite Mission Home with workflow graphs', 'docs/assets/screenshots/00-mission-home.png'],
|
|
34
29
|
['Pi Workflow Suite startup logo', 'docs/assets/screenshots/01-startup-Logo.png'],
|
|
35
30
|
['Workflow Suite theme settings', 'docs/assets/screenshots/02-theme-settings.png'],
|
|
@@ -37,18 +32,18 @@ function buildPackageReadme(sourceReadme) {
|
|
|
37
32
|
['Workflow Suite shared sub-agent settings', 'docs/assets/screenshots/04-SharedSubAgentsSettings.png'],
|
|
38
33
|
['Mission Mode milestone progress', 'docs/assets/screenshots/05-mission-mode.png'],
|
|
39
34
|
['Workflow Suite Mermaid diagram output', 'docs/assets/screenshots/06-diagram-mermaid.png'],
|
|
40
|
-
].map(([alt, path]) => ` => `})`).join('\n\n')}\n\n`;
|
|
41
36
|
|
|
42
37
|
return readme.replace(/## Quick Demo[\s\S]*?## Contents\n/, `${packageMediaBlock}## Contents\n`);
|
|
43
38
|
}
|
|
44
39
|
|
|
45
40
|
function assertPackageReadme(readme) {
|
|
46
41
|
const required = [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
packageMediaUrls.header,
|
|
43
|
+
packageMediaUrls.demoGif,
|
|
44
|
+
packageMediaUrls.demoMp4,
|
|
45
|
+
packageMediaUrls.screenshots.missionHome,
|
|
46
|
+
packageMediaUrls.screenshots.diagramMermaid,
|
|
52
47
|
'[![Watch the Pi Workflow Suite quick demo]',
|
|
53
48
|
];
|
|
54
49
|
for (const needle of required) {
|
|
@@ -63,6 +58,12 @@ function assertPackageReadme(readme) {
|
|
|
63
58
|
if (readme.includes('src="docs/assets/screenshots/') || readme.includes('](docs/assets/screenshots/')) {
|
|
64
59
|
throw new Error('package README still contains source-relative screenshot paths');
|
|
65
60
|
}
|
|
61
|
+
if (readme.includes('@mediadatafusion/pi-workflow-suite@0.0.6/docs/assets')) {
|
|
62
|
+
throw new Error('package README still contains old 0.0.6 package media URLs');
|
|
63
|
+
}
|
|
64
|
+
if (readme.includes('raw.githubusercontent.com/MediaDataFusion/pi-workflow-suite/v0.0.12/docs/assets')) {
|
|
65
|
+
throw new Error('package README points at raw GitHub media instead of the established jsDelivr npm CDN');
|
|
66
|
+
}
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
function looksPackageSafe(readme) {
|
|
@@ -54,7 +54,7 @@ while IFS= read -r -d '' path; do
|
|
|
54
54
|
;;
|
|
55
55
|
esac
|
|
56
56
|
move_rel "$rel"
|
|
57
|
-
done < <(find "$LIVE_DIR" -maxdepth 3 \( -name '*.backup.*' -o -name '*.broken.*' -o -name '.DS_Store' -o -name '*.log' \) -print0 2>/dev/null)
|
|
57
|
+
done < <(find "$LIVE_DIR" -maxdepth 3 \( -name '*.bak' -o -name '*.backup.*' -o -name '*.broken.*' -o -name '.DS_Store' -o -name '*.log' \) -print0 2>/dev/null)
|
|
58
58
|
|
|
59
59
|
# Known stale/development directories from earlier manual repair flows. These are
|
|
60
60
|
# quarantined whole only when present. Review the dry-run output first.
|
package/scripts/verify-live.sh
CHANGED
|
@@ -37,13 +37,21 @@ warn_stale_files() {
|
|
|
37
37
|
|
|
38
38
|
warn_unexpected_loadable_extensions() {
|
|
39
39
|
local expected actual unexpected
|
|
40
|
+
# Keep aligned with package/runtime extension-surface files. Some helper
|
|
41
|
+
# modules have no-op default exports so Pi's broad discovery can load them
|
|
42
|
+
# safely; they are intentional live files, not stale extension candidates.
|
|
40
43
|
expected="$(cat <<'TEXT'
|
|
41
44
|
extensions/subagent/index.ts
|
|
42
45
|
extensions/workflow-model-router.ts
|
|
43
46
|
extensions/workflow-modes.ts
|
|
47
|
+
extensions/workflow-parsers.ts
|
|
48
|
+
extensions/workflow-settings-capabilities.ts
|
|
44
49
|
extensions/workflow-state.ts
|
|
50
|
+
extensions/workflow-subagent-policy.ts
|
|
45
51
|
extensions/workflow-summary.ts
|
|
46
52
|
extensions/workflow-tool-guard.ts
|
|
53
|
+
extensions/workflow-validation-classifier.ts
|
|
54
|
+
extensions/workflow-web-tools.ts
|
|
47
55
|
TEXT
|
|
48
56
|
)"
|
|
49
57
|
actual="$(
|
|
@@ -54,7 +62,7 @@ TEXT
|
|
|
54
62
|
)"
|
|
55
63
|
unexpected="$(comm -13 <(printf '%s\n' "$expected" | sort) <(printf '%s\n' "$actual" | sort) || true)"
|
|
56
64
|
if [[ -n "$unexpected" ]]; then
|
|
57
|
-
printf 'warning: unexpected
|
|
65
|
+
printf 'warning: unexpected files in extension load surface found:\n%s\n' "$unexpected" >&2
|
|
58
66
|
warning=1
|
|
59
67
|
fi
|
|
60
68
|
}
|
|
@@ -5,7 +5,7 @@ description: Convert a user task into an execution-ready implementation plan wit
|
|
|
5
5
|
|
|
6
6
|
# Implementation Planning
|
|
7
7
|
|
|
8
|
-
Produce concrete plans only. Ask follow-up questions when required. Include task summary, assumptions, files likely to change, off-limits files, implementation steps, risks, validation steps, rollback notes, and readiness status.
|
|
8
|
+
Produce concrete plans only. Ask follow-up questions when required. Include task summary, assumptions, files likely to change, allowed new file locations, off-limits files, implementation steps, risks, validation steps, rollback notes, and readiness status. Do not plan arbitrary repository-root files unless the exact root path is approved and justified; otherwise route new artifacts to conventional project directories.
|
|
9
9
|
|
|
10
10
|
Mermaid diagrams are rendered by Workflow Suite in a uniform dark-mode visual style. For user-facing workflows, export/share paths, request lifecycles, architecture, data flow, multi-step sequences, state transitions, dependencies, validation flow, or implementation phases, include a meaningful Mermaid diagram plus concise prose unless the user requested prose only or the response is trivial. Use concise labels and the right diagram type; do not hardcode random style/classDef/light-theme overrides unless the user explicitly asks.
|
|
11
11
|
## Professional Constraints
|
|
@@ -5,7 +5,7 @@ description: Keep code changes bound to an approved plan, avoid unrelated refact
|
|
|
5
5
|
|
|
6
6
|
# Safe Execution
|
|
7
7
|
|
|
8
|
-
Execute only the approved plan. Restate expected files before editing. Prefer surgical edits. Do not commit, push, switch branches, install dependencies, deploy, or run destructive commands. Stop and ask if the approved plan is insufficient.
|
|
8
|
+
Execute only the approved plan. Restate expected files and allowed new file locations before editing. Prefer surgical edits. Do not create arbitrary repository-root files; a root file requires an exact approved root path. Inspect project conventions and use established source, test, docs, config, script, or feature-local directories. If a current-task-created file is misplaced, preserve and move it to the correct approved path instead of deleting it. Treat untracked or unexpected files as possibly user-owned and stop/report before moving or deleting them. Do not commit, push, switch branches, install dependencies, deploy, or run destructive commands. Stop and ask if the approved plan is insufficient.
|
|
9
9
|
|
|
10
10
|
Mermaid diagrams are rendered by Workflow Suite in a uniform dark-mode visual style. For user-facing workflows, export/share paths, request lifecycles, architecture, data flow, multi-step sequences, state transitions, dependencies, validation flow, or implementation phases, include a meaningful Mermaid diagram plus concise prose unless the user requested prose only or the response is trivial. Use concise labels and the right diagram type; do not hardcode random style/classDef/light-theme overrides unless the user explicitly asks.
|
|
11
11
|
## Professional Constraints
|
|
@@ -5,7 +5,7 @@ description: Review implementation against an approved plan and return PASS, PAR
|
|
|
5
5
|
|
|
6
6
|
# Validation Review
|
|
7
7
|
|
|
8
|
-
Use read-only review. Compare changed files and implementation behavior against the approved plan. Report PASS, PARTIAL PASS, or FAIL. Include coverage, missing requirements, unexpected changes, regression risks, test/build status, and next action.
|
|
8
|
+
Use read-only review. Compare changed files and implementation behavior against the approved plan. Report PASS, PARTIAL PASS, or FAIL. Include coverage, missing requirements, unexpected changes, regression risks, test/build status, and next action. Flag arbitrary repository-root files, misplaced files, unsafe cleanup-by-deletion, and deleted recoverable files unless the exact path/disposition was approved. Do not repair, move, delete, or write project source files during validation review.
|
|
9
9
|
|
|
10
10
|
Mermaid diagrams are rendered by Workflow Suite in a uniform dark-mode visual style. For user-facing workflows, export/share paths, request lifecycles, architecture, data flow, multi-step sequences, state transitions, dependencies, validation flow, or implementation phases, include a meaningful Mermaid diagram plus concise prose unless the user requested prose only or the response is trivial. Use concise labels and the right diagram type; do not hardcode random style/classDef/light-theme overrides unless the user explicitly asks.
|
|
11
11
|
## Professional Constraints
|