@fenglimg/fabric-cli 1.3.0 → 1.4.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/README.md +24 -22
- package/dist/{bootstrap-IUL4SAAK.js → bootstrap-B6RCVJZJ.js} +4 -2
- package/dist/{chunk-N4DCTOXW.js → chunk-AZRKMFRY.js} +6 -6
- package/dist/{chunk-VMYPJPKV.js → chunk-BEKSXO5N.js} +161 -21
- package/dist/{chunk-TO5RUB4R.js → chunk-BVTMVW5M.js} +1 -1
- package/dist/{chunk-F2BXHPM5.js → chunk-N7EZORJZ.js} +9 -1
- package/dist/{chunk-6UUPKSDE.js → chunk-Q4LOVXML.js} +13 -8
- package/dist/{chunk-RUQCZA2Q.js → chunk-XQYY2U2C.js} +92 -115
- package/dist/{config-MKWKDE32.js → config-EC5L2QNI.js} +2 -2
- package/dist/index.js +11 -11
- package/dist/{init-BZ73IUHH.js → init-QC2MLFHR.js} +894 -261
- package/dist/{ledger-append-XZ5SX4O5.js → ledger-append-DULKJ6Q2.js} +1 -1
- package/dist/{pre-commit-AK55G73F.js → pre-commit-IK6SJOPT.js} +5 -5
- package/dist/{scan-WKDSKEBB.js → scan-43R3IBLR.js} +2 -2
- package/dist/{sync-meta-THZSEM7Y.js → sync-meta-LKVSO6TS.js} +1 -1
- package/dist/{update-JZPUJ36D.js → update-FY2WKWPB.js} +5 -5
- package/package.json +4 -3
- package/templates/agents-md/AGENTS.md.template +14 -13
- package/templates/agents-md/variants/cocos.md +20 -20
- package/templates/agents-md/variants/next.md +20 -20
- package/templates/agents-md/variants/vite.md +20 -20
- package/templates/bootstrap/CLAUDE.md +3 -5
- package/templates/bootstrap/GEMINI.md +3 -5
- package/templates/bootstrap/codex-AGENTS-header.md +3 -5
- package/templates/bootstrap/cursor-fabric-bootstrap.mdc +11 -11
- package/templates/bootstrap/roo-fabric.md +6 -6
- package/templates/bootstrap/windsurf-fabric.md +6 -6
- package/templates/claude-hooks/agents-md-init-reminder.cjs +18 -18
- package/templates/claude-skills/agents-md-init/SKILL.md +86 -86
- package/templates/codex-hooks/fabric-session-start.cjs +19 -0
- package/templates/codex-hooks/fabric-stop-reminder.cjs +18 -0
- package/templates/codex-skills/fabric-init/SKILL.md +27 -0
- package/templates/fabric/human-lock.json +12 -12
- package/templates/husky/pre-commit +24 -24
- package/dist/{doctor-5KJGOV2P.js → doctor-QTSG2RWF.js} +3 -3
- package/dist/{serve-MMN4GYLM.js → serve-4J2CQY25.js} +4 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fabric-init
|
|
3
|
+
description: Use this skill when `.fabric/forensic.json` exists and Fabric initialization follow-up still needs to be completed for this repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Hard Rules (DO NOT TRANSLATE)
|
|
7
|
+
|
|
8
|
+
MUST: Read `.fabric/forensic.json` before taking any other action.
|
|
9
|
+
MUST: Treat `.fabric/bootstrap/README.md` as the current bootstrap contract for this repository.
|
|
10
|
+
MUST: If `.fabric/init-context.json` already exists, stop and report that initialization follow-up appears complete.
|
|
11
|
+
MUST: Use evidence from `.fabric/forensic.json` and the repository layout to guide the initialization follow-up.
|
|
12
|
+
MUST: Preserve protected tokens exactly: `AGENTS.md`, `FABRIC.md`, `.fabric/agents.meta.json`, `.fabric/human-lock.json`, `.fabric/init-context.json`, `.fabric/forensic.json`, `MUST`, `NEVER`.
|
|
13
|
+
NEVER: Claim initialization is complete without checking `.fabric/init-context.json`.
|
|
14
|
+
NEVER: Rewrite or translate protected tokens.
|
|
15
|
+
NEVER: ignore `.fabric/bootstrap/README.md` while deciding next initialization steps.
|
|
16
|
+
|
|
17
|
+
## Purpose
|
|
18
|
+
|
|
19
|
+
Use this skill after `fab init` when Codex is working inside the repository and Fabric's evidence pack already exists. The goal is to continue the repository-specific initialization workflow using the generated forensic evidence and bootstrap contract.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
1. Read `.fabric/forensic.json`.
|
|
24
|
+
2. Read `.fabric/bootstrap/README.md`.
|
|
25
|
+
3. Check whether `.fabric/init-context.json` exists.
|
|
26
|
+
4. If initialization is still pending, summarize the next repository-specific initialization actions Codex should take.
|
|
27
|
+
5. Keep the guidance tightly scoped to Fabric initialization follow-up for this repository.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://fabric.local/schemas/human-lock.json",
|
|
3
|
-
"locked": [],
|
|
4
|
-
"examples": [
|
|
5
|
-
{
|
|
6
|
-
"file": "AGENTS.md",
|
|
7
|
-
"start_line": 18,
|
|
8
|
-
"end_line": 22,
|
|
9
|
-
"hash": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://fabric.local/schemas/human-lock.json",
|
|
3
|
+
"locked": [],
|
|
4
|
+
"examples": [
|
|
5
|
+
{
|
|
6
|
+
"file": "AGENTS.md",
|
|
7
|
+
"start_line": 18,
|
|
8
|
+
"end_line": 22,
|
|
9
|
+
"hash": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Fabric pre-commit hook — sub-300ms budget via single Node process
|
|
3
|
-
# Runs: sync-meta --check-only → human-lint → ledger-append --staged → meta-guard
|
|
4
|
-
# Uses local binary (no npx spawn) to avoid 3× Node startup cost.
|
|
5
|
-
|
|
6
|
-
FAB_BIN="./node_modules/.bin/fab"
|
|
7
|
-
|
|
8
|
-
if [ ! -x "$FAB_BIN" ]; then
|
|
9
|
-
echo "fabric: $FAB_BIN not found. Run 'pnpm install' at repo root." >&2
|
|
10
|
-
exit 1
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
# Single Node invocation covering all three checks + meta guard.
|
|
14
|
-
# The `pre-commit` meta-command chains sync-meta/human-lint/ledger-append
|
|
15
|
-
# inside one process for minimal startup overhead.
|
|
16
|
-
"$FAB_BIN" pre-commit || exit $?
|
|
17
|
-
|
|
18
|
-
# Guard: block manual edits to .fabric/agents.meta.json
|
|
19
|
-
if git diff --cached --name-only | grep -q '^\.fabric/agents\.meta\.json$'; then
|
|
20
|
-
if [ "$FAB_ALLOW_META_EDIT" != '1' ]; then
|
|
21
|
-
echo '.fabric/agents.meta.json cannot be manually edited; use fab_update_registry or set FAB_ALLOW_META_EDIT=1' >&2
|
|
22
|
-
exit 1
|
|
23
|
-
fi
|
|
24
|
-
fi
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Fabric pre-commit hook — sub-300ms budget via single Node process
|
|
3
|
+
# Runs: sync-meta --check-only → human-lint → ledger-append --staged → meta-guard
|
|
4
|
+
# Uses local binary (no npx spawn) to avoid 3× Node startup cost.
|
|
5
|
+
|
|
6
|
+
FAB_BIN="./node_modules/.bin/fab"
|
|
7
|
+
|
|
8
|
+
if [ ! -x "$FAB_BIN" ]; then
|
|
9
|
+
echo "fabric: $FAB_BIN not found. Run 'pnpm install' at repo root." >&2
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# Single Node invocation covering all three checks + meta guard.
|
|
14
|
+
# The `pre-commit` meta-command chains sync-meta/human-lint/ledger-append
|
|
15
|
+
# inside one process for minimal startup overhead.
|
|
16
|
+
"$FAB_BIN" pre-commit || exit $?
|
|
17
|
+
|
|
18
|
+
# Guard: block manual edits to .fabric/agents.meta.json
|
|
19
|
+
if git diff --cached --name-only | grep -q '^\.fabric/agents\.meta\.json$'; then
|
|
20
|
+
if [ "$FAB_ALLOW_META_EDIT" != '1' ]; then
|
|
21
|
+
echo '.fabric/agents.meta.json cannot be manually edited; use fab_update_registry or set FAB_ALLOW_META_EDIT=1' >&2
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
fi
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolveDevMode
|
|
4
|
+
} from "./chunk-AEOYCVBG.js";
|
|
2
5
|
import {
|
|
3
6
|
padEnd,
|
|
4
7
|
paint,
|
|
5
8
|
symbol
|
|
6
9
|
} from "./chunk-WWNXR34K.js";
|
|
7
|
-
import {
|
|
8
|
-
resolveDevMode
|
|
9
|
-
} from "./chunk-AEOYCVBG.js";
|
|
10
10
|
import {
|
|
11
11
|
t
|
|
12
12
|
} from "./chunk-6ICJICVU.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
paint,
|
|
4
|
-
symbol
|
|
5
|
-
} from "./chunk-WWNXR34K.js";
|
|
6
2
|
import {
|
|
7
3
|
createDebugLogger,
|
|
8
4
|
resolveDevMode
|
|
9
5
|
} from "./chunk-AEOYCVBG.js";
|
|
6
|
+
import {
|
|
7
|
+
paint,
|
|
8
|
+
symbol
|
|
9
|
+
} from "./chunk-WWNXR34K.js";
|
|
10
10
|
import {
|
|
11
11
|
t
|
|
12
12
|
} from "./chunk-6ICJICVU.js";
|