oris-skills 2.0.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.
- package/.cursor-plugin/plugin.json +31 -0
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/agents/oris-loop-debriefer.md +29 -0
- package/agents/oris-loop-doctor.md +32 -0
- package/agents/oris-loop-executor.md +32 -0
- package/agents/oris-loop-verifier.md +31 -0
- package/docs/architecture.md +26 -0
- package/docs/distribution.md +38 -0
- package/docs/maintainer-guide.md +32 -0
- package/docs/user-guide.md +42 -0
- package/package.json +49 -0
- package/references/clean-code-checklist.md +107 -0
- package/references/conventions.md +39 -0
- package/references/doc-policy.md +24 -0
- package/references/loop-adapter.schema.json +126 -0
- package/references/loop-contract.md +119 -0
- package/references/loop.schema.json +143 -0
- package/references/questions.md +38 -0
- package/references/repo-map.md +53 -0
- package/references/repo-map.schema.json +198 -0
- package/references/settings.md +35 -0
- package/references/settings.schema.json +75 -0
- package/scripts/flow/oris-flow-clean-runtime.mjs +182 -0
- package/scripts/flow/oris-flow-layout.mjs +53 -0
- package/scripts/flow/oris-flow-scan.mjs +350 -0
- package/scripts/flow/oris-flow-version-control.mjs +42 -0
- package/scripts/flow/oris-gitignore.mjs +79 -0
- package/scripts/install/generate-agent-adapters.mjs +74 -0
- package/scripts/install/install-user-skills.mjs +271 -0
- package/scripts/install/uninstall-user-skills.mjs +163 -0
- package/scripts/loop/oris-loop-bootstrap.mjs +383 -0
- package/scripts/loop/oris-loop-bundle.mjs +22 -0
- package/scripts/loop/oris-loop-chat.mjs +408 -0
- package/scripts/loop/oris-loop-demo.mjs +180 -0
- package/scripts/loop/oris-loop-document.mjs +179 -0
- package/scripts/loop/oris-loop-dry-run.mjs +110 -0
- package/scripts/loop/oris-loop-fixtures.mjs +148 -0
- package/scripts/loop/oris-loop-list.mjs +81 -0
- package/scripts/loop/oris-loop-paths.mjs +232 -0
- package/scripts/loop/oris-loop-run.mjs +241 -0
- package/scripts/loop/oris-loop-stop.mjs +319 -0
- package/scripts/loop/oris-loop-templates.mjs +77 -0
- package/scripts/loop/oris-loop-verify.mjs +206 -0
- package/scripts/oris-skills.mjs +116 -0
- package/scripts/package-oris-skills.mjs +53 -0
- package/scripts/tests/run-all-tests.mjs +38 -0
- package/scripts/tests/test-agent-adapters.mjs +19 -0
- package/scripts/tests/test-oris-1-0-cleanliness.mjs +58 -0
- package/scripts/tests/test-oris-flow-clean-runtime.mjs +75 -0
- package/scripts/tests/test-oris-flow-scan.mjs +49 -0
- package/scripts/tests/test-oris-gitignore.mjs +35 -0
- package/scripts/tests/test-oris-loop-bootstrap.mjs +94 -0
- package/scripts/tests/test-oris-loop-document.mjs +112 -0
- package/scripts/tests/test-oris-loop-list.mjs +74 -0
- package/scripts/tests/test-oris-loop-run.mjs +45 -0
- package/scripts/tests/test-oris-loop-smoke.mjs +130 -0
- package/scripts/tests/test-oris-loop-stop.mjs +371 -0
- package/scripts/tests/test-routing-lifecycle.mjs +181 -0
- package/scripts/tests/test-schemas.mjs +55 -0
- package/skills/oris-flow/SKILL.md +55 -0
- package/skills/oris-flow/agents/openai.yaml +4 -0
- package/skills/oris-flow-criteria/SKILL.md +49 -0
- package/skills/oris-flow-discover/SKILL.md +58 -0
- package/skills/oris-flow-docs/SKILL.md +31 -0
- package/skills/oris-flow-fix/SKILL.md +42 -0
- package/skills/oris-flow-implement/SKILL.md +43 -0
- package/skills/oris-flow-plan/SKILL.md +51 -0
- package/skills/oris-flow-setup/SKILL.md +49 -0
- package/skills/oris-help/SKILL.md +30 -0
- package/skills/oris-help/agents/openai.yaml +4 -0
- package/skills/oris-loop/SKILL.md +66 -0
- package/skills/oris-loop/agents/openai.yaml +4 -0
- package/skills/oris-loop/references/craft.md +48 -0
- package/skills/oris-loop/references/improve.md +23 -0
- package/skills/oris-loop/references/run.md +30 -0
- package/skills/oris-loop/templates/debriefer.md +18 -0
- package/skills/oris-loop/templates/doctor.md +20 -0
- package/skills/oris-loop/templates/executor.md +19 -0
- package/skills/oris-loop/templates/orchestrator.md +33 -0
- package/skills/oris-loop/templates/verifier.md +21 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://oris.dev/schemas/oris-loop-adapter-v1.json",
|
|
4
|
+
"title": "Oris Loop Repository Adapter",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "repository", "paths", "commands", "profile", "preflight"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"const": "https://oris.dev/schemas/oris-loop-adapter-v1.json"
|
|
11
|
+
},
|
|
12
|
+
"schemaVersion": {
|
|
13
|
+
"const": 1
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"paths": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["runtime", "allowed", "protected"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"taskRoots": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"uniqueItems": true,
|
|
27
|
+
"items": { "$ref": "#/$defs/relativePath" }
|
|
28
|
+
},
|
|
29
|
+
"runtime": { "$ref": "#/$defs/relativePath" },
|
|
30
|
+
"loops": { "$ref": "#/$defs/relativePath" },
|
|
31
|
+
"allowed": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"minItems": 1,
|
|
34
|
+
"uniqueItems": true,
|
|
35
|
+
"items": { "$ref": "#/$defs/relativePath" }
|
|
36
|
+
},
|
|
37
|
+
"protected": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"uniqueItems": true,
|
|
40
|
+
"items": { "$ref": "#/$defs/relativePath" }
|
|
41
|
+
},
|
|
42
|
+
"testDir": { "$ref": "#/$defs/relativePath" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"commands": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"minProperties": 1,
|
|
48
|
+
"propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" },
|
|
49
|
+
"additionalProperties": { "$ref": "#/$defs/command" }
|
|
50
|
+
},
|
|
51
|
+
"models": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"description": "Model alias map per repository, e.g. { \"smart\": \"composer-2.5\" }; loop.md can reference aliases",
|
|
54
|
+
"propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" },
|
|
55
|
+
"additionalProperties": { "type": "string", "minLength": 1 }
|
|
56
|
+
},
|
|
57
|
+
"profile": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": ["required", "defaultRole", "mappings"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"required": { "type": "boolean" },
|
|
63
|
+
"defaultRole": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^[a-z][a-zA-Z0-9]*$"
|
|
66
|
+
},
|
|
67
|
+
"mappings": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "$ref": "#/$defs/mapping" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"preflight": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["minFreeDiskGiB"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"minFreeDiskGiB": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"minimum": 0
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"$defs": {
|
|
86
|
+
"relativePath": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"not": { "pattern": "(^|[\\\\/])\\.\\.([\\\\/]|$)" }
|
|
90
|
+
},
|
|
91
|
+
"command": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["executable", "args", "cwd"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"executable": { "type": "string", "minLength": 1 },
|
|
97
|
+
"args": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "type": "string" }
|
|
100
|
+
},
|
|
101
|
+
"cwd": { "$ref": "#/$defs/relativePath" },
|
|
102
|
+
"requiresFreeDiskGiB": {
|
|
103
|
+
"type": "number",
|
|
104
|
+
"minimum": 0
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"mapping": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": ["env", "from", "required", "secret"],
|
|
112
|
+
"properties": {
|
|
113
|
+
"env": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
116
|
+
},
|
|
117
|
+
"from": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"pattern": "^[A-Za-z][A-Za-z0-9]*(\\.[A-Za-z][A-Za-z0-9]*)*$"
|
|
120
|
+
},
|
|
121
|
+
"required": { "type": "boolean" },
|
|
122
|
+
"secret": { "type": "boolean" }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Oris Loop Contract (v2)
|
|
2
|
+
|
|
3
|
+
An Oris loop is a project-local feedback system: observe → choose ONE bounded action → act → verify with real evidence → record → repeat or stop. It is never permission for work outside its approved scope.
|
|
4
|
+
|
|
5
|
+
## Layout — everything lives in the project
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.oris-flow/
|
|
9
|
+
adapter.json repo adapter (paths, commands, model aliases) — `oris-skills loop bootstrap`
|
|
10
|
+
loops/{slug}/
|
|
11
|
+
loop.md approved contract (front matter below)
|
|
12
|
+
prompts/ one editable file per role
|
|
13
|
+
orchestrator.md injected each pass by the stop hook (optional; default shipped)
|
|
14
|
+
executor.md required
|
|
15
|
+
verifier.md required
|
|
16
|
+
doctor.md required
|
|
17
|
+
debriefer.md optional (required for improve.mode: auto)
|
|
18
|
+
context.md living handoff snapshot (facts, next action)
|
|
19
|
+
receipts/ one compact receipt per pass
|
|
20
|
+
proposals/ unapproved improvement patches
|
|
21
|
+
history/ archived loop.md and prompt versions
|
|
22
|
+
runtime/ machine-owned state — agents NEVER edit it
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## loop.md front matter (the runtime contract)
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
---
|
|
29
|
+
schemaVersion: 2
|
|
30
|
+
kind: oris-loop
|
|
31
|
+
name: my-loop # stable slug
|
|
32
|
+
approved: true # set by the user's approval at craft — loop cannot start without it
|
|
33
|
+
phases: [work]
|
|
34
|
+
limits:
|
|
35
|
+
maxIterations: 25
|
|
36
|
+
maxNoProgress: 2
|
|
37
|
+
maxMinutes: 240
|
|
38
|
+
models: # per-role: "inherit" | adapter alias | platform model id
|
|
39
|
+
default: inherit
|
|
40
|
+
verifier: inherit # override any role independently
|
|
41
|
+
improve:
|
|
42
|
+
mode: propose # propose | auto (auto = debriefer may rewrite prompts/ between passes)
|
|
43
|
+
permissions:
|
|
44
|
+
allowedPaths: []
|
|
45
|
+
forbiddenActions: [commit, push, deploy, external-message]
|
|
46
|
+
verification:
|
|
47
|
+
commands: []
|
|
48
|
+
evidenceRequired: true
|
|
49
|
+
---
|
|
50
|
+
Goal: one sentence.
|
|
51
|
+
Stop: one sentence.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Schema: `references/loop.schema.json`. Body = human summary; prompts live in `prompts/`, never inline.
|
|
55
|
+
`approved: true` marks user approval of goal, scope, prompts, and limits. It never authorizes work outside the loop.
|
|
56
|
+
|
|
57
|
+
## Roles
|
|
58
|
+
|
|
59
|
+
| Role | Does | Never |
|
|
60
|
+
|------|------|-------|
|
|
61
|
+
| orchestrator (main chat) | reads context, spawns roles, writes receipts, sets state | executor/verifier/doctor work |
|
|
62
|
+
| executor | ONE bounded action per pass | self-verify, exceed scope |
|
|
63
|
+
| verifier | independent evidence check per user criteria | trust claims, edit product files |
|
|
64
|
+
| doctor | continue / advance / complete / stop from evidence | edit files, patch loop.md |
|
|
65
|
+
| debriefer | learn across receipts; tune prompts (auto) or propose (propose) | touch scope/limits/permissions |
|
|
66
|
+
|
|
67
|
+
Every prompt is a file the user can edit; the next pass obeys the edited file. Subagent output stays compact; raw logs go to `.oris-flow/runtime/evidence/`.
|
|
68
|
+
|
|
69
|
+
## Models
|
|
70
|
+
|
|
71
|
+
`inherit` → the current session's model (no explicit model passed).
|
|
72
|
+
Adapter aliases → `adapter.json` `models: { "smart": "<platform-model-id>" }`; loop.md references the alias, so the same loop.md ports across platforms.
|
|
73
|
+
Anything else → passed through as a platform model id.
|
|
74
|
+
|
|
75
|
+
## Triggers per platform
|
|
76
|
+
|
|
77
|
+
| Platform | Mechanism |
|
|
78
|
+
|----------|-----------|
|
|
79
|
+
| Cursor | `.cursor/hooks.json` stop hook → injects the next pass into the same chat |
|
|
80
|
+
| Claude Code | `.claude/settings.json` Stop hook → `decision: block` continues the same session |
|
|
81
|
+
| Codex / CI | `oris-skills loop run` — each role is a separate CLI process |
|
|
82
|
+
|
|
83
|
+
`oris-skills loop bootstrap` writes adapter + hooks + wrappers. The injected pass message comes from `prompts/orchestrator.md` (or the shipped default) with `{{placeholders}}` filled from runtime state.
|
|
84
|
+
|
|
85
|
+
## States and outcomes
|
|
86
|
+
|
|
87
|
+
Machine states: `continue` | `advance` | `complete` | `blocked` | `cancelled`.
|
|
88
|
+
Receipt results: `Success` | `Clean no-op` | `Blocked` | `Approval required` | `Exhausted` | `No progress`.
|
|
89
|
+
Hitting any limit without meeting the goal = `blocked`, NEVER success.
|
|
90
|
+
|
|
91
|
+
## Receipt (per pass)
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
# Oris Loop Receipt
|
|
95
|
+
Loop: <slug> | Pass: <n> | Result: <outcome>
|
|
96
|
+
Scope: <inspected/changed>
|
|
97
|
+
Check: <verification + conditions>
|
|
98
|
+
Evidence:
|
|
99
|
+
- <summary + pointer>
|
|
100
|
+
Actions:
|
|
101
|
+
- <bounded action + outcome>
|
|
102
|
+
Improved: <prompt tuned this pass, or none>
|
|
103
|
+
Next: <next action | approval | blocker | nothing>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
No secrets, no private reasoning, no full transcripts in receipts.
|
|
107
|
+
|
|
108
|
+
## Self-improvement
|
|
109
|
+
|
|
110
|
+
- `improve.mode: auto` → debriefer may rewrite `prompts/*.md` (archive old file to `history/` first, note the change in the receipt). One improvement per pass, evidence-backed.
|
|
111
|
+
- `improve.mode: propose` → every change lands in `proposals/` until the user approves.
|
|
112
|
+
- BOTH modes: scope, limits, permissions, verification commands change only via approved proposal; previous `loop.md` → `history/loop.vN.md`.
|
|
113
|
+
|
|
114
|
+
## Iteration rules
|
|
115
|
+
|
|
116
|
+
- Re-read fresh state before consequential actions; preserve unrelated user work.
|
|
117
|
+
- Only declared paths, commands, tools, and data policy.
|
|
118
|
+
- NEVER: commit, push, branch, PR, deploy, DevOps writes, external messages, credential exposure — unless the loop explicitly permits that exact action.
|
|
119
|
+
- Real verification before claiming success. Update only `context.md`, receipts, and declared write scopes.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://oris.dev/schemas/oris-loop-v2.json",
|
|
4
|
+
"title": "Oris Loop document front matter (v2)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"name",
|
|
11
|
+
"approved",
|
|
12
|
+
"phases",
|
|
13
|
+
"limits",
|
|
14
|
+
"permissions",
|
|
15
|
+
"verification"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": {
|
|
19
|
+
"const": 2
|
|
20
|
+
},
|
|
21
|
+
"kind": {
|
|
22
|
+
"const": "oris-loop"
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$",
|
|
27
|
+
"minLength": 2,
|
|
28
|
+
"maxLength": 80
|
|
29
|
+
},
|
|
30
|
+
"approved": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "true only after the user approved goal, scope, prompts, and limits"
|
|
33
|
+
},
|
|
34
|
+
"models": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": true,
|
|
37
|
+
"description": "Per-role model: \"inherit\" (session model), an adapter alias, or a platform model id",
|
|
38
|
+
"properties": {
|
|
39
|
+
"default": { "$ref": "#/$defs/model" },
|
|
40
|
+
"executor": { "$ref": "#/$defs/model" },
|
|
41
|
+
"verifier": { "$ref": "#/$defs/model" },
|
|
42
|
+
"doctor": { "$ref": "#/$defs/model" },
|
|
43
|
+
"debriefer": { "$ref": "#/$defs/model" }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"improve": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": true,
|
|
49
|
+
"properties": {
|
|
50
|
+
"mode": {
|
|
51
|
+
"enum": ["propose", "auto"],
|
|
52
|
+
"description": "auto lets the debriefer rewrite prompts/ between passes; propose requires user approval for every change"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"phases": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"minItems": 1,
|
|
59
|
+
"maxItems": 12,
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"limits": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": [
|
|
68
|
+
"maxIterations",
|
|
69
|
+
"maxNoProgress"
|
|
70
|
+
],
|
|
71
|
+
"additionalProperties": true,
|
|
72
|
+
"properties": {
|
|
73
|
+
"maxIterations": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 1,
|
|
76
|
+
"maximum": 500
|
|
77
|
+
},
|
|
78
|
+
"maxNoProgress": {
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"minimum": 1,
|
|
81
|
+
"maximum": 50
|
|
82
|
+
},
|
|
83
|
+
"maxMinutes": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"minimum": 1,
|
|
86
|
+
"maximum": 1440
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"permissions": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": [
|
|
93
|
+
"allowedPaths",
|
|
94
|
+
"forbiddenActions"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": true,
|
|
97
|
+
"properties": {
|
|
98
|
+
"allowedPaths": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"forbiddenActions": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"minItems": 1,
|
|
108
|
+
"items": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"verification": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": [
|
|
118
|
+
"commands",
|
|
119
|
+
"evidenceRequired"
|
|
120
|
+
],
|
|
121
|
+
"additionalProperties": true,
|
|
122
|
+
"properties": {
|
|
123
|
+
"commands": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"items": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"minLength": 1
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"evidenceRequired": {
|
|
131
|
+
"type": "boolean"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"$defs": {
|
|
137
|
+
"model": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1,
|
|
140
|
+
"maxLength": 120
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Oris Question Contract
|
|
2
|
+
|
|
3
|
+
How every Oris skill asks. Base rules live in `references/conventions.md`; this file adds the standard options and localized labels.
|
|
4
|
+
|
|
5
|
+
## Standard options
|
|
6
|
+
|
|
7
|
+
Include in every Oris question, localized to `uiLanguage`:
|
|
8
|
+
|
|
9
|
+
| Option | `en` | `it` |
|
|
10
|
+
|--------|------|------|
|
|
11
|
+
| explanation (always) | `Explain the options` | `Spiega le opzioni` |
|
|
12
|
+
| early exit (interviews only) | `Enough questions — proceed` | `Basta domande — procedi` |
|
|
13
|
+
|
|
14
|
+
- Explanation → explain briefly, re-ask the same question.
|
|
15
|
+
- Early exit → stop asking, go to the matching generation gate. It is NOT approval to write or execute.
|
|
16
|
+
|
|
17
|
+
## Generation gates
|
|
18
|
+
|
|
19
|
+
Standard labels:
|
|
20
|
+
|
|
21
|
+
| `en` | `it` |
|
|
22
|
+
|------|------|
|
|
23
|
+
| `Generate the document` | `Genera il documento` |
|
|
24
|
+
| `Approve document` | `Approva documento` |
|
|
25
|
+
| `Continue the interview` | `Continua l'intervista` |
|
|
26
|
+
| `Cancel` | `Annulla` |
|
|
27
|
+
|
|
28
|
+
Rules:
|
|
29
|
+
1. NEVER write documents, code, or external changes before the explicit gate choice.
|
|
30
|
+
2. Exception: `oris-flow-criteria` writes the file first, then asks once — confirmed only on `Approve document` / `Generate the document`.
|
|
31
|
+
3. After a document is written: concise summary + contextual next-step menu. NEVER auto-start the next phase.
|
|
32
|
+
|
|
33
|
+
## Interview standard
|
|
34
|
+
|
|
35
|
+
Oris is a guided product, not a silent task runner.
|
|
36
|
+
1. READ everything the repo can answer first; ask only real decisions.
|
|
37
|
+
2. ONE focused question per turn until outcome, authority, evidence, and stop rules are clear.
|
|
38
|
+
3. The agent recommends; the user's explicit choice decides the approved scope.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Oris Repository Map
|
|
2
|
+
|
|
3
|
+
Setup map = the default project context for every Oris skill and loop. It exists so agents stop re-scanning and users stop repeating project facts.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Scope | Purpose |
|
|
8
|
+
|------|-------|---------|
|
|
9
|
+
| `.oris-flow/manifest.json` | repo | compact index: section paths, freshness, confidence, refresh policy |
|
|
10
|
+
| `.oris-flow/maps/**` | repo | short markdown maps: docs, stack, commands, code areas, tests |
|
|
11
|
+
| `.oris-flow/adapter.json` | repo | loop adapter: paths, commands, model aliases |
|
|
12
|
+
| `~/.oris/settings.json` | user | language + test profiles |
|
|
13
|
+
| `docs/tasks/{task}/…` | task | business artifacts only |
|
|
14
|
+
|
|
15
|
+
Manifest and maps are never task authority and NEVER hold secrets.
|
|
16
|
+
|
|
17
|
+
## Manifest shape (v1)
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"$schema": "https://oris.dev/schemas/oris-flow-map-v1.json",
|
|
22
|
+
"schemaVersion": 1,
|
|
23
|
+
"repository": "",
|
|
24
|
+
"generatedAt": "",
|
|
25
|
+
"updatedAt": "",
|
|
26
|
+
"setup": { "versionControl": { "orisFlowMap": "commit" } },
|
|
27
|
+
"refreshPolicy": {},
|
|
28
|
+
"sections": {}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- Small: only sections that exist for the detected stack; no placeholders.
|
|
33
|
+
- Each section: file path, one-line summary, `confidence`, `lastScannedAt`, stale flag.
|
|
34
|
+
- Confidence: `confirmed` (user/authoritative) | `detected` (strong scan evidence) | `inferred` (unverified) | `stale` (no longer matches).
|
|
35
|
+
- `setup.versionControl.orisFlowMap`: `commit` | `gitignore` — applied via `oris-skills flow version-control --mode <choice>`.
|
|
36
|
+
- Schema: `references/repo-map.schema.json`.
|
|
37
|
+
|
|
38
|
+
## Map sections
|
|
39
|
+
|
|
40
|
+
`.oris-flow/maps/`: `README.md`, `docs.md`, `stack.md`, `commands.md`, `code.md`, `tests.md`.
|
|
41
|
+
Each section: purpose, authoritative paths, confirmed decisions, key commands/conventions, confidence + stale notes, pointers instead of copied content.
|
|
42
|
+
|
|
43
|
+
## Consumption rules
|
|
44
|
+
|
|
45
|
+
1. MANIFEST first, then only the relevant map sections — before any broad scan.
|
|
46
|
+
2. VERIFY stale or high-risk facts against the repository before consequential actions.
|
|
47
|
+
3. Loops: the orchestrator passes relevant setup-map facts into role prompts at craft time; users never repeat project facts per loop.
|
|
48
|
+
4. SUGGEST `/oris-flow` → Setup refresh only when a stale gap materially affects the task.
|
|
49
|
+
5. Refresh policy is advisory — never a scheduler.
|
|
50
|
+
|
|
51
|
+
## Command surface
|
|
52
|
+
|
|
53
|
+
In target repositories always use the installed CLI (`oris-skills flow scan|version-control|clean-runtime`, `oris-skills loop …`), never `node scripts/...` paths — those exist only in the OrisSkills source checkout.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://oris.dev/schemas/oris-flow-map-v1.json",
|
|
4
|
+
"title": "Oris Flow Repository Map",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"$schema",
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"repository",
|
|
11
|
+
"generatedAt",
|
|
12
|
+
"updatedAt",
|
|
13
|
+
"setup",
|
|
14
|
+
"sections"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"$schema": {
|
|
18
|
+
"const": "https://oris.dev/schemas/oris-flow-map-v1.json"
|
|
19
|
+
},
|
|
20
|
+
"schemaVersion": {
|
|
21
|
+
"const": 1
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"generatedAt": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
},
|
|
31
|
+
"updatedAt": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"format": "date-time"
|
|
34
|
+
},
|
|
35
|
+
"mapVersion": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"setup": {
|
|
40
|
+
"$ref": "#/$defs/setup"
|
|
41
|
+
},
|
|
42
|
+
"refreshPolicy": {
|
|
43
|
+
"$ref": "#/$defs/refreshPolicy"
|
|
44
|
+
},
|
|
45
|
+
"sections": {
|
|
46
|
+
"$ref": "#/$defs/sections"
|
|
47
|
+
},
|
|
48
|
+
"stacks": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "#/$defs/stack"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"commands": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"$ref": "#/$defs/detectedCommand"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"$defs": {
|
|
62
|
+
"confidence": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"enum": ["confirmed", "detected", "inferred", "stale"]
|
|
65
|
+
},
|
|
66
|
+
"sectionPointer": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": ["path", "confidence"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"path": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^\\.oris-flow/"
|
|
74
|
+
},
|
|
75
|
+
"confidence": {
|
|
76
|
+
"$ref": "#/$defs/confidence"
|
|
77
|
+
},
|
|
78
|
+
"lastScannedAt": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"format": "date-time"
|
|
81
|
+
},
|
|
82
|
+
"stale": {
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
},
|
|
85
|
+
"summary": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"sections": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": {
|
|
93
|
+
"$ref": "#/$defs/sectionPointer"
|
|
94
|
+
},
|
|
95
|
+
"propertyNames": {
|
|
96
|
+
"pattern": "^[a-z][a-zA-Z0-9-]*$"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"refreshPolicy": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["mode"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"mode": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"enum": ["manual", "monthly", "after-major-refactor", "after-test-layout-change"]
|
|
107
|
+
},
|
|
108
|
+
"suggestAfterDays": {
|
|
109
|
+
"type": "integer",
|
|
110
|
+
"minimum": 1
|
|
111
|
+
},
|
|
112
|
+
"triggers": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": ["after-major-refactor", "after-test-layout-change"]
|
|
117
|
+
},
|
|
118
|
+
"uniqueItems": true
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"setup": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"required": ["mode", "scanDepth"],
|
|
126
|
+
"properties": {
|
|
127
|
+
"mode": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"enum": ["create", "refresh", "review-stale", "update-area", "summary"]
|
|
130
|
+
},
|
|
131
|
+
"scanDepth": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"enum": ["fast", "balanced", "manual-summary"]
|
|
134
|
+
},
|
|
135
|
+
"confirmedDecisions": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"tradeOff": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"versionControl": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"properties": {
|
|
148
|
+
"orisFlowMap": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"enum": ["commit", "gitignore"]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"stack": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": ["id", "label", "evidence"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"id": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
164
|
+
},
|
|
165
|
+
"label": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"minLength": 1
|
|
168
|
+
},
|
|
169
|
+
"evidence": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"detectedCommand": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": ["name", "cwd", "command", "evidence"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"name": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
185
|
+
},
|
|
186
|
+
"cwd": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"command": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
},
|
|
192
|
+
"evidence": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|