@deslop/coding-standards 0.1.1246 → 0.1.1248

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.
@@ -1,65 +0,0 @@
1
- ---
2
- name: pull-requests
3
- description: 'Load before the first commit of a task, before changing code to fix a reported bug, before editing a branch that has a PR or MR, and before creating, describing, pushing or restacking one.'
4
- ---
5
-
6
- # Pull requests
7
-
8
- ## Branches
9
-
10
- - **Review units.** Each PR is coherent and runnable on its target, with generated files beside their source.
11
- - **Stacks.** PRs that depend on each other, change the same thing or merge together form one stack: one branch per layer on the layer below, each readable alone. Only unrelated PRs branch from the default branch. Restack with the host's stack commands, never by retargeting by hand.
12
- - **Reshape.** Remove a rejected approach from every unmerged layer; reuse the surviving PRs rather than introducing it below and undoing it above.
13
- - **Integration.** Batch corrections into their owning layers, then restack onto the latest default branch before final proof, Verify and review. Publish that integrated state; revalidate if it changes.
14
- - **Baseline first.** Reproduce a bug, or capture the state a difference is claimed against, before changing code.
15
-
16
- ## Publish
17
-
18
- 1. **Push** a draft once Verify passes. A round of fixes is one push per affected PR, since each push cancels the previous pipeline.
19
- 2. **Describe** with the repository's template (`.github/pull_request_template.md`, `.gitlab/merge_request_templates/Default.md`); its comments say what each section holds. Show, don't narrate:
20
- - **Before/after side by side**: a `| Before | After |` table of images with a caption row. Only real captures of the app, never a screenshot of a rendered page.
21
- - **Formats over sentences**: diff or code block for the shape, table for comparisons and numbers, Mermaid for a flow, `<details>` for long output, at most one `> [!IMPORTANT]` alert for the thing a reviewer must not miss (the marker alone on its line, each following line prefixed `> `), an unchecked task-list item under its Evidence claim for what stays unverified.
22
- - **Bullets are fragments**, only what a reviewer must know: `**No double lint**: vp check --fix fails on leftovers`.
23
- - **Cut** what the diff or the PR page already shows: history, inventory, walkthrough, test lists, Verify, check and review results. Captions say what changed, not how it was captured: no viewport, pixel ratio or capture limits.
24
- 3. **Watch** the final head's pipeline; a failure, a review comment or a conflict gets a fix, Verify and one push.
25
- 4. **Hand back** once the required jobs pass and no P1 or P2 finding is open.
26
- 5. **Ready** only when the user asks; mark a ready PR draft again before editing its layer.
27
-
28
- ## Commands
29
-
30
- Captures upload with `--attach`, never through the host's upload API.
31
-
32
- ```bash
33
- gh pr edit <n> --title '<title>' --body-file - --attach './shot.png#<alt>' <<'EOF' # ![alt](./shot.png) becomes the upload
34
- <body>
35
- EOF
36
- gh pr edit <n> --attach './proof.mp4' # appends the video URL: move it under its claim, alone in its paragraph
37
- gh api repos/<owner>/<repo>/pulls/<n> -H 'Accept: application/vnd.github.html+json' --jq .body_html
38
- glab mr update <n> --description-file - --attach ./shot.png <<'EOF' # appends the reference: move it under its claim
39
- glab api "projects/:id/merge_requests/<n>?render_html=true" | jq -r .description_html
40
- glab api "projects/:id/pipelines/<pipeline>/jobs?scope[]=failed" | jq -r '.[] | "\(.id) \(.name)"'; glab ci trace <job id>
41
- ```
42
-
43
- **GitHub stacks** act on the checked-out branch's stack; GitHub rebases the next layer when the one below merges.
44
-
45
- ```bash
46
- gh stack init <bottom> [<next> …] # start, or adopt existing branches bottom first
47
- gh stack add <branch> # a new layer on top, checked out before its first commit
48
- gh stack rebase [--upstack] # before a push, or above an amended layer; --continue or --abort on a conflict
49
- gh stack submit --auto # first push: opens each PR as a draft on its parent
50
- gh stack push # later rounds
51
- gh stack sync --prune # after a merge below
52
- gh stack unstack --local # drop tracking of a stack that was never submitted
53
- ```
54
-
55
- **GitLab stacks** act on the stack selected in this worktree: one commit per diff on its own branch, whose first message line is the MR title (`Draft: ` opens a draft). Every MR of a stack comes from `sync`, which never edits an existing MR.
56
-
57
- ```bash
58
- git commit -m 'Draft: <title>'
59
- script -qec "GLAB_EDITOR='sh -c \"git rev-list --reverse origin/<default>..HEAD > \\\$1\" -' glab stack infer --name <stack> <default>..HEAD" /dev/null
60
- git add -A && glab stack save -m 'Draft: <title>' # a new layer; `amend` folds into the checked-out one
61
- glab stack sync --skip-push # restack locally before Verify
62
- glab stack sync --update-base # each push and after a merge below: rebase, drop merged diffs, force-push, open missing MRs
63
- ```
64
-
65
- `infer` needs a TTY and an editor, and its range starts at `origin/<default>` since the local default branch can lag; `glab stack create` cannot run in a worktree. `glab stack reorder` takes the same `script` and editor shape, one branch per line, then `glab stack sync`.
@@ -1,24 +0,0 @@
1
- ---
2
- name: review
3
- description: Load for a review, audit or critique of code, design, instructions or a PR body.
4
- ---
5
-
6
- # Review
7
-
8
- - **Scope**: immutable base/head pairs against the accepted requirements, repository contracts and canonical examples. Trace changed contracts through their real consumers and the failure, concurrency, resource-lifetime and previous-release data paths. Judge ownership and architecture, not just lines.
9
- - **One complete pass** reports every defect class; later rounds cover the fixes and the contracts they touch.
10
- - **No edits.** Tests, probes and services as evidence needs, in your own preview tab (`preview_open` with `reuseExistingTab: false`). Name missing proof.
11
-
12
- ## Findings
13
-
14
- Each names severity, `path:line`, a reachable input, the violated contract, evidence and the smallest fix; every instance of a class once. Not findings: taste without a rule, hypothetical callers, what lint covers. Pre-existing defects stay apart from those the change introduces or relies on.
15
-
16
- | Severity | Meaning |
17
- | -------- | ------------------------------------------------------------------------------------------- |
18
- | P1 | Broken user/caller contract, data loss, secret exposure, missing migration or false claim |
19
- | P2 | Repository ownership, boundary or reference violation; unnecessary, duplicated or dead code |
20
- | P3 | Naming, wording or style |
21
-
22
- - **Claims** against their evidence, not the author's summary. The PR body and its captures as a reader without the chat, against its template. With no P1 or P2 left, say the covered scope.
23
- - **UI**: responsive input, retained valid content, loading confined to the affected region, requests limited to the interaction's needs.
24
- - **Instructions**: the affected system as a whole: contradictions, duplicated facts, misplaced rules, restatements of what the harness or tools say, constraints whose cause is gone. The smallest correction that complements the model.
File without changes