@osolmaz/pi-workflows 0.10.0 → 0.11.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 (125) hide show
  1. package/README.md +23 -12
  2. package/dist/builtins/autodoc.workflow.d.ts +58 -0
  3. package/dist/builtins/autodoc.workflow.js +266 -0
  4. package/dist/builtins/autodoc.workflow.js.map +1 -0
  5. package/dist/builtins/autoimplement.workflow.d.ts +210 -11
  6. package/dist/builtins/autoimplement.workflow.js +245 -13
  7. package/dist/builtins/autoimplement.workflow.js.map +1 -1
  8. package/dist/builtins/{autodevise.workflow.d.ts → autoplan.workflow.d.ts} +9 -9
  9. package/dist/builtins/{autodevise.workflow.js → autoplan.workflow.js} +20 -20
  10. package/dist/builtins/autoplan.workflow.js.map +1 -0
  11. package/dist/builtins/catalog.js +8 -4
  12. package/dist/builtins/catalog.js.map +1 -1
  13. package/dist/builtins/index.d.ts +6 -3
  14. package/dist/builtins/index.js +5 -2
  15. package/dist/builtins/index.js.map +1 -1
  16. package/dist/builtins/monitor.workflow.d.ts +4 -0
  17. package/dist/builtins/monitor.workflow.js +134 -9
  18. package/dist/builtins/monitor.workflow.js.map +1 -1
  19. package/dist/builtins/plan-approval.workflow.d.ts +83 -0
  20. package/dist/builtins/plan-approval.workflow.js +148 -0
  21. package/dist/builtins/plan-approval.workflow.js.map +1 -0
  22. package/dist/builtins/plan-presentation.d.ts +7 -0
  23. package/dist/builtins/plan-presentation.js +44 -0
  24. package/dist/builtins/plan-presentation.js.map +1 -0
  25. package/dist/extension/decision-channels.d.ts +132 -0
  26. package/dist/extension/decision-channels.js +1082 -0
  27. package/dist/extension/decision-channels.js.map +1 -0
  28. package/dist/extension/index.d.ts +1 -0
  29. package/dist/extension/index.js +426 -11
  30. package/dist/extension/index.js.map +1 -1
  31. package/dist/extension/widget.js +26 -2
  32. package/dist/extension/widget.js.map +1 -1
  33. package/dist/extension/workflow-tool.d.ts +1 -37
  34. package/dist/extension/workflow-tool.js +1 -42
  35. package/dist/extension/workflow-tool.js.map +1 -1
  36. package/dist/host/rpc-bridge.js +4 -21
  37. package/dist/host/rpc-bridge.js.map +1 -1
  38. package/dist/render/graph-render.js +33 -8
  39. package/dist/render/graph-render.js.map +1 -1
  40. package/dist/viewer/render.js +36 -2
  41. package/dist/viewer/render.js.map +1 -1
  42. package/dist/workflows/composition.js +15 -1
  43. package/dist/workflows/composition.js.map +1 -1
  44. package/dist/workflows/decision-presentation.d.ts +18 -0
  45. package/dist/workflows/decision-presentation.js +417 -0
  46. package/dist/workflows/decision-presentation.js.map +1 -0
  47. package/dist/workflows/engine.d.ts +2 -1
  48. package/dist/workflows/engine.js +86 -4
  49. package/dist/workflows/engine.js.map +1 -1
  50. package/dist/workflows/human-decision.d.ts +87 -0
  51. package/dist/workflows/human-decision.js +583 -0
  52. package/dist/workflows/human-decision.js.map +1 -0
  53. package/dist/workflows/index.d.ts +3 -1
  54. package/dist/workflows/index.js +2 -0
  55. package/dist/workflows/index.js.map +1 -1
  56. package/dist/workflows/schema.js +15 -0
  57. package/dist/workflows/schema.js.map +1 -1
  58. package/dist/workflows/store.js +7 -0
  59. package/dist/workflows/store.js.map +1 -1
  60. package/dist/workflows/tool-input.d.ts +72 -0
  61. package/dist/workflows/tool-input.js +141 -0
  62. package/dist/workflows/tool-input.js.map +1 -0
  63. package/dist/workflows/types.d.ts +223 -0
  64. package/docs/HUMAN_DECISIONS.md +371 -0
  65. package/docs/HUMAN_DECISION_PRESENTATIONS.md +323 -0
  66. package/docs/MONITOR.md +17 -6
  67. package/docs/WORKFLOW_COMPOSITION.md +13 -6
  68. package/docs/plans/2026-08-19-human-decision-gates-plan.md +296 -0
  69. package/docs/plans/2026-08-19-human-decision-presentations-plan.md +172 -0
  70. package/docs/plans/2026-08-19-provider-compatible-workflow-tool-schema-plan.md +45 -0
  71. package/docs/plans/2026-08-19-workflow-composition-plan.md +25 -17
  72. package/docs/run-bundles.md +23 -2
  73. package/docs/workflows.md +43 -5
  74. package/examples/workflows/approved-plan.workflow.ts +58 -0
  75. package/examples/workflows/autoplan.workflow.ts +1 -0
  76. package/examples/workflows/human-decision.workflow.ts +62 -0
  77. package/herdr-plugin.toml +1 -1
  78. package/package.json +2 -1
  79. package/schemas/decision-presentation-v1.schema.json +83 -0
  80. package/schemas/human-decision-accepted-v1.schema.json +44 -0
  81. package/schemas/human-decision-accepted-v2.schema.json +50 -0
  82. package/schemas/human-decision-answer-attempt-v1.schema.json +37 -0
  83. package/schemas/human-decision-cancellation-v1.schema.json +15 -0
  84. package/schemas/human-decision-continuation-v1.schema.json +16 -0
  85. package/schemas/human-decision-delivery-v1.schema.json +28 -0
  86. package/schemas/human-decision-delivery-v2.schema.json +36 -0
  87. package/schemas/human-decision-receipt-v1.schema.json +33 -0
  88. package/schemas/human-decision-receipt-v2.schema.json +39 -0
  89. package/schemas/human-decision-request-v1.schema.json +59 -0
  90. package/schemas/human-decision-request-v2.schema.json +69 -0
  91. package/schemas/human-decision-resolution-v1.schema.json +27 -0
  92. package/schemas/human-decision-resolution-v2.schema.json +27 -0
  93. package/schemas/human-decision-settlement-v1.schema.json +28 -0
  94. package/skills/autodoc/SKILL.md +43 -0
  95. package/skills/autoimplement/SKILL.md +58 -0
  96. package/skills/autoimplement/agents/openai.yaml +4 -0
  97. package/skills/autoplan/SKILL.md +25 -0
  98. package/skills/monitor/SKILL.md +3 -1
  99. package/skills/pi-workflows/SKILL.md +3 -3
  100. package/src/builtins/autodoc.workflow.ts +325 -0
  101. package/src/builtins/autoimplement.workflow.ts +281 -14
  102. package/src/builtins/{autodevise.workflow.ts → autoplan.workflow.ts} +32 -32
  103. package/src/builtins/catalog.ts +8 -4
  104. package/src/builtins/index.ts +25 -6
  105. package/src/builtins/monitor.workflow.ts +162 -8
  106. package/src/builtins/plan-approval.workflow.ts +190 -0
  107. package/src/builtins/plan-presentation.ts +57 -0
  108. package/src/extension/decision-channels.ts +1533 -0
  109. package/src/extension/index.ts +499 -9
  110. package/src/extension/widget.ts +39 -2
  111. package/src/extension/workflow-tool.ts +5 -81
  112. package/src/host/rpc-bridge.ts +7 -30
  113. package/src/render/graph-render.ts +40 -3
  114. package/src/viewer/render.ts +56 -3
  115. package/src/workflows/composition.ts +16 -1
  116. package/src/workflows/decision-presentation.ts +501 -0
  117. package/src/workflows/engine.ts +108 -4
  118. package/src/workflows/human-decision.ts +819 -0
  119. package/src/workflows/index.ts +69 -0
  120. package/src/workflows/schema.ts +17 -0
  121. package/src/workflows/store.ts +8 -0
  122. package/src/workflows/tool-input.ts +202 -0
  123. package/src/workflows/types.ts +265 -0
  124. package/dist/builtins/autodevise.workflow.js.map +0 -1
  125. package/examples/workflows/autodevise.workflow.ts +0 -1
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/osolmaz/pi-workflows/schemas/human-decision-request-v1.schema.json",
4
+ "title": "Pi Workflows human decision request v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "decisionId",
10
+ "requestDigest",
11
+ "runId",
12
+ "workflowName",
13
+ "nodeId",
14
+ "attemptId",
15
+ "audience",
16
+ "title",
17
+ "body",
18
+ "choices",
19
+ "createdAt"
20
+ ],
21
+ "properties": {
22
+ "schema": { "const": "pi-workflows.human-decision-request.v1" },
23
+ "decisionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$" },
24
+ "requestDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
25
+ "runId": { "type": "string" },
26
+ "workflowName": { "type": "string" },
27
+ "nodeId": { "type": "string" },
28
+ "attemptId": { "type": "string" },
29
+ "audience": { "type": "string" },
30
+ "title": { "type": "string", "minLength": 1 },
31
+ "body": true,
32
+ "choices": {
33
+ "type": "object",
34
+ "minProperties": 1,
35
+ "additionalProperties": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["label"],
39
+ "properties": {
40
+ "label": { "type": "string", "minLength": 1 },
41
+ "input": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["kind", "name", "prompt", "minLength", "maxLength"],
45
+ "properties": {
46
+ "kind": { "const": "text" },
47
+ "name": { "type": "string" },
48
+ "prompt": { "type": "string", "minLength": 1 },
49
+ "minLength": { "type": "integer", "minimum": 0 },
50
+ "maxLength": { "type": "integer", "minimum": 1 }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "createdAt": { "type": "string", "format": "date-time" },
57
+ "expiresAt": { "type": "string", "format": "date-time" }
58
+ }
59
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/osolmaz/pi-workflows/schemas/human-decision-request-v2.schema.json",
4
+ "title": "Pi Workflows human decision request v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "decisionId",
10
+ "requestDigest",
11
+ "subjectDigest",
12
+ "presentationDigest",
13
+ "runId",
14
+ "workflowName",
15
+ "nodeId",
16
+ "attemptId",
17
+ "audience",
18
+ "title",
19
+ "subject",
20
+ "presentation",
21
+ "revision",
22
+ "choices",
23
+ "createdAt"
24
+ ],
25
+ "properties": {
26
+ "schema": { "const": "pi-workflows.human-decision-request.v2" },
27
+ "decisionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$" },
28
+ "requestDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
29
+ "subjectDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
30
+ "presentationDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
31
+ "runId": { "type": "string" },
32
+ "workflowName": { "type": "string" },
33
+ "nodeId": { "type": "string" },
34
+ "attemptId": { "type": "string" },
35
+ "audience": { "type": "string" },
36
+ "title": { "type": "string", "minLength": 1 },
37
+ "subject": true,
38
+ "presentation": {
39
+ "$ref": "decision-presentation-v1.schema.json"
40
+ },
41
+ "revision": { "type": "integer", "minimum": 1 },
42
+ "choices": {
43
+ "type": "object",
44
+ "minProperties": 1,
45
+ "additionalProperties": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["label"],
49
+ "properties": {
50
+ "label": { "type": "string", "minLength": 1 },
51
+ "input": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": ["kind", "name", "prompt", "minLength", "maxLength"],
55
+ "properties": {
56
+ "kind": { "const": "text" },
57
+ "name": { "type": "string" },
58
+ "prompt": { "type": "string", "minLength": 1 },
59
+ "minLength": { "type": "integer", "minimum": 0 },
60
+ "maxLength": { "type": "integer", "minimum": 1 }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "createdAt": { "type": "string", "format": "date-time" },
67
+ "expiresAt": { "type": "string", "format": "date-time" }
68
+ }
69
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/osolmaz/pi-workflows/schemas/human-decision-resolution-v1.schema.json",
4
+ "title": "Pi Workflows human decision resolution v1",
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["schema", "outcome", "decision"],
10
+ "properties": {
11
+ "schema": { "const": "pi-workflows.human-decision-resolution.v1" },
12
+ "outcome": { "const": "accepted" },
13
+ "decision": { "$ref": "human-decision-accepted-v1.schema.json" }
14
+ }
15
+ },
16
+ {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["schema", "outcome", "cancellation"],
20
+ "properties": {
21
+ "schema": { "const": "pi-workflows.human-decision-resolution.v1" },
22
+ "outcome": { "const": "cancelled" },
23
+ "cancellation": { "$ref": "human-decision-cancellation-v1.schema.json" }
24
+ }
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/osolmaz/pi-workflows/schemas/human-decision-resolution-v2.schema.json",
4
+ "title": "Pi Workflows human decision resolution v2",
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["schema", "outcome", "decision"],
10
+ "properties": {
11
+ "schema": { "const": "pi-workflows.human-decision-resolution.v2" },
12
+ "outcome": { "const": "accepted" },
13
+ "decision": { "$ref": "human-decision-accepted-v2.schema.json" }
14
+ }
15
+ },
16
+ {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["schema", "outcome", "cancellation"],
20
+ "properties": {
21
+ "schema": { "const": "pi-workflows.human-decision-resolution.v2" },
22
+ "outcome": { "const": "cancelled" },
23
+ "cancellation": { "$ref": "human-decision-cancellation-v1.schema.json" }
24
+ }
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/osolmaz/pi-workflows/schemas/human-decision-settlement-v1.schema.json",
4
+ "title": "Pi Workflows human decision settlement v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "attemptId",
10
+ "decisionId",
11
+ "requestDigest",
12
+ "channel",
13
+ "state",
14
+ "createdAt",
15
+ "finishedAt"
16
+ ],
17
+ "properties": {
18
+ "schema": { "const": "pi-workflows.human-decision-settlement.v1" },
19
+ "attemptId": { "type": "string" },
20
+ "decisionId": { "type": "string" },
21
+ "requestDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
22
+ "channel": { "type": "string" },
23
+ "state": { "enum": ["confirmed", "failed"] },
24
+ "createdAt": { "type": "string", "format": "date-time" },
25
+ "finishedAt": { "type": "string", "format": "date-time" },
26
+ "errorCode": { "type": "string" }
27
+ }
28
+ }
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: autodoc
3
+ description: Use when an existing selected solution or clear implementation plan must be recorded or updated in canonical documentation before implementation, including choosing the right repository and applying SimpleDoc conventions.
4
+ compatibility: Requires Pi Workflows and the built-in autodoc workflow.
5
+ ---
6
+
7
+ # Autodoc
8
+
9
+ Use the built-in `autodoc` Pi Workflow when it is available. At top level, list workflows, then start `autodoc` once with the task, existing plan, repository, known documents, and evidence from the conversation. Do not manually duplicate stages owned by the workflow.
10
+
11
+ When this skill is loaded inside an active workflow step, do not start another workflow. Complete the current step contract.
12
+
13
+ Autodoc records an existing selected solution or clear plan. It does not choose, devise, improve, or revise the solution. If no clear plan exists in the input, conversation, or referenced canonical documents, stop as blocked and use `autoplan` separately.
14
+
15
+ Outside Pi, or when the workflow is unavailable:
16
+
17
+ - Prepare or update the canonical plan and documentation without changing the selected solution.
18
+ - Do not take longer than necessary.
19
+ - Preserve the entropy and information in the user's request, including its intent, when writing the plan. Keep the user's concern and any specific wording that carries important meaning near the start of the document, in an introduction that clearly states its intended purpose or goal.
20
+ - Read the relevant code and existing docs before writing. Update the canonical document instead of creating competing sources of truth.
21
+ - Separate user requirements from assumptions and unresolved questions.
22
+ - In plans, state the scope, non-goals, acceptance criteria, and exact verification steps.
23
+ - If there is no plan Markdown document for the task, create one. Do not implement from this skill.
24
+ - Create or update documentation in repositories that the user authorized for documentation changes.
25
+ - For a repository outside the authorized scope, keep the plan in an approved scratch location unless the user explicitly asks to track it in that repository.
26
+ - Create or update the requisite amount of documentation in either existing files or new files in the relevant repos.
27
+ - Avoid unnecessary duplication and keep the relevant existing documentation up to date.
28
+ - When work spans repositories, keep one canonical explanation and link to it rather than copying the same text.
29
+ - After implementation, update the docs to match what actually shipped and record meaningful departures from the plan.
30
+ - Do not spend a long time updating a large set of docs only for this purpose.
31
+ - Use the `plain-writing` skill for all documentation.
32
+ - Read the SimpleDoc specification from the local checkout at `~/repos/SimpleDoc/docs/SIMPLEDOC_SPEC.md`. Do not fetch the specification or related SimpleDoc documentation from online sources.
33
+ - If `~/repos/SimpleDoc` is missing, clone `https://github.com/osolmaz/SimpleDoc.git` there, then read the specification from the local checkout. If the checkout exists, do not switch its branch or modify it only to read the specification.
34
+ - Use the `simpledoc` skill and follow the locally read SimpleDoc convention when creating or updating documentation.
35
+ - Use capitalized filenames for evergreen, long-term documentation and specifications, and dated SimpleDoc filenames for time-bound documents tied to a certain time.
36
+ - Name specification files after the feature itself without `spec` or `specification` in the filename. The document title may include `Spec` or `Specification`.
37
+ - End filenames for non-evergreen implementation plans with `-plan.md`, not `-implementation-plan.md`.
38
+ - Use `cutover` only to describe replacement behavior in prose. Do not use `cutover` or `cutover plan` in filenames, document titles, headings, plan names, issue titles, pull request titles, commit subjects, test names, or other identifiers. Name the target capability directly, adding `plan` only when a plan suffix is useful.
39
+ - Use the `kill-ai-smell` skill for capitalized evergreen documents. AI smell may remain in one-off implementation plans.
40
+ - Test commands and examples when practical.
41
+ - Never place secrets, credentials, private data, or accidental machine-specific paths in tracked documentation.
42
+ - Use `[skip ci]` in the commit message for documentation-only changes.
43
+ - Run `npx -y @simpledoc/simpledoc check` (or `simpledoc check`) locally in each repo where documentation changed.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: autoimplement
3
+ description: Use when the user asks to implement a plan end-to-end, test it, run Pi Reviewer against the base branch in a loop until no P0/P1 issues remain, and make sure CI/CD is green before finishing.
4
+ compatibility: Requires Pi Workflows and the built-in autoimplement workflow.
5
+ ---
6
+
7
+ Use the built-in `autoimplement` Pi Workflow when it is available. At top level, list workflows, then start `autoimplement` once with the task, existing plan, repository, scope, constraints, base branch, and merge policy from the conversation. Set `merge: true` only when the user explicitly requested merge or an applicable standing instruction authorizes it. Otherwise set it to false. Do not manually duplicate stages already owned by the workflow.
8
+
9
+ When this skill is loaded inside an active workflow step, do not start another workflow. Complete the current step contract with the available tools.
10
+
11
+ Outside Pi, or when the workflow is unavailable, do the following in the order that makes sense. Choose the most efficient order for dependencies, and parallelize independent work.
12
+
13
+ 0. Find the clear existing plan in the user's input, conversation, or referenced canonical documents. Do not devise an initial plan. If no clear plan exists, stop as blocked. If the plan exists but its canonical documentation is missing or stale, use `autodoc` to record it before implementation.
14
+
15
+ 1. Implement the given plan end-to-end.
16
+ - Implement the most elegant and long-term production-ready solution, but do not take longer than necessary.
17
+ - When implementation, verification, review, or CI produces evidence that invalidates the plan, use `autoplan` with the previous plan and new evidence, then continue from the revised plan. Keep local implementation bugs in the normal fix loop.
18
+ - Context compaction might happen during implementation or review. If not enough of the plan was preserved after compaction, re-read the written plan to stay on track with the plan.
19
+ - Finish to completion. If there is a PR open for the implementation plan, do it in the same PR. If there is no PR already, open PR.
20
+ - Before finishing, commit and push any new or changed documentation, specification, or plan file in the relevant repo or repos, including the `~/scratch` repo when used, unless the user asked not to.
21
+
22
+ 2. Once you finish implementing, make sure to test it.
23
+ - This will depend on the nature of the problem. If needed, run local smoke tests, spin up dev servers, make requests and such.
24
+ - Try to test as much as possible, without merging.
25
+ - State explicitly what could not be tested locally and what still needs staging or production verification.
26
+ - Do not put mutation testing on the critical path unless repository policy explicitly requires it; keep the mutation test scripts available.
27
+
28
+ 3. Push your latest commits before running review so the review is always against the current PR head.
29
+ - Run Pi Reviewer with its configured defaults against the base branch: `pi-reviewer --base <branch_name>`. The model and thinking level come from the reviewer's own config, not from this skill.
30
+ - Use a 10 minute timeout on the tool call available to the model, not the shell `timeout` program. If Pi Reviewer takes more than 10 minutes, kill it.
31
+ - Do not silently fall back to `codex review` when Pi Reviewer is unavailable; stop and report the missing command or configuration.
32
+ - Record every review round with separate P0, P1, P2, and lower findings.
33
+ - Run Pi Reviewer in a loop and address any P0 or P1 issues until there are none left.
34
+ - If a round reports only P2 or lower findings, address valid proportionate P2 findings, verify and push them, then move to the next stage without running Pi Reviewer again solely because of that P2 work.
35
+ - Ignore issues about supporting legacy behavior unless the plan requires compatibility.
36
+ - Look at CI only after Pi Reviewer passes, meaning the last completed run found no issues or only P2 or lower issues.
37
+
38
+ 4. Pi Reviewer reports findings locally and does not post them to the pull request.
39
+ - Separately check existing inline review comments and PR issue comments, and address valid comments.
40
+ - Ignore irrelevant comments and stale comments from before the latest commit unless they still apply.
41
+ - Reply to and resolve each comment either way.
42
+ - Do not wait a fixed five minutes; wait only when a required review is known to be pending, and keep that wait bounded.
43
+
44
+ 5. In the final step, make sure that CI/CD is green.
45
+ - Inspect CI once before deciding to wait. If waiting is useful, state and run the exact `gh` tracking command.
46
+ - Bound one CI watch to five minutes. If CI is still pending, use the next model turn for additional useful local tests or smoke tests instead of waiting. Then inspect CI again.
47
+ - Ignore the fails unrelated to your changes, others break stuff sometimes and don't fix it.
48
+ - Make sure whatever changes you did don't break anything.
49
+ - If CI/CD is not fully green, state explicitly which failures are unrelated and why.
50
+ - For documentation-only changes, including SimpleDoc changes, relevant local checks are enough; do not wait for CI/CD after they pass.
51
+
52
+ 6. Once CI/CD is green, or the relevant local checks have passed for a documentation-only change, decide whether merge is authorized.
53
+ - Merge only when the user explicitly requested it or an applicable standing instruction authorizes it. Otherwise leave the PR ready.
54
+ - Then finish and give a summary with the PR link.
55
+ - Include the exact validation commands you ran and their outcomes.
56
+ - Also comment a final report on the PR.
57
+
58
+ If this skill is queued many times, treat that as a reminder to make sure the work is fully finished. Once the work is fully finished, you can ignore the repeated instructions. If the work is not finished, continue working.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Autoimplement"
3
+ short_description: "Finish a plan and ready its PR"
4
+ default_prompt: "Use $autoimplement to implement the approved plan end-to-end, test it, run `codex review --base <branch>` until no P0/P1 findings remain, clear valid PR feedback, and confirm CI/CD is green without merging."
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: autoplan
3
+ description: Use when the user asks to devise, choose, or plan the most elegant long-term production-ready solution, compare it with the ideal end state, and produce the best practical in-scope implementation plan without asking the user to resolve the gap.
4
+ compatibility: Requires Pi Workflows and the built-in autoplan workflow.
5
+ ---
6
+
7
+ # Autoplan
8
+
9
+ Use the built-in `autoplan` Pi Workflow when it is available. At top level, list workflows, then start `autoplan` once with the problem, authorized scope, constraints, previous plan, and new evidence from the conversation.
10
+
11
+ When this skill is loaded inside an active workflow step, do not start another workflow. Complete the current step contract.
12
+
13
+ Outside Pi, or when the workflow is unavailable:
14
+
15
+ 1. Frame the problem, observable success criteria, scope, constraints, and interfaces under our control.
16
+ 2. Devise the most elegant long-term production-ready solution within that scope.
17
+ 3. Describe the holy grail separately. Name every dependency outside our authority.
18
+ 4. Choose the right option without asking the user to decide between them.
19
+ - Choose the ideal when it is proportionate, production-ready, in scope, and implementable through interfaces we control.
20
+ - Otherwise choose the strongest practical in-scope solution with a clear path toward the ideal.
21
+ - Do not block only because the ideal requires an upstream or external change.
22
+ 5. Write a detailed implementation plan. For each step, state what changes, where it changes, and how to verify it.
23
+ 6. Stop as blocked only when no truthful in-scope solution can meet the success criteria.
24
+
25
+ When revising a plan, preserve the previous plan and new evidence. State whether the plan changed and why. Do not implement unless the user also requested implementation.
@@ -35,7 +35,9 @@ When the conversation gives no clear finish criterion, set `stopWhen` to `Stop o
35
35
 
36
36
  Do not invent a finite check count. Omit `maxChecks` unless the user explicitly requests one. The workflow host can apply its own safety upper bound. Disclose that bound if it appears.
37
37
 
38
- When repair is authorized, route a concrete code or design defect through the monitor's composed repair path. Supply the problem, observed evidence, and a stable fingerprint of the issue plus target state. The workflow runs outer `autodevise`, `autoimplement`, and internal redesign when needed, then checks the target again. Do not copy their prompts into the monitor task.
38
+ When repair is authorized, route a concrete code or design defect through the monitor's composed repair path. Supply the problem, observed evidence, and a stable fingerprint of the issue plus target state. The workflow runs outer `autoplan`, standalone `autodoc`, optional `plan-approval`, `autoimplement`, and internal redesign when needed, then checks the target again. Do not copy their prompts into the monitor task.
39
+
40
+ Add `repair.approval` only when the user requests a human plan decision. Set its named `audience` and a bounded `maxReplans`. A verified continue answer starts implementation. Stop ends the repair truthfully. Replan preserves the exact operator text, sends it back to autoplan, documents the revised plan, and asks again. The model-facing workflow answer tool cannot answer this gate.
39
41
 
40
42
  ## Keep routine work moving
41
43
 
@@ -18,7 +18,7 @@ Use the smallest applicable action:
18
18
  - `start` starts a discovered workflow name or workflow file path with structured input.
19
19
  - `status` reads the active run, or the named run when `runId` is supplied.
20
20
  - `pause`, `resume`, and `cancel` control the current active run.
21
- - `answer` supplies input to a waiting checkpoint.
21
+ - `answer` supplies input to an ordinary waiting checkpoint. It cannot satisfy a protected `humanDecision()` gate.
22
22
  - `update` publishes a non-completing durable update for the active step attempt.
23
23
  - `submit` completes the active agent step with its required output.
24
24
 
@@ -57,14 +57,14 @@ Follow these rules:
57
57
  - Give included workflows named exits, map their input explicitly, and keep parent edges out of child internals.
58
58
  - Keep `compute` pure. Put external effects in agent, function-action, or shell-action nodes.
59
59
  - Use structured node outputs for routing.
60
- - Use a checkpoint when progress requires human input.
60
+ - Use an ordinary checkpoint for external continuation data that the model may submit. Use `humanDecision()` for a verified human choice, and use the included `plan-approval` workflow for standard continue, stop, and exact-text replan routing.
61
61
  - Set explicit step and command timeouts.
62
62
  - Bound ordinary loops with `maxSteps` or another clear finish rule.
63
63
  - Use a controller instead of a workflow for indefinite resource reconciliation.
64
64
  - Keep presentation separate from execution. Use `presentationPrompt` only when a final assistant response is needed.
65
65
  - Preserve the single active workflow rule in one Pi session.
66
66
 
67
- Read [../../docs/workflows.md](../../docs/workflows.md) before creating or changing a workflow. Read [../../docs/WORKFLOW_COMPOSITION.md](../../docs/WORKFLOW_COMPOSITION.md) for nested workflows. Read [../../docs/DESIGN_PHILOSOPHY.md](../../docs/DESIGN_PHILOSOPHY.md) before adding public primitives. Use the examples under [../../examples/workflows](../../examples/workflows) as starting points.
67
+ Read [../../docs/workflows.md](../../docs/workflows.md) before creating or changing a workflow. Read [../../docs/WORKFLOW_COMPOSITION.md](../../docs/WORKFLOW_COMPOSITION.md) for nested workflows. Read [../../docs/HUMAN_DECISIONS.md](../../docs/HUMAN_DECISIONS.md) before adding a human gate or channel. Read [../../docs/DESIGN_PHILOSOPHY.md](../../docs/DESIGN_PHILOSOPHY.md) before adding public primitives. Use the examples under [../../examples/workflows](../../examples/workflows) as starting points.
68
68
 
69
69
  ## Verify changes
70
70