reins-method 0.1.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/SKILLS.md ADDED
@@ -0,0 +1,111 @@
1
+ # Skills
2
+
3
+ A skill is a single `SKILL.md` file describing an on-demand procedure. Skills are
4
+ **never loaded proactively** — the agent reads them only when you explicitly ask, or
5
+ when a workflow phase clearly calls for it.
6
+
7
+ ---
8
+
9
+ ## Where skills live
10
+
11
+ | Skill applies to... | Location |
12
+ |---|---|
13
+ | Everyone, any stack (rare — keep core minimal) | `~/.reins/core/skills/<name>/` |
14
+ | Only you, any project | `~/.reins/user/skills/<name>/` |
15
+ | Only a specific stack/company | `~/.reins/user/adapters/<adapter>/skills/<name>/` |
16
+
17
+ Most custom skills belong in an adapter (if stack/company-specific) or in
18
+ `~/.reins/user/skills/` (if personal and general-purpose).
19
+
20
+ ---
21
+
22
+ ## Creating a skill
23
+
24
+ ```bash
25
+ reins new-skill my-skill
26
+ ```
27
+
28
+ This scaffolds `~/.reins/user/skills/my-skill/SKILL.md`. Or, for guided creation, ask
29
+ your agent to use the **skill-creator** meta-skill
30
+ (`~/.reins/core/skills/skill-creator/SKILL.md`) — it will ask what the skill should do,
31
+ when it should trigger, whether it's read-only, and where it belongs (user vs.
32
+ adapter), then draft the file for your review before writing it.
33
+
34
+ ---
35
+
36
+ ## `SKILL.md` format
37
+
38
+ ```yaml
39
+ ---
40
+ name: my-skill
41
+ description: >
42
+ One or two sentences: what this skill does and when to use it. Be specific —
43
+ this is what the agent uses to decide whether the skill applies.
44
+ allowed-tools: bash # optional
45
+ tags: [tag1, tag2] # optional
46
+ ---
47
+
48
+ # My Skill
49
+
50
+ ## Trigger
51
+ Explicit phrases, file patterns, or situations that should cause this skill to load.
52
+
53
+ ## Context
54
+ What the agent needs to know before acting: relevant files, conventions,
55
+ prerequisites, flags to check.
56
+
57
+ ## Steps
58
+ The procedure, step by step. Be explicit about what requires confirmation before
59
+ proceeding — especially anything destructive or irreversible.
60
+
61
+ ## Output
62
+ What the agent should produce or report when done.
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Conventions
68
+
69
+ - **Read-only by default.** If a skill scaffolds or modifies files, it must preview
70
+ the changes and ask for confirmation before writing.
71
+ - **Specific names.** Avoid generic names that could collide across adapters (prefer
72
+ `rails-crud-scaffold` over `scaffold`).
73
+ - **Specific descriptions.** The `description` field is how the agent decides whether
74
+ to load the skill — vague descriptions cause skills to be missed or over-triggered.
75
+ - **Stack-specific skills belong in adapters**, not in `core/` or `user/skills/`.
76
+
77
+ ---
78
+
79
+ ## Example
80
+
81
+ ```yaml
82
+ ---
83
+ name: rails-crud-scaffold
84
+ description: >
85
+ Generate a CRUD scaffold (model, migration, controller, serializer, request specs)
86
+ for a new Rails resource, following this project's conventions. Use when asked to
87
+ "scaffold", "generate CRUD", or "add a new resource" in a Ruby/Rails project.
88
+ allowed-tools: bash
89
+ tags: [scaffold, ruby]
90
+ ---
91
+
92
+ # Rails CRUD Scaffold
93
+
94
+ ## Trigger
95
+ User asks to scaffold/generate a new resource in a Rails project (`Gemfile` present).
96
+
97
+ ## Context
98
+ Read `standards/floor.md` for naming and folder conventions before generating
99
+ anything. Determine the resource name and attributes from the request; ask if
100
+ ambiguous.
101
+
102
+ ## Steps
103
+ 1. Propose the list of files to be created/modified and their contents (preview only).
104
+ 2. Wait for confirmation.
105
+ 3. Write the files.
106
+ 4. Run the relevant generator/test command (if any) and report the result.
107
+
108
+ ## Output
109
+ - List of files created/modified
110
+ - Any follow-up steps (e.g. run migrations)
111
+ ```
@@ -0,0 +1,61 @@
1
+ # Agent Bridge Files
2
+
3
+ The files in this directory (`CLAUDE.md`, `GEMINI.md`, `AGENTS.md`,
4
+ `copilot-instructions.md`) are **generated** by `reins install` / `reins update` from
5
+ `~/.reins/user/config.yaml` — do not edit them by hand, your changes will be
6
+ overwritten on the next `reins update`.
7
+
8
+ They all carry the same content: an import of `core/workflow/1_orchestrator.md`,
9
+ the user's standards, the active adapters, and the historic mode flag.
10
+
11
+ `reins install`/`reins update`/`reins sync` then wire **every agent detected on this
12
+ machine** (its config directory already exists) to read the corresponding bridge
13
+ file, inside a clearly marked block — not just the one agent picked during `reins
14
+ install`. The generic `~/AGENTS.md` fallback is always wired. If you install a
15
+ new AI agent later, run `reins link-agents` to wire it in without a full `reins
16
+ update`.
17
+
18
+ ```
19
+ <!-- REINS:BEGIN -->
20
+ ... managed content ...
21
+ <!-- REINS:END -->
22
+ ```
23
+
24
+ Only the content between these markers is touched — everything else in your native
25
+ config file (e.g. `~/.claude/CLAUDE.md`) is left alone.
26
+
27
+ | Agent | Bridge file | Native target | Mechanism |
28
+ |---|---|---|---|
29
+ | Claude Code | `CLAUDE.md` | `~/.claude/CLAUDE.md` | `@~/.reins/agents/CLAUDE.md` import |
30
+ | Gemini CLI | `GEMINI.md` | `~/.gemini/GEMINI.md` | `@~/.reins/agents/GEMINI.md` import |
31
+ | GitHub Copilot CLI | `copilot-instructions.md` | `~/.copilot/instructions.md` | reference note (no native import syntax) |
32
+ | Codex CLI | `AGENTS.md` | `~/.codex/AGENTS.md` | reference note |
33
+ | Aider / OpenCode / Cursor / other | `AGENTS.md` | `~/AGENTS.md` | reference note |
34
+
35
+ For agents without a native "import another file" mechanism, the managed block is a
36
+ short pointer to the bridge file. Until that agent supports imports, open the bridge
37
+ file directly (e.g. `cat ~/.reins/agents/AGENTS.md`) or paste its content where needed —
38
+ `reins doctor` will flag this so you know it needs attention.
39
+
40
+ ---
41
+
42
+ ## Skill registration
43
+
44
+ Every bridge file ends with an **"Available skills"** section: a generated list of
45
+ every skill under `core/skills/`, `user/skills/`, and active adapters' `skills/`,
46
+ with their `name`, `description`, and path — built by `collect_skills` /
47
+ `skill_frontmatter` in `bin/reins`. This is how agents without a native skill-discovery
48
+ directory (Gemini CLI, Copilot CLI, Codex CLI, Aider/OpenCode/other) find out what
49
+ skills exist and when to use them.
50
+
51
+ **Claude Code** additionally has a native Agent Skills directory at
52
+ `~/.claude/skills/`. `reins install` / `reins update` / `reins new-skill` / `reins sync` all
53
+ call `sync_skills`, which (when `~/.claude/` exists, regardless of which agent is
54
+ configured as primary) maintains a symlink per REINS skill at
55
+ `~/.claude/skills/reins-<name>` (or
56
+ `~/.claude/skills/reins-<adapter>-<name>` for adapter skills) pointing at the skill's
57
+ directory in `~/.reins/`. These symlinks are namespaced with the `reins-` prefix so they
58
+ can be safely added/removed without touching any of your own Claude Code skills.
59
+
60
+ `reins uninstall` removes all `reins-*` symlinks from `~/.claude/skills/` (in addition to
61
+ removing the managed block from your agent's native config).