@gtrabanco/pi-agentic-workflow 0.16.0 → 0.18.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.
@@ -9,6 +9,13 @@ export interface RecommendedProfile {
9
9
  /**
10
10
  * Built-in model profiles keyed by provider identifier.
11
11
  * Only these four models are ever used: nan/glm5.3, nan/glm5.3-flash,
12
- * nan/deepseek-v4-flash, nan/mimo-v2.5.
12
+ * nan/deepseek-v4-flash, nan/mimo-v2.6-flash.
13
+ *
14
+ * The judgment slots (audit-pr, product-audit, review-change, unit-lane) use
15
+ * the Xiaomi family for reviewer independence from the DeepSeek/GLM executors;
16
+ * mimo-v2.6-flash supersedes mimo-v2.5 there (same family, same 1.0B quota,
17
+ * OpenAI-`tools`-native, stronger on the shared coding/agentic benchmarks).
18
+ * Keep this list in step with the README's NaN guidance — there is no test
19
+ * asserting that parity, only the expectations in test/model-profiles.test.mjs.
13
20
  */
14
21
  export declare const RECOMMENDED_PROFILES: Readonly<Record<string, RecommendedProfile>>;
@@ -3,16 +3,23 @@ export const RECOMMENDED_PROVIDERS = ["nan"];
3
3
  /**
4
4
  * Built-in model profiles keyed by provider identifier.
5
5
  * Only these four models are ever used: nan/glm5.3, nan/glm5.3-flash,
6
- * nan/deepseek-v4-flash, nan/mimo-v2.5.
6
+ * nan/deepseek-v4-flash, nan/mimo-v2.6-flash.
7
+ *
8
+ * The judgment slots (audit-pr, product-audit, review-change, unit-lane) use
9
+ * the Xiaomi family for reviewer independence from the DeepSeek/GLM executors;
10
+ * mimo-v2.6-flash supersedes mimo-v2.5 there (same family, same 1.0B quota,
11
+ * OpenAI-`tools`-native, stronger on the shared coding/agentic benchmarks).
12
+ * Keep this list in step with the README's NaN guidance — there is no test
13
+ * asserting that parity, only the expectations in test/model-profiles.test.mjs.
7
14
  */
8
15
  export const RECOMMENDED_PROFILES = {
9
16
  nan: {
10
17
  default: { model: ["nan/deepseek-v4-flash", "nan/glm5.3-flash"], thinking: "inherit" },
11
18
  commands: {
12
- "audit-pr": { model: ["nan/mimo-v2.5", "nan/deepseek-v4-flash"], thinking: "high" },
13
- "product-audit": { model: ["nan/glm5.3", "nan/mimo-v2.5", "nan/deepseek-v4-flash"], thinking: "high" },
14
- "review-change": { model: ["nan/mimo-v2.5", "nan/glm5.3-flash", "nan/deepseek-v4-flash"], thinking: "high" },
15
- "unit-lane": { model: ["nan/mimo-v2.5", "nan/glm5.3-flash", "nan/deepseek-v4-flash"], thinking: "high" },
19
+ "audit-pr": { model: ["nan/mimo-v2.6-flash", "nan/deepseek-v4-flash"], thinking: "high" },
20
+ "product-audit": { model: ["nan/glm5.3", "nan/mimo-v2.6-flash", "nan/deepseek-v4-flash"], thinking: "high" },
21
+ "review-change": { model: ["nan/mimo-v2.6-flash", "nan/glm5.3-flash", "nan/deepseek-v4-flash"], thinking: "high" },
22
+ "unit-lane": { model: ["nan/mimo-v2.6-flash", "nan/glm5.3-flash", "nan/deepseek-v4-flash"], thinking: "high" },
16
23
  "triage-issue": { model: ["nan/glm5.3-flash", "nan/deepseek-v4-flash"], thinking: "inherit" },
17
24
  "init-workspace": { model: ["nan/glm5.3-flash", "nan/deepseek-v4-flash"], thinking: "inherit" },
18
25
  "execute-phase": { model: ["nan/deepseek-v4-flash", "nan/glm5.3-flash"], thinking: "inherit" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtrabanco/pi-agentic-workflow",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Pi package: canonical agentic-workflow skills, friendly slash commands, and per-command model routing.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: init-workspace
3
3
  user-invocable: true
4
- version: 3.0.1
4
+ version: 3.2.0
5
5
  argument-hint: <target-dir>
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -58,7 +58,7 @@ Inspect the target dir (`[target-dir]`, default cwd) before touching anything:
58
58
 
59
59
  ## Progressive loading — bootstrap or upgrade, never both
60
60
 
61
- The reference allowlist is exactly the four linked paths below. Never invent or
61
+ The reference allowlist is exactly the five linked paths below. Never invent or
62
62
  read another `references/` path. Step 0 selects exactly one route:
63
63
 
64
64
  **Hard rule for an existing Claude Code, Cursor, Copilot, or OpenCode
@@ -69,8 +69,12 @@ or portability unless the runtime platform has no named adapter at all.
69
69
  - Bare/foreign repository: read
70
70
  [bootstrap discovery](references/BOOTSTRAP_DISCOVERY.md), complete its
71
71
  interview, then read [bootstrap write](references/BOOTSTRAP_WRITE.md).
72
+ Both the discovery and write routes load
73
+ [SERENA language servers](references/SERENA.md) for stack detection.
72
74
  - Existing agentic-workflow scaffold: read [upgrade](references/UPGRADE.md)
73
75
  only. Its additive-only rule is absolute; do not replay bootstrap.
76
+ The upgrade route loads [SERENA language servers](references/SERENA.md)
77
+ for the additive provisioning step.
74
78
  - No named adapter exists for the detected runtime platform: add
75
79
  [portability](references/PORTABILITY.md) only for that fallback. Claude Code,
76
80
  Cursor, Copilot, and OpenCode are named supported adapters; a missing adapter
@@ -99,6 +103,12 @@ loads exactly upgrade and skips bootstrap plus portability.
99
103
  on its own. **The urgency label seeding is additive-only the same way:**
100
104
  create a missing `urgent`/`fix-next` label, never touch one that already
101
105
  exists (name, color, or description a project already customized).
106
+ - **Serena convention.** `.serena/project.yml` is committed; `project.local.yml`
107
+ and `cache` stay local. Never write `.serena/` config without consent. LSP
108
+ never verifies documents — false positives happen when a file type's server
109
+ is not listed (markdown/yaml/json are never auto-detected), and a listed
110
+ server that fails to start must be removed (one failure disables every
111
+ server in the project). Document verification is a script's job.
102
112
  - **Never redefine the urgency label vocabulary here.** `skills/triage-issue
103
113
  /SKILL.md` is the sole owner of the `urgent`/`fix-next` names, colors, and
104
114
  apply rules — this skill only seeds those two labels into the repo; it never
@@ -178,6 +188,8 @@ OpenCode adapter does not load this fallback.
178
188
  listed as a residual when its hook API/dependency was unavailable.
179
189
  The adaptive lane conventions (unit document, triage, catalog steps, guards,
180
190
  evidence, commit formats) are written into AGENTS.md.
191
+ - The Serena project config is provisioned (or reported as a residual with the
192
+ reason, and the health check ran).
181
193
  - **The closing `→ Next:` block is printed** (plus the offer to install the skills):
182
194
 
183
195
  ```
@@ -67,4 +67,5 @@
67
67
  means Starlight). If no, leave the block commented out —
68
68
  then reports NOT-CONFIGURED instead of guessing. Never scaffold the
69
69
  website itself.
70
- - **Naming conventions** and **MCP servers**, if any.
70
+ - **Naming conventions**, **MCP servers**, and **Serena language servers** (see
71
+ [SERENA](SERENA.md) for the mapping), if any.
@@ -21,11 +21,17 @@
21
21
  optional: an absent document means no project invariants are declared, not
22
22
  that the scaffold failed. If retained, add its documentation-map row and
23
23
  name the project's explicit architectural-decision authority.
24
- 6. **Propagate the unit doc template.** Ensure
24
+ 7. **Propagate the unit doc template.** Ensure
25
25
  `docs/features/_TEMPLATE/SPEC.md` exists with all 13 mandatory sections.
26
26
  This is the template used when creating new unit documents.
27
-
28
- 7. **Install accepted agent safety hooks.** Keep the canonical policy and
27
+ 8. **Provision the Serena project config.** Load
28
+ [SERENA](SERENA.md), ask consent, then: (a) append the `.gitignore`
29
+ block additively (skip when already present); (b) write `.serena/project.yml`
30
+ with the `language_servers` list for every detected language (never overwrite
31
+ an existing file — report it); (c) run the health check from SERENA.md and
32
+ record the result. If Serena is not installed, offer install or record as a
33
+ residual.
34
+ 9. **Install accepted agent safety hooks.** Keep the canonical policy and
29
35
  fullauto wrapper at `.agentic-workflow/hooks/`. Seed the shipped
30
36
  path-protection policy at `.agentic-workflow/path-policy.json` and its doc
31
37
  page at `.agentic-workflow/path-protection.md`, beside the hooks — the
@@ -38,10 +44,10 @@
38
44
  an unknown payload, or an existing customized hook file becomes a residual,
39
45
  never a silent overwrite. Direct merges remain blocked; do not create a
40
46
  `.automerge` exception.
41
- 8. **Offer the workflow skills.** Propose installing them:
47
+ 10. **Offer the workflow skills.** Propose installing them:
42
48
  `npx skills add gtrabanco/agentic-workflow` (note the SSH/local-path variant if
43
49
  the source is private). Don't install without a yes.
44
- 9. **State that reviews are self-contained; offer optional extras.** The
50
+ 11. **State that reviews are self-contained; offer optional extras.** The
45
51
  workflow ships its **own internal review pack** (`review-code`,
46
52
  `review-security`, `review-verify`, `review-debt`, `review-design`,
47
53
  `review-a11y`, `review-brand`, `review-perf`, `review-seo`) — it installs
@@ -51,7 +57,7 @@
51
57
  under a short "Optional review extras" note so `review-change` and
52
58
  `product-audit` run them **in addition** — never as a dependency. Don't
53
59
  install anything without a yes.
54
- 10. **Seed the urgency labels (feature 15, injection-safe urgency).** Create the
60
+ 12. **Seed the urgency labels (feature 15, injection-safe urgency).** Create the
55
61
  two capability-gated GitHub labels `triage-issue` owns and applies
56
62
  (`skills/triage-issue/SKILL.md` is the sole owner of the name/color
57
63
  vocabulary — this step only seeds it, never redefines it):
@@ -64,7 +70,7 @@
64
70
  forge is unavailable or the user declines forge setup, skip this step and
65
71
  list the two labels as a residual for the user to create manually later
66
72
  (never fail the whole scaffold on it).
67
- 12. **Report.** List what was created, which placeholders still need human input,
73
+ 13. **Report.** List what was created, which placeholders still need human input,
68
74
  the companion skills recorded/installed, the urgency labels seeded (or
69
75
  skipped, with reason), and the next step:
70
76
  `discover-repository-state` → `/unit-lane` (or `workflow-status`) → catalog
@@ -0,0 +1,133 @@
1
+ ## Why this step exists
2
+
3
+ LSP-backed navigation and verification must actually work. A project-local
4
+ `.serena/project.yml` that pins the wrong `language_servers` silently disables
5
+ the server, and every symbol call then times out with
6
+ `Language server status: not initialized` (verified 2026-09-24 in this
7
+ repository).
8
+
9
+ ## The convention this file owns
10
+
11
+ - `.serena/project.yml` is **committed** to version control (the project's
12
+ config, not a dev-local override).
13
+ - `.serena/project.local.yml` and `.serena/cache/` stay local (tool-internal
14
+ state).
15
+ - The target's `.gitignore` must therefore ignore every `.serena` tree **except
16
+ the root `project.yml`** — the block below enforces that.
17
+
18
+ ## What to write into the target .gitignore
19
+
20
+ When the target's `.gitignore` does not already contain the block below, append
21
+ it (additive only — see rules below):
22
+
23
+ ```text
24
+ # Ignore every .serena tree (tool-local state); version ONLY the root project
25
+ # config. Serena's own .serena/.gitignore keeps cache and per-dev overrides local.
26
+ **/.serena/
27
+ !.serena/
28
+ .serena/*
29
+ !.serena/project.yml
30
+ ```
31
+
32
+ **Rules:**
33
+
34
+ - **Additive only** — append the block when it is absent.
35
+ - If the target already ignores `.serena` wholesale (e.g. `.serena/` without
36
+ an `!` carve-out), **propose the narrowing** and apply it **only with consent**.
37
+ - **Never rewrite unrelated lines.** Only touch the `.serena` block.
38
+ - **Idempotent** — skip when the exact block (all four lines) is already
39
+ present.
40
+
41
+ ## Language servers for the detected stack
42
+
43
+ Write language servers in this order: **fixed entries first** (always written,
44
+ regardless of the target), then **detected entries** (from Step 0 signals).
45
+
46
+ ### Fixed entries — always written
47
+
48
+ | Entry | Why always |
49
+ |---|---|
50
+ | `markdown` | Every scaffolded project has `docs/` and `.md` files (this workflow's own documentation is Markdown) |
51
+ | `json` | Manifests and tool config (`package.json`, `tsconfig.json`, settings) exist in nearly every stack |
52
+
53
+ ### Never auto-detected rule
54
+
55
+ **`markdown`, `yaml`, and `json` are never auto-detected by Serena — they must
56
+ appear in `language_servers` explicitly, or requests for those file types fall
57
+ back to another server and produce false positives** (e.g. TypeScript diagnostics
58
+ on a `.yml`). Every server listed above (and `yaml` when `.yml`/`.yaml` files
59
+ are present) is explicit-only.
60
+
61
+ ### Detected entries — append when present
62
+
63
+ | Detected | Entry |
64
+ |---|---|
65
+ | `.yml` / `.yaml` files present (CI workflows, config) | `yaml` |
66
+ | `package.json` / `tsconfig.json` (TypeScript or JavaScript) | `typescript` |
67
+ | `pyproject.toml` / `requirements.txt` | `python` |
68
+ | `go.mod` | `go` |
69
+ | `Cargo.toml` | `rust` |
70
+ | `pom.xml` / `build.gradle` | `java` |
71
+ | `Gemfile` | `ruby` |
72
+ | `composer.json` | `php` |
73
+ | `CMakeLists.txt` / `Makefile` (C/C++) | `cpp` |
74
+ | `.csproj` / `.sln` | `csharp` |
75
+ | shell-dominant repo (`*.sh` prevalent) | `bash` |
76
+
77
+ The authoritative list of valid values is Serena's own `ls_config.py`
78
+ (`LanguageServerId`). An id Serena does not know about is silently ignored by
79
+ Serena — **the health check below is what proves the list is correct.**
80
+
81
+ ## Ask first
82
+
83
+ Never write `.serena/` or `.gitignore` without an explicit yes, and report
84
+ exactly what was written. (This matches the skill's existing installation-consent
85
+ rule.)
86
+
87
+ ## Health check — fail closed at the claim
88
+
89
+ After activation, confirm **each listed server** initialised by asking Serena
90
+ for the project status and verifying `Language server status: initialized` for
91
+ every language in `language_servers`. If a server did not initialise, the
92
+ check names the offending entry. Removing a failing entry (per the startup
93
+ rule below) is the correct remediation — never leave a dead entry in the file.
94
+ **Never claim LSP evidence for a run whose server never started.**
95
+
96
+ ### Startup rule (critical)
97
+
98
+ > **A server that fails to start must not stay listed.** One failing entry
99
+ > disables the whole language-server manager — every symbol call for the
100
+ > project then fails with `Language server manager is not initialized`.
101
+ > After writing the config, the health check must confirm **every** listed
102
+ > server started; any entry that fails is removed from `language_servers`
103
+ > and recorded as a residual with its exact error (e.g. `markdown`: marksman
104
+ > needs the system `libicu` package).
105
+
106
+ ## When a server is missing or fails
107
+
108
+ `markdown`, `yaml`, and `json` servers exist but are explicit-only and
109
+ experimental: they must be listed by hand or requests fall back and produce
110
+ false positives.
111
+
112
+ - **Missing (not listed)** → fallback server answers → false positives for that
113
+ file type (e.g. TypeScript diagnostics on a `.yml`).
114
+ - **Failing (listed but broken)** → whole manager down → every symbol call
115
+ fails with `Language server manager is not initialized`. Remediation: remove
116
+ the entry from `language_servers` and record the residual (e.g. `markdown`:
117
+ marksman needs the system `libicu` package).
118
+
119
+ Document verification (schema rules like required sections/columns) stays a
120
+ deterministic script's job regardless — LSP serves navigation and diagnostics,
121
+ not our document grammar. `node`+`npm` are required for json/yaml; `libicu` is
122
+ required for marksman.
123
+
124
+ ## Tool install is a different step
125
+
126
+ This file owns the **project config**, not the tool. If Serena is not installed,
127
+ offer the install (ask-first; `uv`/`uvx` preferred, `pipx` fallback) or record
128
+ it as a residual. The install half is tracked by #219.
129
+
130
+ ## Degraded path
131
+
132
+ Serena unavailable → warn once, continue, and record the absence in the unit's
133
+ evidence. **Never block a run on it.**
@@ -4,7 +4,7 @@ Entered when Step 0 finds an existing **agentic-workflow scaffold** (not a
4
4
  bare or foreign repo). Bootstrap mode (the Process section above) never
5
5
  engages here — upgrade mode reuses the same discovery + interview machinery,
6
6
  scoped to **only the blocks the current template has that this project
7
- lacks**. Eight ordered steps:
7
+ lacks**. Nine ordered steps:
8
8
 
9
9
  1. **Locate the current template.** Fetch the current `template/` the same
10
10
  way bootstrap does — `npx degit gtrabanco/agentic-workflow/template <temp-dir>`
@@ -91,7 +91,15 @@ lacks**. Eight ordered steps:
91
91
  never touch a label that already exists (additive-only, same never-clobber
92
92
  rule as the doc blocks; a pre-existing `urgent`/`fix-next` label the
93
93
  project recolored or redescribed is left exactly as-is).
94
- 8. **Report + hand off.** Summarize blocks added, filled, and skipped
94
+
95
+ 8. **Provision the Serena project config, additively only (Refs #219).** Load
96
+ [SERENA](SERENA.md). Append the `.gitignore` block only if the target
97
+ does not already contain it. Write `.serena/project.yml` only if it is
98
+ absent — never touch an existing one. Report what was skipped and why.
99
+ Run the health check and record the result. If Serena is not installed,
100
+ offer install or record as a residual. This step is additive-only; it
101
+ never rewrites or deletes, consistent with upgrade mode's rule.
102
+ 9. **Report + hand off.** Summarize blocks added, filled, and skipped
95
103
  (residuals), the legacy `CLAUDE.md` outcome (folded items and removed, or kept
96
104
  with the reason), the urgency labels seeded (or already present), then print the
97
105
  recommendation to run `product-audit` next to see which newly-available
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: log-session
3
3
  user-invocable: true
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  argument-hint: "[note to prepend to the entry]"
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -23,8 +23,10 @@ Capture the *why* and the *what-next* of a working session — the context that
23
23
  git history alone never records. A commit says what changed; a session log says
24
24
  what you were trying to do, what you decided, and where to resume.
25
25
 
26
- Deliberately cheap (`sonnet`/`medium`): this is structured summarization, not
27
- judgment. It must never reach for an expensive model.
26
+ Deliberately cheap (`qwen3.6`/`reasoning_config: none` — unlimited; the NaN
27
+ cluster models carry **no token counter**, so this skill pays in bytes, not
28
+ quota): structured summarization, not judgment. It must never reach for an
29
+ expensive model.
28
30
 
29
31
  ## Turn contract — verify before ending the turn
30
32
 
@@ -124,8 +126,9 @@ the HEAD sha and start time at session open.
124
126
 
125
127
  ## Guardrails
126
128
 
127
- - **Never use an expensive model for this.** It's summarization; `sonnet` is the
128
- ceiling, and the hooks do the free mechanical version.
129
+ - **Never use an expensive model for this.** It's summarization; `qwen3.6`
130
+ (`reasoning_config: none` → zero thinking tokens) is the natural ceiling on
131
+ the cluster plan, and the hooks do the free mechanical version.
129
132
  - **Don't invent facts.** Decisions and next steps come from the actual session
130
133
  (your context + git), not plausible-sounding filler. If a section has nothing
131
134
  real, omit its line rather than padding.
@@ -147,8 +150,10 @@ enables:
147
150
  (Process step 1's no-marker path).
148
151
  - **No `/clear`** — read it as your agent's context-reset / new-conversation
149
152
  equivalent, in the triggers and in the closing block alike.
150
- - **No per-skill `model:`/`effort:`** — the intent stands: use a **cheap**
151
- model for this. It's summarization, never judgment.
153
+ - **No per-skill `model:`/`effort:`** — the intent stands: use the cheapest
154
+ available model for this. It's summarization, never judgment. On NaN the
155
+ cluster models (qwen3.6, gemma4) carry no token counter — set
156
+ `reasoning_config: none` so the append pays zero thinking tokens.
152
157
 
153
158
  ## Relationship to other skills
154
159