prizmkit 1.1.111 → 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.
Files changed (110) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/agents/prizm-dev-team-reviewer.md +12 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -0
  4. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +19 -73
  5. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +283 -421
  6. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
  7. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +259 -481
  8. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -0
  9. package/bundled/dev-pipeline/scripts/init-pipeline.py +12 -0
  10. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +24 -1
  11. package/bundled/dev-pipeline/scripts/prompt_framework.py +312 -0
  12. package/bundled/dev-pipeline/scripts/update-bug-status.py +87 -20
  13. package/bundled/dev-pipeline/scripts/update-feature-status.py +82 -16
  14. package/bundled/dev-pipeline/scripts/update-refactor-status.py +68 -28
  15. package/bundled/dev-pipeline/scripts/utils.py +171 -0
  16. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  17. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +10 -18
  18. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +14 -25
  19. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +9 -1
  20. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +11 -8
  21. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +122 -182
  22. package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +16 -0
  23. package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +12 -0
  24. package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +9 -0
  25. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +31 -0
  26. package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +22 -0
  27. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +23 -0
  28. package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +20 -0
  29. package/bundled/dev-pipeline/templates/sections/bugfix-phase-init.md +9 -0
  30. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +15 -0
  31. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +29 -0
  32. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +11 -0
  33. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +7 -0
  34. package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +31 -0
  35. package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +40 -0
  36. package/bundled/dev-pipeline/templates/sections/failure-capture.md +2 -2
  37. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
  38. package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +17 -0
  39. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +13 -0
  40. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +9 -0
  41. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +37 -0
  42. package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +22 -0
  43. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +16 -0
  44. package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +9 -0
  45. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +22 -0
  46. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +19 -0
  47. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +11 -0
  48. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +7 -0
  49. package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +28 -0
  50. package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +52 -0
  51. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +17 -5
  52. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +197 -0
  53. package/bundled/dev-pipeline/tests/test_unified_cli.py +6 -2
  54. package/bundled/dev-pipeline/tests/test_utils.py +66 -1
  55. package/bundled/skills/_metadata.json +1 -1
  56. package/bundled/skills/app-planner/SKILL.md +8 -7
  57. package/bundled/skills/app-planner/references/project-brief-guide.md +2 -2
  58. package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +1 -1
  59. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +1 -1
  60. package/bundled/skills/app-planner/references/rules-configuration.md +53 -26
  61. package/bundled/skills/bug-fix-workflow/SKILL.md +191 -336
  62. package/bundled/skills/bug-planner/SKILL.md +6 -5
  63. package/bundled/skills/bug-planner/references/critic-and-verification.md +3 -3
  64. package/bundled/skills/bug-planner/references/schema-validation.md +2 -1
  65. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +30 -1
  66. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +16 -16
  67. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +2 -2
  68. package/bundled/skills/feature-pipeline-launcher/SKILL.md +19 -11
  69. package/bundled/skills/feature-planner/SKILL.md +9 -11
  70. package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
  71. package/bundled/skills/feature-planner/references/decomposition-patterns.md +1 -1
  72. package/bundled/skills/feature-planner/references/error-recovery.md +2 -1
  73. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +2 -2
  74. package/bundled/skills/feature-planner/references/new-project-planning.md +35 -39
  75. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -1
  76. package/bundled/skills/feature-workflow/SKILL.md +169 -298
  77. package/bundled/skills/prizmkit/SKILL.md +103 -57
  78. package/bundled/skills/prizmkit-code-review/SKILL.md +97 -116
  79. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -0
  80. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +12 -1
  81. package/bundled/skills/prizmkit-committer/SKILL.md +59 -47
  82. package/bundled/skills/prizmkit-deploy/SKILL.md +162 -381
  83. package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +220 -0
  84. package/bundled/skills/prizmkit-implement/SKILL.md +51 -40
  85. package/bundled/skills/prizmkit-init/SKILL.md +4 -3
  86. package/bundled/skills/prizmkit-plan/SKILL.md +85 -70
  87. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +94 -73
  88. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +20 -18
  89. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +18 -14
  90. package/bundled/skills/prizmkit-retrospective/SKILL.md +56 -48
  91. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +79 -27
  92. package/bundled/skills/prizmkit-test/SKILL.md +138 -141
  93. package/bundled/skills/prizmkit-test/references/examples.md +10 -8
  94. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +1 -1
  95. package/bundled/skills/prizmkit-test/references/test-report-template.md +2 -2
  96. package/bundled/skills/recovery-workflow/SKILL.md +195 -256
  97. package/bundled/skills/recovery-workflow/evals/evals.json +21 -13
  98. package/bundled/skills/recovery-workflow/references/detection.md +48 -39
  99. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +258 -322
  100. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -11
  101. package/bundled/skills/refactor-planner/SKILL.md +2 -2
  102. package/bundled/skills/refactor-planner/references/behavior-preservation.md +24 -19
  103. package/bundled/skills/refactor-planner/references/fast-path.md +2 -4
  104. package/bundled/skills/refactor-planner/references/planning-phases.md +2 -2
  105. package/bundled/skills/refactor-workflow/SKILL.md +173 -307
  106. package/package.json +1 -1
  107. package/src/scaffold.js +5 -0
  108. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +0 -6
  109. package/bundled/skills/feature-workflow/references/brainstorm-guide.md +0 -137
  110. package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +0 -116
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.111",
3
- "bundledAt": "2026-07-08T07:06:52.766Z",
4
- "bundledFrom": "1db214b"
2
+ "frameworkVersion": "1.1.112",
3
+ "bundledAt": "2026-07-08T16:44:52.355Z",
4
+ "bundledFrom": "544bc17"
5
5
  }
@@ -25,7 +25,18 @@ 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
- **Worktree constraint**: You are spawned with default/no worktree isolation by the orchestrator. You review the active checkout's changes the orchestrator provides workspace context (git status, diff summary, new-file paths). 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.
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.
29
40
 
30
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).
31
42
 
@@ -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
@@ -693,10 +694,13 @@ SECTION_TO_SKILL = {
693
694
  "phase-commit": None, # special: split into retrospective + committer
694
695
  }
695
696
 
696
- # phase-commit is split into two steps
697
+ # phase-commit is split into durable checkpoint steps. CLI flags are not
698
+ # artifacts; only real files/globs belong in required_artifacts.
697
699
  _COMMIT_STEPS = [
698
700
  ("prizmkit-retrospective", "Retrospective", []),
699
- ("prizmkit-committer", "Commit", ["--headless"]),
701
+ ("prizmkit-committer", "Commit", []),
702
+ ("completion-summary", "Completion Summary",
703
+ [".prizmkit/specs/{slug}/completion-summary.json"]),
700
704
  ]
701
705
 
702
706
 
@@ -1295,7 +1299,6 @@ def load_section(sections_dir, name):
1295
1299
 
1296
1300
  ACTIVE_AGENT_PROMPTS = {
1297
1301
  "critic-plan-challenge.md": "{{AGENT_PROMPT_CRITIC_PLAN_CHALLENGE}}",
1298
- "reviewer-review.md": "{{AGENT_PROMPT_REVIEWER_REVIEW}}",
1299
1302
  }
1300
1303
 
1301
1304
 
@@ -1834,48 +1837,16 @@ def build_replacements(args, feature, features, global_context, script_dir):
1834
1837
  )
1835
1838
  critic_enabled = False
1836
1839
 
1837
- # Browser interaction - extract from feature if present
1838
- browser_interaction = feature.get("browser_interaction")
1839
- browser_enabled = False
1840
- browser_verify_steps = ""
1841
- browser_tool = "auto" # default: AI chooses at runtime
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)
1842
1843
 
1843
- browser_verify_env = os.environ.get("BROWSER_VERIFY", "").lower()
1844
- if browser_verify_env == "false":
1845
- browser_interaction = None
1846
-
1847
- if browser_interaction and isinstance(browser_interaction, bool):
1848
- # Simple boolean: browser verification enabled, no specific goals
1849
- browser_enabled = True
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
+ )
1850
1849
  browser_tool = "auto"
1851
- browser_verify_steps = (
1852
- " # (no specific verify goals — explore the app and "
1853
- "verify the feature works as expected)")
1854
- elif browser_interaction and isinstance(browser_interaction, dict):
1855
- # Extract tool preference (playwright-cli / opencli / auto)
1856
- browser_tool = browser_interaction.get("tool", "auto")
1857
- if browser_tool not in ("playwright-cli", "opencli", "auto"):
1858
- LOGGER.warning(
1859
- "Unknown browser_interaction.tool '%s', defaulting to 'auto'",
1860
- browser_tool,
1861
- )
1862
- browser_tool = "auto"
1863
-
1864
- # browser_interaction only needs verify_steps — AI auto-detects
1865
- # dev server command, URL, and port from project config
1866
- steps = browser_interaction.get("verify_steps", [])
1867
- if steps:
1868
- browser_enabled = True
1869
- browser_verify_steps = "\n".join(
1870
- " # Goal {}: {}".format(i + 1, step)
1871
- for i, step in enumerate(steps)
1872
- )
1873
- elif browser_interaction.get("url") or browser_interaction.get("enabled", True):
1874
- # Backward compat: old format had url/setup_command fields
1875
- browser_enabled = True
1876
- browser_verify_steps = (
1877
- " # (no specific verify goals — explore the app and "
1878
- "verify the feature works as expected)")
1879
1850
 
1880
1851
  # Auto-detect test commands from project structure
1881
1852
  test_cmd = detect_test_commands(project_root)
@@ -1893,36 +1864,10 @@ def build_replacements(args, feature, features, global_context, script_dir):
1893
1864
  if isinstance(testing_config, dict):
1894
1865
  coverage_target = str(testing_config.get("coverage_target", 80))
1895
1866
 
1896
- # Detect dev server port from package.json
1897
- dev_port = "3000" # Default fallback
1898
- try:
1899
- pkg_path = os.path.join(project_root, "package.json")
1900
- if os.path.isfile(pkg_path):
1901
- with open(pkg_path, "r", encoding="utf-8") as f:
1902
- pkg = json.load(f)
1903
- dev_script = pkg.get("scripts", {}).get("dev", "")
1904
- # Extract -p <port> from dev script
1905
- port_match = re.search(r"-p\s+(\d+)", dev_script)
1906
- if port_match:
1907
- dev_port = port_match.group(1)
1908
- else:
1909
- # Fallback: try NEXT_PUBLIC_SITE_URL from .env files
1910
- for env_file in [".env.local", ".env"]:
1911
- env_path = os.path.join(project_root, env_file)
1912
- if os.path.isfile(env_path):
1913
- with open(env_path, "r", encoding="utf-8") as ef:
1914
- for line in ef:
1915
- m = re.match(
1916
- r"NEXT_PUBLIC_SITE_URL\s*=\s*.*?:([0-9]+)", line.strip()
1917
- )
1918
- if m:
1919
- dev_port = m.group(1)
1920
- break
1921
- if dev_port != "3000":
1922
- break
1923
- except Exception:
1924
- pass # Keep default 3000 on any error
1925
- 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>"
1926
1871
 
1927
1872
  replacements = {
1928
1873
  "{{RUN_ID}}": args.run_id,
@@ -1948,6 +1893,7 @@ def build_replacements(args, feature, features, global_context, script_dir):
1948
1893
  "{{SESSION_STATUS_PATH}}": session_status_abs,
1949
1894
  "{{PROJECT_ROOT}}": project_root,
1950
1895
  "{{FEATURE_SLUG}}": feature_slug,
1896
+ "{{ARTIFACT_DIR}}": os.path.join(".prizmkit", "specs", feature_slug),
1951
1897
  "{{CHECKPOINT_PATH}}": os.path.join(
1952
1898
  ".prizmkit", "specs", feature_slug, "workflow-checkpoint.json",
1953
1899
  ),