prizmkit 1.1.196 → 1.1.198
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/bin/create-prizmkit.js +1 -7
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +1 -1
- package/bundled/adapters/antigravity/rules-adapter.js +1 -13
- package/bundled/adapters/claude/paths.js +0 -1
- package/bundled/adapters/claude/settings-adapter.js +3 -8
- package/bundled/adapters/codex/paths.js +0 -1
- package/bundled/adapters/codex/settings-adapter.js +1 -1
- package/bundled/adapters/cursor/assets/prizmkit-hook.cjs +1 -1
- package/bundled/adapters/cursor/rules-adapter.js +1 -13
- package/bundled/adapters/pi/paths.js +0 -1
- package/bundled/dev-pipeline/.env.example +2 -2
- package/bundled/dev-pipeline/README.md +6 -5
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +2 -2
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +15 -25
- package/bundled/dev-pipeline/prizmkit_runtime/iterate.py +1 -69
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +1 -114
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +2 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +78 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +4 -234
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +0 -5
- package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +9 -1
- package/bundled/dev-pipeline/scripts/feature_list_contract.py +0 -43
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +15 -76
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -112
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +0 -13
- package/bundled/dev-pipeline/scripts/init-pipeline.py +0 -1
- package/bundled/dev-pipeline/scripts/prompt_framework.py +0 -79
- package/bundled/dev-pipeline/scripts/status_common.py +150 -4
- package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -2
- package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -2
- package/bundled/dev-pipeline/scripts/utils.py +6 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -5
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -101
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +0 -35
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -52
- package/bundled/dev-pipeline/templates/feature-list-schema.json +0 -25
- package/bundled/dev-pipeline/templates/iterate/evaluate-prompt.md +5 -16
- package/bundled/dev-pipeline/templates/iterate/evaluation-schema.json +1 -58
- package/bundled/dev-pipeline/templates/iterate/headless-plan-prompt.md +1 -12
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +0 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +0 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +0 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +0 -5
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -2
- package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/retrospective.md +3 -3
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +1 -1
- package/bundled/rules/USAGE.md +5 -19
- package/bundled/rules/general/coding-baseline.md +2 -2
- package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +1 -1
- package/bundled/skills/app-planner/references/generated-plan-review.md +1 -1
- package/bundled/skills/app-planner/references/rules-configuration.md +6 -7
- package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +2 -20
- package/bundled/skills/bug-planner/SKILL.md +5 -6
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +1 -1
- package/bundled/skills/bug-planner/references/input-formats.md +2 -2
- package/bundled/skills/bug-planner/references/schema-validation.md +0 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +2 -9
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +36 -25
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +32 -26
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -25
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +32 -26
- package/bundled/skills/feature-planner/SKILL.md +4 -10
- package/bundled/skills/feature-planner/references/completeness-review.md +2 -2
- package/bundled/skills/feature-planner/references/new-project-planning.md +0 -1
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -25
- package/bundled/skills/iterate-pipeline-launcher/SKILL.md +53 -42
- package/bundled/skills/iterate-pipeline-launcher/references/configuration.md +47 -43
- package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +2 -2
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
- package/bundled/skills/prizmkit-init/SKILL.md +6 -7
- package/bundled/skills/prizmkit-init/references/config-schema.md +5 -9
- package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +1 -1
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/rule-evolution-steps.md +11 -17
- package/bundled/skills/prizmkit-workflow/SKILL.md +6 -3
- package/bundled/skills/prizmkit-workflow/references/cold-start-rules.md +8 -7
- package/bundled/templates/project-memory-template.md +2 -1
- package/package.json +1 -1
- package/src/clean.js +29 -7
- package/src/config.js +29 -48
- package/src/index.js +2 -9
- package/src/manifest.js +5 -9
- package/src/platforms.js +0 -14
- package/src/prompts.js +0 -13
- package/src/scaffold.js +100 -327
- package/src/upgrade.js +38 -42
- package/bundled/adapters/claude/rules-adapter.js +0 -25
- package/bundled/adapters/codebuddy/rules-adapter.js +0 -30
- package/bundled/adapters/codex/rules-adapter.js +0 -30
- package/bundled/adapters/pi/rules-adapter.js +0 -13
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +0 -10
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -111
- package/bundled/skills/bug-planner/references/verification.md +0 -26
- package/bundled/skills/feature-planner/references/browser-interaction.md +0 -39
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"""Cross-platform helper CLI for prompt runtime operations.
|
|
2
2
|
|
|
3
3
|
The helpers in this module use Python standard-library APIs for file checks,
|
|
4
|
-
source discovery, text search,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
instead of shell exit-code chains.
|
|
4
|
+
source discovery, text search, and review-verdict parsing. Stdout starts with
|
|
5
|
+
deterministic markers so generated AI prompts can branch on text instead of
|
|
6
|
+
shell exit-code chains.
|
|
8
7
|
"""
|
|
9
8
|
|
|
10
9
|
from __future__ import annotations
|
|
@@ -12,21 +11,10 @@ from __future__ import annotations
|
|
|
12
11
|
import argparse
|
|
13
12
|
import json
|
|
14
13
|
import os
|
|
15
|
-
import
|
|
16
|
-
import socket
|
|
17
|
-
import subprocess
|
|
18
|
-
import sys
|
|
19
|
-
import time
|
|
20
|
-
import urllib.error
|
|
21
|
-
import urllib.request
|
|
22
|
-
from dataclasses import asdict, dataclass
|
|
14
|
+
from dataclasses import dataclass
|
|
23
15
|
from pathlib import Path
|
|
24
16
|
from typing import Any
|
|
25
17
|
|
|
26
|
-
from .paths import resolve_runtime_paths
|
|
27
|
-
from .platform_detection import resolve_platform, resolve_skill
|
|
28
|
-
from .processes import is_pid_running, terminate_pid_tree
|
|
29
|
-
|
|
30
18
|
SOURCE_EXTENSIONS = (
|
|
31
19
|
".js",
|
|
32
20
|
".jsx",
|
|
@@ -327,149 +315,6 @@ def _text_final_verdict(args: argparse.Namespace) -> HelperResult:
|
|
|
327
315
|
return HelperResult(marker, True, {"path": str(target), "verdict": verdict})
|
|
328
316
|
|
|
329
317
|
|
|
330
|
-
def _platform_detect(args: argparse.Namespace) -> HelperResult:
|
|
331
|
-
paths = resolve_runtime_paths(project_root=args.project_root, pipeline_root=args.pipeline_root)
|
|
332
|
-
resolution = resolve_platform(paths.project_root)
|
|
333
|
-
marker = resolution.platform.upper() if resolution.platform else "NOT_INSTALLED"
|
|
334
|
-
return HelperResult(marker, bool(resolution.platform), {"platform": resolution.platform, "source": resolution.source, "notes": list(resolution.notes)})
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
def _platform_skill(args: argparse.Namespace) -> HelperResult:
|
|
338
|
-
paths = resolve_runtime_paths(project_root=args.project_root, pipeline_root=args.pipeline_root)
|
|
339
|
-
resolution = resolve_skill(paths.project_root, args.skill, platform=args.platform, prefix=args.prefix)
|
|
340
|
-
fields = {
|
|
341
|
-
"platform": resolution.platform,
|
|
342
|
-
"skill": resolution.skill,
|
|
343
|
-
"path": str(resolution.path) if resolution.path else None,
|
|
344
|
-
"candidates": [asdict(candidate) | {"path": str(candidate.path)} for candidate in resolution.candidates],
|
|
345
|
-
}
|
|
346
|
-
return HelperResult(resolution.marker, resolution.marker == "SKILL_EXISTS", fields)
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
def _executable_check(args: argparse.Namespace) -> HelperResult:
|
|
350
|
-
executable = shutil.which(args.name)
|
|
351
|
-
return HelperResult("INSTALLED" if executable else "NOT_INSTALLED", bool(executable), {"name": args.name, "path": executable})
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
def _executable_version(args: argparse.Namespace) -> HelperResult:
|
|
355
|
-
executable = shutil.which(args.name)
|
|
356
|
-
if not executable:
|
|
357
|
-
return HelperResult("NOT_INSTALLED", False, {"name": args.name}, 1)
|
|
358
|
-
command = [executable, *(args.arg or ["--version"])]
|
|
359
|
-
try:
|
|
360
|
-
completed = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, timeout=args.timeout, check=False)
|
|
361
|
-
except (OSError, subprocess.TimeoutExpired) as exc:
|
|
362
|
-
return HelperResult("VERSION_ERROR", False, {"name": args.name, "error": type(exc).__name__}, 1)
|
|
363
|
-
output = (completed.stdout or completed.stderr or "").strip().splitlines()
|
|
364
|
-
return HelperResult("VERSION", completed.returncode == 0, {"name": args.name, "path": executable, "version": output[0] if output else "", "return_code": completed.returncode}, completed.returncode)
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
def _port_check(args: argparse.Namespace) -> HelperResult:
|
|
368
|
-
port = int(args.port)
|
|
369
|
-
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
370
|
-
try:
|
|
371
|
-
sock.settimeout(float(args.timeout))
|
|
372
|
-
in_use = sock.connect_ex((args.host, port)) == 0
|
|
373
|
-
finally:
|
|
374
|
-
sock.close()
|
|
375
|
-
return HelperResult("PORT_IN_USE" if in_use else "PORT_FREE", not in_use, {"host": args.host, "port": port})
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
def _process_status_pid(args: argparse.Namespace) -> HelperResult:
|
|
379
|
-
pid = int(args.pid)
|
|
380
|
-
running = is_pid_running(pid)
|
|
381
|
-
return HelperResult("PROCESS_RUNNING" if running else "PROCESS_NOT_RUNNING", running, {"pid": pid})
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
def _process_cleanup_pid(args: argparse.Namespace) -> HelperResult:
|
|
385
|
-
pid = int(args.pid)
|
|
386
|
-
result = terminate_pid_tree(pid, "runtime_helper_cleanup", grace_seconds=float(args.grace_seconds))
|
|
387
|
-
marker = "PROCESS_TERMINATED" if result.terminated else "PROCESS_NOT_RUNNING" if not is_pid_running(pid) else "PROCESS_CLEANUP_FAILED"
|
|
388
|
-
return HelperResult(marker, marker != "PROCESS_CLEANUP_FAILED", {"pid": pid, "forced": result.forced, "details": list(result.details)})
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
def _process_cleanup_port(args: argparse.Namespace) -> HelperResult:
|
|
392
|
-
# The Python standard library cannot portably map listening ports to owning
|
|
393
|
-
# PIDs on all supported platforms without shelling out to lsof/netstat/taskkill.
|
|
394
|
-
# Keep this deterministic and safe instead of pretending cleanup happened.
|
|
395
|
-
port_result = _port_check(argparse.Namespace(port=args.port, host=args.host, timeout=args.timeout))
|
|
396
|
-
marker = "PORT_FREE" if port_result.marker == "PORT_FREE" else "UNSUPPORTED"
|
|
397
|
-
ok = marker == "PORT_FREE"
|
|
398
|
-
return HelperResult(marker, ok, {"host": args.host, "port": int(args.port), "reason": "pid_lookup_by_port_not_available_in_python_stdlib"}, 0 if ok else 2)
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
def _process_start(args: argparse.Namespace) -> HelperResult:
|
|
402
|
-
command = list(args.command)
|
|
403
|
-
if command and command[0] == "--":
|
|
404
|
-
command = command[1:]
|
|
405
|
-
if not command:
|
|
406
|
-
return HelperResult("PROCESS_START_FAILED", False, {"reason": "missing_command"}, 2)
|
|
407
|
-
cwd = _path(args.cwd or ".")
|
|
408
|
-
opened_handles = []
|
|
409
|
-
stdout_target = subprocess.DEVNULL
|
|
410
|
-
stderr_target = subprocess.DEVNULL
|
|
411
|
-
try:
|
|
412
|
-
if args.stdout:
|
|
413
|
-
stdout_path = _path(args.stdout)
|
|
414
|
-
stdout_path.parent.mkdir(parents=True, exist_ok=True)
|
|
415
|
-
stdout_target = open(stdout_path, "a", encoding="utf-8")
|
|
416
|
-
opened_handles.append(stdout_target)
|
|
417
|
-
if args.stderr:
|
|
418
|
-
stderr_path = _path(args.stderr)
|
|
419
|
-
stderr_path.parent.mkdir(parents=True, exist_ok=True)
|
|
420
|
-
stderr_target = open(stderr_path, "a", encoding="utf-8")
|
|
421
|
-
opened_handles.append(stderr_target)
|
|
422
|
-
process = subprocess.Popen(
|
|
423
|
-
[str(part) for part in command],
|
|
424
|
-
cwd=cwd,
|
|
425
|
-
stdout=stdout_target,
|
|
426
|
-
stderr=stderr_target,
|
|
427
|
-
stdin=subprocess.DEVNULL,
|
|
428
|
-
start_new_session=(os.name != "nt"),
|
|
429
|
-
creationflags=getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0) if os.name == "nt" else 0,
|
|
430
|
-
)
|
|
431
|
-
except OSError as exc:
|
|
432
|
-
return HelperResult("PROCESS_START_FAILED", False, {"reason": type(exc).__name__, "error": str(exc)}, 1)
|
|
433
|
-
finally:
|
|
434
|
-
for target in opened_handles:
|
|
435
|
-
try:
|
|
436
|
-
target.close()
|
|
437
|
-
except OSError:
|
|
438
|
-
pass
|
|
439
|
-
if args.pid_file:
|
|
440
|
-
pid_file = _path(args.pid_file)
|
|
441
|
-
pid_file.parent.mkdir(parents=True, exist_ok=True)
|
|
442
|
-
pid_file.write_text(f"{process.pid}\n", encoding="utf-8")
|
|
443
|
-
return HelperResult("PROCESS_STARTED", True, {"pid": process.pid, "pid_file": str(_path(args.pid_file)) if args.pid_file else None})
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
def _status_is_ready(status: int, expected_statuses: list[int] | None) -> bool:
|
|
447
|
-
if expected_statuses:
|
|
448
|
-
return status in expected_statuses
|
|
449
|
-
return status < 500
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
def _web_wait_ready(args: argparse.Namespace) -> HelperResult:
|
|
453
|
-
deadline = time.monotonic() + float(args.timeout)
|
|
454
|
-
statuses: list[str] = []
|
|
455
|
-
while time.monotonic() <= deadline:
|
|
456
|
-
try:
|
|
457
|
-
request = urllib.request.Request(args.url, method="GET")
|
|
458
|
-
with urllib.request.urlopen(request, timeout=float(args.request_timeout)) as response:
|
|
459
|
-
status = int(response.status)
|
|
460
|
-
statuses.append(str(status))
|
|
461
|
-
if _status_is_ready(status, args.status):
|
|
462
|
-
return HelperResult("READY", True, {"url": args.url, "status": status})
|
|
463
|
-
except urllib.error.HTTPError as exc:
|
|
464
|
-
statuses.append(str(exc.code))
|
|
465
|
-
if _status_is_ready(int(exc.code), args.status):
|
|
466
|
-
return HelperResult("READY", True, {"url": args.url, "status": int(exc.code)})
|
|
467
|
-
except (OSError, urllib.error.URLError, TimeoutError) as exc:
|
|
468
|
-
statuses.append(type(exc).__name__)
|
|
469
|
-
time.sleep(float(args.interval))
|
|
470
|
-
return HelperResult("NOT_READY", False, {"url": args.url, "observed": statuses[-5:]}, 1)
|
|
471
|
-
|
|
472
|
-
|
|
473
318
|
def build_parser() -> argparse.ArgumentParser:
|
|
474
319
|
parser = argparse.ArgumentParser(prog="prizmkit-runtime-helper", description="Cross-platform PrizmKit prompt runtime helper CLI.")
|
|
475
320
|
subparsers = parser.add_subparsers(dest="group", required=True)
|
|
@@ -529,81 +374,6 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
529
374
|
_add_json(final_verdict)
|
|
530
375
|
final_verdict.set_defaults(func=_text_final_verdict)
|
|
531
376
|
|
|
532
|
-
platform = subparsers.add_parser("platform", help="AI platform and skill detection")
|
|
533
|
-
platform_sub = platform.add_subparsers(dest="action", required=True)
|
|
534
|
-
detect = platform_sub.add_parser("detect", help="Detect current AI platform")
|
|
535
|
-
detect.add_argument("--project-root")
|
|
536
|
-
detect.add_argument("--pipeline-root")
|
|
537
|
-
_add_json(detect)
|
|
538
|
-
detect.set_defaults(func=_platform_detect)
|
|
539
|
-
skill = platform_sub.add_parser("skill", help="Detect a platform skill")
|
|
540
|
-
skill.add_argument("skill")
|
|
541
|
-
skill.add_argument("--platform", default="auto")
|
|
542
|
-
skill.add_argument("--project-root")
|
|
543
|
-
skill.add_argument("--pipeline-root")
|
|
544
|
-
skill.add_argument("--prefix", action="store_true")
|
|
545
|
-
_add_json(skill)
|
|
546
|
-
skill.set_defaults(func=_platform_skill)
|
|
547
|
-
|
|
548
|
-
executable = subparsers.add_parser("executable", help="Executable checks")
|
|
549
|
-
executable_sub = executable.add_subparsers(dest="action", required=True)
|
|
550
|
-
check = executable_sub.add_parser("check", help="Check executable availability")
|
|
551
|
-
check.add_argument("name")
|
|
552
|
-
_add_json(check)
|
|
553
|
-
check.set_defaults(func=_executable_check)
|
|
554
|
-
version = executable_sub.add_parser("version", help="Run executable version command")
|
|
555
|
-
version.add_argument("name")
|
|
556
|
-
version.add_argument("--arg", action="append", default=None)
|
|
557
|
-
version.add_argument("--timeout", type=float, default=10.0)
|
|
558
|
-
_add_json(version)
|
|
559
|
-
version.set_defaults(func=_executable_version)
|
|
560
|
-
|
|
561
|
-
port = subparsers.add_parser("port", help="Port readiness helpers")
|
|
562
|
-
port_sub = port.add_subparsers(dest="action", required=True)
|
|
563
|
-
port_check = port_sub.add_parser("check", help="Check whether a TCP port is in use")
|
|
564
|
-
port_check.add_argument("port", type=int)
|
|
565
|
-
port_check.add_argument("--host", default="127.0.0.1")
|
|
566
|
-
port_check.add_argument("--timeout", type=float, default=0.5)
|
|
567
|
-
_add_json(port_check)
|
|
568
|
-
port_check.set_defaults(func=_port_check)
|
|
569
|
-
|
|
570
|
-
process = subparsers.add_parser("process", help="Process lifecycle helpers")
|
|
571
|
-
process_sub = process.add_subparsers(dest="action", required=True)
|
|
572
|
-
start = process_sub.add_parser("start", help="Start a process and optionally write a PID file")
|
|
573
|
-
start.add_argument("--pid-file")
|
|
574
|
-
start.add_argument("--cwd")
|
|
575
|
-
start.add_argument("--stdout")
|
|
576
|
-
start.add_argument("--stderr")
|
|
577
|
-
start.add_argument("command", nargs=argparse.REMAINDER)
|
|
578
|
-
_add_json(start)
|
|
579
|
-
start.set_defaults(func=_process_start)
|
|
580
|
-
status_pid = process_sub.add_parser("status-pid", help="Check whether a PID is running")
|
|
581
|
-
status_pid.add_argument("pid", type=int)
|
|
582
|
-
_add_json(status_pid)
|
|
583
|
-
status_pid.set_defaults(func=_process_status_pid)
|
|
584
|
-
cleanup_pid = process_sub.add_parser("cleanup-pid", help="Best-effort cleanup by PID")
|
|
585
|
-
cleanup_pid.add_argument("pid", type=int)
|
|
586
|
-
cleanup_pid.add_argument("--grace-seconds", type=float, default=2.0)
|
|
587
|
-
_add_json(cleanup_pid)
|
|
588
|
-
cleanup_pid.set_defaults(func=_process_cleanup_pid)
|
|
589
|
-
cleanup_port = process_sub.add_parser("cleanup-port", help="Best-effort cleanup by port when supported")
|
|
590
|
-
cleanup_port.add_argument("port", type=int)
|
|
591
|
-
cleanup_port.add_argument("--host", default="127.0.0.1")
|
|
592
|
-
cleanup_port.add_argument("--timeout", type=float, default=0.5)
|
|
593
|
-
_add_json(cleanup_port)
|
|
594
|
-
cleanup_port.set_defaults(func=_process_cleanup_port)
|
|
595
|
-
|
|
596
|
-
web = subparsers.add_parser("web", help="Browser/server readiness helpers")
|
|
597
|
-
web_sub = web.add_subparsers(dest="action", required=True)
|
|
598
|
-
wait_ready = web_sub.add_parser("wait-ready", help="Wait for an HTTP endpoint to be ready")
|
|
599
|
-
wait_ready.add_argument("--url", required=True)
|
|
600
|
-
wait_ready.add_argument("--timeout", type=float, default=30.0)
|
|
601
|
-
wait_ready.add_argument("--interval", type=float, default=2.0)
|
|
602
|
-
wait_ready.add_argument("--request-timeout", type=float, default=2.0)
|
|
603
|
-
wait_ready.add_argument("--status", action="append", type=int, default=None)
|
|
604
|
-
_add_json(wait_ready)
|
|
605
|
-
wait_ready.set_defaults(func=_web_wait_ready)
|
|
606
|
-
|
|
607
377
|
return parser
|
|
608
378
|
|
|
609
379
|
|
|
@@ -206,7 +206,6 @@ def read_iterate_status(paths: RuntimePaths) -> dict[str, object]:
|
|
|
206
206
|
"consecutive_failures": 0,
|
|
207
207
|
"consecutive_no_progress": 0,
|
|
208
208
|
"last_verdict": None,
|
|
209
|
-
"last_evidence_mode": None,
|
|
210
209
|
"pending_decisions_exists": pending_file.is_file(),
|
|
211
210
|
"summary": "",
|
|
212
211
|
}
|
|
@@ -244,7 +243,6 @@ def read_iterate_status(paths: RuntimePaths) -> dict[str, object]:
|
|
|
244
243
|
"started_at": state.get("started_at"),
|
|
245
244
|
"updated_at": state.get("updated_at"),
|
|
246
245
|
"last_verdict": state.get("last_verdict"),
|
|
247
|
-
"last_evidence_mode": state.get("last_evidence_mode"),
|
|
248
246
|
"pending_decisions_exists": pending_file.is_file(),
|
|
249
247
|
"summary": state.get("summary") or "",
|
|
250
248
|
}
|
|
@@ -252,7 +250,6 @@ def read_iterate_status(paths: RuntimePaths) -> dict[str, object]:
|
|
|
252
250
|
snapshot["last_round"] = {
|
|
253
251
|
"round": last_round.get("round"),
|
|
254
252
|
"verdict": last_round.get("verdict"),
|
|
255
|
-
"evidence_mode": last_round.get("evidence_mode"),
|
|
256
253
|
"appended_ids": last_round.get("appended_ids") or [],
|
|
257
254
|
"completed_ids": last_round.get("completed_ids") or [],
|
|
258
255
|
"failed_ids": last_round.get("failed_ids") or [],
|
|
@@ -280,8 +277,6 @@ def _format_iterate_status_text(snapshot: Mapping[str, object]) -> str:
|
|
|
280
277
|
lines.append(f"pause_reason: {snapshot.get('pause_reason')}")
|
|
281
278
|
if snapshot.get("last_verdict"):
|
|
282
279
|
lines.append(f"last_verdict: {snapshot.get('last_verdict')}")
|
|
283
|
-
if snapshot.get("last_evidence_mode"):
|
|
284
|
-
lines.append(f"last_evidence_mode: {snapshot.get('last_evidence_mode')}")
|
|
285
280
|
if snapshot.get("focus"):
|
|
286
281
|
lines.append(f"focus: {snapshot.get('focus')}")
|
|
287
282
|
if snapshot.get("pending_decisions_exists"):
|
|
@@ -18,7 +18,7 @@ from .atomic_io import write_json_atomic
|
|
|
18
18
|
# Ordered pipeline phases — index defines forward-only progression.
|
|
19
19
|
# Phase detection is monotonic: once a phase is reached, earlier phases
|
|
20
20
|
# cannot be re-entered (prevents false positives from file content mentions).
|
|
21
|
-
PHASE_ORDER = ["plan", "implement", "code-review", "retrospective", "commit"]
|
|
21
|
+
PHASE_ORDER = ["plan", "implement", "code-review", "test", "summary", "retrospective", "commit"]
|
|
22
22
|
|
|
23
23
|
# Keywords for phase detection.
|
|
24
24
|
# "strong" keywords are skill invocations — high confidence, but still
|
|
@@ -46,6 +46,14 @@ PHASE_KEYWORDS = {
|
|
|
46
46
|
"strong": ["prizmkit-code-review"],
|
|
47
47
|
"weak": ["code review", "review verdict", "reviewing"],
|
|
48
48
|
},
|
|
49
|
+
"test": {
|
|
50
|
+
"strong": ["prizmkit-test"],
|
|
51
|
+
"weak": ["test-report.md", "test-result.json", "regression ring"],
|
|
52
|
+
},
|
|
53
|
+
"summary": {
|
|
54
|
+
"strong": ["completion-summary", "bug-report"],
|
|
55
|
+
"weak": ["completion-summary.json", "fix-report.md"],
|
|
56
|
+
},
|
|
49
57
|
"retrospective": {
|
|
50
58
|
"strong": ["prizmkit-retrospective"],
|
|
51
59
|
"weak": [
|
|
@@ -77,7 +77,6 @@ CURRENT_FEATURE_FIELDS = {
|
|
|
77
77
|
"model",
|
|
78
78
|
"completion_notes",
|
|
79
79
|
"user_context",
|
|
80
|
-
"browser_interaction",
|
|
81
80
|
"testing",
|
|
82
81
|
}
|
|
83
82
|
# Historical lists may still carry these keys. They are ignored residue, not
|
|
@@ -85,13 +84,6 @@ CURRENT_FEATURE_FIELDS = {
|
|
|
85
84
|
LEFTOVER_IGNORED_FEATURE_FIELDS = {"session_granularity", "sub_features"}
|
|
86
85
|
FEATURE_ID_RE = re.compile(r"^F-\d{3}(-[A-Z])?$")
|
|
87
86
|
|
|
88
|
-
UI_KEYWORDS_RE = re.compile(
|
|
89
|
-
r"\b(click|button|modal|page|form|display|navigate|tab|input|opens|shows|"
|
|
90
|
-
r"renders|visible|redirect|download|upload|preview|select|toggle|dropdown|"
|
|
91
|
-
r"popup|toast|menu)\b",
|
|
92
|
-
re.IGNORECASE,
|
|
93
|
-
)
|
|
94
|
-
|
|
95
87
|
|
|
96
88
|
@dataclass(frozen=True)
|
|
97
89
|
class ContractOperationResult:
|
|
@@ -211,26 +203,6 @@ detect_cycles = _detect_cycles
|
|
|
211
203
|
# ---------------------------------------------------------------------------
|
|
212
204
|
|
|
213
205
|
|
|
214
|
-
def _validate_browser_interaction(label: str, browser_interaction: Any, errors: list[str]) -> None:
|
|
215
|
-
if browser_interaction is None:
|
|
216
|
-
return
|
|
217
|
-
if not isinstance(browser_interaction, dict):
|
|
218
|
-
errors.append(f"{label}: browser_interaction must be an object")
|
|
219
|
-
return
|
|
220
|
-
tool = browser_interaction.get("tool")
|
|
221
|
-
if tool is not None and tool != "playwright-cli":
|
|
222
|
-
errors.append(
|
|
223
|
-
f"{label}: browser_interaction.tool must be 'playwright-cli', got {tool!r}"
|
|
224
|
-
)
|
|
225
|
-
blocking = browser_interaction.get("blocking")
|
|
226
|
-
if blocking is not None and not isinstance(blocking, bool):
|
|
227
|
-
errors.append(f"{label}: browser_interaction.blocking must be a boolean")
|
|
228
|
-
verify_steps = browser_interaction.get("verify_steps")
|
|
229
|
-
if verify_steps is not None:
|
|
230
|
-
if not isinstance(verify_steps, list) or not all(isinstance(s, str) for s in verify_steps):
|
|
231
|
-
errors.append(f"{label}: browser_interaction.verify_steps must be an array of strings")
|
|
232
|
-
|
|
233
|
-
|
|
234
206
|
def validate_feature_list(data: Any, is_new_plan: bool = True) -> dict[str, Any]:
|
|
235
207
|
"""Validate a parsed feature-list structure in parity with validate-and-generate.py."""
|
|
236
208
|
errors: list[str] = []
|
|
@@ -305,9 +277,6 @@ def validate_feature_list(data: Any, is_new_plan: bool = True) -> dict[str, Any]
|
|
|
305
277
|
|
|
306
278
|
seen_ids: set[Any] = set()
|
|
307
279
|
complexity_dist = {"low": 0, "medium": 0, "high": 0, "critical": 0}
|
|
308
|
-
has_frontend = bool(
|
|
309
|
-
isinstance(global_context, dict) and global_context.get("frontend_framework")
|
|
310
|
-
)
|
|
311
280
|
|
|
312
281
|
for idx, feat in enumerate(features):
|
|
313
282
|
label = f"features[{idx}]"
|
|
@@ -401,18 +370,6 @@ def validate_feature_list(data: Any, is_new_plan: bool = True) -> dict[str, Any]
|
|
|
401
370
|
else:
|
|
402
371
|
complexity_dist[complexity] += 1
|
|
403
372
|
|
|
404
|
-
_validate_browser_interaction(label, feat.get("browser_interaction"), errors)
|
|
405
|
-
|
|
406
|
-
if has_frontend and feat.get("status") != "completed":
|
|
407
|
-
criteria_list = feat.get("acceptance_criteria", [])
|
|
408
|
-
if isinstance(criteria_list, list):
|
|
409
|
-
criteria_text = " ".join(c for c in criteria_list if isinstance(c, str))
|
|
410
|
-
if UI_KEYWORDS_RE.search(criteria_text) and feat.get("browser_interaction") is None:
|
|
411
|
-
warnings.append(
|
|
412
|
-
f"{label}: has UI acceptance criteria but no browser_interaction "
|
|
413
|
-
"field. Consider adding browser verification."
|
|
414
|
-
)
|
|
415
|
-
|
|
416
373
|
# 3. Dependency validation
|
|
417
374
|
all_ids = {f.get("id") for f in features if isinstance(f, dict)}
|
|
418
375
|
for idx, feat in enumerate(features):
|
|
@@ -28,11 +28,9 @@ from utils import enrich_global_context, helper_replacements, load_json_file, re
|
|
|
28
28
|
from continuation import add_continuation_args, append_continuation_handoff, is_continuation
|
|
29
29
|
from prompt_framework import (
|
|
30
30
|
artifact_exists,
|
|
31
|
-
browser_enabled_from_item,
|
|
32
31
|
checkpoint_skip,
|
|
33
32
|
checkpoint_step,
|
|
34
33
|
completed_test_artifacts_valid,
|
|
35
|
-
detect_dev_server_port,
|
|
36
34
|
generate_checkpoint_from_sections,
|
|
37
35
|
merge_checkpoint_state as merge_shared_checkpoint_state,
|
|
38
36
|
pipeline_checkpoint_metadata,
|
|
@@ -513,9 +511,8 @@ def process_conditional_blocks(content, resume_phase):
|
|
|
513
511
|
return content
|
|
514
512
|
|
|
515
513
|
|
|
516
|
-
def process_template_blocks(content, init_done
|
|
517
|
-
|
|
518
|
-
"""Process init and browser blocks in an explicit custom template."""
|
|
514
|
+
def process_template_blocks(content, init_done):
|
|
515
|
+
"""Process init blocks in an explicit custom template."""
|
|
519
516
|
# Init blocks
|
|
520
517
|
if init_done:
|
|
521
518
|
content = re.sub(r"\{\{IF_INIT_DONE\}\}\n?", "", content)
|
|
@@ -532,30 +529,6 @@ def process_template_blocks(content, init_done, browser_interaction=False,
|
|
|
532
529
|
"", content, flags=re.DOTALL,
|
|
533
530
|
)
|
|
534
531
|
|
|
535
|
-
# Browser interaction blocks
|
|
536
|
-
browser_open = "{{IF_BROWSER_INTERACTION}}"
|
|
537
|
-
browser_close = "{{END_IF_BROWSER_INTERACTION}}"
|
|
538
|
-
if browser_interaction:
|
|
539
|
-
content = content.replace(browser_open + "\n", "")
|
|
540
|
-
content = content.replace(browser_open, "")
|
|
541
|
-
content = content.replace(browser_close + "\n", "")
|
|
542
|
-
content = content.replace(browser_close, "")
|
|
543
|
-
else:
|
|
544
|
-
pattern = re.escape(browser_open) + r".*?" + re.escape(browser_close) + r"\n?"
|
|
545
|
-
content = re.sub(pattern, "", content, flags=re.DOTALL)
|
|
546
|
-
|
|
547
|
-
# Unwrap optional legacy PLAYWRIGHT conditional block when browser verification is enabled
|
|
548
|
-
tool_open = "{{IF_BROWSER_TOOL_PLAYWRIGHT}}"
|
|
549
|
-
tool_close = "{{END_IF_BROWSER_TOOL_PLAYWRIGHT}}"
|
|
550
|
-
if browser_interaction:
|
|
551
|
-
content = content.replace(tool_open + "\n", "")
|
|
552
|
-
content = content.replace(tool_open, "")
|
|
553
|
-
content = content.replace(tool_close + "\n", "")
|
|
554
|
-
content = content.replace(tool_close, "")
|
|
555
|
-
else:
|
|
556
|
-
pat = re.escape(tool_open) + r".*?" + re.escape(tool_close) + r"\n?"
|
|
557
|
-
content = re.sub(pat, "", content, flags=re.DOTALL)
|
|
558
|
-
|
|
559
532
|
return content
|
|
560
533
|
|
|
561
534
|
|
|
@@ -621,7 +594,6 @@ SECTION_TO_SKILL = {
|
|
|
621
594
|
"prizmkit-code-review", "Code Review",
|
|
622
595
|
[".prizmkit/specs/{slug}/review-report.md"],
|
|
623
596
|
),
|
|
624
|
-
"phase-browser": checkpoint_step("browser-verification", "Browser Verification", []),
|
|
625
597
|
"feature-completion-summary": checkpoint_step(
|
|
626
598
|
"completion-summary", "Completion Summary",
|
|
627
599
|
[".prizmkit/specs/{slug}/completion-summary.json"],
|
|
@@ -675,22 +647,18 @@ def _completed_step_artifacts_valid(project_root, skill_key, artifacts):
|
|
|
675
647
|
return all(artifact_exists(project_root, artifact) for artifact in artifacts)
|
|
676
648
|
|
|
677
649
|
|
|
678
|
-
def _compatibility_checkpoint_sections(init_done=False
|
|
650
|
+
def _compatibility_checkpoint_sections(init_done=False):
|
|
679
651
|
"""Return the canonical stage skeleton for an explicit custom template."""
|
|
680
652
|
sections = [
|
|
681
653
|
("phase0-test-baseline" if init_done else "phase0-init", ""),
|
|
682
654
|
("phase-specify-plan", ""),
|
|
683
655
|
("phase-implement", ""),
|
|
684
656
|
("phase-review", ""),
|
|
685
|
-
]
|
|
686
|
-
if browser_enabled:
|
|
687
|
-
sections.append(("phase-browser", ""))
|
|
688
|
-
sections.extend([
|
|
689
657
|
("phase-prizmkit-test", ""),
|
|
690
658
|
("feature-completion-summary", ""),
|
|
691
659
|
("phase-commit", ""),
|
|
692
660
|
("runtime-commit-handoff", ""),
|
|
693
|
-
]
|
|
661
|
+
]
|
|
694
662
|
return sections
|
|
695
663
|
|
|
696
664
|
|
|
@@ -783,7 +751,7 @@ def _canonical_reminders():
|
|
|
783
751
|
"""Return family-neutral reminders for the canonical guidance profile."""
|
|
784
752
|
lines = [
|
|
785
753
|
"## Reminders\n",
|
|
786
|
-
"- Every formal lifecycle stage is mandatory
|
|
754
|
+
"- Every formal lifecycle stage is mandatory.",
|
|
787
755
|
"- Use context-snapshot.md for navigation and handoff, then inspect current source and diffs when correctness requires it.",
|
|
788
756
|
"- Code Review writes only review-report.md and `/prizmkit-test` exclusively owns the test repair loop and terminal test artifacts.",
|
|
789
757
|
"- Atomic Skills return stage-local results only; this injected session owns checkpoint mapping and routing.",
|
|
@@ -794,9 +762,8 @@ def _canonical_reminders():
|
|
|
794
762
|
return "\n".join(lines) + "\n"
|
|
795
763
|
|
|
796
764
|
|
|
797
|
-
def assemble_sections(sections_dir, init_done
|
|
798
|
-
|
|
799
|
-
"""Assemble the canonical prompt sections and configured optional gates."""
|
|
765
|
+
def assemble_sections(sections_dir, init_done):
|
|
766
|
+
"""Assemble the canonical prompt sections."""
|
|
800
767
|
sections = []
|
|
801
768
|
|
|
802
769
|
title, guidance_desc = _canonical_header()
|
|
@@ -849,10 +816,6 @@ def assemble_sections(sections_dir, init_done, browser_enabled,
|
|
|
849
816
|
sections.append(("phase-review",
|
|
850
817
|
load_section(sections_dir, "phase-review-full.md")))
|
|
851
818
|
|
|
852
|
-
if browser_enabled:
|
|
853
|
-
sections.append(("phase-browser",
|
|
854
|
-
load_section(sections_dir, "phase-browser-verification.md")))
|
|
855
|
-
|
|
856
819
|
sections.append(("phase-prizmkit-test",
|
|
857
820
|
load_section(sections_dir, "phase-prizmkit-test.md")))
|
|
858
821
|
sections.append(("feature-completion-summary",
|
|
@@ -981,13 +944,6 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
981
944
|
if effective_resume == "null" and artifacts["all_complete"]:
|
|
982
945
|
effective_resume = "6"
|
|
983
946
|
|
|
984
|
-
|
|
985
|
-
# Browser verification is opt-in through a browser_interaction object and
|
|
986
|
-
# can always be disabled globally with BROWSER_VERIFY=false.
|
|
987
|
-
browser_enabled, browser_tool, browser_verify_steps, browser_blocking = browser_enabled_from_item(
|
|
988
|
-
feature, logger=LOGGER,
|
|
989
|
-
)
|
|
990
|
-
|
|
991
947
|
# Auto-detect test commands from project structure
|
|
992
948
|
test_cmd = detect_test_commands(project_root)
|
|
993
949
|
if not test_cmd:
|
|
@@ -1004,11 +960,6 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1004
960
|
if isinstance(testing_config, dict):
|
|
1005
961
|
coverage_target = str(testing_config.get("coverage_target", 80))
|
|
1006
962
|
|
|
1007
|
-
# Detect dev server port from project config. Do not guess a default port;
|
|
1008
|
-
# browser prompt sections require the agent to discover it when unknown.
|
|
1009
|
-
dev_port = detect_dev_server_port(project_root)
|
|
1010
|
-
dev_url = "http://localhost:{}".format(dev_port) if dev_port.isdigit() else "<UNKNOWN_DETECT_FROM_PROJECT_CONFIG>"
|
|
1011
|
-
|
|
1012
963
|
replacements = {
|
|
1013
964
|
"{{RUN_ID}}": args.run_id,
|
|
1014
965
|
"{{SESSION_ID}}": args.session_id,
|
|
@@ -1041,17 +992,12 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1041
992
|
"{{INIT_DONE}}": "true" if init_done else "false",
|
|
1042
993
|
"{{HAS_SPEC}}": "true" if artifacts["has_spec"] else "false",
|
|
1043
994
|
"{{HAS_PLAN}}": "true" if artifacts["has_plan"] else "false",
|
|
1044
|
-
"{{BROWSER_VERIFY_STEPS}}": browser_verify_steps,
|
|
1045
|
-
"{{BROWSER_TOOL}}": browser_tool,
|
|
1046
|
-
"{{BROWSER_BLOCKING}}": "true" if browser_blocking else "false",
|
|
1047
995
|
"{{AC_CHECKLIST}}": format_ac_checklist(
|
|
1048
996
|
feature.get("acceptance_criteria", [])
|
|
1049
997
|
),
|
|
1050
998
|
"{{TEST_CMD}}": test_cmd,
|
|
1051
999
|
"{{BASELINE_FAILURES}}": baseline_failures,
|
|
1052
1000
|
"{{COVERAGE_TARGET}}": coverage_target,
|
|
1053
|
-
"{{DEV_PORT}}": dev_port,
|
|
1054
|
-
"{{DEV_URL}}": dev_url,
|
|
1055
1001
|
"{{SESSION_LOG_PATH}}": os.path.join(
|
|
1056
1002
|
".prizmkit", "state", "features", args.feature_id,
|
|
1057
1003
|
"sessions", args.session_id, "logs", "session.log",
|
|
@@ -1060,20 +1006,17 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1060
1006
|
|
|
1061
1007
|
replacements.update(helper_replacements(script_dir))
|
|
1062
1008
|
|
|
1063
|
-
return replacements, effective_resume
|
|
1009
|
+
return replacements, effective_resume
|
|
1064
1010
|
|
|
1065
1011
|
|
|
1066
|
-
def render_template(template_content, replacements, resume_phase
|
|
1067
|
-
browser_enabled=False, browser_tool="playwright-cli"):
|
|
1012
|
+
def render_template(template_content, replacements, resume_phase):
|
|
1068
1013
|
"""Render the template by processing conditionals and replacing placeholders."""
|
|
1069
1014
|
# Step 1: Process fresh_start/resume conditional blocks
|
|
1070
1015
|
content = process_conditional_blocks(template_content, resume_phase)
|
|
1071
1016
|
|
|
1072
|
-
# Step 2: Process mode
|
|
1017
|
+
# Step 2: Process mode and init conditional blocks
|
|
1073
1018
|
init_done = replacements.get("{{INIT_DONE}}", "false") == "true"
|
|
1074
|
-
content = process_template_blocks(
|
|
1075
|
-
content, init_done, browser_enabled, browser_tool,
|
|
1076
|
-
)
|
|
1019
|
+
content = process_template_blocks(content, init_done)
|
|
1077
1020
|
|
|
1078
1021
|
# Step 3: Replace all {{PLACEHOLDER}} variables (two passes for nested
|
|
1079
1022
|
# agent prompt templates that may contain their own placeholders)
|
|
@@ -1135,7 +1078,7 @@ def main():
|
|
|
1135
1078
|
global_context = {}
|
|
1136
1079
|
|
|
1137
1080
|
# Build replacements (shared by both code paths)
|
|
1138
|
-
replacements, effective_resume
|
|
1081
|
+
replacements, effective_resume = build_replacements(
|
|
1139
1082
|
args, feature, features, global_context, script_dir
|
|
1140
1083
|
)
|
|
1141
1084
|
|
|
@@ -1154,10 +1097,7 @@ def main():
|
|
|
1154
1097
|
# New modular section assembly (code-level conditional logic)
|
|
1155
1098
|
LOGGER.info("Using section assembly from %s", sections_dir)
|
|
1156
1099
|
try:
|
|
1157
|
-
sections = assemble_sections(
|
|
1158
|
-
sections_dir, init_done, browser_enabled,
|
|
1159
|
-
browser_tool=browser_tool,
|
|
1160
|
-
)
|
|
1100
|
+
sections = assemble_sections(sections_dir, init_done)
|
|
1161
1101
|
rendered = render_from_sections(sections, replacements)
|
|
1162
1102
|
except FileNotFoundError as exc:
|
|
1163
1103
|
emit_failure("Section assembly failed: {}".format(exc))
|
|
@@ -1172,8 +1112,7 @@ def main():
|
|
|
1172
1112
|
emit_failure("Template error: {}".format(err))
|
|
1173
1113
|
|
|
1174
1114
|
rendered = render_template(
|
|
1175
|
-
template_content, replacements, effective_resume
|
|
1176
|
-
browser_tool
|
|
1115
|
+
template_content, replacements, effective_resume
|
|
1177
1116
|
)
|
|
1178
1117
|
|
|
1179
1118
|
# ── Validate rendered output ───────────────────────────────────────
|
|
@@ -1195,7 +1134,7 @@ def main():
|
|
|
1195
1134
|
if feature_slug:
|
|
1196
1135
|
checkpoint_sections = (
|
|
1197
1136
|
sections if use_sections
|
|
1198
|
-
else _compatibility_checkpoint_sections(init_done
|
|
1137
|
+
else _compatibility_checkpoint_sections(init_done)
|
|
1199
1138
|
)
|
|
1200
1139
|
checkpoint = generate_checkpoint_definition(
|
|
1201
1140
|
sections=checkpoint_sections,
|