prizmkit 1.1.118 → 1.1.120

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 (70) hide show
  1. package/bin/create-prizmkit.js +1 -5
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/dev-pipeline/README.md +41 -38
  4. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +76 -0
  5. package/bundled/dev-pipeline/prizmkit_runtime/config.py +2 -8
  6. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +2 -4
  7. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -1
  8. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +3 -3
  9. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +21 -11
  10. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +45 -3
  11. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +28 -6
  12. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +60 -102
  13. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +1 -19
  14. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +1 -19
  15. package/bundled/dev-pipeline/scripts/{init-dev-team.py → init-change-artifact.py} +6 -16
  16. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +364 -76
  17. package/bundled/dev-pipeline/scripts/utils.py +1 -1
  18. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
  19. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +7 -9
  20. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +2 -2
  21. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
  22. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
  23. package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -2
  24. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -1
  25. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +6 -7
  26. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +6 -7
  27. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +4 -2
  28. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +2 -2
  29. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +4 -2
  30. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +20 -0
  31. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +2 -2
  32. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +204 -141
  33. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +16 -10
  34. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +2 -13
  35. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +13 -14
  36. package/bundled/dev-pipeline/tests/test_unified_cli.py +227 -7
  37. package/bundled/skills/_metadata.json +1 -1
  38. package/bundled/skills/app-planner/SKILL.md +2 -2
  39. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -3
  40. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -2
  41. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +40 -1
  42. package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -2
  43. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +40 -1
  44. package/bundled/skills/prizmkit-code-review/SKILL.md +16 -14
  45. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +9 -9
  46. package/bundled/skills/prizmkit-implement/SKILL.md +21 -1
  47. package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +67 -0
  48. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +4 -2
  49. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +40 -1
  50. package/package.json +1 -1
  51. package/src/clean.js +12 -8
  52. package/src/config.js +24 -42
  53. package/src/index.js +1 -10
  54. package/src/manifest.js +3 -9
  55. package/src/metadata.js +0 -26
  56. package/src/prompts.js +0 -13
  57. package/src/scaffold.js +76 -201
  58. package/src/upgrade.js +16 -33
  59. package/bundled/adapters/claude/agent-adapter.js +0 -96
  60. package/bundled/adapters/claude/team-adapter.js +0 -183
  61. package/bundled/adapters/codebuddy/agent-adapter.js +0 -42
  62. package/bundled/adapters/codebuddy/team-adapter.js +0 -46
  63. package/bundled/adapters/codex/agent-adapter.js +0 -38
  64. package/bundled/adapters/codex/team-adapter.js +0 -37
  65. package/bundled/agents/prizm-dev-team-dev.md +0 -123
  66. package/bundled/agents/prizm-dev-team-reviewer.md +0 -113
  67. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +0 -65
  68. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +0 -436
  69. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +0 -510
  70. package/bundled/team/prizm-dev-team.json +0 -27
@@ -3,14 +3,16 @@
3
3
 
4
4
  Supports two modes:
5
5
  1. **Section assembly** (preferred): Loads modular section files from
6
- templates/sections/ and assembles them based on tier, conditions, and
7
- feature configuration. Conditional logic is handled in Python code,
6
+ templates/sections/ and assembles the unified full/tier3-equivalent
7
+ feature guidance by default. Conditional logic is handled in Python code,
8
8
  not regex-based template blocks.
9
- 2. **Legacy template** (fallback): Reads a monolithic bootstrap-tier{1,2,3}.md
10
- template and resolves {{PLACEHOLDER}} variables and {{IF_xxx}} blocks.
9
+ 2. **Legacy template** (fallback): Reads the monolithic bootstrap-tier3.md
10
+ template, falling back to bootstrap-prompt.md when tier3 is unavailable,
11
+ and resolves {{PLACEHOLDER}} variables and {{IF_xxx}} blocks.
11
12
 
12
- The section assembly mode is used when templates/sections/ directory exists.
13
- Otherwise, falls back to legacy templates for backward compatibility.
13
+ The section assembly mode is used when templates/sections/ directory exists
14
+ and no explicit --template path is supplied. Otherwise, falls back to legacy
15
+ templates for backward compatibility.
14
16
 
15
17
  Usage:
16
18
  python3 generate-bootstrap-prompt.py \
@@ -93,8 +95,9 @@ def parse_args():
93
95
  "--template",
94
96
  default=None,
95
97
  help=(
96
- "Custom template path. Defaults to "
97
- "{script_dir}/../templates/bootstrap-prompt.md"
98
+ "Custom template path. Defaults to section-based full feature "
99
+ "prompt assembly, or {script_dir}/../templates/bootstrap-tier3.md "
100
+ "when sections are unavailable."
98
101
  ),
99
102
  )
100
103
  parser.add_argument(
@@ -620,18 +623,21 @@ def detect_existing_artifacts(project_root, feature_slug):
620
623
 
621
624
 
622
625
  def determine_pipeline_mode(complexity):
623
- """Map estimated_complexity to pipeline mode.
624
-
625
- Returns: 'lite', 'standard', or 'full'
626
-
627
- Tier assignment rationale:
628
- - low + medium → lite (single agent): most features don't benefit from
629
- the orchestrator→dev→reviewer overhead. A single agent reading
630
- .prizmkit/prizm-docs + implementing directly is faster and cheaper.
631
- - high → standard (orchestrator + dev + reviewer): complex features
632
- need the spec→plan→analyze→implement→review pipeline.
633
- - critical → full (full team + framework guardrails): architectural
634
- changes that touch many files and need extra safety checks.
626
+ """Return the unified feature prompt mode for any complexity.
627
+
628
+ ``estimated_complexity`` remains input metadata for planning summaries,
629
+ dependency ordering, and rendered Session Context, but prompt guidance is
630
+ intentionally no longer tiered by complexity. Every feature task receives
631
+ the full/tier3-equivalent guidance by default.
632
+ """
633
+ return "full"
634
+
635
+
636
+ def determine_legacy_template_mode(complexity):
637
+ """Map complexity for explicit custom template conditional compatibility.
638
+
639
+ This is used only when a caller supplies ``--template`` and omits
640
+ ``--mode``. The normal feature prompt path never uses this mapping.
635
641
  """
636
642
  mapping = {
637
643
  "low": "lite",
@@ -1214,16 +1220,18 @@ def _tier_header(pipeline_mode):
1214
1220
  """Return the tier-specific header and mission description."""
1215
1221
  headers = {
1216
1222
  "lite": (
1217
- "# Dev-Pipeline Session Bootstrap — Tier 1 (Single Agent)\n",
1218
- "**Tier 1 — Single Agent**: You handle everything directly. "
1219
- "No normal work subagents. No TeamCreate.\n",
1223
+ "# Dev-Pipeline Session Bootstrap — Unified Full Guidance "
1224
+ "(compatibility mode: lite)\n",
1225
+ "**Unified Full Guidance**: Feature prompts use the "
1226
+ "full/tier3-equivalent sections for every estimated complexity. "
1227
+ "The lite label remains metadata only for compatibility.\n",
1220
1228
  ),
1221
1229
  "standard": (
1222
- "# Dev-Pipeline Session Bootstrap — Tier 2 "
1223
- "(Orchestrator + Reviewer)\n",
1224
- "**Tier 2 Orchestrator + Reviewer**: You handle "
1225
- "context + planning + implementation directly. Reviewer reviews. "
1226
- "No Dev subagent orchestrator implements directly (P0-6).\n",
1230
+ "# Dev-Pipeline Session Bootstrap — Unified Full Guidance "
1231
+ "(compatibility mode: standard)\n",
1232
+ "**Unified Full Guidance**: Feature prompts use the "
1233
+ "full/tier3-equivalent sections for every estimated complexity. "
1234
+ "The standard label remains metadata only for compatibility.\n",
1227
1235
  ),
1228
1236
  "full": (
1229
1237
  "# Dev-Pipeline Session Bootstrap — Tier 3 "
@@ -1256,13 +1264,13 @@ def _tier_reminders(pipeline_mode):
1256
1264
 
1257
1265
  if pipeline_mode == "lite":
1258
1266
  specific = [
1259
- "- Tier 1: you handle everything directly no normal work "
1260
- "subagents needed",
1267
+ "- Tier 1: compatibility label only; feature prompts now render "
1268
+ "the unified full/tier3-equivalent guidance by default",
1261
1269
  ]
1262
1270
  elif pipeline_mode == "standard":
1263
1271
  specific = [
1264
- "- Tier 2: orchestrator builds context+plan, implements directly "
1265
- "(no Dev subagent), and Reviewer reviews — see P0-6",
1272
+ "- Tier 2: compatibility label only; feature prompts now render "
1273
+ "the unified full/tier3-equivalent guidance by default",
1266
1274
  "- context-snapshot.md is append-only: orchestrator writes "
1267
1275
  "Sections 1-4 + Implementation Log, Reviewer appends Review Notes",
1268
1276
  "- Gate checks enforce Implementation Log (with Gate Evidence) "
@@ -1283,6 +1291,14 @@ def _tier_reminders(pipeline_mode):
1283
1291
  "written before proceeding",
1284
1292
  "- Do NOT use `run_in_background=true` when spawning normal work "
1285
1293
  "agents",
1294
+ "- If an Agent tool call fails with team/config/lock errors, retry "
1295
+ "at most once; after a second failure, use the documented "
1296
+ "inline/recovery fallback or write `failure-log.md` rather than "
1297
+ "spawning variants or polling indefinitely",
1298
+ "- NEVER delete, modify, or touch any file under `.prizmkit/state/` "
1299
+ "— those are pipeline runtime files managed by the runner",
1300
+ "- NEVER run `rm -rf`, `git clean`, or destructive filesystem "
1301
+ "cleanup during the feature session",
1286
1302
  "- On timeout: check snapshot → model:lite → remaining steps "
1287
1303
  "only → max 2 retries → orchestrator fallback",
1288
1304
  ]
@@ -1575,56 +1591,8 @@ def build_replacements(args, feature, features, global_context, script_dir):
1575
1591
  """Build the full dict of placeholder -> replacement value."""
1576
1592
  project_root = _args_project_root(args, script_dir)
1577
1593
 
1578
- # Resolve paths - platform-aware agent/team resolution.
1579
- # Mixed `--platform all` installs must render commands for the actual AI
1580
- # environment, not whichever platform directory happens to be checked first.
1581
- platform = resolve_prompt_platform(project_root)
1582
- home_dir = os.path.expanduser("~")
1583
-
1584
- if platform == "claude":
1585
- # Claude Code: agents in .claude/agents/, no native team config
1586
- agents_dir = os.path.join(project_root, ".claude", "agents")
1587
- team_config_path = os.path.join(
1588
- project_root, ".claude", "team-info.json",
1589
- )
1590
- elif platform == "codex":
1591
- # Codex: agents and team metadata are project-local references.
1592
- agents_dir = os.path.join(project_root, ".codex", "agents")
1593
- team_config_path = os.path.join(
1594
- project_root, ".codex", "team-info.json",
1595
- )
1596
- else:
1597
- # CodeBuddy: agents in .codebuddy/agents/, team in ~/.codebuddy/teams/
1598
- agents_dir = os.path.join(project_root, ".codebuddy", "agents")
1599
- team_config_path = os.path.join(
1600
- home_dir, ".codebuddy", "teams", "prizm-dev-team", "config.json",
1601
- )
1602
-
1603
- # Agent definitions are native .toml for Codex and .md for Claude/CodeBuddy.
1604
- agent_ext = ".toml" if platform == "codex" else ".md"
1605
- dev_subagent = os.path.join(
1606
- agents_dir, f"prizm-dev-team-dev{agent_ext}",
1607
- )
1608
- reviewer_subagent = os.path.join(
1609
- agents_dir, f"prizm-dev-team-reviewer{agent_ext}",
1610
- )
1611
-
1612
- # Verify agent files actually exist — missing files cause confusing
1613
- # errors when the AI session tries to read them later.
1614
- for agent_path, agent_name in [
1615
- (dev_subagent, "dev agent"),
1616
- (reviewer_subagent, "reviewer agent"),
1617
- ]:
1618
- if not os.path.isfile(agent_path):
1619
- LOGGER.warning(
1620
- "Agent file not found: %s (%s). "
1621
- "Subagent spawning may fail. "
1622
- "Run `npx prizmkit install` to reinstall agent definitions.",
1623
- agent_path, agent_name,
1624
- )
1625
- # Validator scripts - check if they exist in .codebuddy/scripts/, otherwise use .prizmkit/dev-pipeline/scripts/
1626
- validator_scripts_dir = os.path.join(project_root, ".prizmkit", "dev-pipeline", "scripts")
1627
- init_script_path = os.path.join(validator_scripts_dir, "init-dev-team.py")
1594
+ # Resolve platform for platform-specific project convention references only.
1595
+ resolve_prompt_platform(project_root)
1628
1596
 
1629
1597
  # Session status is controlled by the main runner state dir, even when
1630
1598
  # rendered project paths are AI-visible worktree paths.
@@ -1650,10 +1618,15 @@ def build_replacements(args, feature, features, global_context, script_dir):
1650
1618
  "estimated_complexity",
1651
1619
  feature.get("complexity", "medium"),
1652
1620
  )
1653
- if args.mode:
1654
- pipeline_mode = args.mode
1621
+ if args.template:
1622
+ pipeline_mode = args.mode or determine_legacy_template_mode(complexity)
1655
1623
  else:
1656
1624
  pipeline_mode = determine_pipeline_mode(complexity)
1625
+ if args.mode and args.mode != pipeline_mode and not args.template:
1626
+ LOGGER.info(
1627
+ "Ignoring feature prompt --mode=%s; unified full guidance is used",
1628
+ args.mode,
1629
+ )
1657
1630
 
1658
1631
  # Auto-detect resume: if all planning artifacts exist and resume_phase
1659
1632
  # is "null" (fresh start), skip to Phase 6
@@ -1710,10 +1683,6 @@ def build_replacements(args, feature, features, global_context, script_dir):
1710
1683
  ),
1711
1684
  "{{GLOBAL_CONTEXT}}": format_global_context(global_context, project_root),
1712
1685
  "{{PROJECT_BRIEF}}": _read_project_brief(project_root),
1713
- "{{TEAM_CONFIG_PATH}}": team_config_path,
1714
- "{{DEV_SUBAGENT_PATH}}": dev_subagent,
1715
- "{{REVIEWER_SUBAGENT_PATH}}": reviewer_subagent,
1716
- "{{INIT_SCRIPT_PATH}}": init_script_path,
1717
1686
  "{{SESSION_STATUS_PATH}}": session_status_abs,
1718
1687
  "{{PROJECT_ROOT}}": project_root,
1719
1688
  "{{FEATURE_SLUG}}": feature_slug,
@@ -1859,20 +1828,9 @@ def main():
1859
1828
  if args.template:
1860
1829
  template_path = args.template
1861
1830
  else:
1862
- complexity = feature.get(
1863
- "estimated_complexity",
1864
- feature.get("complexity", "medium"),
1865
- )
1866
- _mode = args.mode or determine_pipeline_mode(complexity)
1867
- _tier_file_map = {
1868
- "lite": "bootstrap-tier1.md",
1869
- "standard": "bootstrap-tier2.md",
1870
- "full": "bootstrap-tier3.md",
1871
- }
1872
- _tier_file = _tier_file_map.get(_mode, "bootstrap-tier2.md")
1873
- _tier_path = os.path.join(templates_dir, _tier_file)
1874
- if os.path.isfile(_tier_path):
1875
- template_path = _tier_path
1831
+ tier3_path = os.path.join(templates_dir, "bootstrap-tier3.md")
1832
+ if os.path.isfile(tier3_path):
1833
+ template_path = tier3_path
1876
1834
  else:
1877
1835
  template_path = os.path.join(
1878
1836
  templates_dir, "bootstrap-prompt.md"
@@ -246,22 +246,7 @@ def is_recovery_like(args):
246
246
  def build_replacements(args, bug, global_context, script_dir):
247
247
  """Build the full dict of placeholder -> replacement value."""
248
248
  project_root = _args_project_root(args, script_dir)
249
- platform = resolve_prompt_platform(project_root)
250
- home_dir = os.path.expanduser("~")
251
-
252
- if platform == "claude":
253
- agents_dir = os.path.join(project_root, ".claude", "agents")
254
- team_config_path = os.path.join(project_root, ".claude", "team-info.json")
255
- elif platform == "codex":
256
- agents_dir = os.path.join(project_root, ".codex", "agents")
257
- team_config_path = os.path.join(project_root, ".codex", "team-info.json")
258
- else:
259
- agents_dir = os.path.join(project_root, ".codebuddy", "agents")
260
- team_config_path = os.path.join(home_dir, ".codebuddy", "teams", "prizm-dev-team", "config.json")
261
-
262
- agent_ext = ".toml" if platform == "codex" else ".md"
263
- dev_subagent = os.path.join(agents_dir, "prizm-dev-team-dev{}".format(agent_ext))
264
- reviewer_subagent = os.path.join(agents_dir, "prizm-dev-team-reviewer{}".format(agent_ext))
249
+ resolve_prompt_platform(project_root)
265
250
 
266
251
  state_dir = (
267
252
  os.path.abspath(args.state_dir)
@@ -311,9 +296,6 @@ def build_replacements(args, bug, global_context, script_dir):
311
296
  "{{AC_CHECKLIST}}": format_ac_checklist(bug.get("acceptance_criteria", [])),
312
297
  "{{ENVIRONMENT}}": format_environment(bug.get("environment")),
313
298
  "{{GLOBAL_CONTEXT}}": format_global_context(global_context, project_root),
314
- "{{TEAM_CONFIG_PATH}}": team_config_path,
315
- "{{DEV_SUBAGENT_PATH}}": dev_subagent,
316
- "{{REVIEWER_SUBAGENT_PATH}}": reviewer_subagent,
317
299
  "{{SESSION_STATUS_PATH}}": session_status_path,
318
300
  "{{PROJECT_ROOT}}": project_root,
319
301
  "{{ARTIFACT_DIR}}": ".prizmkit/bugfix/{}".format(args.bug_id),
@@ -272,22 +272,7 @@ def determine_refactor_mode(args, refactor):
272
272
 
273
273
  def build_replacements(args, refactor, refactors, global_context, script_dir):
274
274
  project_root = _args_project_root(args, script_dir)
275
- platform = resolve_prompt_platform(project_root)
276
- home_dir = os.path.expanduser("~")
277
-
278
- if platform == "claude":
279
- agents_dir = os.path.join(project_root, ".claude", "agents")
280
- team_config_path = os.path.join(project_root, ".claude", "team-info.json")
281
- elif platform == "codex":
282
- agents_dir = os.path.join(project_root, ".codex", "agents")
283
- team_config_path = os.path.join(project_root, ".codex", "team-info.json")
284
- else:
285
- agents_dir = os.path.join(project_root, ".codebuddy", "agents")
286
- team_config_path = os.path.join(home_dir, ".codebuddy", "teams", "prizm-dev-team", "config.json")
287
-
288
- agent_ext = ".toml" if platform == "codex" else ".md"
289
- dev_subagent = os.path.join(agents_dir, "prizm-dev-team-dev{}".format(agent_ext))
290
- reviewer_subagent = os.path.join(agents_dir, "prizm-dev-team-reviewer{}".format(agent_ext))
275
+ resolve_prompt_platform(project_root)
291
276
 
292
277
  state_dir = (
293
278
  os.path.abspath(args.state_dir)
@@ -337,9 +322,6 @@ def build_replacements(args, refactor, refactors, global_context, script_dir):
337
322
  "{{AC_CHECKLIST}}": format_ac_checklist(refactor.get("acceptance_criteria", [])),
338
323
  "{{DEPENDENCIES}}": format_dependencies(refactor.get("dependencies", []), refactors),
339
324
  "{{GLOBAL_CONTEXT}}": format_global_context(global_context, project_root),
340
- "{{TEAM_CONFIG_PATH}}": team_config_path,
341
- "{{DEV_SUBAGENT_PATH}}": dev_subagent,
342
- "{{REVIEWER_SUBAGENT_PATH}}": reviewer_subagent,
343
325
  "{{SESSION_STATUS_PATH}}": session_status_path,
344
326
  "{{PROJECT_ROOT}}": project_root,
345
327
  "{{ARTIFACT_DIR}}": ".prizmkit/refactor/{}".format(args.refactor_id),
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env python3
2
- """Initialize prizmkit directory structures for a feature.
2
+ """Initialize PrizmKit change-artifact directories for a feature.
3
3
 
4
- Creates the standard directory layout expected by prizm-dev-team agents:
4
+ Creates the standard directory layout expected by generated pipeline prompts:
5
5
  - .prizmkit/specs/<feature-slug>/ ← per-feature subdirectory
6
6
 
7
7
  Usage:
8
- python3 init-dev-team.py --project-root <path> --feature-slug <slug>
8
+ python3 init-change-artifact.py --project-root <path> --feature-slug <slug>
9
9
  """
10
10
 
11
11
  import argparse
@@ -17,7 +17,7 @@ from datetime import datetime, timezone
17
17
 
18
18
  def parse_args():
19
19
  parser = argparse.ArgumentParser(
20
- description="Initialize dev-team and prizmkit directories"
20
+ description="Initialize PrizmKit change-artifact directories"
21
21
  )
22
22
  parser.add_argument(
23
23
  "--project-root",
@@ -38,16 +38,14 @@ def parse_args():
38
38
 
39
39
 
40
40
  def create_directories(project_root, feature_slug=None):
41
- """Create the prizmkit directory structures."""
41
+ """Create the PrizmKit change-artifact directory structures."""
42
42
  dirs_to_create = []
43
43
 
44
- # PrizmKit per-feature directories
45
44
  if feature_slug:
46
45
  dirs_to_create.extend([
47
46
  ".prizmkit/specs/{}".format(feature_slug),
48
47
  ])
49
48
  else:
50
- # Fallback: create flat directories (not recommended)
51
49
  dirs_to_create.extend([
52
50
  ".prizmkit/specs",
53
51
  ])
@@ -67,14 +65,11 @@ def init_prizmkit_config(project_root, feature_id):
67
65
  config_path = os.path.join(project_root, ".prizmkit", "config.json")
68
66
 
69
67
  if os.path.exists(config_path):
70
- # Update existing config
71
68
  with open(config_path, "r", encoding="utf-8") as f:
72
69
  config = json.load(f)
73
70
  config["current_feature"] = feature_id
74
71
  config["updated_at"] = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
75
72
  else:
76
- # Create new config
77
- # Try to get project name from package.json or directory name
78
73
  project_name = os.path.basename(project_root)
79
74
  pkg_json_path = os.path.join(project_root, "package.json")
80
75
  if os.path.exists(pkg_json_path):
@@ -112,22 +107,17 @@ def main():
112
107
  print(json.dumps(result, indent=2))
113
108
  sys.exit(1)
114
109
 
115
- # Create directories
116
110
  created_dirs = create_directories(project_root, args.feature_slug)
117
-
118
- # Initialize config
119
111
  config_path = init_prizmkit_config(project_root, args.feature_id)
120
112
 
121
113
  result = {
122
114
  "success": True,
123
115
  "project_root": project_root,
124
116
  "feature_slug": args.feature_slug,
125
- "directories_created": created_dirs,
117
+ "created_dirs": created_dirs,
126
118
  "config_path": config_path,
127
119
  }
128
-
129
120
  print(json.dumps(result, indent=2))
130
- sys.exit(0)
131
121
 
132
122
 
133
123
  if __name__ == "__main__":