yadflow 4.0.0-next.4 → 4.0.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/CHANGELOG.md +537 -0
- package/README.md +236 -334
- package/bin/yad.mjs +2 -2
- package/cli/capture.mjs +1 -1
- package/cli/claims.mjs +1 -1
- package/cli/errors.mjs +2 -2
- package/package.json +3 -3
package/bin/yad.mjs
CHANGED
|
@@ -948,7 +948,7 @@ main()
|
|
|
948
948
|
})
|
|
949
949
|
.catch(async (err) => {
|
|
950
950
|
// Under --json every failure is still one object on stdout (E1) — a refusal from the parser, a
|
|
951
|
-
// thrown YadError, a bug. The `code` is the `YAD-` code
|
|
951
|
+
// thrown YadError, a bug. The `code` is the `YAD-` code the docs/CLI.md "Error codes" table is keyed on.
|
|
952
952
|
// If the command had already answered, stdout holds its object, and the failure goes to stderr.
|
|
953
953
|
if (inJSON() && !jsonEmitted()) {
|
|
954
954
|
if (err?.parsedCmd !== undefined && runningCmd === null) beginJSON(commandName(err.parsedWords ?? []));
|
|
@@ -959,7 +959,7 @@ main()
|
|
|
959
959
|
const code = err?.code && /^YAD-/.test(err.code) ? ` [${err.code}]` : '';
|
|
960
960
|
log(c.red(`\nyad failed${code}: ${err?.message || err}`));
|
|
961
961
|
if (err?.hint) log(c.yellow(` → ${err.hint}`));
|
|
962
|
-
if (code) log(c.dim(' (see
|
|
962
|
+
if (code) log(c.dim(' (see the error codes in https://github.com/abdelrahmannasr/yadflow/blob/main/docs/CLI.md#error-codes, or run `yad doctor`)'));
|
|
963
963
|
process.exitCode = 1;
|
|
964
964
|
// Offer to report the failure — but only interactively (never in CI), and opt-out via
|
|
965
965
|
// YAD_NO_REPORT. `report` failing on its own would land here, so never re-offer for it.
|
package/cli/capture.mjs
CHANGED
|
@@ -319,7 +319,7 @@ export async function runCapture(root, { hook = false, noPush = false, now = Dat
|
|
|
319
319
|
// secret captured by mistake, say) is not continued from a stale copy (E43 review 3). This prune clears
|
|
320
320
|
// every stale copy on the hand path; a LOCAL branch is still pushed back, and the hook, which never
|
|
321
321
|
// fetches, still reads a copy another fetch left. Removing one for good means `git branch -D` and
|
|
322
|
-
// `git branch -dr origin/…` on every machine too (
|
|
322
|
+
// `git branch -dr origin/…` on every machine too (docs/CLI.md, Background capture). The same
|
|
323
323
|
// low-speed limit as the push, so a stalled HTTPS connection gives up instead of holding the capture.
|
|
324
324
|
spawnSync('git', ['-c', 'http.lowSpeedLimit=1000', '-c', 'http.lowSpeedTime=20', 'fetch', '--quiet', '--prune', '--no-tags', 'origin', `+refs/heads/${WIP_PREFIX}/${name}/*:refs/remotes/origin/${WIP_PREFIX}/${name}/*`],
|
|
325
325
|
{ cwd: root, stdio: 'ignore', timeout: 30_000, env: { ...env, ...pushEnv(env) } });
|
package/cli/claims.mjs
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// may lose the race in silence. Nothing reads those copies while the local branch exists, and a capture by
|
|
23
23
|
// hand fetches (with prune) before it relies on them.
|
|
24
24
|
//
|
|
25
|
-
// LIMITS, said in
|
|
25
|
+
// LIMITS, said in docs/CLI.md (claims): capture off, or offline, is invisible; the push runs at most every 5 minutes;
|
|
26
26
|
// two people with one git name share branches, so they never see each other; clocks are the committer's.
|
|
27
27
|
import { spawnSync } from 'node:child_process';
|
|
28
28
|
import fs from 'node:fs';
|
package/cli/errors.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Structured error codes for the `yad` CLI. A YadError carries a stable code (greppable,
|
|
2
|
-
// documented in
|
|
2
|
+
// documented in docs/CLI.md "Error codes") and a one-line recovery hint that the top-level
|
|
3
3
|
// catch in bin/yad.mjs prints after the message. Plain Errors still work everywhere; codes
|
|
4
4
|
// are reserved for the failures users actually hit and need to act on.
|
|
5
5
|
export class YadError extends Error {
|
|
@@ -11,7 +11,7 @@ export class YadError extends Error {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
// The catalog — single source for doctor, the top-level catch, and the
|
|
14
|
+
// The catalog — single source for doctor, the top-level catch, and the docs/CLI.md table.
|
|
15
15
|
export const CODES = {
|
|
16
16
|
'YAD-ENV-001': 'git is not installed or not on PATH',
|
|
17
17
|
'YAD-ENV-002': 'the platform CLI (gh/glab) is missing or not authenticated',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yadflow",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
|
+
"description": "Shared project memory and workflows for teams building with AI: a versioned record of plans, decisions, contracts and reviews across repos, human-approved review gates, and a zero-dependency `yad` CLI plus 38 skills for your AI assistant.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "AbdelRahman Nasr",
|
|
7
7
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test:e2e": "bash test/e2e/run.sh",
|
|
47
47
|
"release-check": "bash scripts/release-check.sh",
|
|
48
48
|
"coverage": "node --test --experimental-test-coverage --test-coverage-exclude='cli/test*.mjs' --test-coverage-exclude='cli/test*.js' --test-coverage-lines=70 --test-coverage-branches=70 cli/test.mjs cli/test-checks.mjs cli/test-threads.mjs cli/test-golden.mjs cli/test-migrate.mjs cli/test-hooks.mjs cli/test-fuzz.js",
|
|
49
|
-
"diagrams": "npx -y @mermaid-js/mermaid-cli -i docs/diagrams/sdlc-overview.mmd -o docs/diagrams/sdlc-overview.svg -b transparent && npx -y @mermaid-js/mermaid-cli -i docs/diagrams/review-loop.mmd -o docs/diagrams/review-loop.svg -b transparent",
|
|
49
|
+
"diagrams": "npx -y @mermaid-js/mermaid-cli@11.15.0 -i docs/diagrams/sdlc-overview.mmd -o docs/diagrams/sdlc-overview.svg -b transparent && npx -y @mermaid-js/mermaid-cli@11.15.0 -i docs/diagrams/review-loop.mmd -o docs/diagrams/review-loop.svg -b transparent && npx -y @mermaid-js/mermaid-cli@11.15.0 -i docs/diagrams/work-and-memory.mmd -o docs/diagrams/work-and-memory.svg -b transparent && npx -y @mermaid-js/mermaid-cli@11.15.0 -i docs/diagrams/feature-evolution.mmd -o docs/diagrams/feature-evolution.svg -b transparent",
|
|
50
50
|
"prepublishOnly": "npm test"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|