@webpieces/rules-config 0.3.222 → 0.3.223
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/rules-config",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.223",
|
|
4
4
|
"description": "Shared webpieces.config.json loader. Single source of truth for validation rule configuration consumed by @webpieces/ai-hook-rules, @webpieces/code-rules, and @webpieces/nx-webpieces-rules.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# webpieces Git & PR Workflow (for the AI)
|
|
2
|
+
|
|
3
|
+
Generated by `@webpieces/pr-gate` (refreshed on every `wp-*` PR/merge command, so it can't drift).
|
|
4
|
+
Read this before running any `wp-git-update` / `wp-start-upsert-pr` / `wp-finish-upsert-pr`.
|
|
5
|
+
|
|
6
|
+
## Golden rule: the tooling NEVER commits your work for you
|
|
7
|
+
|
|
8
|
+
Before running any `wp-*` PR/merge command, your working tree must be 100% clean:
|
|
9
|
+
|
|
10
|
+
- **Commit** every changed tracked file.
|
|
11
|
+
- **Add + commit, or delete** every untracked file.
|
|
12
|
+
|
|
13
|
+
Each command runs `git status --porcelain` first and **aborts** if anything is uncommitted — including
|
|
14
|
+
**untracked** files (gitignored paths like `.webpieces/` are excluded). The tooling deliberately does
|
|
15
|
+
**not** `git add -A` your tree: a blanket sweep once committed a stale untracked directory into a
|
|
16
|
+
squash commit. If a command tells you the tree is dirty, commit or delete the listed files, then re-run.
|
|
17
|
+
|
|
18
|
+
## The 3-point fork-point system
|
|
19
|
+
|
|
20
|
+
- **A = fork point**: `git merge-base origin/main HEAD`
|
|
21
|
+
- **B = feature HEAD**: your branch tip
|
|
22
|
+
- **C = main HEAD**: `origin/main`
|
|
23
|
+
|
|
24
|
+
Never `git merge` or `git rebase` main into your branch directly — it breaks the fork point (A) that
|
|
25
|
+
produces clean PR diffs. Sync only via `pnpm wp-git-update` (a 3-point squash-update). This is enforced
|
|
26
|
+
by the `redirect-how-to-merge-main` guard.
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
1. **`pnpm wp-git-update`** — squash-update your branch from main. Clean merge → finalizes. Conflicts →
|
|
31
|
+
writes `.webpieces/instruct-ai/webpieces.mergeprocess.md` and hands resolution to you; finish with
|
|
32
|
+
`pnpm wp-finish-upsert-pr`.
|
|
33
|
+
2. **`pnpm wp-start-upsert-pr`** — update from main, push, run an advisory build gate, then tells you to
|
|
34
|
+
write `review.json`. Never creates the PR itself.
|
|
35
|
+
3. **`pnpm wp-finish-upsert-pr`** — validates any in-progress merge, requires your `review.json`, runs
|
|
36
|
+
the **authoritative** build gate, pushes, and creates/updates the PR.
|
|
37
|
+
|
|
38
|
+
## Resolving merge conflicts
|
|
39
|
+
|
|
40
|
+
Follow `.webpieces/instruct-ai/webpieces.mergeprocess.md`. For each conflicted file: resolve it (remove
|
|
41
|
+
all markers), `git add` it, and write its `merge-explanation.md`. Then run `pnpm wp-finish-upsert-pr`.
|
|
42
|
+
The gate stages only tracked resolutions (`git add -u`) and refuses to proceed if untracked files are
|
|
43
|
+
present — commit or delete them first.
|
|
44
|
+
|
|
45
|
+
## Before you trust a push
|
|
46
|
+
|
|
47
|
+
The build gate validates the **working tree**; the push sends **HEAD**. A green build on disk does
|
|
48
|
+
**not** mean the committed tree is correct. After any fix, run `git show --stat HEAD` (or `git status`)
|
|
49
|
+
and confirm the commit actually contains your fix. The clean-tree guard enforces `working tree == HEAD`
|
|
50
|
+
before the build gate and push, so a fix left uncommitted will block the PR instead of silently pushing
|
|
51
|
+
a stale commit.
|