prizmkit 1.1.110 → 1.1.112
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/bundled/VERSION.json +3 -3
- package/bundled/agents/prizm-dev-team-reviewer.md +15 -0
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +55 -76
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +283 -421
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +259 -481
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -0
- package/bundled/dev-pipeline/scripts/init-pipeline.py +12 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +24 -1
- package/bundled/dev-pipeline/scripts/prompt_framework.py +312 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +87 -20
- package/bundled/dev-pipeline/scripts/update-feature-status.py +82 -16
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +68 -28
- package/bundled/dev-pipeline/scripts/utils.py +171 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +10 -18
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +14 -25
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +9 -1
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +11 -8
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +122 -182
- package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +16 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +12 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +9 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +31 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +22 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +23 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +20 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-init.md +9 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +15 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +29 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +11 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +7 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +31 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +40 -0
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
- package/bundled/dev-pipeline/templates/sections/failure-capture.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +17 -0
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +13 -0
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +9 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +37 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +22 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +16 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +9 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +22 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +19 -0
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +11 -0
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +7 -0
- package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +28 -0
- package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +52 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +122 -5
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +122 -0
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +124 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +197 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +7 -3
- package/bundled/dev-pipeline/tests/test_utils.py +66 -1
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +8 -7
- package/bundled/skills/app-planner/references/project-brief-guide.md +2 -2
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +1 -1
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +1 -1
- package/bundled/skills/app-planner/references/rules-configuration.md +53 -26
- package/bundled/skills/bug-fix-workflow/SKILL.md +191 -336
- package/bundled/skills/bug-planner/SKILL.md +6 -5
- package/bundled/skills/bug-planner/references/critic-and-verification.md +3 -3
- package/bundled/skills/bug-planner/references/schema-validation.md +2 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +30 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +16 -16
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +2 -2
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +19 -11
- package/bundled/skills/feature-planner/SKILL.md +9 -11
- package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +1 -1
- package/bundled/skills/feature-planner/references/error-recovery.md +2 -1
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +2 -2
- package/bundled/skills/feature-planner/references/new-project-planning.md +35 -39
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -1
- package/bundled/skills/feature-workflow/SKILL.md +169 -298
- package/bundled/skills/prizmkit/SKILL.md +103 -57
- package/bundled/skills/prizmkit-code-review/SKILL.md +97 -94
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -0
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +13 -1
- package/bundled/skills/prizmkit-committer/SKILL.md +59 -47
- package/bundled/skills/prizmkit-deploy/SKILL.md +162 -381
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +220 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +51 -40
- package/bundled/skills/prizmkit-init/SKILL.md +4 -3
- package/bundled/skills/prizmkit-plan/SKILL.md +85 -70
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +94 -73
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +20 -18
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +18 -14
- package/bundled/skills/prizmkit-retrospective/SKILL.md +56 -48
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +79 -27
- package/bundled/skills/prizmkit-test/SKILL.md +138 -141
- package/bundled/skills/prizmkit-test/references/examples.md +10 -8
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +1 -1
- package/bundled/skills/prizmkit-test/references/test-report-template.md +2 -2
- package/bundled/skills/recovery-workflow/SKILL.md +195 -256
- package/bundled/skills/recovery-workflow/evals/evals.json +21 -13
- package/bundled/skills/recovery-workflow/references/detection.md +48 -39
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +258 -322
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -11
- package/bundled/skills/refactor-planner/SKILL.md +2 -2
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +24 -19
- package/bundled/skills/refactor-planner/references/fast-path.md +2 -4
- package/bundled/skills/refactor-planner/references/planning-phases.md +2 -2
- package/bundled/skills/refactor-workflow/SKILL.md +173 -307
- package/package.json +1 -1
- package/src/scaffold.js +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +0 -6
- package/bundled/skills/feature-workflow/references/brainstorm-guide.md +0 -137
- package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +0 -116
package/bundled/VERSION.json
CHANGED
|
@@ -25,6 +25,19 @@ You are the team's "senior engineer doing code review" — you diagnose problems
|
|
|
25
25
|
2. If no `context-snapshot.md`: read `spec.md`, `plan.md` from the artifact directory, then `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
26
26
|
3. Identify changed files from `## Implementation Log` or completed tasks in plan.md
|
|
27
27
|
|
|
28
|
+
**Active Checkout Requirement**: You must review only the active checkout provided by the orchestrator. `/prizmkit-code-review` does not support worktree review.
|
|
29
|
+
|
|
30
|
+
The orchestrator must provide the expected active checkout git top-level in the workspace context. Before reviewing, verify that your current git top-level matches that expected active checkout.
|
|
31
|
+
|
|
32
|
+
If you detect that you are running inside a temporary worktree, `.claude/worktrees/...`, `.prizmkit/state/worktrees/...`, a remote workspace, a copied checkout, or any checkout whose git top-level does not match the orchestrator-provided active checkout root:
|
|
33
|
+
- Stop immediately.
|
|
34
|
+
- Do not read or review files.
|
|
35
|
+
- Do not produce normal review findings.
|
|
36
|
+
- Report `WRONG_CHECKOUT`.
|
|
37
|
+
- State that `/prizmkit-code-review` cannot continue because the reviewer subagent was not started in the active checkout/no-worktree mode required by this skill.
|
|
38
|
+
|
|
39
|
+
Do NOT request or create `.claude/worktrees/...` tool worktrees. Do NOT re-discover or re-index the whole repository; use the orchestrator-provided context as your review scope and request only targeted file reads.
|
|
40
|
+
|
|
28
41
|
**File Reading Rule**: Read ONLY files listed in the Implementation Log for diagnosis — do not explore unrelated files. Exception: during Fix Strategy Formulation, you MAY read additional files to trace impact (callers, dependents, shared patterns).
|
|
29
42
|
|
|
30
43
|
### Review Workflow
|
|
@@ -74,6 +87,8 @@ When Dev has applied fixes and returns for re-review:
|
|
|
74
87
|
- Do not modify source files to fix issues — produce Fix Instructions for Dev instead
|
|
75
88
|
- **Do NOT run test suites** — the Orchestrator handles testing. You review code, not execute tests.
|
|
76
89
|
- Do NOT re-read source files already listed in context-snapshot.md Section 4 File Manifest unless you need a specific code detail for a finding
|
|
90
|
+
- **Do NOT request or create worktrees** (`.claude/worktrees/...` or similar) — you review the active checkout's changes using the orchestrator-provided workspace context
|
|
91
|
+
- **Do NOT re-discover or broadly re-index the repository** — the orchestrator has already captured the diff scope; request only targeted file reads for lines you need
|
|
77
92
|
|
|
78
93
|
### Behavioral Rules
|
|
79
94
|
|
|
@@ -33,6 +33,7 @@ UTILITY_ENTRYPOINTS = {
|
|
|
33
33
|
|
|
34
34
|
UTILITY_LIBRARY_ONLY = {
|
|
35
35
|
"continuation.py": "shared continuation helpers imported by prompt generators",
|
|
36
|
+
"prompt_framework.py": "shared prompt rendering and checkpoint helpers imported by prompt generators",
|
|
36
37
|
"utils.py": "shared utility helpers imported by runtime scripts",
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -29,6 +29,7 @@ import sys
|
|
|
29
29
|
|
|
30
30
|
from utils import enrich_global_context, helper_replacements, load_json_file, resolve_prompt_platform, setup_logging
|
|
31
31
|
from continuation import add_continuation_args, append_continuation_handoff, is_continuation
|
|
32
|
+
from prompt_framework import browser_enabled_from_item, detect_dev_server_port
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
DEFAULT_MAX_RETRIES = 3
|
|
@@ -190,9 +191,42 @@ def detect_test_commands(project_root):
|
|
|
190
191
|
"""
|
|
191
192
|
test_commands = []
|
|
192
193
|
|
|
193
|
-
# Check for npm/package.json
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
# Check for npm/package.json — use content-aware detection
|
|
195
|
+
pkg_json_path = os.path.join(project_root, "package.json")
|
|
196
|
+
if os.path.exists(pkg_json_path):
|
|
197
|
+
try:
|
|
198
|
+
with open(pkg_json_path, "r", encoding="utf-8") as f:
|
|
199
|
+
pkg_data = json.load(f)
|
|
200
|
+
scripts = pkg_data.get("scripts", {}) if isinstance(pkg_data, dict) else {}
|
|
201
|
+
|
|
202
|
+
# Detect package manager from lockfiles
|
|
203
|
+
if os.path.exists(os.path.join(project_root, "pnpm-lock.yaml")):
|
|
204
|
+
pm_cmd = "pnpm"
|
|
205
|
+
elif os.path.exists(os.path.join(project_root, "yarn.lock")):
|
|
206
|
+
pm_cmd = "yarn"
|
|
207
|
+
else:
|
|
208
|
+
pm_cmd = "npm"
|
|
209
|
+
|
|
210
|
+
# Find best test script: prefer "test", then "test:unit",
|
|
211
|
+
# then first script matching test-related patterns
|
|
212
|
+
if "test" in scripts:
|
|
213
|
+
test_commands.append("{} test".format(pm_cmd))
|
|
214
|
+
elif "test:unit" in scripts:
|
|
215
|
+
test_commands.append("{} run test:unit".format(pm_cmd))
|
|
216
|
+
else:
|
|
217
|
+
# Search for any test-like script name
|
|
218
|
+
test_like = None
|
|
219
|
+
for script_name in sorted(scripts.keys()):
|
|
220
|
+
if "test" in script_name.lower():
|
|
221
|
+
test_like = script_name
|
|
222
|
+
break
|
|
223
|
+
if test_like:
|
|
224
|
+
test_commands.append(
|
|
225
|
+
"{} run {}".format(pm_cmd, test_like)
|
|
226
|
+
)
|
|
227
|
+
except Exception:
|
|
228
|
+
# Corrupt/unreadable package.json → skip JS detection
|
|
229
|
+
pass
|
|
196
230
|
|
|
197
231
|
# Check for Go
|
|
198
232
|
if os.path.exists(os.path.join(project_root, "go.mod")):
|
|
@@ -660,10 +694,13 @@ SECTION_TO_SKILL = {
|
|
|
660
694
|
"phase-commit": None, # special: split into retrospective + committer
|
|
661
695
|
}
|
|
662
696
|
|
|
663
|
-
# phase-commit is split into
|
|
697
|
+
# phase-commit is split into durable checkpoint steps. CLI flags are not
|
|
698
|
+
# artifacts; only real files/globs belong in required_artifacts.
|
|
664
699
|
_COMMIT_STEPS = [
|
|
665
700
|
("prizmkit-retrospective", "Retrospective", []),
|
|
666
|
-
("prizmkit-committer", "Commit", [
|
|
701
|
+
("prizmkit-committer", "Commit", []),
|
|
702
|
+
("completion-summary", "Completion Summary",
|
|
703
|
+
[".prizmkit/specs/{slug}/completion-summary.json"]),
|
|
667
704
|
]
|
|
668
705
|
|
|
669
706
|
|
|
@@ -1262,7 +1299,6 @@ def load_section(sections_dir, name):
|
|
|
1262
1299
|
|
|
1263
1300
|
ACTIVE_AGENT_PROMPTS = {
|
|
1264
1301
|
"critic-plan-challenge.md": "{{AGENT_PROMPT_CRITIC_PLAN_CHALLENGE}}",
|
|
1265
|
-
"reviewer-review.md": "{{AGENT_PROMPT_REVIEWER_REVIEW}}",
|
|
1266
1302
|
}
|
|
1267
1303
|
|
|
1268
1304
|
|
|
@@ -1801,48 +1837,16 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1801
1837
|
)
|
|
1802
1838
|
critic_enabled = False
|
|
1803
1839
|
|
|
1804
|
-
# Browser
|
|
1805
|
-
|
|
1806
|
-
browser_enabled =
|
|
1807
|
-
browser_verify_steps = ""
|
|
1808
|
-
browser_tool = "auto" # default: AI chooses at runtime
|
|
1809
|
-
|
|
1810
|
-
browser_verify_env = os.environ.get("BROWSER_VERIFY", "").lower()
|
|
1811
|
-
if browser_verify_env == "false":
|
|
1812
|
-
browser_interaction = None
|
|
1840
|
+
# Browser verification defaults to a mandatory attempt. It is disabled only
|
|
1841
|
+
# by BROWSER_VERIFY=false or browser_interaction.enabled=false.
|
|
1842
|
+
browser_enabled, browser_tool, browser_verify_steps, browser_blocking = browser_enabled_from_item(feature)
|
|
1813
1843
|
|
|
1814
|
-
if
|
|
1815
|
-
|
|
1816
|
-
|
|
1844
|
+
if browser_tool not in ("playwright-cli", "opencli", "auto"):
|
|
1845
|
+
LOGGER.warning(
|
|
1846
|
+
"Unknown browser_interaction.tool '%s', defaulting to 'auto'",
|
|
1847
|
+
browser_tool,
|
|
1848
|
+
)
|
|
1817
1849
|
browser_tool = "auto"
|
|
1818
|
-
browser_verify_steps = (
|
|
1819
|
-
" # (no specific verify goals — explore the app and "
|
|
1820
|
-
"verify the feature works as expected)")
|
|
1821
|
-
elif browser_interaction and isinstance(browser_interaction, dict):
|
|
1822
|
-
# Extract tool preference (playwright-cli / opencli / auto)
|
|
1823
|
-
browser_tool = browser_interaction.get("tool", "auto")
|
|
1824
|
-
if browser_tool not in ("playwright-cli", "opencli", "auto"):
|
|
1825
|
-
LOGGER.warning(
|
|
1826
|
-
"Unknown browser_interaction.tool '%s', defaulting to 'auto'",
|
|
1827
|
-
browser_tool,
|
|
1828
|
-
)
|
|
1829
|
-
browser_tool = "auto"
|
|
1830
|
-
|
|
1831
|
-
# browser_interaction only needs verify_steps — AI auto-detects
|
|
1832
|
-
# dev server command, URL, and port from project config
|
|
1833
|
-
steps = browser_interaction.get("verify_steps", [])
|
|
1834
|
-
if steps:
|
|
1835
|
-
browser_enabled = True
|
|
1836
|
-
browser_verify_steps = "\n".join(
|
|
1837
|
-
" # Goal {}: {}".format(i + 1, step)
|
|
1838
|
-
for i, step in enumerate(steps)
|
|
1839
|
-
)
|
|
1840
|
-
elif browser_interaction.get("url") or browser_interaction.get("enabled", True):
|
|
1841
|
-
# Backward compat: old format had url/setup_command fields
|
|
1842
|
-
browser_enabled = True
|
|
1843
|
-
browser_verify_steps = (
|
|
1844
|
-
" # (no specific verify goals — explore the app and "
|
|
1845
|
-
"verify the feature works as expected)")
|
|
1846
1850
|
|
|
1847
1851
|
# Auto-detect test commands from project structure
|
|
1848
1852
|
test_cmd = detect_test_commands(project_root)
|
|
@@ -1860,36 +1864,10 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1860
1864
|
if isinstance(testing_config, dict):
|
|
1861
1865
|
coverage_target = str(testing_config.get("coverage_target", 80))
|
|
1862
1866
|
|
|
1863
|
-
# Detect dev server port from
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
if os.path.isfile(pkg_path):
|
|
1868
|
-
with open(pkg_path, "r", encoding="utf-8") as f:
|
|
1869
|
-
pkg = json.load(f)
|
|
1870
|
-
dev_script = pkg.get("scripts", {}).get("dev", "")
|
|
1871
|
-
# Extract -p <port> from dev script
|
|
1872
|
-
port_match = re.search(r"-p\s+(\d+)", dev_script)
|
|
1873
|
-
if port_match:
|
|
1874
|
-
dev_port = port_match.group(1)
|
|
1875
|
-
else:
|
|
1876
|
-
# Fallback: try NEXT_PUBLIC_SITE_URL from .env files
|
|
1877
|
-
for env_file in [".env.local", ".env"]:
|
|
1878
|
-
env_path = os.path.join(project_root, env_file)
|
|
1879
|
-
if os.path.isfile(env_path):
|
|
1880
|
-
with open(env_path, "r", encoding="utf-8") as ef:
|
|
1881
|
-
for line in ef:
|
|
1882
|
-
m = re.match(
|
|
1883
|
-
r"NEXT_PUBLIC_SITE_URL\s*=\s*.*?:([0-9]+)", line.strip()
|
|
1884
|
-
)
|
|
1885
|
-
if m:
|
|
1886
|
-
dev_port = m.group(1)
|
|
1887
|
-
break
|
|
1888
|
-
if dev_port != "3000":
|
|
1889
|
-
break
|
|
1890
|
-
except Exception:
|
|
1891
|
-
pass # Keep default 3000 on any error
|
|
1892
|
-
dev_url = f"http://localhost:{dev_port}"
|
|
1867
|
+
# Detect dev server port from project config. Do not guess a default port;
|
|
1868
|
+
# browser prompt sections require the agent to discover it when unknown.
|
|
1869
|
+
dev_port = detect_dev_server_port(project_root)
|
|
1870
|
+
dev_url = "http://localhost:{}".format(dev_port) if dev_port.isdigit() else "<UNKNOWN_DETECT_FROM_PROJECT_CONFIG>"
|
|
1893
1871
|
|
|
1894
1872
|
replacements = {
|
|
1895
1873
|
"{{RUN_ID}}": args.run_id,
|
|
@@ -1915,6 +1893,7 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1915
1893
|
"{{SESSION_STATUS_PATH}}": session_status_abs,
|
|
1916
1894
|
"{{PROJECT_ROOT}}": project_root,
|
|
1917
1895
|
"{{FEATURE_SLUG}}": feature_slug,
|
|
1896
|
+
"{{ARTIFACT_DIR}}": os.path.join(".prizmkit", "specs", feature_slug),
|
|
1918
1897
|
"{{CHECKPOINT_PATH}}": os.path.join(
|
|
1919
1898
|
".prizmkit", "specs", feature_slug, "workflow-checkpoint.json",
|
|
1920
1899
|
),
|