@tianhai/pi-workflow-kit 0.5.3 → 0.6.0

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 (63) hide show
  1. package/README.md +44 -494
  2. package/docs/developer-usage-guide.md +41 -401
  3. package/docs/oversight-model.md +13 -34
  4. package/docs/workflow-phases.md +32 -46
  5. package/extensions/workflow-guard.ts +67 -0
  6. package/package.json +3 -7
  7. package/skills/brainstorming/SKILL.md +16 -67
  8. package/skills/executing-tasks/SKILL.md +26 -227
  9. package/skills/finalizing/SKILL.md +33 -0
  10. package/skills/writing-plans/SKILL.md +23 -132
  11. package/ROADMAP.md +0 -16
  12. package/agents/code-reviewer.md +0 -18
  13. package/agents/config.ts +0 -5
  14. package/agents/implementer.md +0 -26
  15. package/agents/spec-reviewer.md +0 -13
  16. package/agents/worker.md +0 -17
  17. package/docs/plans/2026-04-10-brainstorming-boundary-enforcement-design.md +0 -60
  18. package/docs/plans/completed/2026-04-09-cleanup-legacy-state-and-enforce-think-phases-design.md +0 -56
  19. package/docs/plans/completed/2026-04-09-cleanup-legacy-state-and-enforce-think-phases-implementation.md +0 -196
  20. package/docs/plans/completed/2026-04-09-workflow-next-autocomplete-design.md +0 -185
  21. package/docs/plans/completed/2026-04-09-workflow-next-autocomplete-implementation.md +0 -334
  22. package/docs/plans/completed/2026-04-09-workflow-next-handoff-state-design.md +0 -251
  23. package/docs/plans/completed/2026-04-09-workflow-next-handoff-state-implementation.md +0 -253
  24. package/extensions/constants.ts +0 -15
  25. package/extensions/lib/logging.ts +0 -138
  26. package/extensions/plan-tracker.ts +0 -508
  27. package/extensions/subagent/agents.ts +0 -144
  28. package/extensions/subagent/concurrency.ts +0 -52
  29. package/extensions/subagent/env.ts +0 -47
  30. package/extensions/subagent/index.ts +0 -1181
  31. package/extensions/subagent/lifecycle.ts +0 -25
  32. package/extensions/subagent/timeout.ts +0 -13
  33. package/extensions/workflow-monitor/debug-monitor.ts +0 -98
  34. package/extensions/workflow-monitor/git.ts +0 -31
  35. package/extensions/workflow-monitor/heuristics.ts +0 -58
  36. package/extensions/workflow-monitor/investigation.ts +0 -52
  37. package/extensions/workflow-monitor/reference-tool.ts +0 -42
  38. package/extensions/workflow-monitor/skip-confirmation.ts +0 -19
  39. package/extensions/workflow-monitor/tdd-monitor.ts +0 -137
  40. package/extensions/workflow-monitor/test-runner.ts +0 -37
  41. package/extensions/workflow-monitor/verification-monitor.ts +0 -61
  42. package/extensions/workflow-monitor/warnings.ts +0 -81
  43. package/extensions/workflow-monitor/workflow-handler.ts +0 -363
  44. package/extensions/workflow-monitor/workflow-next-completions.ts +0 -68
  45. package/extensions/workflow-monitor/workflow-next-state.ts +0 -112
  46. package/extensions/workflow-monitor/workflow-tracker.ts +0 -286
  47. package/extensions/workflow-monitor/workflow-transitions.ts +0 -88
  48. package/extensions/workflow-monitor.ts +0 -909
  49. package/skills/dispatching-parallel-agents/SKILL.md +0 -194
  50. package/skills/receiving-code-review/SKILL.md +0 -196
  51. package/skills/systematic-debugging/SKILL.md +0 -170
  52. package/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  53. package/skills/systematic-debugging/condition-based-waiting.md +0 -115
  54. package/skills/systematic-debugging/defense-in-depth.md +0 -122
  55. package/skills/systematic-debugging/find-polluter.sh +0 -63
  56. package/skills/systematic-debugging/reference/rationalizations.md +0 -61
  57. package/skills/systematic-debugging/root-cause-tracing.md +0 -169
  58. package/skills/test-driven-development/SKILL.md +0 -266
  59. package/skills/test-driven-development/reference/examples.md +0 -101
  60. package/skills/test-driven-development/reference/rationalizations.md +0 -67
  61. package/skills/test-driven-development/reference/when-stuck.md +0 -33
  62. package/skills/test-driven-development/testing-anti-patterns.md +0 -299
  63. package/skills/using-git-worktrees/SKILL.md +0 -231
@@ -1,47 +0,0 @@
1
- const ALLOWED_PREFIXES = ["PI_", "NODE_", "NPM_", "NVM_", "LC_", "XDG_"];
2
-
3
- const ALLOWED_EXPLICIT = new Set([
4
- "PATH",
5
- "HOME",
6
- "SHELL",
7
- "TERM",
8
- "USER",
9
- "LOGNAME",
10
- "TMPDIR",
11
- "EDITOR",
12
- "VISUAL",
13
- "SSH_AUTH_SOCK",
14
- "COLORTERM",
15
- "FORCE_COLOR",
16
- "NO_COLOR",
17
- "LANG",
18
- "LANGUAGE",
19
- ]);
20
-
21
- export function buildSubagentEnv(extra?: Record<string, string>): Record<string, string | undefined> {
22
- const filtered: Record<string, string | undefined> = {};
23
-
24
- for (const [key, value] of Object.entries(process.env)) {
25
- if (value === undefined) continue;
26
- if (ALLOWED_EXPLICIT.has(key) || ALLOWED_PREFIXES.some((p) => key.startsWith(p))) {
27
- filtered[key] = value;
28
- }
29
- }
30
-
31
- const passthrough = process.env.PI_SUBAGENT_ENV_PASSTHROUGH;
32
- if (passthrough) {
33
- for (const name of passthrough
34
- .split(",")
35
- .map((s) => s.trim())
36
- .filter(Boolean)) {
37
- const val = process.env[name];
38
- if (val !== undefined) filtered[name] = val;
39
- }
40
- }
41
-
42
- if (extra) {
43
- Object.assign(filtered, extra);
44
- }
45
-
46
- return filtered;
47
- }