gm-codex 2.0.888 → 2.0.889

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.
@@ -4,45 +4,37 @@ description: The required surface for any text task whose correctness depends on
4
4
  allowed-tools: Agent, Read, Write, Edit, Bash, Skill
5
5
  ---
6
6
 
7
- # Textprocessing — Meaning Goes Through Haiku
7
+ # Textprocessing — Meaning goes through Haiku
8
8
 
9
- ## INVOCATION
9
+ ## Invocation
10
10
 
11
11
  ```
12
12
  Agent(subagent_type='gm:textprocessing', model='haiku', prompt='## INPUT\n<body>\n\n## INSTRUCTION\n<task>')
13
13
  ```
14
14
 
15
- Background fire-and-forget: add `run_in_background=true`. Batch: N parallel `Agent` calls in ONE message, one per item.
15
+ Background fire-and-forget: add `run_in_background=true`. Batch: N parallel `Agent` calls in one message, one per item.
16
16
 
17
- ## WHEN TO USE — HARD RULE
17
+ ## The split
18
18
 
19
- Mechanics in code. Meaning through this skill.
19
+ Mechanics stay in code: char/word/token/line counts, byte length, split on delimiter, exact-string find/replace, regex match/extract, sort, group-by-key, dedup-by-equality, lower/uppercase, JSON parse/stringify, base64, URL encode, hash, diff, format/pretty-print.
20
20
 
21
- **Mechanics (code, not skill)**: char/word/token/line count, byte length, split on delimiter, exact-string find/replace, regex match/extract, sort, group-by-key, dedup-by-equality, lowercase/uppercase, JSON parse/stringify, base64, URL encode, hash, diff, format/pretty-print.
21
+ Meaning goes through this skill: summarize, classify, extract entities or intents, rewrite for tone or audience, translate, semantic dedup (same meaning, different words), rank or score by quality, label by topic, decide whether two texts are about the same thing, paraphrase, simplify, expand outline → prose, headline-from-body, body-from-headline, fact-from-passage, sentiment, toxicity, relevance, similarity-by-meaning.
22
22
 
23
- **Meaning (skill, not code)**: summarize, classify, extract entities/intents, rewrite for tone/audience, translate, semantic dedup (same meaning, different words), rank/score by quality, label by topic, decide if two texts are "about the same thing", paraphrase, simplify, expand outline prose, headline-from-body, body-from-headline, fact-from-passage, sentiment, toxicity, relevance, similarity-by-meaning.
23
+ The bar: would a human have to *read and understand* the text to do this correctly? Yes skill. No code. A keyword-list, a regex on phrases like "important", or a string-similarity ratio loop deciding meaning is a stub of this skill. Replace it with one (or N parallel) Agent calls.
24
24
 
25
- A code loop that decides meaning by keyword lists, regex on phrases like "important", or string-similarity ratios *is a stub of this skill*. Replace it with one (or N parallel) `Agent(textprocessing)` calls.
25
+ ## Batch
26
26
 
27
- The bar: would a human have to *read and understand* the text to do this correctly? Yes → skill. No code.
27
+ Independent items run in parallel one Agent call per item, all in one message. The runner Promise-allSettles. Sequential calls are wasteful when items don't depend on each other.
28
28
 
29
- ## BATCH PATTERN
29
+ For one large body exceeding a single-prompt budget, the *caller* chunks deterministically (paragraph, section, fixed token count), fans out one Agent per chunk, and merges with a final reducer Agent if cross-chunk synthesis is needed. The agent itself never chunks — it processes whatever it receives in one shot.
30
30
 
31
- Independent items run in parallel — one `Agent` call per item, all in ONE message. The runner Promise-allSettles. Sequential calls are wasteful and forbidden when items don't depend on each other.
31
+ ## Output contract
32
32
 
33
- For one large body exceeding a single-prompt budget: the *caller* chunks deterministically (by paragraph, section, fixed token count) and fans out one Agent per chunk, merges with a final reducer Agent if cross-chunk synthesis is needed. The agent itself never chunks it processes whatever it receives in one shot.
33
+ Plain-text instruction plain-text output, no fences, no labels. JSON instruction exactly that JSON, parseable by `JSON.parse`. Multi-document input requested as a list one entry per input doc in the same order. Ambiguous shape defaults to plain text. Empty input empty output.
34
34
 
35
- ## OUTPUT CONTRACT
35
+ ## Constraints
36
36
 
37
- Plain-text instruction plain-text output, no fences, no labels.
38
- JSON instruction (e.g. "return as a JSON array of `{id, label}`") exactly that JSON, parseable by `JSON.parse`.
39
- Multi-document input requested as a list one entry per input doc in the same order.
40
-
41
- If the prompt was ambiguous about output shape, the agent defaults to plain text. Empty input → empty output.
42
-
43
- ## CONSTRAINTS
44
-
45
- - Model fixed at `haiku`. Cheap and fast. Escalate to opus only when haiku output fails an acceptance check, never preemptively.
46
- - One transform per call. Don't ask one prompt to "summarize AND classify AND translate" — three calls in parallel is faster and the outputs are cleaner.
47
- - Idempotent: same input + same instruction → same output (modulo sampling). Callers needing strict determinism specify `temperature=0` in the prompt.
48
- - Never wraps output in commentary, explanation, or "here is your output". The output IS the deliverable.
37
+ - Model fixed at `haiku`. Escalate to opus only when haiku output fails an acceptance check.
38
+ - One transform per call. Three parallel calls beats one prompt asking for "summarize AND classify AND translate".
39
+ - Idempotent: same input + same instructionsame output, modulo sampling. Strict determinism callers specify `temperature=0` in the prompt.
40
+ - Output is the deliverable. No commentary, no "here is your output".
@@ -5,22 +5,22 @@ description: UPDATE-DOCS phase. Refresh README.md, AGENTS.md, and docs/index.htm
5
5
 
6
6
  # GM UPDATE-DOCS
7
7
 
8
- GRAPH: `PLAN EXECUTE EMIT VERIFY[UPDATE-DOCS]COMPLETE`
9
- Entry: feature verified, committed, pushed. From `gm-complete`.
8
+ Entry: feature verified, committed, pushed. Exit: docs match disk, committed, pushed COMPLETE. Unknown architecture change → `planning`.
10
9
 
11
- **FORWARD**: docs updated + committed + pushed COMPLETE
12
- **BACKWARD**: unknown architecture change → `planning`
10
+ Every claim in docs is verifiable against disk. Phase names match frontmatter, platform names match `platforms/`, file paths exist, constraint counts are accurate. An unverifiable section is removed, not speculated.
13
11
 
14
12
  ## Sequence
15
13
 
16
- **1 — What changed**:
14
+ What changed:
15
+
17
16
  ```
18
17
  exec:bash
19
18
  git log -5 --oneline
20
19
  git diff HEAD~1 --stat
21
20
  ```
22
21
 
23
- **2 — Read current docs**:
22
+ Read current docs:
23
+
24
24
  ```
25
25
  exec:nodejs
26
26
  const fs = require('fs');
@@ -30,35 +30,26 @@ const fs = require('fs');
30
30
  });
31
31
  ```
32
32
 
33
- **3 — Write changed sections only**:
33
+ Write changed sections only:
34
+
35
+ - **README.md** — platform count, skill tree diagram, quick-start commands
36
+ - **AGENTS.md** — via `Agent(subagent_type='gm:memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<learnings>')`. Never inline-edit.
37
+ - **docs/index.html** — `PHASES` array, platform lists, state machine diagram
38
+ - **gm-starter/agents/gm.md** — skill chain line if new skills added
34
39
 
35
- - **README.md**: platform count, skill tree diagram, quick start commands
36
- - **AGENTS.md**: via memorize sub-agent only — never inline-edit. `Agent(subagent_type='gm:memorize', model='haiku', run_in_background=true, prompt='## CONTEXT TO MEMORIZE\n<learnings>')`
37
- - **docs/index.html**: `PHASES` array, platform lists, state machine diagram
38
- - **gm-starter/agents/gm.md**: skill chain line if new skills added
40
+ Verify from disk:
39
41
 
40
- **4 — Verify from disk**:
41
42
  ```
42
43
  exec:nodejs
43
44
  const content = require('fs').readFileSync('/abs/path/file.md', 'utf8');
44
45
  console.log(content.includes('expectedString'), content.length);
45
46
  ```
46
47
 
47
- **5 — Commit and push**:
48
+ Commit and push:
49
+
48
50
  ```
49
51
  exec:bash
50
52
  git add README.md docs/index.html gm-starter/agents/gm.md
51
53
  git commit -m "docs: update documentation to reflect session changes"
52
54
  git push -u origin HEAD
53
55
  ```
54
-
55
- ## FIX ON SIGHT — HARD RULE
56
-
57
- Doc-write surfaces a stale claim, broken link, missing file referenced, or contradiction with disk → fix at root cause this turn (update doc to match disk, or fix code if disc is wrong). Never leave a known-false claim in docs. Push surfaces a CI failure → fix and re-push, do not declare complete.
58
-
59
- ## Fidelity Rules
60
-
61
- Every claim verifiable against disk: phase names match frontmatter, platform names match `platforms/`, file paths exist, constraint counts accurate. Unverifiable section → remove, don't speculate.
62
-
63
- **Never**: write from memory | push without disk verify | add comments | claim done without witnessed push
64
- **Always**: git diff first | read before overwriting | verify after write | push