plain-forge 1.0.11 → 1.0.12
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 +2 -50
- package/bin/cli.mjs +15 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,9 +42,9 @@ Each skill operates on the same one-question-at-a-time, write-immediately, refin
|
|
|
42
42
|
|
|
43
43
|
plain-forge ships as a set of skills, rules, and docs that plug into your AI coding tool of choice. Install it once, then invoke `forge-plain` (or `add-feature` to add a feature to an existing ***plain project) from any project.
|
|
44
44
|
|
|
45
|
-
### Install with `npx plain-forge install`
|
|
45
|
+
### Install with `npx plain-forge install`
|
|
46
46
|
|
|
47
|
-
The
|
|
47
|
+
The one and only way to install plain-forge. It works for every supported runtime and ships **all** plain-forge content (skills, rules, **and** docs).
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
npx plain-forge install
|
|
@@ -95,40 +95,6 @@ Each deprecated file is confirmed individually before it's deleted — you'll se
|
|
|
95
95
|
|
|
96
96
|
Installs that predate the manifest (anyone who installed before this feature existed) have no manifest to read. `update` still finds them by their skill footprint: if the `forge-plain`, `add-feature`, `debug-specs`, and `load-plain-reference` skills are all present in an agent directory, it's treated as a plain-forge install. Such installs are refreshed without pruning (overwrite-only), and gain a manifest going forward so later updates can prune.
|
|
97
97
|
|
|
98
|
-
### Alternative install paths (skills only — no rules or docs)
|
|
99
|
-
|
|
100
|
-
These work but only install the skill files. Rules and docs do **not** travel with them, so use them only if you have a reason not to use `npx plain-forge install`.
|
|
101
|
-
|
|
102
|
-
#### `npx skills` CLI
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
npx skills add Codeplain-ai/plain-forge --skill '*' --agent claude-code
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Replace `--agent claude-code` with `codex` or `opencode` to target a different runtime, or repeat the flag for several at once.
|
|
109
|
-
|
|
110
|
-
#### Claude Code native plugin flow
|
|
111
|
-
|
|
112
|
-
Requires the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code). Inside a Claude Code session, run the following **three commands** one after the other:
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
/plugin marketplace add Codeplain-ai/plain-forge
|
|
116
|
-
/plugin install plain-forge@plain-forge
|
|
117
|
-
/reload-plugins
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Without the reload the skills won't appear in the current session.
|
|
121
|
-
|
|
122
|
-
#### Codex native plugin flow
|
|
123
|
-
|
|
124
|
-
Requires the [OpenAI Codex CLI](https://developers.openai.com/codex/cli/reference). From your shell:
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
codex plugin marketplace add Codeplain-ai/plain-forge
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Then, inside Codex, open the plugin directory, pick the `plain-forge` marketplace, and install the plugin from there. (Codex's CLI does not currently expose a `codex plugin install` equivalent.)
|
|
131
|
-
|
|
132
98
|
## Usage
|
|
133
99
|
|
|
134
100
|
### Prerequisites
|
|
@@ -218,20 +184,6 @@ bin/
|
|
|
218
184
|
.opencode/ # OpenCode plugin layout
|
|
219
185
|
```
|
|
220
186
|
|
|
221
|
-
### Contributing
|
|
222
|
-
|
|
223
|
-
After editing anything under `forge/` or `runtimes/*/templates/`, regenerate the runtime outputs:
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
npm install # required after every fresh clone (node_modules/ is gitignored)
|
|
227
|
-
npm run build # regenerate runtime outputs for Claude, Codex, OpenCode
|
|
228
|
-
npm run clean # remove generated outputs and rebuild from scratch
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
If `npm run build` errors with `sh: tsx: command not found`, it means `node_modules/` is missing — run `npm install` first.
|
|
232
|
-
|
|
233
|
-
The build is idempotent — re-running it produces no `git diff`.
|
|
234
|
-
|
|
235
187
|
## Available Skills
|
|
236
188
|
|
|
237
189
|
### Core Workflow
|
package/bin/cli.mjs
CHANGED
|
@@ -557,8 +557,21 @@ async function main() {
|
|
|
557
557
|
|
|
558
558
|
// Only run the CLI when executed directly — importing this module (e.g. from
|
|
559
559
|
// the test suite) must not trigger main() or process.exit().
|
|
560
|
-
|
|
561
|
-
|
|
560
|
+
// `__filename` (from import.meta.url) is realpath-resolved by Node, but
|
|
561
|
+
// process.argv[1] is the path as invoked — under npx / a global install it's a
|
|
562
|
+
// symlink in node_modules/.bin or the npx cache. Resolve both through realpath
|
|
563
|
+
// so the comparison survives symlinked bins; otherwise main() silently never
|
|
564
|
+
// runs (spinner, then nothing).
|
|
565
|
+
function isInvokedDirectly() {
|
|
566
|
+
const invoked = process.argv[1];
|
|
567
|
+
if (!invoked) return false;
|
|
568
|
+
try {
|
|
569
|
+
return fs.realpathSync(invoked) === __filename;
|
|
570
|
+
} catch {
|
|
571
|
+
return path.resolve(invoked) === __filename;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
const invokedDirectly = isInvokedDirectly();
|
|
562
575
|
if (invokedDirectly) {
|
|
563
576
|
main().catch((err) => {
|
|
564
577
|
if (err instanceof Error && err.message === "cancelled") {
|