jorgex-stack 1.0.23 → 1.0.25

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/README.md CHANGED
@@ -24,7 +24,7 @@ For development from a clone, run the same commands through `pnpm cli <command>`
24
24
 
25
25
  Every command supports `--dry-run`, `--yes`, and `--target-dir <dir>` for testing without touching the real config. Writes create automatic backups and verify idempotency; merges into user config are surgical (marked markdown sections, JSON/TOML upserts), so user-owned content is never touched.
26
26
 
27
- Permission defaults by runtime (what gets installed, what stays custom, and the read-anywhere limitations) are documented in [docs/references/permissions.md](docs/references/permissions.md).
27
+ Runtime defaults are documented in [docs/references/permissions.md](docs/references/permissions.md) for permissions and [docs/references/models.md](docs/references/models.md) for model selection, GPT-5.6 subagent tiers, and orchestrator inheritance.
28
28
 
29
29
  ### Modes: Human and Programmatic
30
30
 
package/dist/cli.js CHANGED
@@ -179,21 +179,22 @@ function resolveAgentModel(models, agentName, tier) {
179
179
  }
180
180
  var DEFAULT_MODEL_MAP = {
181
181
  opencode: {
182
- strong: { model: "openai/gpt-5.4", variant: "high" },
183
- standard: { model: "openai/gpt-5.4-mini", variant: "high" },
184
- cheap: { model: "minimax/MiniMax-M3" }
182
+ strong: { model: "openai/gpt-5.6-terra", variant: "xhigh" },
183
+ standard: { model: "openai/gpt-5.6-terra", variant: "xhigh" },
184
+ cheap: { model: "openai/gpt-5.6-luna", variant: "medium" }
185
185
  },
186
186
  "claude-code": {
187
187
  strong: { model: "fable" },
188
188
  standard: { model: "sonnet" },
189
189
  cheap: { model: "haiku" }
190
190
  },
191
- // Codex: "default" = no fijar modelo (usa el del CLI, que OpenAI actualiza
192
- // solo D6); variant model_reasoning_effort.
191
+ // El primary (orchestrator) no usa estos tiers: tanto el profile de CLI como
192
+ // la skill de la app heredan el modelo elegido por el usuario. Estos defaults
193
+ // son solo para subagentes; variant → model_reasoning_effort.
193
194
  codex: {
194
- strong: { model: "default", variant: "high" },
195
- standard: { model: "default", variant: "medium" },
196
- cheap: { model: "default", variant: "low" }
195
+ strong: { model: "gpt-5.6-terra", variant: "xhigh" },
196
+ standard: { model: "gpt-5.6-terra", variant: "xhigh" },
197
+ cheap: { model: "gpt-5.6-luna", variant: "medium" }
197
198
  }
198
199
  };
199
200
  function modelMapFile() {
@@ -2842,7 +2843,15 @@ import * as p5 from "@clack/prompts";
2842
2843
  var TIERS = ["strong", "standard", "cheap"];
2843
2844
  var EFFORTS = ["low", "medium", "high", "xhigh"];
2844
2845
  var CLAUDE_ALIASES = ["fable", "opus", "sonnet", "haiku", "inherit"];
2845
- var CODEX_MODELS = ["default", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini"];
2846
+ var CODEX_MODELS = [
2847
+ "default",
2848
+ "gpt-5.6-sol",
2849
+ "gpt-5.6-terra",
2850
+ "gpt-5.6-luna",
2851
+ "gpt-5.5",
2852
+ "gpt-5.4",
2853
+ "gpt-5.4-mini"
2854
+ ];
2846
2855
  var CODEX_CUSTOM = "__custom__";
2847
2856
  var CANCEL = /* @__PURE__ */ Symbol("cancel");
2848
2857
  function opencodeLiveModels(binPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jorgex-stack",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "Harness multi-agente portable: instala la config JorgeX (agentes, skills, hooks, Engram, MCPs) en Claude Code, Codex CLI y OpenCode",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -99,7 +99,7 @@ The `work-lifecycle` skill is the single source of this flow. Summary — every
99
99
  - `work/{name}/` (gitignored, exists only while the work is in progress) holds the human-reviewed artifacts: `PRD.md` and `plan.md`. They stay resident across intermediate PR merges; `plan.md` is the ONLY task status board — flip statuses with surgical edits; don't re-read the whole plan after every task (re-read it on resume).
100
100
  - The full spec of each atomic task → Engram, one `mem_save` per task under `work/{name}/task/{NN}`. When you delegate a task, pass the subagent its topic_key + title — never the task content inline; it retrieves the spec itself.
101
101
  - Phase outcomes, decisions and PR checkpoints → Engram under `work/{name}/{phase}` and `work/{name}/pr/{NN}`; tell each subagent which topic_key to use for its saves.
102
- - Pending work → the project's single `work/backlog` topic_key (one upserted list), or issues (`to-issues`) if the project uses a tracker. Never a TODOs folder.
102
+ - Pending work → the project's single `work/backlog` topic_key, or issues (`to-issues`) if the project uses a tracker. Never a TODOs folder. For Engram, you are the **single writer**: before every change, retrieve the exact observation with `mem_get_observation`, preserve unrelated entries, send the complete content with `mem_update`, then read it again to verify. Never write it concurrently or use a blind topic-key upsert. Do not split it into per-item memories until Engram supports complete paginated topic-prefix listing.
103
103
  - On final close: `mem_save` the outcome under `work/{name}/done`, move the PRD to the project's docs only if it has lasting documentation value, then delete `work/{name}/`. `work/{name}/done` is only for the last PR / final outcome. History is memory + git.
104
104
 
105
105
  ## Delegation map
@@ -173,7 +173,7 @@ When the plan is fully applied and VERIFY passes:
173
173
  - **Critical Issues (must fix)**: apply ALL of them — the PR must not reach merge with these open.
174
174
  - **Important Improvements (should fix)**: apply the ones worth doing now, at your judgment.
175
175
  - **Suggestions (nice to have)**: apply only if trivial and safe.
176
- 3. Every finding you decide NOT to apply now goes to the project's `work/backlog` single topic_key — one line each: what + why deferred.
176
+ 3. Every finding you decide NOT to apply now goes to the project's `work/backlog` single topic_key — one line each: what + why deferred. Apply the safe serialized backlog protocol above; subagents only return candidate lines.
177
177
  4. For what you DO apply: add the new tasks to plan.md and one `mem_save` per task spec, execute them as in EXECUTE, re-verify, and push the fixes to the PR branch.
178
178
  5. The review fires once per PR creation — pushing fixes does not re-trigger it. Re-run `/xreview` only if the fixes were large.
179
179
 
@@ -21,7 +21,7 @@ Every piece of work gets a **canonical kebab-case name** when it starts (e.g. `c
21
21
  | PR checkpoint outcome | Engram `work/{name}/pr/{NN}` | Intermediate PR merge record |
22
22
  | Phase outcomes, decisions, findings | Engram `work/{name}/{phase}` | History — must survive the folder and compactions |
23
23
  | Final outcome | Engram `work/{name}/done` | Permanent record of what shipped after the last PR |
24
- | Pending / backlog items | Engram `work/backlog` — ONE key per project | All pending ideas in a single upserted list |
24
+ | Pending / backlog items | Engram `work/backlog` — ONE key per project | All pending ideas in one serialized list |
25
25
 
26
26
  `work/` is **scaffolding, not product**: add it to the project's `.gitignore`. It contains ONLY work in progress — an empty `work/` means nothing is half-done. No `1-TODOs/`, no `3-finalized/`, no phase subfolders.
27
27
 
@@ -51,7 +51,18 @@ When presenting the PRD or the plan for human review on non-trivial work, OFFER
51
51
 
52
52
  ## Pending work (backlog)
53
53
 
54
- All pending or future work of a project lives under the SINGLE topic_key `work/backlog` (upsert): one list, each item a short title + one-liner. Never one topic_key per idea, never a TODOs folder. When an item starts, it graduates: remove it from the backlog and create its `work/{name}/`. Review findings deliberately NOT applied also land here, one line each (what + why deferred).
54
+ All pending or future work of a project lives under the SINGLE topic_key `work/backlog`: one list, each item a short title + one-liner. Never one topic_key per idea, never a TODOs folder. When an item starts, it graduates: remove it from the backlog and create its `work/{name}/`. Review findings deliberately NOT applied also land here, one line each (what + why deferred).
55
+
56
+ ### Safe backlog mutation
57
+
58
+ Engram replaces an observation's complete content on both `mem_update` and a `mem_save` topic-key upsert. Until Engram offers complete, paginated listing by topic-key prefix, use this serialized protocol for every backlog add, edit or removal:
59
+
60
+ 1. The active coordinator/orchestrator is the **single writer**. Subagents return candidate backlog lines; they never mutate `work/backlog` themselves. Never run backlog writes concurrently.
61
+ 2. Find the exact `work/backlog` observation, then call `mem_get_observation` to read its full, untruncated content. If it does not exist, create it once with `mem_save`.
62
+ 3. Change only the intended lines while preserving every unrelated entry, then call `mem_update` on that exact observation ID with the **complete content**. Never send only the delta and never use a blind `mem_save` upsert for an existing backlog.
63
+ 4. Call `mem_get_observation` again and **verify** both the intended change and the preserved entries.
64
+
65
+ Engram has no atomic append or compare-and-swap, so concurrent writers can still lose data even if both read first. Do not split items into `work/backlog/{slug}` yet: `mem_search` is capped and has no paginated topic-prefix listing, so older active items could become invisible. Once that capability exists, one observation per item is the preferred migration. If the project has an issue tracker, use issues instead now and do not keep an Engram backlog too.
55
66
 
56
67
  If the project manages work through an issue tracker, issues (`to-issues`) take this role instead — don't keep both.
57
68
 
@@ -91,6 +102,7 @@ For single-PR work, the PR checkpoint and final work close happen together: one
91
102
  - Don't mix several distinct pieces of work under the same name/topic_key.
92
103
  - Same evolving phase → same topic_key (upsert). Different phases and different tasks must not overwrite each other.
93
104
  - Never persist the same artifact in two homes — no file + memory copies, no hybrid writes.
105
+ - Treat `work/backlog` as the exceptional serialized list described above; ordinary topic-key upserts are not a safe substitute for its read-modify-write protocol.
94
106
 
95
107
  ## Legacy `work/` folders
96
108
 
@@ -161,7 +161,7 @@ Status, wave and dependencies live in the plan.md table (single home) — do NOT
161
161
 
162
162
  ## Backlog entry — Template (`work/backlog`)
163
163
 
164
- ONE observation per project holds every pending idea (topic_key `work/backlog`, upserted). Each item is just:
164
+ ONE observation per project holds every pending idea (topic_key `work/backlog`). Each item is just:
165
165
 
166
166
  ```markdown
167
167
  - **[short title]** — [one-line description of the idea and its value]
@@ -169,6 +169,8 @@ ONE observation per project holds every pending idea (topic_key `work/backlog`,
169
169
 
170
170
  When an item starts, remove it from this list and create its `work/[name]/`.
171
171
 
172
+ Mutation is serialized: the coordinator is the single writer, reads the exact observation with `mem_get_observation`, preserves all unrelated lines, sends the complete content through `mem_update`, then reads it again to verify. Never send a delta or use a blind topic-key upsert. See **Safe backlog mutation** in the parent skill for the full protocol and the current reason not to use one observation per item.
173
+
172
174
  ---
173
175
 
174
176
  ## Task creation rules
@@ -93,7 +93,7 @@ Every piece of information about a piece of work has exactly ONE home — never
93
93
  - In-progress work lives in `work/{name}/` (gitignored): `PRD.md` + `plan.md`. They stay there across intermediate PR merges; `plan.md` is the ONLY task status board — update statuses with surgical edits. An empty `work/` means nothing is half-done.
94
94
  - Execution worktrees and their branches always use the same name. Resolve the root with `git rev-parse --show-toplevel`, ensure `worktrees/` is ignored in the repo-local `.git/info/exclude`, then create/use `<project-root>/worktrees/<canonical-name>` for single-PR work or `<project-root>/worktrees/<canonical-name>-prNN` for multi-PR checkpoints; never create worktrees next to the repo, in the repo root, under `work/`, or in external temp/shared folders.
95
95
  - Full task specs, phase outcomes, PR checkpoints and history live in Engram: `work/{name}/task/{NN}`, `work/{name}/{phase}`, `work/{name}/pr/{NN}`, `work/{name}/done`. Subagents receive a topic_key + title, never the task content inline.
96
- - Pending work: the project's single `work/backlog` topic_key (one upserted list — never one key per idea), or issues (`to-issues`) if the project uses a tracker. Never a TODOs folder.
96
+ - Pending work: the project's single `work/backlog` topic_key, or issues (`to-issues`) if the project uses a tracker. Never a TODOs folder. The coordinator/orchestrator is its **single writer**: retrieve the exact observation with `mem_get_observation`, preserve unrelated entries, send the complete content with `mem_update`, then read it again to verify; never mutate it concurrently or use a blind topic-key upsert. Do not split it into one memory per item until Engram supports complete paginated topic-prefix listing.
97
97
  - On intermediate PR merge: save the checkpoint under `work/{name}/pr/{NN}` and keep `work/{name}/` alive for the remaining PRs.
98
98
  - On final close: save the outcome under `work/{name}/done`, move the PRD to the project's docs only if it has lasting value, then delete `work/{name}/`. `work/{name}/done` is the final outcome only. History is memory + git — no archive folders.
99
99
 
@@ -42,6 +42,8 @@ Use the `engram` subagent for non-trivial memory reads — it filters and return
42
42
 
43
43
  Work tracking follows the `work-lifecycle` skill: `work/{name}/plan.md` (file) is the only status board; memory holds the task specs (`work/{name}/task/{NN}`), phase outcomes (`work/{name}/{phase}`), PR checkpoints (`work/{name}/pr/{NN}`), and the final outcome in `work/{name}/done` only after the last PR; the project backlog stays under the single key `work/backlog`. Subagents retrieve their task by the topic_key the orchestrator passes them and save their phase outcome under the topic_key they were given BEFORE their final report.
44
44
 
45
+ `work/backlog` has a stricter mutation rule because Engram replaces complete content rather than applying a patch. The coordinator/orchestrator is the **single writer**; subagents only return candidates. Before every add, edit or removal, locate the exact observation and call `mem_get_observation`; preserve all unrelated entries, pass the complete content to `mem_update`, then read it again to verify. Never write it concurrently and never use a blind `mem_save` upsert. Separate `work/backlog/{slug}` memories are not safe yet because Engram lacks complete paginated topic-prefix listing; use tracker issues instead when available.
46
+
45
47
  ## Before ending a session
46
48
 
47
49
  Call `mem_session_summary` with: Goal, Instructions, Discoveries, Accomplished, Next Steps, Relevant Files. This is NOT optional — without it the next session starts blind.