@open-tomato/rafa 0.23.0 → 0.24.1
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 +4 -0
- package/dist/cli.js +12033 -9087
- package/dist/{describe-0tefrkk7.js → describe-66gth329.js} +2 -2
- package/dist/effort/store/index.js +2 -2
- package/dist/epic-verify-prompt.md +59 -0
- package/dist/{index-28jzpyks.js → index-4fwgqveh.js} +5 -0
- package/dist/{index-ae290g0m.js → index-7qgng1rf.js} +1 -1
- package/dist/{index-rw7tb99r.js → index-amyd4dse.js} +3315 -1198
- package/dist/{index-ehsb7198.js → index-h369efkh.js} +1502 -822
- package/dist/{index-4a45ffqh.js → index-w1dnwja1.js} +15 -6
- package/dist/index.js +4 -4
- package/dist/templates/epic.md +17 -0
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
commandSpelling,
|
|
5
5
|
isRoutingWord,
|
|
6
6
|
isTopLevel
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-4fwgqveh.js";
|
|
8
8
|
import {
|
|
9
9
|
describeValue
|
|
10
10
|
} from "./index-pmkgvtfe.js";
|
|
@@ -82,14 +82,23 @@ function shadowOf(words, find, subjects) {
|
|
|
82
82
|
return;
|
|
83
83
|
return find(subject.name, second);
|
|
84
84
|
}
|
|
85
|
+
function typedAlias(alias) {
|
|
86
|
+
return alias.trim().split(/\s+/).join(" ");
|
|
87
|
+
}
|
|
85
88
|
function indexAliases(commands, find, subjects) {
|
|
86
89
|
const claimed = new Map;
|
|
87
90
|
const aliases = [];
|
|
88
91
|
for (const command of commands) {
|
|
89
92
|
const spelling = commandSpelling(command);
|
|
93
|
+
const lasting = new Set((command.lastingAliases ?? []).map(typedAlias));
|
|
94
|
+
for (const kept of lasting) {
|
|
95
|
+
if (!(command.aliases ?? []).map(typedAlias).includes(kept)) {
|
|
96
|
+
throw new Error(`${REFUSAL}: command "${spelling}" has lasting alias "${kept}", which is not one of its aliases`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
90
99
|
for (const alias of command.aliases ?? []) {
|
|
91
|
-
const
|
|
92
|
-
const
|
|
100
|
+
const typed = typedAlias(alias);
|
|
101
|
+
const words = Object.freeze(typed.split(" "));
|
|
93
102
|
if (!words.every(isRoutingWord)) {
|
|
94
103
|
throw new Error(`${REFUSAL}: command "${spelling}" has alias ${describeValue(alias)},` + " expected words with no slash and no leading dash");
|
|
95
104
|
}
|
|
@@ -103,7 +112,7 @@ function indexAliases(commands, find, subjects) {
|
|
|
103
112
|
throw new Error(`${REFUSAL}: alias "${typed}" of "${spelling}" is spelled as command "${commandSpelling(shadow)}"`);
|
|
104
113
|
}
|
|
105
114
|
claimed.set(typed, command);
|
|
106
|
-
aliases.push(Object.freeze({ words, command }));
|
|
115
|
+
aliases.push(Object.freeze({ words, command, lasting: lasting.has(typed) }));
|
|
107
116
|
}
|
|
108
117
|
}
|
|
109
118
|
return Object.freeze(aliases.sort((a, b) => b.words.length - a.words.length));
|
|
@@ -189,7 +198,7 @@ function describeArg(arg) {
|
|
|
189
198
|
function describeFlag(flag) {
|
|
190
199
|
return { ...describeArg(flag), aliases: [...flag.aliases ?? []] };
|
|
191
200
|
}
|
|
192
|
-
function
|
|
201
|
+
function typedAlias2(alias) {
|
|
193
202
|
return alias.trim().split(/\s+/).join(" ");
|
|
194
203
|
}
|
|
195
204
|
function describeCommand(command, name, module) {
|
|
@@ -202,7 +211,7 @@ function describeCommand(command, name, module) {
|
|
|
202
211
|
flags: command.flags.map(describeFlag),
|
|
203
212
|
examples: command.examples.map(({ cmd, note }) => ({ cmd, note })),
|
|
204
213
|
outputs: [...command.outputs],
|
|
205
|
-
aliases: module === null ? (command.aliases ?? []).map(
|
|
214
|
+
aliases: module === null ? (command.aliases ?? []).map(typedAlias2) : [],
|
|
206
215
|
deprecated: deprecated === undefined ? null : { since: deprecated.since, use: deprecated.use },
|
|
207
216
|
module,
|
|
208
217
|
spends: spends === undefined ? null : { ...spends }
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
start,
|
|
21
21
|
usage,
|
|
22
22
|
validateManifest
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-h369efkh.js";
|
|
24
24
|
import {
|
|
25
25
|
PLAN_BLOCK_KINDS,
|
|
26
26
|
PLAN_HEADER_FIELDS,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
openNdjsonStore,
|
|
44
44
|
openSqliteStore,
|
|
45
45
|
selectEffortStore
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-7qgng1rf.js";
|
|
47
47
|
import {
|
|
48
48
|
CONFIG_DEFAULTS,
|
|
49
49
|
CONFIG_FILE,
|
|
@@ -60,8 +60,8 @@ import {
|
|
|
60
60
|
resolveConfig
|
|
61
61
|
} from "./index-twbp38kz.js";
|
|
62
62
|
import"./index-d6d0942q.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
63
|
+
import"./index-w1dnwja1.js";
|
|
64
|
+
import"./index-4fwgqveh.js";
|
|
65
65
|
import {
|
|
66
66
|
CLAUDE_SETTING_SOURCES,
|
|
67
67
|
CONFIG_VERSIONS,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- This issue is public. No local paths, no internal hostnames, no credentials. Its body stores intent only: rafa computes the epic's state from its members, and edits the checklist at the end itself. -->
|
|
2
|
+
|
|
3
|
+
## Acceptance criteria
|
|
4
|
+
|
|
5
|
+
- Placeholder: one line per thing that makes this epic finished, written so a check against main can tell whether it holds.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
<!-- The estimate is free text. The date is optional: a YYYY-MM-DD day, or leave it blank. The owned line names the folders this epic's code lives in, separated by commas. -->
|
|
10
|
+
|
|
11
|
+
Estimate:
|
|
12
|
+
Date:
|
|
13
|
+
Owns:
|
|
14
|
+
|
|
15
|
+
## Specs
|
|
16
|
+
|
|
17
|
+
<!-- One line per member issue, in order. rafa writes these lines as issues join and leave the epic; a line is ticked when its pull request merges. -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tomato/rafa",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"description": "Alpha. Runs a plan through the ralph loop: one Claude Code session per task, one commit per task, then a pull request and a CI wait.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"bun": ">=1.3.14"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
-
"build": "rm -rf dist && bun build src/rafa.ts --target=bun --outfile=dist/cli.js && bun build src/index.ts src/plan/index.ts src/effort/store/index.ts src/ports/index.ts src/learning/index.ts --target=bun --splitting --root=src --outdir=dist && cp src/PROMPT.md src/plan-prompt.md dist/ && cp -R src/bundled dist/bundled && bun build src/tools/ts-symbols/cli.ts --target=bun --outfile=dist/bundled/bin/ts-symbols && for tree in pr/plans:plans board/templates:templates; do src=src/${tree%:*}; out=dist/${tree#*:}; [ -d \"$src\" ] || continue; mkdir -p \"$out\" && cp \"$src\"/*.md \"$out\"/ || exit 1; for yml in \"$src\"/*.yml; do [ -e \"$yml\" ] || continue; cp \"$yml\" \"$out\"/ || exit 1; done; done",
|
|
51
|
+
"build": "rm -rf dist && bun build src/rafa.ts --target=bun --outfile=dist/cli.js && bun build src/index.ts src/plan/index.ts src/effort/store/index.ts src/ports/index.ts src/learning/index.ts --target=bun --splitting --root=src --outdir=dist && cp src/PROMPT.md src/plan-prompt.md src/epic-verify-prompt.md dist/ && cp -R src/bundled dist/bundled && bun build src/tools/ts-symbols/cli.ts --target=bun --outfile=dist/bundled/bin/ts-symbols && for tree in pr/plans:plans board/templates:templates; do src=src/${tree%:*}; out=dist/${tree#*:}; [ -d \"$src\" ] || continue; mkdir -p \"$out\" && cp \"$src\"/*.md \"$out\"/ || exit 1; for yml in \"$src\"/*.yml; do [ -e \"$yml\" ] || continue; cp \"$yml\" \"$out\"/ || exit 1; done; done",
|
|
52
52
|
"prepack": "bun run build",
|
|
53
53
|
"test": "bun test",
|
|
54
54
|
"lint": "eslint .",
|