opencode-irf 0.0.10-next.1 → 0.0.11
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/README.md +21 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Once installed, just tell OpenCode what you want:
|
|
|
11
11
|
```
|
|
12
12
|
Use IRF to rewrite my instruction files
|
|
13
13
|
Rewrite instructions.md with IRF in verbose mode
|
|
14
|
-
Use IRF to
|
|
14
|
+
Use IRF to add a rule about using early returns
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Overview
|
|
@@ -83,6 +83,10 @@ The `irf-rewrite` tool reads the `instructions` array from your project's `openc
|
|
|
83
83
|
}
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
### irf-rewrite
|
|
87
|
+
|
|
88
|
+
Rewrites all matched instruction files through the parse/format pipeline.
|
|
89
|
+
|
|
86
90
|
```
|
|
87
91
|
irf-rewrite # discover from opencode.json, balanced mode
|
|
88
92
|
irf-rewrite --mode concise # discover, concise output
|
|
@@ -90,13 +94,27 @@ irf-rewrite --files fixtures/testing.md # single file, balanced mode
|
|
|
90
94
|
irf-rewrite --files a.md,b.md --mode verbose # multiple files, verbose output
|
|
91
95
|
```
|
|
92
96
|
|
|
93
|
-
### Parameters
|
|
94
|
-
|
|
95
97
|
| Parameter | Type | Required | Description |
|
|
96
98
|
| --- | --- | --- | --- |
|
|
97
99
|
| `mode` | string | No | Output format: verbose, balanced, or concise (default: balanced) |
|
|
98
100
|
| `files` | string | No | Comma-separated file paths to process instead of discovering from opencode.json |
|
|
99
101
|
|
|
102
|
+
### irf-add
|
|
103
|
+
|
|
104
|
+
Appends new rules to the end of an instruction file without rewriting existing content.
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
irf-add --input "Always use early returns" # append to first discovered file, balanced mode
|
|
108
|
+
irf-add --input "Use early returns" --mode concise
|
|
109
|
+
irf-add --input "Use early returns" --file docs/rules.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Parameter | Type | Required | Description |
|
|
113
|
+
| --- | --- | --- | --- |
|
|
114
|
+
| `input` | string | Yes | Unstructured rule text to parse, format, and append |
|
|
115
|
+
| `file` | string | No | Target file path (default: first discovered instruction file) |
|
|
116
|
+
| `mode` | string | No | Output format: verbose, balanced, or concise (default: balanced) |
|
|
117
|
+
|
|
100
118
|
## Theoretical Foundation
|
|
101
119
|
|
|
102
120
|
IRF is grounded in [speech act theory](https://en.wikipedia.org/wiki/Speech_act) and [deontic logic](https://en.wikipedia.org/wiki/Deontic_logic).
|
package/package.json
CHANGED