@webpieces/rules-config 0.3.223 → 0.3.224
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.224",
|
|
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",
|
|
@@ -35,12 +35,55 @@ by the `redirect-how-to-merge-main` guard.
|
|
|
35
35
|
3. **`pnpm wp-finish-upsert-pr`** — validates any in-progress merge, requires your `review.json`, runs
|
|
36
36
|
the **authoritative** build gate, pushes, and creates/updates the PR.
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Two possible outcomes of a squash-update
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
A `wp-git-update` (the squash step inside `wp-start-upsert-pr` too) ends one of two ways. The tool
|
|
41
|
+
`git merge --squash`es your feature onto a fresh copy of main; whether that merges cleanly decides
|
|
42
|
+
who does the work.
|
|
43
|
+
|
|
44
|
+
### Outcome A — CLEAN merge (the tool does everything; you do nothing)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
you: pnpm wp-git-update
|
|
48
|
+
tool: assertCleanTree # you must have committed your own work first
|
|
49
|
+
tool: backup branch; checkout main; pull; create <feature>Squash off main
|
|
50
|
+
tool: git merge --squash <feature> # SUCCEEDS — stages the combined result
|
|
51
|
+
tool: git commit -m "Squash merge of <feature>" # <-- the TOOL commits (mechanical)
|
|
52
|
+
tool: delete old branch; force-push to the stable base; rename to next generation
|
|
53
|
+
done — no AI/human merge work.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
There is **no `git add` here** — `git merge --squash` staged only the merge result, and the tool
|
|
57
|
+
commits exactly that. The commit is a pure function of your already-committed work + main.
|
|
58
|
+
|
|
59
|
+
### Outcome B — CONFLICT merge (the AI resolves; the tool still commits)
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
you: pnpm wp-git-update
|
|
63
|
+
tool: assertCleanTree; backup; checkout main; pull; create <feature>Squash
|
|
64
|
+
tool: git merge --squash <feature> # CONFLICTS — conflicted files left with markers
|
|
65
|
+
tool: writes .webpieces/merge-info/<feature>/ (A=fork / B=feature / C=main context + diffs)
|
|
66
|
+
tool: writes .webpieces/instruct-ai/webpieces.mergeprocess.md, then exits (code 2)
|
|
67
|
+
---- hand-off to the AI ----
|
|
68
|
+
AI: read webpieces.mergeprocess.md
|
|
69
|
+
AI: per conflicted file -> resolve markers -> git add <file> -> write merge-explanation.md
|
|
70
|
+
AI: pnpm wp-finish-upsert-pr
|
|
71
|
+
tool: validateResolution (no markers left, every file has an explanation)
|
|
72
|
+
tool: assertNoUntracked -> git add -u -> git commit "... (conflicts resolved)" # <-- TOOL commits
|
|
73
|
+
tool: build gate -> push -> create/update PR
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Who does what on the conflict path:
|
|
77
|
+
- **You/the AI** supply the *judgment*: how to combine the conflicting changes. You edit the files,
|
|
78
|
+
`git add` them, and write each `merge-explanation.md`.
|
|
79
|
+
- **The tool** still makes the *commit*. You are BLOCKED from `git commit` / `git push` / `gh pr`
|
|
80
|
+
while the merge is in progress (the `merge-in-progress-guard`); `wp-finish-upsert-pr` is what
|
|
81
|
+
validates and commits. `git add -u` stages only your tracked resolutions and **refuses** if any
|
|
82
|
+
untracked file is present — commit or delete those first, the tool will not sweep them in.
|
|
83
|
+
|
|
84
|
+
The two docs cooperate: **this file** is the always-present overview of both paths;
|
|
85
|
+
**`webpieces.mergeprocess.md`** is written *only when there is a conflict* and lists the exact files
|
|
86
|
+
to resolve for that specific merge.
|
|
44
87
|
|
|
45
88
|
## Before you trust a push
|
|
46
89
|
|