oris-skills 2.1.0 → 2.2.1

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 (66) hide show
  1. package/.cursor-plugin/plugin.json +2 -16
  2. package/CHANGELOG.md +15 -1
  3. package/README.md +79 -32
  4. package/agents/oris-loop-debriefer.md +1 -0
  5. package/agents/oris-loop-executor.md +5 -2
  6. package/agents/oris-loop-verifier.md +3 -2
  7. package/docs/architecture.md +7 -6
  8. package/docs/distribution.md +1 -1
  9. package/docs/maintainer-guide.md +3 -3
  10. package/docs/user-guide.md +5 -4
  11. package/package.json +1 -1
  12. package/references/clean-code-checklist.md +1 -1
  13. package/references/conventions.md +28 -2
  14. package/references/loop-contract.md +1 -1
  15. package/references/repo-map.schema.json +4 -0
  16. package/references/settings.md +2 -1
  17. package/references/settings.schema.json +5 -0
  18. package/scripts/flow/oris-flow-scan.mjs +70 -0
  19. package/scripts/install/generate-agent-adapters.mjs +5 -15
  20. package/scripts/install/install-user-skills.mjs +54 -8
  21. package/scripts/install/uninstall-user-skills.mjs +29 -1
  22. package/scripts/loop/oris-loop-chat.mjs +2 -2
  23. package/scripts/loop/oris-loop-dry-run.mjs +1 -1
  24. package/scripts/loop/oris-loop-fixtures.mjs +1 -1
  25. package/scripts/loop/oris-loop-templates.mjs +3 -3
  26. package/scripts/oris-skills.mjs +1 -1
  27. package/scripts/tests/run-all-tests.mjs +1 -0
  28. package/scripts/tests/test-agent-adapters.mjs +52 -1
  29. package/scripts/tests/test-oris-flow-scan.mjs +43 -1
  30. package/scripts/tests/test-routing-lifecycle.mjs +28 -15
  31. package/scripts/tests/test-skill-style.mjs +64 -0
  32. package/skills/oris-flow/SKILL.md +48 -33
  33. package/skills/{oris-flow-architecture/SKILL.md → oris-flow/references/architecture.md} +37 -24
  34. package/skills/{oris-flow-change/SKILL.md → oris-flow/references/change.md} +21 -16
  35. package/skills/oris-flow/references/criteria.md +60 -0
  36. package/skills/oris-flow/references/discover.md +66 -0
  37. package/skills/{oris-flow-docs/SKILL.md → oris-flow/references/docs.md} +15 -13
  38. package/skills/oris-flow/references/fix.md +49 -0
  39. package/skills/{oris-help/SKILL.md → oris-flow/references/help.md} +18 -14
  40. package/skills/oris-flow/references/implement.md +48 -0
  41. package/skills/oris-flow/references/loop-craft.md +59 -0
  42. package/skills/oris-flow/references/loop-improve.md +32 -0
  43. package/skills/oris-flow/references/loop-run.md +47 -0
  44. package/skills/oris-flow/references/loop.md +56 -0
  45. package/skills/{oris-flow-new/SKILL.md → oris-flow/references/new.md} +25 -19
  46. package/skills/oris-flow/references/plan.md +58 -0
  47. package/skills/oris-flow/references/setup.md +100 -0
  48. package/skills/{oris-flow-verify/SKILL.md → oris-flow/references/verify.md} +24 -17
  49. package/skills/{oris-loop → oris-flow}/templates/debriefer.md +1 -0
  50. package/skills/{oris-loop → oris-flow}/templates/executor.md +5 -0
  51. package/skills/{oris-loop → oris-flow}/templates/verifier.md +2 -1
  52. package/skills/oris-flow-criteria/SKILL.md +0 -55
  53. package/skills/oris-flow-discover/SKILL.md +0 -63
  54. package/skills/oris-flow-fix/SKILL.md +0 -42
  55. package/skills/oris-flow-implement/SKILL.md +0 -43
  56. package/skills/oris-flow-merge/SKILL.md +0 -45
  57. package/skills/oris-flow-plan/SKILL.md +0 -55
  58. package/skills/oris-flow-setup/SKILL.md +0 -80
  59. package/skills/oris-help/agents/openai.yaml +0 -4
  60. package/skills/oris-loop/SKILL.md +0 -46
  61. package/skills/oris-loop/agents/openai.yaml +0 -4
  62. package/skills/oris-loop/references/craft.md +0 -49
  63. package/skills/oris-loop/references/improve.md +0 -23
  64. package/skills/oris-loop/references/run.md +0 -32
  65. /package/skills/{oris-loop → oris-flow}/templates/doctor.md +0 -0
  66. /package/skills/{oris-loop → oris-flow}/templates/orchestrator.md +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oris-skills",
3
3
  "description": "Oris Skills: one entry point (/oris-flow), guided discovery-to-implementation flow, and self-tuning verified loops. Cross-model: Cursor, Claude Code, Codex.",
4
- "version": "2.1.0",
4
+ "version": "2.2.1",
5
5
  "author": {
6
6
  "name": "Davide Baldassarre"
7
7
  },
@@ -17,20 +17,6 @@
17
17
  "codex"
18
18
  ],
19
19
  "skills": [
20
- "./skills/oris-flow",
21
- "./skills/oris-flow-setup",
22
- "./skills/oris-flow-new",
23
- "./skills/oris-flow-discover",
24
- "./skills/oris-flow-criteria",
25
- "./skills/oris-flow-plan",
26
- "./skills/oris-flow-implement",
27
- "./skills/oris-flow-fix",
28
- "./skills/oris-flow-verify",
29
- "./skills/oris-flow-change",
30
- "./skills/oris-flow-docs",
31
- "./skills/oris-flow-architecture",
32
- "./skills/oris-flow-merge",
33
- "./skills/oris-loop",
34
- "./skills/oris-help"
20
+ "./skills/oris-flow"
35
21
  ]
36
22
  }
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
 
3
- ## 2.1.0 - 2026-07-05
3
+ ## 2.2.1 - 2026-07-07
4
+
5
+ - **Loop roles are invisible to users**: the installer no longer writes `oris-loop-{executor,verifier,doctor,debriefer}` into `~/.cursor/agents/`, `~/.claude/agents/`, or `~/.codex/agents/` — they showed up as manually invocable subagents, but the loop orchestrator never spawns them by name (it passes each loop's `prompts/<role>.md` to a generic subagent). `agents/` stays in the repo as the canonical role definitions for development. Uninstall (and therefore reinstall/upgrade) now also removes adapters left behind by earlier versions.
6
+
7
+ ## 2.2.0 - 2026-07-07
8
+
9
+ - **One skill**: users see only `/oris-flow`. Every former skill (setup, new, discover, criteria, plan, implement, fix, verify, change, architecture, merge, docs, help, loop) is now a route reference inside `skills/oris-flow/references/`; the router reads the intent, picks ONE route, and applies its reference in the same chat. Loop prompt templates moved to `skills/oris-flow/templates/`.
10
+ - **Full skill revision, one skeleton**: essence paragraph, leading-word moves (READ / ASK / WRITE / NEVER), an explicit `## Never` block, and a `## Done when` checklist in every route, plus a silence contract — machinery (map reads, freshness checks, write-back) is never narrated. The router's description carries the whole trigger vocabulary so the model auto-enters the flow from plain chat.
11
+ - **Routing hardened**: new `Precedence` section settles the ambiguous calls explicitly (rethink beats build; change vs discover; fix vs implement; verify once vs loop; new vs setup) — one menu question maximum, then enter.
12
+ - **Loops are four decisions**: the craft interview shrank from nine questions to four (GOAL, PROOF, SCOPE, STOP); roles, limits, models, and improve mode are stated defaults, changed only when the user objects or the work demands it.
13
+ - **SHA-anchored maps + write-back**: the scan records `headSha`; `npx oris-skills flow scan --check` answers "is the map fresh?" in one cheap call (SHA compare + changed-file list, zero reads when fresh). Skills refresh only the touched areas in place and write proved facts back (`confirmed` commands, corrected sections) silently at natural pauses — write-back never blocks or slows the work.
14
+ - **Caveman response style**: `orisFlow.responseStyle: "caveman"` in `~/.oris/settings.json` switches chat to maximum token density (answer first, no warm-up, fragments fine); generated documents, gate labels, receipts, and error reports are never compressed. Set via `/oris-flow` → Setup → language & profiles.
15
+ - **Every agent, honestly**: installer now targets GitHub Copilot too (user prompt file in the VS Code profile — enable `chat.promptFiles` once, then `/oris-flow`), and writes a universal pointer at `~/.oris/oris-flow.md` so ANY file-reading agent can join with one sentence. Support matrix: in-chat loop hooks on Cursor and Claude Code; headless loops via Codex/Claude CLIs; the full flow everywhere.
16
+ - **Leaner core**: the merge-conflict route was removed — agents handle it natively and it never belonged to the flow discipline. Loop economy tightened: default limit is now 10 passes, and the craft guidance states when a loop pays for itself (~3 expected passes; below that, implement or verify directly). Canonical subagents aligned with the hardened templates: executors stop instead of half-doing oversized actions, verifiers run checks before judging, debriefers may never weaken the verification bar.
17
+ - **Style is enforced, not hoped for**: new `scripts/tests/test-skill-style.mjs` checks front-matter naming, trigger-bearing descriptions, Never + Done when blocks, a line budget, and that every routing handle resolves to a real bundle file.
4
18
 
5
19
  - **Harness independence**: task documents default to `.oris-flow/tasks/{task}/` (`setup.tasksRoot` in the manifest) — Oris no longer writes into the project's `docs/`; repos already using `docs/tasks` keep it via a recorded setup choice.
6
20
  - **Adaptive setup**: the scan detects `projectType` (webapp/api/library/cli/monorepo), derives build/test commands for .NET, Python, Go, and Rust (marked `inferred` until confirmed), walks breadth-first with a `truncated` flag, and honors `--area` for partial refreshes. Refresh merges instead of overwriting: `confirmed` sections, commands, and decisions survive; missing evidence marks them stale.
package/README.md CHANGED
@@ -1,67 +1,114 @@
1
1
  # Oris Skills
2
2
 
3
- One entry point, a guided software flow, and self-tuning verified loops — for **Cursor**, **Claude Code**, and **Codex**.
3
+ **One command. A disciplined software flow. Loops that verify themselves.**
4
+ For Cursor, Claude Code, Codex, GitHub Copilot — and any agent that can read a file.
4
5
 
5
6
  ```bash
6
7
  npx oris-skills@latest install
7
8
  ```
8
9
 
9
- The installer detects your agents (`~/.cursor`, `~/.claude`, `~/.codex`) or takes `--agents cursor,claude,codex`. Reload your agent, then type **`/oris-flow`** the only command you need to remember.
10
+ Reload your agent, then type **`/oris-flow`**. That is the entire user manual.
10
11
 
11
- ## What you get
12
+ ## The idea
12
13
 
13
- **`/oris-flow`** routes any software-flow request to the right skill in the same chat:
14
+ AI agents are brilliant executors and terrible colleagues: they guess requirements,
15
+ declare victory without evidence, and forget everything between sessions. Oris fixes the
16
+ colleague part with three rules baked into every interaction:
14
17
 
15
- | Route | Purpose |
18
+ 1. **Interview before writing.** Nothing lands in your repo — no document, no code — before
19
+ you explicitly approve it. One question per turn, recommended answer first.
20
+ 2. **Evidence before done.** "It works" means a command ran and its output says so.
21
+ Verification is independent from execution: the agent that writes code never grades
22
+ its own homework.
23
+ 3. **Remember without slowing down.** The repo map is anchored to a commit SHA; one cheap
24
+ check answers "is my knowledge fresh?", and only the changed areas are re-read.
25
+ Bookkeeping is silent — you see questions, answers, and results, never the machinery.
26
+
27
+ ## One skill, every route
28
+
29
+ `/oris-flow` reads your intent and enters the right route in the same chat — no other
30
+ command exists. Say "the login button does nothing" and you are in **fix**; say "the
31
+ client changed their mind about invoicing" and you are in **change**.
32
+
33
+ ```text
34
+ idea ──► discover ──► criteria ──► plan ──► implement ──► verify
35
+ │ ▲ │
36
+ └── change (spec moved) ─────────────┘ fix ◄┘ (red)
37
+ ```
38
+
39
+ | Route | You get |
16
40
  |-------|---------|
17
- | setup | map the repository into `.oris-flow/` so agents stop re-scanning |
18
- | discover | business-first interview `functional-analysis.md` |
19
- | criteria | verifiable acceptance criteria → `acceptance-criteria.md` |
20
- | plan | technical interview → `implementation-plan.md` |
21
- | implement / fix | execute the plan, or the smallest safe bug fix |
22
- | verify | check every acceptance criterion against the real product, once `verification-report.md` |
23
- | change | spec changed mid-flight: delta interview, all docs updated together → `change-log.md` (CH-xxx) |
24
- | loop | repeat work until verified, with subagents and receipts |
25
- | docs / help | keep task docs aligned; explain Oris |
26
-
27
- **Oris loops** run the cycle *observe → one bounded action → independent verify → record → repeat/stop* with two default roles (executor + verifier) — doctor and debriefer are opt-in — each driven by **an editable prompt file**:
41
+ | **setup** | the repo mapped into `.oris-flow/` (type, commands, structure) so agents stop re-scanning; AI-readiness check |
42
+ | **new** | a greenfield project born agent-native: sparse `AGENTS.md`, domain glossary, first ADR, red→green test observed |
43
+ | **discover** | business-first interview → `functional-analysis.md` |
44
+ | **criteria** | observable, stable-ID acceptance criteria → `acceptance-criteria.md` |
45
+ | **plan** | technical interview `implementation-plan.md` with bounded, verifiable steps |
46
+ | **implement / fix** | the plan executed step by step, or the smallest safe bug fix root cause first |
47
+ | **verify** | every criterion checked against the *real* product, with evidence → `verification-report.md` |
48
+ | **change** | spec delta interviewed, **all** documents updated in one approved pass → `change-log.md` |
49
+ | **loop** | repeat-until-verified work with subagents and receipts (below) |
50
+ | **architecture / docs / help** | deepening review, doc alignment, answers |
51
+
52
+ Every route follows one skeleton — what to do, what **Never** to do, and a **Done when**
53
+ checklist — enforced by the test suite, so the discipline survives refactors.
54
+
55
+ ## Loops: repeat until *proven*
56
+
57
+ A loop is four decisions — **GOAL** (what done looks like), **PROOF** (how a pass proves
58
+ it), **SCOPE** (what it may touch), **STOP** (when to quit) — everything else is a sane
59
+ default. Each pass: *observe → one bounded action → independent verify → receipt →
60
+ repeat or stop.*
28
61
 
29
62
  ```text
30
63
  .oris-flow/loops/{slug}/
31
- loop.md contract: goal, scope, roles, limits, per-role models, improve mode
32
- prompts/ executor.md verifier.md (+ orchestrator/doctor/debriefer when opted in) ← edit freely
33
- context.md receipts/ proposals/ history/
64
+ loop.md the approved contract: goal, scope, roles, limits, models
65
+ prompts/ one editable file per role the next pass obeys your edits
66
+ receipts/ one compact evidence record per pass
67
+ context.md proposals/ history/
34
68
  ```
35
69
 
36
- - **Per-role models** — `models:` in `loop.md`: `inherit` (session model), an adapter alias, or a platform model id.
37
- - **Self-tuning** `improve.mode: auto` lets the debriefer rewrite the prompt files between passes (old versions archived in `history/`); scope and limits always require your approval.
38
- - **Cross-platform triggers** — Cursor stop hook, Claude Code Stop hook (same chat continues automatically), or `npx oris-skills loop run --agent codex|claude` for headless/CI where each role is a separate CLI process.
70
+ - **Two roles by default** — executor acts, verifier checks with evidence. Doctor
71
+ (multi-phase stop logic) and debriefer (learns across passes) are opt-in.
72
+ - **Prompts are yours** — plain markdown files; edit them mid-run and the loop adapts.
73
+ With `improve.mode: auto` the debriefer tunes them itself (old versions archived);
74
+ scope and limits always require your approval.
75
+ - **No false victories** — an exhausted limit, a missing tool, or an unverifiable claim
76
+ is never "success". Progress is counted only when the verifier confirms it.
77
+ - **Cross-platform** — Cursor and Claude Code continue the same chat via stop hooks;
78
+ Codex/CI runs headless: `npx oris-skills loop run --loop <slug> --agent codex|claude`.
79
+ Copilot and every other agent get the full flow via prompt pointers; point any
80
+ file-reading agent at `~/.oris/oris-flow.md` and it is in.
39
81
 
40
- ## Try a loop in 3 minutes
82
+ Try it safely in three minutes — the demo touches only its own sandbox folder:
41
83
 
42
84
  ```bash
43
- npx oris-skills loop demo # creates a sandboxed tutorial loop
44
- npx oris-skills loop dry-run --loop oris-demo # preview the exact pass message — runs nothing
45
- npx oris-skills loop chat --action start --loop oris-demo # then end the chat turn; the hook does the rest
85
+ npx oris-skills loop demo # 1. create the tutorial loop
86
+ npx oris-skills loop dry-run --loop oris-demo # 2. preview the exact pass — runs nothing
87
+ npx oris-skills loop chat --action start --loop oris-demo # 3. arm it, end your turn
46
88
  ```
47
89
 
48
- Stop anytime: `npx oris-skills loop chat --action stop`. Self-check the runtime: `npx oris-skills loop verify --temp`.
90
+ Stop anything, anytime: `npx oris-skills loop chat --action stop`.
91
+
92
+ ## Tuning
93
+
94
+ Settings live in `~/.oris/settings.json` (`/oris-flow` → Setup → language & profiles):
95
+ chat and document language (`en`/`it`), test profiles, and `responseStyle: "caveman"` —
96
+ chat shrinks to maximum token density while documents and safety gates stay complete.
49
97
 
50
98
  ## Repository layout
51
99
 
52
100
  | Path | Purpose |
53
101
  |------|---------|
54
- | `skills/` | the 12 Oris skills (`SKILL.md` each) |
55
- | `skills/oris-loop/templates/` | role prompt templates copied into new loops |
56
- | `references/` | shared contracts and JSON schemas |
57
- | `agents/` | canonical subagent definitions (Cursor/Claude/Codex adapters generated) |
102
+ | `skills/oris-flow/` | the one skill: router (`SKILL.md`), route references, loop prompt templates |
103
+ | `references/` | shared contracts (conventions, loop contract, doc policy) and JSON schemas |
104
+ | `agents/` | canonical subagent definitions (platform adapters generated at install) |
58
105
  | `scripts/` | Node CLI, loop runtime, installer, tests |
59
106
  | `docs/` | architecture, user guide, maintainer guide |
60
107
 
61
108
  ## Maintainers
62
109
 
63
110
  ```bash
64
- npm test # cross-platform Node test suite
111
+ npm test # cross-platform Node test suite (includes the skill-style gate)
65
112
  npm run verify:loop # end-to-end stop-hook simulation (cursor + claude)
66
113
  ```
67
114
 
@@ -13,6 +13,7 @@ Rules:
13
13
  3. improve.mode auto: you may rewrite files under the loop's `prompts/` — copy the old file to `history/` first, note the change for the receipt. One improvement per debrief.
14
14
  4. improve.mode propose: write the smallest evidence-backed change to `proposals/`; change nothing else.
15
15
  5. NEVER touch loop.md scope, limits, permissions, or verification — always a proposal.
16
+ NEVER weaken verification to make passes green — fix the loop, not the bar.
16
17
  6. Keep the summary compact.
17
18
 
18
19
  Output:
@@ -10,12 +10,15 @@ Rules:
10
10
 
11
11
  1. Verify the task includes `ORIS LOOP ACTIVE`.
12
12
  2. Read only the loop definition, context, and files in declared scope.
13
- 3. Perform exactly one bounded action.
13
+ 3. Perform exactly one bounded action. Re-read the fresh state of every file
14
+ you touch before editing it. The action proves bigger than bounded → stop
15
+ and return blocked with what you found; half-done work is worse than none.
14
16
  4. Preserve unrelated user work.
15
17
  5. Do not commit, push, deploy, write DevOps, send external messages, expose
16
18
  credentials, or edit `.oris-flow/runtime/**`.
17
19
  6. Return a compact result with changed files, claim, risk, and suggested
18
- verifier check.
20
+ verifier check. claim = what changed + the exact command or observation
21
+ that proves it.
19
22
 
20
23
  Output:
21
24
 
@@ -8,10 +8,11 @@ You are the Oris Loop verifier.
8
8
 
9
9
  Rules:
10
10
 
11
- 1. Do not trust the executor claim without evidence.
11
+ 1. Do not trust the executor claim without evidence. Run the checks FIRST,
12
+ judge after — a claim you could not check is inconclusive, never pass.
12
13
  2. Use the verification command, static check, browser evidence, or review rule
13
14
  declared by the loop.
14
- 3. Do not edit product files.
15
+ 3. Do not edit product files — you only observe, never fix.
15
16
  4. Keep raw logs out of the orchestrator response; point to evidence files when
16
17
  available.
17
18
  5. Report pass, fail, blocked, or inconclusive.
@@ -5,11 +5,11 @@ Read this before explaining or changing the project.
5
5
  ## Shape
6
6
 
7
7
  ```text
8
- skills/ 15 skills; oris-flow is the router, oris-loop the loop system
9
- references/ shared contracts (conventions, loop-contract, settings, repo-map, doc-policy, clean-code-checklist) + JSON schemas
10
- agents/ canonical subagent definitions; adapters generated per platform
11
- scripts/ Node CLI (oris-skills.mjs), loop runtime, installer, tests
12
- docs/ this file, user-guide, maintainer-guide, distribution
8
+ skills/oris-flow/ the ONE user-facing skill: SKILL.md routes; references/ hold every route (setup…loop); templates/ hold the loop role prompts
9
+ references/ shared contracts (conventions, loop-contract, settings, repo-map, doc-policy, clean-code-checklist) + JSON schemas
10
+ agents/ canonical loop-role definitions (internal); never installed into user agent homes — roles reach subagents via each loop's prompts/<role>.md
11
+ scripts/ Node CLI (oris-skills.mjs), loop runtime, installer, tests
12
+ docs/ this file, user-guide, maintainer-guide, distribution
13
13
  ```
14
14
 
15
15
  ## Principles
@@ -22,6 +22,7 @@ docs/ this file, user-guide, maintainer-guide, distribution
22
22
 
23
23
  ## Runtime
24
24
 
25
- - `/oris-flow` routes; destination skills own their gates.
25
+ - `/oris-flow` routes; each route reference owns its gates.
26
+ - The repo map is SHA-anchored: `flow scan --check` compares `headSha` to HEAD; only touched areas are refreshed; write-back is silent and never blocks work.
26
27
  - Loop triggers: Cursor stop hook + Claude Stop hook (shared `scripts/loop/oris-loop-stop.mjs`, `--platform` switch), headless `loop run` for Codex/CI.
27
28
  - State machine: `.oris-flow/runtime/chat-active.json`, managed only by `npx oris-skills loop chat`.
@@ -26,7 +26,7 @@ Project assets live only in each repository's `.oris-flow/` (adapter, loops, run
26
26
 
27
27
  ```bash
28
28
  npx oris-skills uninstall --dry-run # preview
29
- npx oris-skills uninstall # removes Oris-owned paths incl. legacy ~/.cursor locations
29
+ npx oris-skills uninstall # removes Oris-owned paths incl. legacy ~/.cursor locations and pre-2.2.1 loop agent adapters (~/.cursor|.claude|.codex/agents/oris-*)
30
30
  npx oris-skills reinstall
31
31
  ```
32
32
 
@@ -6,13 +6,13 @@ Use when improving Oris Skills itself. Keep changes tiny; update the canonical f
6
6
 
7
7
  | Change | Canonical place |
8
8
  |--------|-----------------|
9
- | User-facing explanation | `docs/user-guide.md`, `skills/oris-help/SKILL.md` |
9
+ | User-facing explanation | `docs/user-guide.md`, `skills/oris-flow/references/help.md` |
10
10
  | Project structure | `docs/architecture.md` |
11
11
  | Routing | `skills/oris-flow/SKILL.md` (route table) |
12
12
  | Shared interaction rules | `references/conventions.md` |
13
13
  | Task doc standards | `references/doc-policy.md` ({task} slug, per-doc ownership) |
14
- | Loop behavior | `references/loop-contract.md`, `skills/oris-loop/` |
15
- | Loop prompt templates | `skills/oris-loop/templates/` |
14
+ | Loop behavior | `references/loop-contract.md`, `skills/oris-flow/references/loop*.md` |
15
+ | Loop prompt templates | `skills/oris-flow/templates/` |
16
16
  | Loop runtime | `scripts/loop/` |
17
17
  | Install lifecycle | `scripts/oris-skills.mjs`, `scripts/install/` |
18
18
  | Tests | `scripts/tests/` |
@@ -3,16 +3,17 @@
3
3
  Install once, remember one command:
4
4
 
5
5
  ```bash
6
- npx oris-skills@latest install # detects Cursor / Claude Code / Codex
6
+ npx oris-skills@latest install # detects Cursor / Claude Code / Codex / Copilot (VS Code)
7
7
  ```
8
8
 
9
- Then type **`/oris-flow`** in your agent chat. It routes your request or shows a short menu (setup, new project, discovery, criteria, plan, implement/fix, verify, spec change, loop, architecture review, merge conflicts, docs, help). On Codex use the installed `/oris-flow` prompt.
9
+ Then type **`/oris-flow`** in your agent chat. It routes your request or shows a short menu (setup, new project, discovery, criteria, plan, implement/fix, verify, spec change, loop, architecture review, docs, help). On Codex use the installed `/oris-flow` prompt; on Copilot Chat use `/oris-flow` too (enable the VS Code setting `chat.promptFiles` once). Any other agent: tell it to read `~/.oris/oris-flow.md`.
10
10
 
11
- The flow in one line: **discover → criteria → plan → implement → verify**, with `fix` for bugs, `change` when the spec changes mid-flight (it updates all task docs together and logs `CH-xxx` history), and `loop` for work that must repeat until verified. `new` bootstraps an AI-driven project from scratch; `architecture` maps deepening/refactor opportunities; `merge` resolves merge/rebase conflicts. Task documents live in `.oris-flow/tasks/` by default — your project's own docs stay untouched.
11
+ The flow in one line: **discover → criteria → plan → implement → verify**, with `fix` for bugs, `change` when the spec changes mid-flight (it updates all task docs together and logs `CH-xxx` history), and `loop` for work that must repeat until verified. `new` bootstraps an AI-driven project from scratch; `architecture` maps deepening/refactor opportunities. Task documents live in `.oris-flow/tasks/` by default — your project's own docs stay untouched.
12
12
 
13
13
  ## Loops in short
14
14
 
15
15
  A loop repeats: one bounded action → independent verification → receipt → continue or stop.
16
+ Building one takes four decisions — goal, proof, scope, stop — everything else defaults.
16
17
 
17
18
  Learn it safely:
18
19
 
@@ -41,4 +42,4 @@ npx oris-skills reinstall
41
42
  ```
42
43
 
43
44
  Uninstall removes only Oris-owned paths (including legacy locations); preview with `--dry-run`.
44
- Settings (language, test profiles): `~/.oris/settings.json`, edited via `/oris-flow` → Setup.
45
+ Settings (language, test profiles, `responseStyle: caveman` for ultra-short chat): `~/.oris/settings.json`, edited via `/oris-flow` → Setup.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oris-skills",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "Oris Skills: one entry point (/oris-flow), guided discovery-to-implementation flow, and self-tuning verified loops for Cursor, Claude Code, and Codex.",
5
5
  "license": "MIT",
6
6
  "author": "Davide Baldassarre",
@@ -17,4 +17,4 @@ Before removing anything: search references and call sites (including DI registr
17
17
 
18
18
  ## Never here
19
19
 
20
- Bug fixes (→ `skills/oris-flow-fix/SKILL.md`), architectural redesign, cross-feature refactors, DevOps, drive-by cleanup of code you did not touch.
20
+ Bug fixes (→ `skills/oris-flow/references/fix.md`), architectural redesign, cross-feature refactors, DevOps, drive-by cleanup of code you did not touch.
@@ -8,9 +8,17 @@ Shared rules for every Oris skill. Skills reference this file instead of repeati
8
8
  - Installed: `~/.oris/oris-skills/`
9
9
  - Repo checkout: repository root.
10
10
 
11
+ ## Silence (the fluidity contract)
12
+
13
+ The user sees questions, answers, results, and gates — NEVER the machinery. Reading maps,
14
+ references, or settings, checking freshness, writing back facts, loading a route: all
15
+ SILENT. Never say "let me read…", "I'm checking the manifest…", "updating the map…".
16
+ One announcement exists: the route entry line ("Entering <route>: <why>"). Everything
17
+ else the user hears is the work itself.
18
+
11
19
  ## Routing handles
12
20
 
13
- Name a destination skill by its file path (`skills/oris-flow-fix/SKILL.md`) the one canonical handle. Never by slash command or prose nickname.
21
+ ONE user-facing skill exists: `skills/oris-flow/SKILL.md` (/oris-flow — the router). Every destination is one of its references — name it by file path (`skills/oris-flow/references/fix.md`), the one canonical handle. Never by slash command or prose nickname. Routing means: read the reference file and apply it in the same chat.
14
22
 
15
23
  ## CLI commands
16
24
 
@@ -36,9 +44,27 @@ The `oris-skills` CLI is NOT installed globally. ALWAYS invoke it as `npx oris-s
36
44
  - READ `references/settings.md` (user settings: `~/.oris/settings.json`).
37
45
  - Chat + questions: `uiLanguage`. Generated documents: `artifactLanguage`. Default both: `en`.
38
46
 
39
- ## Setup map
47
+ ## Response style
48
+
49
+ READ `orisFlow.responseStyle` (`standard` | `caveman`, default `standard`).
50
+
51
+ `caveman` = the user pays per token; chat goes maximum density. The contract, in its own voice:
52
+
53
+ > Caveman speak short. Answer first. No warm-up, no "I will now…", no repeat of what user said.
54
+ > One line beat three. Fragment fine. Code speak for itself.
55
+ > Caveman brain still big: same exploration, same gates, same evidence — only words shrink.
56
+ > Question still one per turn, labels still full. Recap = counted facts, no prose.
57
+ > Danger, error, secret → caveman speak clear, full sentence. Safety never shrink.
58
+
59
+ SCOPE: chat replies, recaps, status lines. NEVER compressed: generated documents, gate
60
+ labels, receipts, error reports, and anything another session must read cold.
61
+
62
+ ## Setup map & write-back
40
63
 
41
64
  - WHEN `.oris-flow/manifest.json` exists: read it + only the relevant `.oris-flow/maps/**` sections BEFORE scanning broadly.
65
+ - FRESHNESS is one call: `npx oris-skills flow scan --repository-root <repo> --check` — compares the manifest's `headSha` anchor to the current HEAD. `fresh: true` → trust the map, zero extra reads. Stale → refresh ONLY the areas the `changedFiles` list touches (`--area <section>`), in place; full rescans belong to setup.
66
+ - WRITE BACK what the flow proved — silently, at natural pauses (after verification, at close; never mid-move): a command observed green → mark it `confirmed`; a map fact the repo contradicts → correct that section in place. Small scoped edits only.
67
+ - Write-back must NEVER slow the work: nothing durable learned → write nothing; batch at the end of the turn; never block an edit or a verification on map bookkeeping; never full-rescan mid-task.
42
68
  - VERIFY stale or high-risk map facts against the repository before consequential actions.
43
69
 
44
70
  ## Gates
@@ -33,7 +33,7 @@ approved: true # set by the user's approval at craft — loop cannot s
33
33
  phases: [work]
34
34
  roles: [executor, verifier] # default; opt in doctor and/or debriefer only when needed
35
35
  limits:
36
- maxIterations: 25
36
+ maxIterations: 10
37
37
  maxNoProgress: 2 # consecutive passes without verified progress → blocked
38
38
  maxMinutes: 240
39
39
  models: # per-role: "inherit" | adapter alias | platform model id
@@ -32,6 +32,10 @@
32
32
  "type": "string",
33
33
  "format": "date-time"
34
34
  },
35
+ "headSha": {
36
+ "type": ["string", "null"],
37
+ "description": "Commit SHA the last scan was anchored to; null outside git. Freshness = headSha vs current HEAD."
38
+ },
35
39
  "mapVersion": {
36
40
  "type": "string",
37
41
  "minLength": 1
@@ -8,7 +8,7 @@ The installer creates it when missing; it NEVER overwrites an existing file.
8
8
  ```json
9
9
  {
10
10
  "version": 1,
11
- "orisFlow": { "uiLanguage": "en", "artifactLanguage": "en" },
11
+ "orisFlow": { "uiLanguage": "en", "artifactLanguage": "en", "responseStyle": "standard" },
12
12
  "defaultProfiles": { "testing": "default" },
13
13
  "profiles": {
14
14
  "default": {
@@ -23,6 +23,7 @@ The installer creates it when missing; it NEVER overwrites an existing file.
23
23
 
24
24
  - `uiLanguage` → chat, menus, question labels, recaps (`en` | `it`, default `en`).
25
25
  - `artifactLanguage` → generated documents (`en` | `it`, default `en`).
26
+ - `responseStyle` → chat verbosity (`standard` | `caveman`, default `standard`). Caveman = maximum token density in chat; contract in `references/conventions.md` `## Response style`. Documents and gates are never compressed.
26
27
  - `profiles` → repository-neutral test logins/config. The repo adapter maps profile fields to roles.
27
28
  - `flags.allowDataMutation` → data mutation allowed ONLY with `environment: local` + loopback URLs + this flag true.
28
29
 
@@ -22,6 +22,11 @@
22
22
  "artifactLanguage": {
23
23
  "type": "string",
24
24
  "enum": ["it", "en"]
25
+ },
26
+ "responseStyle": {
27
+ "type": "string",
28
+ "enum": ["standard", "caveman"],
29
+ "description": "Chat verbosity: standard prose or caveman (maximum token density; documents and gates never compressed)."
25
30
  }
26
31
  }
27
32
  },
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import childProcess from "node:child_process";
3
4
  import fs from "node:fs";
4
5
  import path from "node:path";
5
6
  import process from "node:process";
@@ -63,6 +64,68 @@ function fail(message) {
63
64
  process.exit(1);
64
65
  }
65
66
 
67
+ function git(root, args) {
68
+ try {
69
+ const output = childProcess.execFileSync("git", args, { cwd: root, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
70
+ return output.trim();
71
+ } catch {
72
+ return null;
73
+ }
74
+ }
75
+
76
+ /** Commit SHA the scan anchors to; null outside git (the anchor is then unavailable, never an error). */
77
+ export function gitHeadSha(root) {
78
+ return git(root, ["rev-parse", "HEAD"]);
79
+ }
80
+
81
+ /**
82
+ * Files changed since the anchored SHA: committed delta + working-tree changes,
83
+ * deduped. The map's own files (.oris-flow/**) never count — they describe the
84
+ * code, they are not the code.
85
+ */
86
+ export function gitChangedFiles(root, sinceSha) {
87
+ const diff = git(root, ["diff", "--name-only", `${sinceSha}..HEAD`]);
88
+ const status = git(root, ["status", "--porcelain", "-uall"]);
89
+ if (diff === null && status === null) return null;
90
+ const changed = new Set();
91
+ const add = (file) => {
92
+ const clean = file.replace(/^"|"$/g, "");
93
+ if (clean && !clean.startsWith(".oris-flow/")) changed.add(clean);
94
+ };
95
+ for (const line of (diff ?? "").split(/\r?\n/)) if (line.trim()) add(line.trim());
96
+ for (const line of (status ?? "").split(/\r?\n/)) {
97
+ const file = line.slice(3).trim();
98
+ if (file) add(file.includes(" -> ") ? file.split(" -> ")[1] : file);
99
+ }
100
+ return [...changed].sort();
101
+ }
102
+
103
+ /**
104
+ * Freshness in one cheap call (the delta-scan anchor): compare the manifest's
105
+ * headSha with the current HEAD. Equal and clean → fresh, zero reads. Moved →
106
+ * the changed file list tells the caller which map areas to refresh in place.
107
+ */
108
+ export function checkFreshness(repositoryRoot) {
109
+ const root = path.resolve(repositoryRoot);
110
+ const manifest = readJson(path.join(root, ...ORIS_FLOW_MANIFEST.split("/")));
111
+ if (!manifest) return { manifest: false, fresh: false, reason: "no manifest — run a full scan" };
112
+ const headSha = gitHeadSha(root);
113
+ const scannedSha = manifest.headSha ?? null;
114
+ if (!headSha || !scannedSha) {
115
+ return { manifest: true, fresh: false, reason: "no SHA anchor — refresh writes one", headSha, scannedSha, changedFiles: null };
116
+ }
117
+ const changedFiles = gitChangedFiles(root, scannedSha) ?? [];
118
+ const fresh = headSha === scannedSha && changedFiles.length === 0;
119
+ return {
120
+ manifest: true,
121
+ fresh,
122
+ headSha,
123
+ scannedSha,
124
+ changedFiles: fresh ? [] : changedFiles.slice(0, 200),
125
+ sections: Object.keys(manifest.sections ?? {}),
126
+ };
127
+ }
128
+
66
129
  function parseArgs(argv) {
67
130
  const options = {
68
131
  repositoryRoot: process.cwd(),
@@ -82,6 +145,7 @@ function parseArgs(argv) {
82
145
  else if (key === "--write") options.write = true;
83
146
  else if (key === "--json") options.json = true;
84
147
  else if (key === "--area" || key.startsWith("--area=")) [i, options.area] = readValue(i, raw);
148
+ else if (key === "--check") options.check = true;
85
149
  else fail(`Unknown argument: ${raw}`);
86
150
  }
87
151
  return options;
@@ -415,6 +479,7 @@ function mergeWithExisting(scan, existingManifest) {
415
479
  export function scanRepository(repositoryRoot, options = {}) {
416
480
  const root = path.resolve(repositoryRoot);
417
481
  const scannedAt = new Date().toISOString();
482
+ const headSha = gitHeadSha(root);
418
483
  const existingManifest = readJson(path.join(root, ...ORIS_FLOW_MANIFEST.split("/")));
419
484
  const { files, truncated } = walk(root, options);
420
485
  const stacks = detectStacks(files);
@@ -430,6 +495,7 @@ export function scanRepository(repositoryRoot, options = {}) {
430
495
  repository: path.basename(root),
431
496
  generatedAt: scannedAt,
432
497
  updatedAt: scannedAt,
498
+ headSha,
433
499
  projectType,
434
500
  truncated,
435
501
  setup: {
@@ -493,6 +559,10 @@ export function writeScanResult(scan, options = {}) {
493
559
 
494
560
  if (process.argv[1] && path.resolve(process.argv[1]) === path.resolve(fileURLToPath(import.meta.url))) {
495
561
  const options = parseArgs(process.argv.slice(2));
562
+ if (options.check) {
563
+ console.log(JSON.stringify(checkFreshness(options.repositoryRoot), null, 2));
564
+ process.exit(0);
565
+ }
496
566
  const scan = scanRepository(options.repositoryRoot, options);
497
567
  const written = options.write ? writeScanResult(scan, { area: options.area }) : null;
498
568
  const payload = {
@@ -58,7 +58,11 @@ function readAgents() {
58
58
  .map((name) => ({ name, ...readAgent(path.join(sourceRoot, name)) }));
59
59
  }
60
60
 
61
- /** Write adapters into repo-local .cursor/.claude/.codex dirs under root. */
61
+ /**
62
+ * Write adapters into repo-local .cursor/.claude/.codex dirs under root.
63
+ * Development-only: the installer never copies these into user agent homes —
64
+ * loop roles are internal and reach subagents via per-loop prompts/<role>.md files.
65
+ */
62
66
  export function generateAgentAdapters(root = repoRoot) {
63
67
  const agents = readAgents();
64
68
  for (const agent of agents) {
@@ -69,20 +73,6 @@ export function generateAgentAdapters(root = repoRoot) {
69
73
  return agents.map((agent) => agent.frontMatter.name);
70
74
  }
71
75
 
72
- /**
73
- * Write adapters into explicit agent homes, e.g. { cursor: "~/.cursor", codex: "~/.codex" }.
74
- * Used by the installer so the generated adapters actually reach the user's agents.
75
- */
76
- export function writeAgentAdapters(targets) {
77
- const agents = readAgents();
78
- for (const agent of agents) {
79
- if (targets.cursor) writeFile(path.join(targets.cursor, "agents", agent.name), renderMarkdownAgent(agent));
80
- if (targets.claude) writeFile(path.join(targets.claude, "agents", agent.name), renderMarkdownAgent(agent));
81
- if (targets.codex) writeFile(path.join(targets.codex, "agents", agent.name.replace(/\.md$/, ".toml")), renderCodexAgent(agent));
82
- }
83
- return agents.map((agent) => agent.frontMatter.name);
84
- }
85
-
86
76
  if (process.argv[1] && path.resolve(process.argv[1]) === path.resolve(fileURLToPath(import.meta.url))) {
87
77
  const rootArg = process.argv.find((arg) => arg.startsWith("--root="));
88
78
  const root = rootArg ? path.resolve(rootArg.slice("--root=".length)) : repoRoot;