@metasession.co/devaudit-cli 0.1.72 → 0.1.74
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/sdlc/.claude/settings.local.json +11 -0
- package/sdlc/ai-rules/INSTRUCTIONS-SDLC.md +30 -0
- package/sdlc/ai-rules/SDLC_RULES.md +45 -0
- package/sdlc/ai-rules/claude/CLAUDE.md +47 -5
- package/sdlc/ai-rules/windsurf/.windsurfrules +47 -5
- package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +12 -2
- package/sdlc/files/stacks/node/hooks/pre-push +10 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metasession.co/devaudit-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.74",
|
|
4
4
|
"description": "DevAudit CLI — installs, syncs, and operates the Metasession SDLC across consumer projects.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@clack/prompts": "^0.8.2",
|
|
36
|
-
"@metasession.co/devaudit-plugin-sdk": "
|
|
36
|
+
"@metasession.co/devaudit-plugin-sdk": "file:../plugin-sdk",
|
|
37
37
|
"ajv": "^8.20.0",
|
|
38
38
|
"commander": "^12.1.0",
|
|
39
39
|
"consola": "^3.2.3",
|
|
@@ -36,6 +36,36 @@ This prompt is **mandatory and structural** — it is not advisory. The `sdlc-im
|
|
|
36
36
|
|
|
37
37
|
The only exception: if the user's request is clearly housekeeping ("bump a dep", "fix a typo", "update docs") and does not involve `feat`/`fix`/`refactor`/`perf` commit types, skip the prompt and proceed directly.
|
|
38
38
|
|
|
39
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill (devaudit-installer#199)
|
|
40
|
+
|
|
41
|
+
The most common failure mode for this rule is **not skipping the prompt entirely** — it is **prompting (or being told to use the skill) and then manually reading the SDLC workflow files and walking through the steps yourself** instead of invoking the `sdlc-implementer` skill. The skill exists to orchestrate this. Manually reading `SDLC/1-plan-requirement.md`, `SDLC/2-implement-and-test.md`, etc. and executing their steps by hand is the exact failure mode this rule exists to prevent.
|
|
42
|
+
|
|
43
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
44
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
45
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
46
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
47
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
48
|
+
|
|
49
|
+
**When you catch yourself:** Stop immediately. Invoke the skill with `Skill(name: "sdlc-implementer", …)`. Do not attempt to continue the manual walkthrough — the skill will re-read state and resume correctly.
|
|
50
|
+
|
|
51
|
+
This anti-pattern is the same class of bug as #132 (e2e delegation bypass): the agent has a purpose-built tool and defaults to hand-rolling the procedure it automates. The skill is the tool. Use it.
|
|
52
|
+
|
|
53
|
+
### Driver clarity — always state who is driving (devaudit-installer#199)
|
|
54
|
+
|
|
55
|
+
The operator must be able to tell at a glance whether they need to act or whether the agent is handling it. **Every substantive response during SDLC work MUST open with a driver tag** on the first line, before any other content:
|
|
56
|
+
|
|
57
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
58
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
59
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
60
|
+
|
|
61
|
+
Rules:
|
|
62
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
63
|
+
- If the driver changes mid-response (e.g. the agent was driving, hits a gate failure, and halts), the tag at the top of the response reflects the **final** state. If the agent stops mid-work, the tag is `[Operator driving]` or `[Blocked]`.
|
|
64
|
+
- The tag is mandatory for any response that does work, reports status, or hands off. Skip it only for pure chitchat or one-word confirmations.
|
|
65
|
+
- The tag works alongside the LAST/NEXT sticky convention — the tag says *who* is driving right now; the sticky says *what* just happened and *what* is next.
|
|
66
|
+
|
|
67
|
+
**Why this exists:** Without an explicit driver tag, the operator cannot distinguish "the agent is working and I can wait" from "the agent stopped and I need to act" without reading the entire response. That ambiguity is the root cause of both false-waits (operator thinks the agent is working when it has halted) and false-stops (operator thinks they need to act when the agent is auto-continuing).
|
|
68
|
+
|
|
39
69
|
### Before ANY Code Change
|
|
40
70
|
|
|
41
71
|
1. If the user has NOT been prompted for `sdlc-implementer` and the change is not trivial housekeeping, stop and run the mandatory prompt above before continuing.
|
|
@@ -17,6 +17,51 @@ This project contains detailed SDLC workflow files in its `SDLC/` directory (cop
|
|
|
17
17
|
|
|
18
18
|
Tier 1 reference docs (Test_Policy.md, Test_Strategy.md, Test_Architecture.md, Periodic_Security_Review_Schedule.md) may also be in `SDLC/` or in the DevAudit repository.
|
|
19
19
|
|
|
20
|
+
## CRITICAL: `sdlc-implementer` prompt before implementation (devaudit-installer#199)
|
|
21
|
+
|
|
22
|
+
When the user requests implementation of an issue (e.g. "implement issue #N", "fix issue #N", "do issue #N", "implement #N"), you MUST prompt before writing any code:
|
|
23
|
+
|
|
24
|
+
> Implementing #N using sdlc-implementer, can I proceed?
|
|
25
|
+
|
|
26
|
+
Wait for the user's yes/no response. Do NOT begin implementation until they answer.
|
|
27
|
+
|
|
28
|
+
- **YES** → invoke the `sdlc-implementer` skill immediately. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
29
|
+
- **NO** → proceed with manual implementation outside the skill. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
|
|
30
|
+
|
|
31
|
+
This prompt is **mandatory and structural** — it is not advisory. Skipping the prompt and jumping straight into code is the same class of inertia-trap bug as #132 (e2e delegation bypass).
|
|
32
|
+
|
|
33
|
+
The only exception: if the user's request is clearly housekeeping ("bump a dep", "fix a typo", "update docs") and does not involve `feat`/`fix`/`refactor`/`perf` commit types, skip the prompt and proceed directly.
|
|
34
|
+
|
|
35
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill
|
|
36
|
+
|
|
37
|
+
The most common failure mode is **prompting (or being told to use the skill) and then manually reading the SDLC workflow files and walking through the steps yourself** instead of invoking the `sdlc-implementer` skill. The skill exists to orchestrate this. Manually reading `SDLC/1-plan-requirement.md`, `SDLC/2-implement-and-test.md`, etc. and executing their steps by hand is the exact failure mode this rule exists to prevent.
|
|
38
|
+
|
|
39
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
40
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
41
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
42
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
43
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
44
|
+
|
|
45
|
+
**When you catch yourself:** Stop immediately. Invoke the skill with `Skill(name: "sdlc-implementer", …)`. Do not attempt to continue the manual walkthrough — the skill will re-read state and resume correctly.
|
|
46
|
+
|
|
47
|
+
## Driver clarity — always state who is driving (devaudit-installer#199)
|
|
48
|
+
|
|
49
|
+
The operator must be able to tell at a glance whether they need to act or whether the agent is handling it. **Every substantive response during SDLC work MUST open with a driver tag** on the first line, before any other content:
|
|
50
|
+
|
|
51
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
52
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
53
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
54
|
+
|
|
55
|
+
Rules:
|
|
56
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
57
|
+
- If the driver changes mid-response (e.g. the agent was driving, hits a gate failure, and halts), the tag at the top of the response reflects the **final** state. If the agent stops mid-work, the tag is `[Operator driving]` or `[Blocked]`.
|
|
58
|
+
- The tag is mandatory for any response that does work, reports status, or hands off. Skip it only for pure chitchat or one-word confirmations.
|
|
59
|
+
- The tag works alongside the LAST/NEXT sticky convention — the tag says *who* is driving right now; the sticky says *what* just happened and *what* is next.
|
|
60
|
+
|
|
61
|
+
**Why this exists:** Without an explicit driver tag, the operator cannot distinguish "the agent is working and I can wait" from "the agent stopped and I need to act" without reading the entire response. That ambiguity is the root cause of both false-waits (operator thinks the agent is working when it has halted) and false-stops (operator thinks they need to act when the agent is auto-continuing).
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
20
65
|
## CRITICAL: Before Writing Any Code
|
|
21
66
|
|
|
22
67
|
Before implementing ANY change (feature, fix, refactor, or enhancement), you MUST complete these checks:
|
|
@@ -21,13 +21,55 @@ When a workflow step requires detailed commands or templates, **read the full wo
|
|
|
21
21
|
|
|
22
22
|
Tier 1 reference documents (policy, strategy, architecture) are also in `SDLC/` if present, or in the DevAudit repository at `sdlc/files/`.
|
|
23
23
|
|
|
24
|
+
### MANDATORY: `sdlc-implementer` prompt before implementation (devaudit-installer#199)
|
|
25
|
+
|
|
26
|
+
When the user requests implementation of an issue (e.g. "implement issue #N", "fix issue #N", "do issue #N", "implement #N"), you MUST prompt before writing any code:
|
|
27
|
+
|
|
28
|
+
> Implementing #N using sdlc-implementer, can I proceed?
|
|
29
|
+
|
|
30
|
+
Wait for the user's yes/no response. Do NOT begin implementation until they answer.
|
|
31
|
+
|
|
32
|
+
- **YES** → invoke the `sdlc-implementer` skill immediately. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
33
|
+
- **NO** → proceed with manual implementation outside the skill. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
|
|
34
|
+
|
|
35
|
+
This prompt is **mandatory and structural** — it is not advisory. Skipping the prompt and jumping straight into code is the same class of inertia-trap bug as #132 (e2e delegation bypass).
|
|
36
|
+
|
|
37
|
+
The only exception: if the user's request is clearly housekeeping ("bump a dep", "fix a typo", "update docs") and does not involve `feat`/`fix`/`refactor`/`perf` commit types, skip the prompt and proceed directly.
|
|
38
|
+
|
|
39
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill
|
|
40
|
+
|
|
41
|
+
The most common failure mode is **prompting (or being told to use the skill) and then manually reading the SDLC workflow files and walking through the steps yourself** instead of invoking the `sdlc-implementer` skill. The skill exists to orchestrate this. Manually reading `SDLC/1-plan-requirement.md`, `SDLC/2-implement-and-test.md`, etc. and executing their steps by hand is the exact failure mode this rule exists to prevent.
|
|
42
|
+
|
|
43
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
44
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
45
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
46
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
47
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
48
|
+
|
|
49
|
+
**When you catch yourself:** Stop immediately. Invoke the skill with `Skill(name: "sdlc-implementer", …)`. Do not attempt to continue the manual walkthrough — the skill will re-read state and resume correctly.
|
|
50
|
+
|
|
51
|
+
### Driver clarity — always state who is driving (devaudit-installer#199)
|
|
52
|
+
|
|
53
|
+
The operator must be able to tell at a glance whether they need to act or whether the agent is handling it. **Every substantive response during SDLC work MUST open with a driver tag** on the first line, before any other content:
|
|
54
|
+
|
|
55
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
56
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
57
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
58
|
+
|
|
59
|
+
Rules:
|
|
60
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
61
|
+
- If the driver changes mid-response (e.g. the agent was driving, hits a gate failure, and halts), the tag at the top of the response reflects the **final** state. If the agent stops mid-work, the tag is `[Operator driving]` or `[Blocked]`.
|
|
62
|
+
- The tag is mandatory for any response that does work, reports status, or hands off. Skip it only for pure chitchat or one-word confirmations.
|
|
63
|
+
- The tag works alongside the LAST/NEXT sticky convention — the tag says *who* is driving right now; the sticky says *what* just happened and *what* is next.
|
|
64
|
+
|
|
24
65
|
### Before ANY Code Change
|
|
25
66
|
|
|
26
|
-
1.
|
|
27
|
-
2.
|
|
28
|
-
3. If
|
|
29
|
-
4. If
|
|
30
|
-
5.
|
|
67
|
+
1. If the user has NOT been prompted for `sdlc-implementer` and the change is not trivial housekeeping, stop and run the mandatory prompt above before continuing.
|
|
68
|
+
2. Ask: **"Which GitHub Issue is this for?"** before writing code. Fetch it with `gh issue view NNN`.
|
|
69
|
+
3. If no issue exists: ask if one should be created. When creating via `gh issue create`, ALWAYS append the SDLC checklist to the body (see below).
|
|
70
|
+
4. If new requirement needed: **read `SDLC/1-plan-requirement.md`** and follow it to create RTM entry (with issue reference), evidence directory, and test-scope.md BEFORE implementing.
|
|
71
|
+
5. If trivial (typo/formatting): proceed without requirement but use conventional commit format.
|
|
72
|
+
6. Verify `develop` branch: `git branch --show-current` — never implement on `main`.
|
|
31
73
|
|
|
32
74
|
### For ALL Code Changes (including bug fixes)
|
|
33
75
|
|
|
@@ -15,13 +15,55 @@ Detailed workflow instructions are in this project's `SDLC/` directory. Read the
|
|
|
15
15
|
|
|
16
16
|
When a workflow step requires detailed commands or templates, read the full workflow file rather than relying on the summary below.
|
|
17
17
|
|
|
18
|
+
### MANDATORY: `sdlc-implementer` prompt before implementation (devaudit-installer#199)
|
|
19
|
+
|
|
20
|
+
When the user requests implementation of an issue (e.g. "implement issue #N", "fix issue #N", "do issue #N", "implement #N"), you MUST prompt before writing any code:
|
|
21
|
+
|
|
22
|
+
> Implementing #N using sdlc-implementer, can I proceed?
|
|
23
|
+
|
|
24
|
+
Wait for the user's yes/no response. Do NOT begin implementation until they answer.
|
|
25
|
+
|
|
26
|
+
- **YES** → invoke the `sdlc-implementer` skill immediately. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
27
|
+
- **NO** → proceed with manual implementation outside the skill. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
|
|
28
|
+
|
|
29
|
+
This prompt is **mandatory and structural** — it is not advisory. Skipping the prompt and jumping straight into code is the same class of inertia-trap bug as #132 (e2e delegation bypass).
|
|
30
|
+
|
|
31
|
+
The only exception: if the user's request is clearly housekeeping ("bump a dep", "fix a typo", "update docs") and does not involve `feat`/`fix`/`refactor`/`perf` commit types, skip the prompt and proceed directly.
|
|
32
|
+
|
|
33
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill
|
|
34
|
+
|
|
35
|
+
The most common failure mode is **prompting (or being told to use the skill) and then manually reading the SDLC workflow files and walking through the steps yourself** instead of invoking the `sdlc-implementer` skill. The skill exists to orchestrate this. Manually reading `SDLC/1-plan-requirement.md`, `SDLC/2-implement-and-test.md`, etc. and executing their steps by hand is the exact failure mode this rule exists to prevent.
|
|
36
|
+
|
|
37
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
38
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
39
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
40
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
41
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
42
|
+
|
|
43
|
+
**When you catch yourself:** Stop immediately. Invoke the skill with `Skill(name: "sdlc-implementer", …)`. Do not attempt to continue the manual walkthrough — the skill will re-read state and resume correctly.
|
|
44
|
+
|
|
45
|
+
### Driver clarity — always state who is driving (devaudit-installer#199)
|
|
46
|
+
|
|
47
|
+
The operator must be able to tell at a glance whether they need to act or whether the agent is handling it. **Every substantive response during SDLC work MUST open with a driver tag** on the first line, before any other content:
|
|
48
|
+
|
|
49
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
50
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
51
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
52
|
+
|
|
53
|
+
Rules:
|
|
54
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
55
|
+
- If the driver changes mid-response (e.g. the agent was driving, hits a gate failure, and halts), the tag at the top of the response reflects the **final** state. If the agent stops mid-work, the tag is `[Operator driving]` or `[Blocked]`.
|
|
56
|
+
- The tag is mandatory for any response that does work, reports status, or hands off. Skip it only for pure chitchat or one-word confirmations.
|
|
57
|
+
- The tag works alongside the LAST/NEXT sticky convention — the tag says *who* is driving right now; the sticky says *what* just happened and *what* is next.
|
|
58
|
+
|
|
18
59
|
### Before ANY Code Change
|
|
19
60
|
|
|
20
|
-
1.
|
|
21
|
-
2.
|
|
22
|
-
3. If
|
|
23
|
-
4. If
|
|
24
|
-
5.
|
|
61
|
+
1. If the user has NOT been prompted for `sdlc-implementer` and the change is not trivial housekeeping, stop and run the mandatory prompt above before continuing.
|
|
62
|
+
2. Ask: "Which GitHub Issue is this for?" before writing code. Fetch it with `gh issue view NNN`.
|
|
63
|
+
3. If no issue exists: ask if one should be created. When creating via `gh issue create`, ALWAYS append the SDLC checklist to the body (see below).
|
|
64
|
+
4. If new requirement needed: read `SDLC/1-plan-requirement.md` and follow it BEFORE implementing.
|
|
65
|
+
5. If trivial (typo/formatting): proceed without requirement but use conventional commit format.
|
|
66
|
+
6. Verify `develop` branch: `git branch --show-current` — never implement on `main`.
|
|
25
67
|
|
|
26
68
|
### For ALL Code Changes (including bug fixes)
|
|
27
69
|
|
|
@@ -206,14 +206,24 @@ NEXT: Done — close issue + retire feature branch (sdlc-implementer halts)
|
|
|
206
206
|
|
|
207
207
|
### 2. In-chat LAST/NEXT line (Claude Code surface)
|
|
208
208
|
|
|
209
|
-
Lead every substantive turn with the
|
|
209
|
+
Lead every substantive turn with a driver tag on the **first line**, then the two-line LAST/NEXT shape so the operator can `Ctrl-F NEXT:` in the chat transcript to find the current pointer without re-reading:
|
|
210
210
|
|
|
211
211
|
```
|
|
212
|
+
[Agent driving] — or — [Operator driving] — or — [Blocked]
|
|
213
|
+
|
|
212
214
|
**LAST:** <one sentence>
|
|
213
215
|
**NEXT:** <one sentence with actor>
|
|
214
216
|
```
|
|
215
217
|
|
|
216
|
-
|
|
218
|
+
The driver tag is mandatory and comes **before** the LAST/NEXT lines:
|
|
219
|
+
|
|
220
|
+
- **`[Agent driving]`** — the skill is auto-continuing; no human action needed right now. The operator can look away.
|
|
221
|
+
- **`[Operator driving]`** — the skill has halted; the human must do something (review, approve, merge, answer a question). The NEXT line states the specific action needed.
|
|
222
|
+
- **`[Blocked]`** — something failed and the skill cannot proceed. State the blocker and the operator action needed to unblock.
|
|
223
|
+
|
|
224
|
+
The tag reflects the **final** state of the response — if the skill was driving but hits a halt mid-turn, the tag is `[Operator driving]` or `[Blocked]`.
|
|
225
|
+
|
|
226
|
+
Skip the tag and LAST/NEXT for trivial turns (acknowledging a "merged" / one-line confirmations / chitchat). It's for SDLC work, not every message. The two surfaces (sticky comment + chat line) should always agree — if they diverge, the comment is canonical (it's what the operator scrolling the issue sees).
|
|
217
227
|
|
|
218
228
|
### When to update
|
|
219
229
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/
|
|
1
|
+
#!/bin/sh
|
|
2
2
|
# Husky pre-push hook — fast gates + E2E evidence + skill-invocation sentinel + compliance validator.
|
|
3
3
|
#
|
|
4
4
|
# Runs four checks before allowing a push:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
#
|
|
14
14
|
# Install: cp this file to .husky/pre-push && chmod +x .husky/pre-push
|
|
15
15
|
|
|
16
|
-
set -
|
|
16
|
+
set -eu
|
|
17
17
|
|
|
18
18
|
# ── 1. TypeScript check ──────────────────────────────────────────────
|
|
19
19
|
echo "Pre-push: running TypeScript check..."
|
|
@@ -35,9 +35,10 @@ INTEGRATION_BRANCH=$(jq -r '.integration_branch // "develop"' sdlc-config.json 2
|
|
|
35
35
|
# Read stdin to get the pushed refs (husky pre-push protocol)
|
|
36
36
|
while read -r local_ref local_sha remote_ref remote_sha; do
|
|
37
37
|
# Check if pushing to the integration branch
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
case "$remote_ref" in
|
|
39
|
+
*"refs/heads/$INTEGRATION_BRANCH") ;;
|
|
40
|
+
*) continue ;;
|
|
41
|
+
esac
|
|
41
42
|
|
|
42
43
|
# Determine the commit range being pushed
|
|
43
44
|
if [ "$remote_sha" = "0000000000000000000000000000000000000000" ]; then
|
|
@@ -79,9 +80,10 @@ TRACKED_TYPES='^(feat|fix|refactor|perf)(\(.+\))?!?:'
|
|
|
79
80
|
HAS_TRACKED=false
|
|
80
81
|
|
|
81
82
|
while read -r local_ref local_sha remote_ref remote_sha; do
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
case "$remote_ref" in
|
|
84
|
+
*"refs/heads/$INTEGRATION_BRANCH") ;;
|
|
85
|
+
*) continue ;;
|
|
86
|
+
esac
|
|
85
87
|
if [ "$remote_sha" = "0000000000000000000000000000000000000000" ]; then
|
|
86
88
|
RANGE="$local_sha"
|
|
87
89
|
else
|