@comento/pota-harness 0.0.0-stage → 1.0.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 (99) hide show
  1. package/.agents/workflows/pota-doctor.md +16 -0
  2. package/.agents/workflows/pota-install.md +15 -0
  3. package/.agents/workflows/pota-memory.md +17 -0
  4. package/.agents/workflows/pota-plan.md +22 -0
  5. package/.agents/workflows/pota-review.md +16 -0
  6. package/.agents/workflows/pota-toolcheck.md +9 -0
  7. package/.agents/workflows/pota-uninstall.md +9 -0
  8. package/.agents/workflows/pota-upgrade.md +15 -0
  9. package/.agents/workflows/pota-work.md +24 -0
  10. package/.claude/agents/explorer.md +7 -0
  11. package/.claude/agents/worker.md +7 -0
  12. package/.claude/commands/pota-doctor.md +5 -0
  13. package/.claude/commands/pota-install.md +9 -0
  14. package/.claude/commands/pota-memory.md +5 -0
  15. package/.claude/commands/pota-plan.md +5 -0
  16. package/.claude/commands/pota-review.md +5 -0
  17. package/.claude/commands/pota-toolcheck.md +7 -0
  18. package/.claude/commands/pota-uninstall.md +5 -0
  19. package/.claude/commands/pota-upgrade.md +9 -0
  20. package/.claude/commands/pota-work.md +7 -0
  21. package/.codex-plugin/plugin.json +33 -0
  22. package/LICENSE +21 -0
  23. package/README.de.md +166 -0
  24. package/README.es.md +166 -0
  25. package/README.fr.md +166 -0
  26. package/README.ja.md +166 -0
  27. package/README.ko.md +184 -0
  28. package/README.md +191 -2
  29. package/README.pt.md +166 -0
  30. package/README.zh.md +166 -0
  31. package/agents/explorer.md +36 -0
  32. package/agents/worker.md +45 -0
  33. package/commands/pota-doctor.md +28 -0
  34. package/commands/pota-install.md +29 -0
  35. package/commands/pota-memory.md +17 -0
  36. package/commands/pota-plan.md +22 -0
  37. package/commands/pota-review.md +16 -0
  38. package/commands/pota-toolcheck.md +17 -0
  39. package/commands/pota-uninstall.md +27 -0
  40. package/commands/pota-upgrade.md +26 -0
  41. package/commands/pota-work.md +24 -0
  42. package/docs/model-guidance/README.md +67 -0
  43. package/docs/model-guidance/claude.md +49 -0
  44. package/docs/model-guidance/codex.md +68 -0
  45. package/hooks/hooks.json +65 -0
  46. package/package.json +47 -4
  47. package/scripts/pota +14 -0
  48. package/scripts/pota-auto-upgrade.mjs +342 -0
  49. package/scripts/pota-cleanup.mjs +194 -0
  50. package/scripts/pota-goal-cli.mjs +337 -0
  51. package/scripts/pota-goal-evidence.mjs +186 -0
  52. package/scripts/pota-goal-history.mjs +316 -0
  53. package/scripts/pota-goal-operations-evidence.mjs +213 -0
  54. package/scripts/pota-goal-operations-mutations.mjs +97 -0
  55. package/scripts/pota-goal-operations.mjs +281 -0
  56. package/scripts/pota-goal-policy.mjs +62 -0
  57. package/scripts/pota-goal-state-validation.mjs +361 -0
  58. package/scripts/pota-goal-state.mjs +136 -0
  59. package/scripts/pota-goal.mjs +69 -0
  60. package/scripts/pota-index.mjs +1052 -0
  61. package/scripts/pota-lifecycle-claude.mjs +173 -0
  62. package/scripts/pota-lifecycle-commands.mjs +418 -0
  63. package/scripts/pota-lifecycle-config.mjs +153 -0
  64. package/scripts/pota-lifecycle-hosts.mjs +98 -0
  65. package/scripts/pota-lifecycle-integrity.mjs +272 -0
  66. package/scripts/pota-lifecycle-layout.mjs +52 -0
  67. package/scripts/pota-lifecycle-lock.mjs +205 -0
  68. package/scripts/pota-lifecycle-mirror.mjs +83 -0
  69. package/scripts/pota-lifecycle-staging.mjs +156 -0
  70. package/scripts/pota-lifecycle-transaction-journal.mjs +244 -0
  71. package/scripts/pota-lifecycle-transaction-targets.mjs +119 -0
  72. package/scripts/pota-lifecycle-transaction.mjs +12 -0
  73. package/scripts/pota-lifecycle.mjs +244 -0
  74. package/scripts/pota-paths.mjs +190 -0
  75. package/scripts/pota-safe-fs.mjs +277 -0
  76. package/scripts/pota-state-context.mjs +281 -0
  77. package/scripts/pota-state-hook.mjs +26 -0
  78. package/scripts/pota-state-init.mjs +80 -0
  79. package/scripts/pota-state.mjs +245 -0
  80. package/scripts/pota-toolcheck-detect.mjs +229 -0
  81. package/scripts/pota-toolcheck-runtime.mjs +178 -0
  82. package/scripts/pota-toolcheck.mjs +221 -0
  83. package/scripts/pota-update-state.mjs +219 -0
  84. package/scripts/pota.mjs +200 -0
  85. package/skills/pota-memory/SKILL.md +52 -0
  86. package/skills/pota-plan/SKILL.md +66 -0
  87. package/skills/pota-plan/delegation.md +65 -0
  88. package/skills/pota-plan/heavy-path.md +28 -0
  89. package/skills/pota-plan/planning-rules.md +78 -0
  90. package/skills/pota-review/SKILL.md +56 -0
  91. package/skills/pota-work/SKILL.md +71 -0
  92. package/skills/pota-work/delegation.md +65 -0
  93. package/skills/pota-work/heavy-path.md +18 -0
  94. package/skills/pota-work/recovery.md +29 -0
  95. package/skills/pota-work/verification.md +79 -0
  96. package/templates/MEMORY.md +12 -0
  97. package/templates/PLAN.md +9 -0
  98. package/templates/domain-memory.md +22 -0
  99. package/templates/work-plan.md +177 -0
@@ -0,0 +1,177 @@
1
+ # Plan: <topic>
2
+
3
+ ## Plan Phase
4
+
5
+ - Initial: decision-complete for `triage-plan`; not implementation-ready.
6
+ - Finalized: decision-complete for implementation after planned triage.
7
+ - Codex UI synchronization: `update_plan` status and `create_goal` status, or an explicit unavailable reason.
8
+
9
+ ## Goal
10
+
11
+ Describe the observable result.
12
+
13
+ - Goal ID: `goal-<stable-id>`
14
+ - Plan ID: `plan-<stable-id>`
15
+ - Runtime resources: `pota://` resources resolved by the installed Pota version; do not record a user-specific absolute plugin path.
16
+ - Completion criteria (advisory text; Pota does not enforce it — completion is gated only by required evidence):
17
+ - Required goal evidence: `finalReview`
18
+ - Terminal state: `completed`, `paused`, `blocked`, or `cancelled` (an `active` goal is never complete).
19
+
20
+ ## Whole Work
21
+
22
+ - Outcome:
23
+ - Affected surfaces:
24
+ - Task classification:
25
+ - Sub-tasks, if needed:
26
+
27
+ ## Memory Inputs
28
+
29
+ - `MEMORY.md`
30
+ - `docs/memory/<domain>.md`
31
+ - Related completed plans: <docs/plan/<topic>.md | none related>
32
+
33
+ ## Model Guidance
34
+
35
+ - Applied model family: Codex or Claude.
36
+ - Referenced guidance:
37
+ - `pota://docs/model-guidance/README.md`
38
+ - `pota://docs/model-guidance/<claude-or-codex>.md`
39
+ - Rationale:
40
+ - Role-specific adjustment:
41
+ - User-visible response and artifact locale: OS locale unless the user asks for another language.
42
+
43
+ ## Reasoning Effort Profile
44
+
45
+ - Model: decided per task (fast `haiku` for read-only exploration/search/summarization; balanced `sonnet` for Light implementation and routine verification; stronger `opus` for planning, complexity triage, Heavy implementation, review, and final verification/review; strongest `fable` for Heavy design only, as a separate `kind: "design"` task dispatched to that tier rather than part of planning). Pass it through the host option on every dispatch (Claude Code: Agent `model`, never `fork`); re-dispatch one tier up (fast, balanced, stronger, strongest) if a lower-tier worker fails a gate; `Model routing: inherited` disables this. Effective model adds the exact model ID the worker reports from its own system prompt (`unreported` when absent; never guess). A re-dispatch that changes model or effort MUST be a new dispatch, never `SendMessage`. A design model below the host's strongest tier (`--host`: `fable`/`gpt-6-astra`/`pro`) fails completion unless `--allow-no-design-model <reason>`. Never change model/global config.
46
+ - Light Path: planning=`medium`, implementation=`medium`, verification=`medium`.
47
+ - Heavy Path: planning/review=`high`, implementation=`high`, final verification/review=`xhigh`.
48
+ - Host boundary: every new task/worker dispatch MUST pass the task's requested effort through the host option (Claude Code: Agent `effort`, never `fork`; Codex: host-native option). Recording without passing is a defect. Use `inherited` only when the host has no option.
49
+ - Route-change gate: synchronize the plan artifact, repository goal task roadmap through `goal replan`, native UI plan, and reasoning effort profile before edits resume. Completed task profiles are preserved as audit history; incomplete task profiles are recalculated for the new path.
50
+ - Every module task records:
51
+ - Requested model:
52
+ - Effective model: <applied value (reported model ID | unreported) | not-applied: reason | inherited: host has no option>
53
+ - Requested reasoning effort:
54
+ - Effective reasoning effort: <applied value | not-applied: reason | inherited: host has no option>
55
+
56
+ ## Complexity Triage
57
+
58
+ - Selected path: Light Path or Heavy Path.
59
+ - Selection rationale:
60
+ - Checkpoint ledger:
61
+ - Request checkpoint: provisional route, request/`MEMORY.md` evidence, uncertainty, and newly found Heavy Path signals.
62
+ - Planning checkpoint: post-exploration route, affected-surface/test evidence, and newly found Heavy Path signals.
63
+ - Code checkpoint: `pending` until exact files/callers/tests are inspected; record the final route immediately before the first edit.
64
+ - Route-change synchronization: before editing, evidence may change either route. Update the plan artifact, replace the incomplete repository goal task roadmap with `goal replan`, and update the native UI plan to the same stable task order, reviews, assignments, and required evidence before mutation.
65
+ - Late promotion: after editing begins, a new Heavy Path signal promotes Light Path to Heavy Path. Stop further edits, mark affected evidence stale, synchronize all three roadmaps, run newly required review, and repeat the code checkpoint before resuming.
66
+ - Heavy Path signals checked:
67
+ - New directory/module/layer:
68
+ - New domain model/service/abstraction:
69
+ - Security/auth/session:
70
+ - External API/message queue/payment:
71
+ - DB schema/migration:
72
+ - Concurrency/transaction/cache invalidation:
73
+ - Cross-domain refactor:
74
+ - Explicit extra-care signal:
75
+ - Heavy Path trigger, if selected:
76
+ - Omitted delegation in Light Path, if applicable:
77
+ - Pre-implementation decisions:
78
+
79
+ ### Path Criteria
80
+
81
+ - Light Path: narrow changes inside existing architecture layers. Direct edit or one bounded `worker`, then focused verification.
82
+ - Heavy Path: new directory/module/layer, new domain model/service/abstraction, security/session/auth, external API/message queue/payment, DB schema/migration, concurrency/transaction/cache changes, cross-domain refactor, or explicit extra-care request.
83
+
84
+ ## Agent Assignments
85
+
86
+ - `explorer`: read-only discovery, impact analysis, pattern search, and read-only verification when available.
87
+ - `worker`: bounded implementation tasks with clear file ownership, or scoped verification work.
88
+ - Local main session: urgent blocking work when the next step depends immediately on the result.
89
+
90
+ | Task | Agent | Route | model | dispatch effort |
91
+ | --- | --- | --- | --- | --- |
92
+ | `<task-id>` | `<agent>` | `light` or `heavy` | <tier/value passed via host option> | <value passed via host option> |
93
+
94
+ ## Tool Readiness
95
+
96
+ - Detected stack:
97
+ - Toolcheck command:
98
+ - Required LSP/symbol tools:
99
+ - Required typecheck/lint/verification tools:
100
+ - Missing tools:
101
+ - Install approval: not requested, approved, denied, or not needed.
102
+ - Install/bootstrap commands proposed or attempted:
103
+ - Tool blockers:
104
+
105
+ ## Execution Guardrails
106
+
107
+ - Test contract first: requirements, invariants, boundaries, failure modes, expected initial failure, and authoritative tool result.
108
+ - Token budget: high reasoning for plan/triage/test design; bounded minimum implementation; concise tool-derived verification summaries.
109
+ - Verification ladder: focused tests, one final full check, then package dry-run if no files changed. Inspect lifecycle scripts first; run normal `npm pack --dry-run` by default. Content-producing or unknown scripts must never use `--ignore-scripts`; only absent or proven content-neutral scripts may use it while evidence remains fresh.
110
+ - Evidence freshness: relevant changes after verification make affected evidence stale.
111
+ - Verification execution: `goal verify` defaults to 600,000 ms (10 minutes), is capped at 3,600,000 ms (1 hour), and records only when the starting goal/task identity and pre/post watched fingerprint match.
112
+ - Evidence boundary: choose the semantic boundary whose watch set and command prove the claimed behavior.
113
+ - Dry-run or check mode before external-state mutation:
114
+ - No dry-run available, if applicable:
115
+ - Verification loop budget: two passes per task by default.
116
+ - Failure handling: diagnose once, shrink the task or split it into sub-tasks, rerun both gates, then record a blocker after the second failed pass.
117
+
118
+ ## Module Tasks
119
+
120
+ ### Task 0: planned triage and plan finalization
121
+
122
+ - Task ID: `triage-plan`
123
+ - Initial status: `active`
124
+ - Requested model:
125
+ - Effective model: <applied value (reported model ID | unreported) | not-applied: reason | inherited: host has no option>
126
+ - Requested reasoning effort:
127
+ - Effective reasoning effort: <applied value | not-applied: reason | inherited: host has no option>
128
+ - Contract: execute the investigation scope and Heavy Path criteria declared by the initial plan, then update this file and the Codex UI plan to the decision-complete implementation revision.
129
+ - Required evidence records:
130
+ - `planArtifact`: command, exit code 0, timestamp, goal ID, task ID, and plan ID.
131
+ - `triageDecision`: command, exit code 0, timestamp, goal ID, task ID, and plan ID.
132
+
133
+ ### Task 1: <module>
134
+
135
+ - Task ID: `task-1`
136
+ - Initial status: `pending` or `active`
137
+ - Requested model:
138
+ - Effective model: <applied value (reported model ID | unreported) | not-applied: reason | inherited: host has no option>
139
+ - Requested reasoning effort:
140
+ - Effective reasoning effort: <applied value | not-applied: reason | inherited: host has no option>
141
+ - Contract:
142
+ - Sub-tasks, if needed:
143
+ - Files:
144
+ - Depends on (task ids):
145
+ - Write scope:
146
+ - Handoff files:
147
+ - Tool readiness requirement:
148
+ - Dry-run or check command:
149
+ - Module acceptance verification:
150
+ - Surface integration verification:
151
+ - Required evidence records:
152
+ - `moduleAcceptance`: command, exit code 0, timestamp, goal ID, task ID, and plan ID.
153
+ - `surfaceIntegration`: command or QA artifact, exit code 0, timestamp, goal ID, task ID, and plan ID.
154
+ - Assigned agent ID, if delegated:
155
+ - Blocker: a concrete reason is required when status becomes `blocked`.
156
+
157
+ ## Evidence
158
+
159
+ - Dry-run or check:
160
+ - Tool readiness:
161
+ - Tests:
162
+ - Module acceptance:
163
+ - Surface integration:
164
+ - Goal final review evidence record:
165
+ - Memory promotion: <docs/memory/<domain>.md | none: reason>
166
+ - Verification pass count:
167
+ - Blocker after two failed passes:
168
+
169
+ ## Status
170
+
171
+ - [ ] Planned
172
+ - [ ] Dry-run or check passed, or not applicable was recorded
173
+ - [ ] Implemented
174
+ - [ ] Module acceptance passed
175
+ - [ ] Surface integration passed
176
+ - [ ] Reviewed
177
+ - [ ] Goal completed, or an explicit paused/blocked/cancelled reason was recorded