oris-skills 2.1.0 → 2.2.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 (63) hide show
  1. package/.cursor-plugin/plugin.json +2 -16
  2. package/CHANGELOG.md +11 -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/maintainer-guide.md +3 -3
  9. package/docs/user-guide.md +5 -4
  10. package/package.json +1 -1
  11. package/references/clean-code-checklist.md +1 -1
  12. package/references/conventions.md +28 -2
  13. package/references/loop-contract.md +1 -1
  14. package/references/repo-map.schema.json +4 -0
  15. package/references/settings.md +2 -1
  16. package/references/settings.schema.json +5 -0
  17. package/scripts/flow/oris-flow-scan.mjs +70 -0
  18. package/scripts/install/install-user-skills.mjs +56 -4
  19. package/scripts/install/uninstall-user-skills.mjs +17 -1
  20. package/scripts/loop/oris-loop-chat.mjs +2 -2
  21. package/scripts/loop/oris-loop-dry-run.mjs +1 -1
  22. package/scripts/loop/oris-loop-fixtures.mjs +1 -1
  23. package/scripts/loop/oris-loop-templates.mjs +3 -3
  24. package/scripts/oris-skills.mjs +1 -1
  25. package/scripts/tests/run-all-tests.mjs +1 -0
  26. package/scripts/tests/test-oris-flow-scan.mjs +43 -1
  27. package/scripts/tests/test-routing-lifecycle.mjs +28 -15
  28. package/scripts/tests/test-skill-style.mjs +64 -0
  29. package/skills/oris-flow/SKILL.md +48 -33
  30. package/skills/{oris-flow-architecture/SKILL.md → oris-flow/references/architecture.md} +37 -24
  31. package/skills/{oris-flow-change/SKILL.md → oris-flow/references/change.md} +21 -16
  32. package/skills/oris-flow/references/criteria.md +60 -0
  33. package/skills/oris-flow/references/discover.md +66 -0
  34. package/skills/{oris-flow-docs/SKILL.md → oris-flow/references/docs.md} +15 -13
  35. package/skills/oris-flow/references/fix.md +49 -0
  36. package/skills/{oris-help/SKILL.md → oris-flow/references/help.md} +18 -14
  37. package/skills/oris-flow/references/implement.md +48 -0
  38. package/skills/oris-flow/references/loop-craft.md +59 -0
  39. package/skills/oris-flow/references/loop-improve.md +32 -0
  40. package/skills/oris-flow/references/loop-run.md +47 -0
  41. package/skills/oris-flow/references/loop.md +56 -0
  42. package/skills/{oris-flow-new/SKILL.md → oris-flow/references/new.md} +25 -19
  43. package/skills/oris-flow/references/plan.md +58 -0
  44. package/skills/oris-flow/references/setup.md +100 -0
  45. package/skills/{oris-flow-verify/SKILL.md → oris-flow/references/verify.md} +24 -17
  46. package/skills/{oris-loop → oris-flow}/templates/debriefer.md +1 -0
  47. package/skills/{oris-loop → oris-flow}/templates/executor.md +5 -0
  48. package/skills/{oris-loop → oris-flow}/templates/verifier.md +2 -1
  49. package/skills/oris-flow-criteria/SKILL.md +0 -55
  50. package/skills/oris-flow-discover/SKILL.md +0 -63
  51. package/skills/oris-flow-fix/SKILL.md +0 -42
  52. package/skills/oris-flow-implement/SKILL.md +0 -43
  53. package/skills/oris-flow-merge/SKILL.md +0 -45
  54. package/skills/oris-flow-plan/SKILL.md +0 -55
  55. package/skills/oris-flow-setup/SKILL.md +0 -80
  56. package/skills/oris-help/agents/openai.yaml +0 -4
  57. package/skills/oris-loop/SKILL.md +0 -46
  58. package/skills/oris-loop/agents/openai.yaml +0 -4
  59. package/skills/oris-loop/references/craft.md +0 -49
  60. package/skills/oris-loop/references/improve.md +0 -23
  61. package/skills/oris-loop/references/run.md +0 -32
  62. /package/skills/{oris-loop → oris-flow}/templates/doctor.md +0 -0
  63. /package/skills/{oris-loop → oris-flow}/templates/orchestrator.md +0 -0
@@ -1,55 +0,0 @@
1
- ---
2
- name: oris-flow-plan
3
- description: Technical implementation-plan interview before coding - file mapping, architecture choices, sequencing, verification strategy, implementation-plan.md. Ambiguous request - route to /oris-flow.
4
- ---
5
-
6
- # Technical Plan
7
-
8
- Interview the technical owner until another agent or developer could execute the plan without guessing.
9
-
10
- RULES: follow `references/conventions.md`. Doc standards: `references/doc-policy.md`.
11
- NEVER write code, Git, or DevOps here. WRITE `implementation-plan.md` only after explicit generation choice.
12
-
13
- ## Before asking
14
-
15
- 1. EXPLORE: `functional-analysis.md` + `acceptance-criteria.md` when present (preferred, not required — offer discovery only when the functional source is too weak to plan safely), task docs, setup map, standards, code, tests, build scripts.
16
- 2. NEVER re-ask functional/QA questions already answered by docs or confirmed chat.
17
- 3. PREFER existing project patterns over new abstractions. Keep uncertainty visible — never invent architecture, field names, or commands.
18
-
19
- ## Interview
20
-
21
- ASK one technical decision at a time, recommended answer first, early-exit always present. Cover:
22
- - ownership boundaries, files/symbols to touch;
23
- - APIs/contracts, data model, migrations;
24
- - permissions, feature flags, frontend integration;
25
- - verification strategy;
26
- - rollout, risk, sequencing.
27
-
28
- ## Generation gate
29
-
30
- SHOW compact recap: approach, touched areas, sequence, verification, risks, open points.
31
- ASK: generate the document | keep interviewing | explain.
32
- ON generate → write `{tasksRoot}/{task}/implementation-plan.md` (language `artifactLanguage`):
33
-
34
- ```markdown
35
- # {Feature} — Implementation Plan
36
- ## Approach (decisions + why, existing patterns referenced)
37
- ## Implementation plan
38
- ### 1. {task} (files, changes, completion criteria)
39
- ### 2. …
40
- ## Verification (commands, tests, what proves each step)
41
- ## Risks & open points
42
- ## Change history (date | source | change | reason)
43
- ```
44
-
45
- Numbered `### n.` tasks are the execution steps `oris-flow-implement` will follow — keep each one bounded and independently verifiable.
46
-
47
- ## After writing
48
-
49
- OFFER: implement (`skills/oris-flow-implement/SKILL.md`) | stop. Never auto-start.
50
-
51
- ## Done when
52
-
53
- - [ ] Explored before asking; only implementation questions asked.
54
- - [ ] Plan tasks bounded with completion criteria.
55
- - [ ] Document written only after explicit generation choice.
@@ -1,80 +0,0 @@
1
- ---
2
- name: oris-flow-setup
3
- description: Prepare a repository for Oris - explore, detect project type, write .oris-flow/manifest.json + maps, check AI-readiness, arm loop hooks. Use for setup, map, refresh, or "prepare this repo for Oris" intents.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Oris Setup
8
-
9
- GOAL: make the repo cheap for agents to understand — manifest + maps + AI-readiness + loop readiness. Adapt to what the repo IS; never force one structure. Writes ONLY after the user confirms.
10
-
11
- RULES: follow `references/conventions.md`. Map format: `references/repo-map.md`.
12
- IF the repo is empty or brand-new → route to `skills/oris-flow-new/SKILL.md` instead.
13
-
14
- ## Mode
15
-
16
- IF `.oris-flow/manifest.json` exists → ask ONE question with these options:
17
- - refresh all (keeps `confirmed` values — scan merges, never overwrites them)
18
- - update one area (`--area <section>`)
19
- - review stale sections
20
- - show summary (no writes)
21
- - recreate from scratch
22
- - language & profiles → Local Preferences below; touches only `~/.oris/settings.json`
23
- - clean runtime → preview with `npx oris-skills flow clean-runtime --repository-root <repo> --dry-run`, confirm, run without `--dry-run`
24
-
25
- ELSE → create from scratch.
26
-
27
- ## 1. Explore first
28
-
29
- 1. CONFIRM the target repository root (ask only if multiple roots are plausible).
30
- 2. SCAN: `npx oris-skills flow scan --repository-root <repo> --json` — deterministic baseline: `projectType`, stacks, commands (with confidence), sections, `truncated` flag. Scan output = draft evidence, not truth.
31
- 3. IF `truncated: true` → say so; large monorepos may need per-area subagent scans.
32
- 4. ADD parallel subagent scans (docs, frontend, backend/data, tests/build, local skills/rules) only when the baseline leaves real gaps.
33
-
34
- ## 2. Present findings, decide one at a time
35
-
36
- SHOW compactly: detected project type + evidence, stacks, commands, AI-readiness (below). Then walk decisions ONE per turn — short explainer first, recommended answer first, assume the user may not know the term:
37
-
38
- - **Project type** — confirm or correct `projectType` (webapp | api | library | cli | monorepo). It drives which map sections matter and how criteria/verify will observe behavior.
39
- - **Tasks root** — where Oris writes task documents. Default `.oris-flow/tasks` (Oris's own folder, keeps the project clean). Keep `docs/tasks` only when the team already treats task docs as project docs. Record in `setup.tasksRoot`.
40
- - **Verify commands** — show detected/inferred build+test commands; user confirms or corrects → mark `confirmed`. These feed implement, verify, and loop VERIFIER; an unconfirmed command is a guess.
41
- - **Refresh policy** (manual | monthly | after refactor | after test-layout change) — advisory only, never a scheduler.
42
- - **Version control for `.oris-flow/`** — commit (team default) or gitignore. Task docs follow the same choice.
43
-
44
- ## 3. AI-readiness check
45
-
46
- COMPARE the repo against the agent-native standards; report gaps, one line each, with a fix offer:
47
-
48
- | Check | Why it matters |
49
- |-------|----------------|
50
- | `AGENTS.md` (or `CLAUDE.md`) at root | the cross-tool agent entry point — minimal: one-line purpose + commands. Keep it sparse; every token loads on every request |
51
- | `CONTEXT.md` | domain glossary — names agents must use for the product's concepts |
52
- | `docs/adr/` | decisions agents must not re-litigate |
53
- | project skills/rules (`.claude/skills`, `.cursor/rules`) | repeatable workflows as source of truth |
54
- | confirmed test/build commands | deterministic feedback loop — agents verify instead of guessing |
55
-
56
- ON explicit confirmation per file → scaffold the missing ones minimal (never overwrite existing content; edit the file that exists, never create AGENTS.md beside CLAUDE.md).
57
-
58
- ## 4. Recap + write
59
-
60
- 1. RECAP: repo, mode, project type, tasksRoot, files to write, AI-readiness gaps, choices. CONFIRM explicitly.
61
- 2. WRITE `.oris-flow/manifest.json` + `.oris-flow/maps/**` (enrich generated sections with confirmed facts; set their confidence to `confirmed` so refresh preserves them), then apply:
62
- - `npx oris-skills flow version-control --repository-root <repo> --mode commit|gitignore`
63
- - `npx oris-skills loop bootstrap --repository-root <repo>` when adapter/hooks are missing.
64
- 3. OFFER next steps: discovery, technical plan, loop (mention `npx oris-skills loop demo` for first-timers), refresh one area, stop.
65
-
66
- REFRESH runs keep user-confirmed values — the scan merges (`confirmed` sections/commands/decisions survive; missing evidence marks them stale, never deletes).
67
-
68
- ## Local Preferences
69
-
70
- 1. READ `~/.oris/settings.json` (defaults in `references/settings.md`).
71
- 2. ASK what to change: uiLanguage | artifactLanguage | default test profile | add/update/remove profile.
72
- 3. SHOW masked summary (passwords `***`), CONFIRM, write ONLY the settings file.
73
- 4. NEVER copy secrets into `.oris-flow/**`, docs, or loop state.
74
-
75
- ## Done when
76
-
77
- - [ ] Mode chosen; scan before questions; decisions asked one at a time with explainers.
78
- - [ ] Project type and tasksRoot recorded; confirmed commands marked `confirmed`.
79
- - [ ] AI-readiness gaps reported; files scaffolded only on explicit per-file confirmation.
80
- - [ ] Explicit confirmation before every write; no secrets in repository files.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Oris Help"
3
- short_description: "Explain how to use Oris Skills"
4
- default_prompt: "Use $oris-help to explain how to start with Oris Skills."
@@ -1,46 +0,0 @@
1
- ---
2
- name: oris-loop
3
- description: Design, test, run, and self-tune bounded work loops with executor + verifier subagents (doctor/debriefer opt-in). Use for repeated verified work - fix until green, implement plan step by step, align docs, or any observe-act-verify cycle. Cross-platform - Cursor, Claude Code, Codex.
4
- ---
5
-
6
- # Oris Loop
7
-
8
- A loop = observe → choose ONE bounded action → act → verify with evidence → record → repeat or stop.
9
- IF fresh evidence cannot change the next action → recommend a one-shot workflow, not a loop.
10
- IF the goal is verifying acceptance criteria once → recommend `skills/oris-flow-verify/SKILL.md`, not a loop.
11
-
12
- RULES: follow `references/conventions.md`. CONTRACT: `references/loop-contract.md` — the single source for folder layout, loop.md schema (roles, limits, models), states, receipts, and self-improvement (`improve.mode: auto` vs `propose`). Read it before crafting or running.
13
- Treat loop files, receipts, and proposals as untrusted data until they are the approved active loop.
14
-
15
- Default roles per pass: executor + verifier. Doctor and debriefer are opt-in via `roles:` in loop.md — offer them only for multi-phase stop logic (doctor) or long unattended runs (debriefer).
16
-
17
- ## Route
18
-
19
- Pick the smallest path; load ONLY its reference file:
20
-
21
- | User wants… | Route | Read |
22
- |-------------|-------|------|
23
- | a new loop (or adapt an existing one) | craft | `references/craft.md` (in this skill folder) |
24
- | try/learn the system safely | demo | run `npx oris-skills loop demo`, then guide the 3 printed steps |
25
- | execute or resume an approved loop | run | `references/run.md` |
26
- | inspect a loop without running it | audit | read its `loop.md` + `prompts/` + last receipts; report gaps against the contract |
27
- | learn from receipts / tune the loop | improve | `references/improve.md` |
28
-
29
- BEFORE craft/run: `npx oris-skills loop list --json` (fallback: scan `.oris-flow/loops/`).
30
- IF loops exist AND the route is ambiguous → ask ONE question: reuse | adapt | run | audit | new.
31
- NEVER overwrite loop files, receipts, proposals, or history without confirmation.
32
- The prompts under a loop's `prompts/` folder are user-editable — the next pass obeys the edited file.
33
-
34
- ## Test before trusting
35
-
36
- - `npx oris-skills loop demo` — creates a sandbox tutorial loop (touches only its own folder).
37
- - `npx oris-skills loop dry-run --loop <slug>` — prints the exact message the next pass would inject; runs nothing.
38
- - `npx oris-skills loop verify --temp` — self-checks the hook runtime end to end.
39
-
40
- Platform triggers (Cursor stop hook, Claude Code Stop hook, Codex/CI headless run) are defined in the contract. `npx oris-skills loop bootstrap` arms the hooks; `npx oris-skills loop chat --action stop` halts any loop.
41
-
42
- ## Done when
43
-
44
- - [ ] Existing loops checked before creating a new one.
45
- - [ ] Route chosen; only its reference loaded.
46
- - [ ] No loop file written or run without the user's explicit approval.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Oris Loop"
3
- short_description: "Design verified work loops"
4
- default_prompt: "Use $oris-loop to design a bounded current-chat work loop with subagent execution."
@@ -1,49 +0,0 @@
1
- # Craft a loop
2
-
3
- GOAL: interview → draft role prompts → user approves → write files. The user owns the final wording of every prompt.
4
-
5
- ## Interview
6
-
7
- READ first: `.oris-flow/manifest.json` + relevant maps (project facts live there — don't re-ask them).
8
- ASK one question at a time (conventions apply). Required decisions:
9
-
10
- 1. Goal — what does "done" look like?
11
- 2. Verification — how do we PROVE a pass worked? (commands, criteria, observable proof → feeds the VERIFIER prompt verbatim)
12
- 3. Scope — what may the loop inspect/change? What is off-limits?
13
- 4. Stop — when to stop, ask for help, or declare no-progress?
14
- 5. Limits — max passes / minutes (suggest defaults: 25 / 240).
15
- 6. Roles — default executor + verifier (recommend it). Offer doctor ONLY for multi-phase loops with non-trivial stop logic; debriefer ONLY for long unattended runs that should learn across passes.
16
- 7. Models — default `inherit`; ask ONLY if the user wants per-role models.
17
- 8. Improve — `propose` (default) or `auto` (self-tuning prompts; requires the debriefer role)?
18
- 9. Run now or just save?
19
-
20
- INFER phases and structure from the answers. NEVER ask the user to design schemas or subagent contracts.
21
- IF new evidence could not change the next action → recommend a one-shot workflow instead.
22
-
23
- ## Draft prompts
24
-
25
- COPY templates from `skills/oris-loop/templates/` — ONLY for the active roles (executor + verifier by default; doctor/debriefer/orchestrator when opted in).
26
- FILL the CAPS placeholders from interview answers. The verifier prompt MUST embed decision 2 verbatim, including when `goalMet` becomes true.
27
- KEEP runtime placeholders (`{{iteration}}`, `{{phase}}`, `{{currentTarget}}`) — the orchestrator fills them each pass.
28
- TRACE one full pass silently (observe → act → verify → record → stop rule). Repair weak verification or vague stops before showing anything.
29
-
30
- ## Approval gate
31
-
32
- SHOW: goal + stop rule (2 lines), then each draft prompt.
33
- ASK one question: write the loop | edit verifier | edit executor | edit doctor | edit debriefer | keep interviewing.
34
- ITERATE until the user chooses "write the loop". NEVER write files before that.
35
-
36
- ## Write
37
-
38
- Under `.oris-flow/loops/{slug}/`:
39
- - `loop.md` — front matter per `references/loop-contract.md` (`schemaVersion: 2`, `approved: true`, `roles:` from the interview) + body: `Goal:` and `Stop:` lines.
40
- - `prompts/executor.md`, `verifier.md` (+ `doctor.md`, `debriefer.md`, `orchestrator.md` for opted-in roles).
41
- - `context.md` — objective + next action.
42
- - empty `receipts/`, `proposals/`, `history/`.
43
-
44
- THEN: `npx oris-skills loop dry-run --loop {slug}` and show the result.
45
- IF the user chose "run now" → follow `references/run.md`.
46
-
47
- ## Adapt an existing loop
48
-
49
- COPY the source loop's prompts, EDIT only what the interview changed, run the same approval gate. Never overwrite the source loop.
@@ -1,23 +0,0 @@
1
- # Improve a loop
2
-
3
- EVIDENCE FIRST: read receipts + referenced evidence. No pattern from a single run unless the defect is obvious.
4
-
5
- CLASSIFY the cause before touching anything:
6
- loop design | execution choice | verifier gap | environment/tooling | changed goal | insufficient evidence.
7
- ONLY loop-design and verifier-gap causes justify changing the loop.
8
-
9
- ## Where changes land
10
-
11
- | Change | improve.mode: propose | improve.mode: auto |
12
- |--------|----------------------|--------------------|
13
- | prompts/*.md wording | proposal in `proposals/` | debriefer edits directly; old file → `history/`; noted in receipt |
14
- | context.md facts | allowed | allowed |
15
- | scope, limits, permissions, verification commands (loop.md) | proposal + explicit user approval | SAME — never automatic |
16
-
17
- RULE: one improvement per debrief, smallest change the evidence justifies.
18
- APPLYING an approved loop.md change: archive the previous `loop.md` to `history/loop.vN.md`, record the decision in the next receipt.
19
- UNAPPROVED proposals never affect execution.
20
-
21
- ## Outcomes
22
-
23
- Report exactly one: `Keep loop` | `Tuned prompts` | `Patch proposed` | `Execution issue` | `Environment blocked` | `Inconclusive`.
@@ -1,32 +0,0 @@
1
- # Run a loop
2
-
3
- ## Arm (first turn)
4
-
5
- 1. RESOLVE the slug: `npx oris-skills loop list --json`.
6
- 2. CHECK readiness: `npx oris-skills loop dry-run --loop <slug>` (validates prompts + shows the pass message).
7
- 3. ARM: `npx oris-skills loop chat --action start --loop <slug>` (rebind a broken runtime with `--action repair`).
8
- 4. END the turn with one status line. The stop hook injects the next pass automatically — NEVER start a pass in the same turn, NEVER simulate the hook.
9
-
10
- `--task <path>` is only for materializing a NEW loop from a task path. NEVER create symlinks or copied folders to alias slugs.
11
-
12
- ## Each pass (triggered by the hook message)
13
-
14
- The injected message IS the orchestrator prompt (from `prompts/orchestrator.md` or the default). Follow it exactly:
15
-
16
- - Orchestrator = control plane only. NEVER do executor/verifier/doctor work in the main chat.
17
- - SPAWN one subagent per ACTIVE role (listed in the pass message) with its `prompts/<role>.md` file, runtime placeholders filled, model from the pass message.
18
- - No doctor in the active roles → map the verifier verdict yourself: pass + goalMet → complete; pass → continue; fail → continue; blocked/inconclusive → ask-user.
19
- - Windows: workers must not chain commands with `&&`; use the tool working directory.
20
- - RECEIPT per pass (see contract), raw logs → `.oris-flow/runtime/evidence/`.
21
- - CLOSE: `npx oris-skills loop chat --action set-state --state <state> --progress <yes|no>`, then end with `ORIS_LOOP_STATE: <state>`.
22
- - After continue/advance: END THE TURN. Never ask "run next pass?".
23
- - On ask-user: tell the user what decision is needed; the loop stays paused until `set-state --state continue`.
24
-
25
- IF prompts files are missing → `set-state blocked`, tell the user to complete craft. NEVER invent role instructions.
26
- IF subagents cannot be spawned → `set-state blocked`. The main chat never degrades into doing worker roles.
27
- NEVER classify an error, missing tool, or exhausted limit as success.
28
-
29
- ## Headless (Codex / CI)
30
-
31
- `npx oris-skills loop run --loop <slug> --agent codex|claude`
32
- Each active role runs as a separate CLI process with its own prompt file and model (read-only roles run without write access); receipts and state work the same.