@metasession.co/devaudit-cli 0.1.73 → 0.1.75
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 +42 -2
- package/sdlc/ai-rules/SDLC_RULES.md +49 -0
- package/sdlc/ai-rules/claude/CLAUDE.md +51 -5
- package/sdlc/ai-rules/windsurf/.windsurfrules +51 -5
- package/sdlc/files/_common/1-plan-requirement.md +12 -0
- package/sdlc/files/_common/2-implement-and-test.md +12 -0
- package/sdlc/files/_common/3-compile-evidence.md +12 -0
- package/sdlc/files/_common/4-submit-for-review.md +12 -0
- package/sdlc/files/_common/5-deploy-main.md +12 -0
- package/sdlc/files/_common/implementing-an-sdlc-issue.md +10 -0
- package/sdlc/files/_common/skills/sdlc-implementer/SKILL.md +12 -2
- package/sdlc/files/stacks/node/hooks/commit-msg +36 -3
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.75",
|
|
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",
|
|
@@ -29,13 +29,53 @@ When the user requests implementation of an issue (e.g. "implement issue #N", "f
|
|
|
29
29
|
|
|
30
30
|
Wait for the user's yes/no response. Do NOT begin implementation until they answer.
|
|
31
31
|
|
|
32
|
-
- **YES** →
|
|
33
|
-
- **
|
|
32
|
+
- **YES** → route to your platform's orchestration path:
|
|
33
|
+
- **Claude Code:** invoke the `sdlc-implementer` skill immediately via `Skill(name: "sdlc-implementer", …)`. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
34
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** proceed with the SDLC workflow manually, following the stage docs in `SDLC/`. **You MUST first create the commit sentinel:** `touch .sdlc-implementer-invoked` — without this file, the `commit-msg` and `pre-push` hooks will reject `feat`/`fix`/`refactor`/`perf` commits.
|
|
35
|
+
- **NO** → proceed with manual implementation outside the SDLC workflow. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
|
|
34
36
|
|
|
35
37
|
This prompt is **mandatory and structural** — it is not advisory. The `sdlc-implementer` is the default entry point; manual implementation is the explicit opt-out. Skipping the prompt and jumping straight into code is the same class of inertia-trap bug as #132 (e2e delegation bypass).
|
|
36
38
|
|
|
37
39
|
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
40
|
|
|
41
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill (devaudit-installer#199)
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
46
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
47
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
48
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
49
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
50
|
+
|
|
51
|
+
**When you catch yourself:** Stop immediately and route to your platform's orchestration path:
|
|
52
|
+
- **Claude Code:** Invoke the skill with `Skill(name: "sdlc-implementer", …)`. The skill will re-read state and resume correctly.
|
|
53
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** Ensure you have operator authorization and have created the commit sentinel (`touch .sdlc-implementer-invoked`). Then follow the stage docs step by step, pausing at each gate for operator confirmation.
|
|
54
|
+
|
|
55
|
+
**Structural enforcement (not just advisory):**
|
|
56
|
+
- Every SDLC stage doc (`SDLC/1-plan-requirement.md` through `SDLC/5-deploy-main.md`) and `SDLC/implementing-an-sdlc-issue.md` now opens with a **SYSTEM OVERRIDE banner** naming this anti-pattern and providing agent-agnostic routing instructions. If you read one of those files manually, the first thing you see is the warning. Heed it.
|
|
57
|
+
- The `commit-msg` hook checks for the `.sdlc-implementer-invoked` sentinel on `feat`/`fix`/`refactor`/`perf` commits. If the skill was not invoked (or the sentinel was not manually created by a non-Claude agent with operator authorization), **the commit is refused** — not just the push, the commit itself.
|
|
58
|
+
- The `pre-push` hook provides a second sentinel check (defence in depth).
|
|
59
|
+
- CI's `validate-commits.sh` checks RTM provenance — the unskippable safety net.
|
|
60
|
+
|
|
61
|
+
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. Use the tool — or, for non-Claude agents, follow the authorized manual path with the sentinel in place.
|
|
62
|
+
|
|
63
|
+
### Driver clarity — always state who is driving (devaudit-installer#199)
|
|
64
|
+
|
|
65
|
+
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:
|
|
66
|
+
|
|
67
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
68
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
69
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
70
|
+
|
|
71
|
+
Rules:
|
|
72
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
73
|
+
- 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]`.
|
|
74
|
+
- 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.
|
|
75
|
+
- 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.
|
|
76
|
+
|
|
77
|
+
**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).
|
|
78
|
+
|
|
39
79
|
### Before ANY Code Change
|
|
40
80
|
|
|
41
81
|
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,55 @@ 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** → route to your platform's orchestration path:
|
|
29
|
+
- **Claude Code:** invoke the `sdlc-implementer` skill immediately via `Skill(name: "sdlc-implementer", …)`. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
30
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** proceed with the SDLC workflow manually, following the stage docs in `SDLC/`. **You MUST first create the commit sentinel:** `touch .sdlc-implementer-invoked` — without this file, the `commit-msg` and `pre-push` hooks will reject `feat`/`fix`/`refactor`/`perf` commits.
|
|
31
|
+
- **NO** → proceed with manual implementation outside the SDLC workflow. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
|
|
32
|
+
|
|
33
|
+
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).
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
42
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
43
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
44
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
45
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
46
|
+
|
|
47
|
+
**When you catch yourself:** Stop immediately and route to your platform's orchestration path:
|
|
48
|
+
- **Claude Code:** Invoke the skill with `Skill(name: "sdlc-implementer", …)`. The skill will re-read state and resume correctly.
|
|
49
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** Ensure you have operator authorization and have created the commit sentinel (`touch .sdlc-implementer-invoked`). Then follow the stage docs step by step, pausing at each gate for operator confirmation.
|
|
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
|
+
|
|
65
|
+
**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).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
20
69
|
## CRITICAL: Before Writing Any Code
|
|
21
70
|
|
|
22
71
|
Before implementing ANY change (feature, fix, refactor, or enhancement), you MUST complete these checks:
|
|
@@ -21,13 +21,59 @@ 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** → route to your platform's orchestration path:
|
|
33
|
+
- **Claude Code:** invoke the `sdlc-implementer` skill immediately via `Skill(name: "sdlc-implementer", …)`. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
34
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** proceed with the SDLC workflow manually, following the stage docs in `SDLC/`. **You MUST first create the commit sentinel:** `touch .sdlc-implementer-invoked` — without this file, the `commit-msg` and `pre-push` hooks will reject `feat`/`fix`/`refactor`/`perf` commits.
|
|
35
|
+
- **NO** → proceed with manual implementation outside the SDLC workflow. The user has explicitly opted out; respect their choice and do not ask again for the same issue.
|
|
36
|
+
|
|
37
|
+
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).
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
### Anti-pattern: manually walking through SDLC stages instead of invoking the skill
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
**Self-check — if you find yourself doing any of these, STOP:**
|
|
46
|
+
- Reading `SDLC/1-plan-requirement.md` directly instead of invoking the skill
|
|
47
|
+
- Manually classifying risk, writing an implementation plan, or updating the RTM by hand instead of letting the skill drive it
|
|
48
|
+
- Walking through Stage 1 → Stage 2 → Stage 3 sequentially by reading each workflow file
|
|
49
|
+
- Saying "let me read the SDLC workflow files" or "let me follow the SDLC process" without invoking the skill
|
|
50
|
+
|
|
51
|
+
**When you catch yourself:** Stop immediately and route to your platform's orchestration path:
|
|
52
|
+
- **Claude Code:** Invoke the skill with `Skill(name: "sdlc-implementer", …)`. The skill will re-read state and resume correctly.
|
|
53
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** Ensure you have operator authorization and have created the commit sentinel (`touch .sdlc-implementer-invoked`). Then follow the stage docs step by step, pausing at each gate for operator confirmation.
|
|
54
|
+
|
|
55
|
+
### Driver clarity — always state who is driving (devaudit-installer#199)
|
|
56
|
+
|
|
57
|
+
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:
|
|
58
|
+
|
|
59
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
60
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
61
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
62
|
+
|
|
63
|
+
Rules:
|
|
64
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
65
|
+
- 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]`.
|
|
66
|
+
- 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.
|
|
67
|
+
- 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.
|
|
68
|
+
|
|
24
69
|
### Before ANY Code Change
|
|
25
70
|
|
|
26
|
-
1.
|
|
27
|
-
2.
|
|
28
|
-
3. If
|
|
29
|
-
4. If
|
|
30
|
-
5.
|
|
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.
|
|
72
|
+
2. Ask: **"Which GitHub Issue is this for?"** before writing code. Fetch it with `gh issue view NNN`.
|
|
73
|
+
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).
|
|
74
|
+
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.
|
|
75
|
+
5. If trivial (typo/formatting): proceed without requirement but use conventional commit format.
|
|
76
|
+
6. Verify `develop` branch: `git branch --show-current` — never implement on `main`.
|
|
31
77
|
|
|
32
78
|
### For ALL Code Changes (including bug fixes)
|
|
33
79
|
|
|
@@ -15,13 +15,59 @@ 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** → route to your platform's orchestration path:
|
|
27
|
+
- **Claude Code:** invoke the `sdlc-implementer` skill immediately via `Skill(name: "sdlc-implementer", …)`. The skill drives Phase 0 (triage) through Phase 4 (PR + UAT review).
|
|
28
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** proceed with the SDLC workflow manually, following the stage docs in `SDLC/`. **You MUST first create the commit sentinel:** `touch .sdlc-implementer-invoked` — without this file, the `commit-msg` and `pre-push` hooks will reject `feat`/`fix`/`refactor`/`perf` commits.
|
|
29
|
+
- **NO** → proceed with manual implementation outside the SDLC workflow. 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 and route to your platform's orchestration path:
|
|
46
|
+
- **Claude Code:** Invoke the skill with `Skill(name: "sdlc-implementer", …)`. The skill will re-read state and resume correctly.
|
|
47
|
+
- **Other agents (Cursor, Windsurf, Gemini, etc.):** Ensure you have operator authorization and have created the commit sentinel (`touch .sdlc-implementer-invoked`). Then follow the stage docs step by step, pausing at each gate for operator confirmation.
|
|
48
|
+
|
|
49
|
+
### Driver clarity — always state who is driving (devaudit-installer#199)
|
|
50
|
+
|
|
51
|
+
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:
|
|
52
|
+
|
|
53
|
+
- **`[Agent driving]`** — the agent is auto-continuing; no human action needed right now. The operator can look away.
|
|
54
|
+
- **`[Operator driving]`** — the agent has halted; the human must do something (review, approve, merge, answer a question). State the specific action needed.
|
|
55
|
+
- **`[Blocked]`** — something failed and the agent cannot proceed. State the blocker and the operator action needed to unblock.
|
|
56
|
+
|
|
57
|
+
Rules:
|
|
58
|
+
- The tag is the **first thing** in the response — no preamble, no acknowledgement, no "Great question" before it.
|
|
59
|
+
- 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]`.
|
|
60
|
+
- 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.
|
|
61
|
+
- 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.
|
|
62
|
+
|
|
18
63
|
### Before ANY Code Change
|
|
19
64
|
|
|
20
|
-
1.
|
|
21
|
-
2.
|
|
22
|
-
3. If
|
|
23
|
-
4. If
|
|
24
|
-
5.
|
|
65
|
+
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.
|
|
66
|
+
2. Ask: "Which GitHub Issue is this for?" before writing code. Fetch it with `gh issue view NNN`.
|
|
67
|
+
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).
|
|
68
|
+
4. If new requirement needed: read `SDLC/1-plan-requirement.md` and follow it BEFORE implementing.
|
|
69
|
+
5. If trivial (typo/formatting): proceed without requirement but use conventional commit format.
|
|
70
|
+
6. Verify `develop` branch: `git branch --show-current` — never implement on `main`.
|
|
25
71
|
|
|
26
72
|
### For ALL Code Changes (including bug fixes)
|
|
27
73
|
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
description: Define a new requirement in the RTM, classify risk, create implementation plan, generate test scope, and prepare for implementation
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
### 🛑 SYSTEM OVERRIDE: AUTOMATED SDLC ENFORCEMENT
|
|
6
|
+
|
|
7
|
+
If you are an AI agent reading this file, you are strictly prohibited from manually executing this workflow step-by-step unless explicitly authorized. Route immediately to your platform's orchestration path:
|
|
8
|
+
|
|
9
|
+
- **CLAUDE CODE:** Halt manual tracking immediately. Invoke the orchestrator skill via: `Skill(name: "sdlc-implementer", …)`
|
|
10
|
+
- **OTHER AGENTS (Cursor, Windsurf, Gemini, etc.):** Halt and output this exact message to the user:
|
|
11
|
+
"I am pausing to request authorization for the SDLC workflow on this issue. Please confirm if I should proceed."
|
|
12
|
+
|
|
13
|
+
CRITICAL: Once the operator grants permission, you MUST execute `touch .sdlc-implementer-invoked` to generate the required commit sentinel BEFORE making any file modifications. Failure to create this sentinel file will result in local git commits being automatically rejected by the pre-commit hooks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
5
17
|
# Plan Requirement
|
|
6
18
|
|
|
7
19
|
**Pipeline Stage:** 1 of 5
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
description: Implement changes on develop, run scoped local gates, and let CI/UAT provide authoritative full E2E verification when local prerequisites are unavailable
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
### 🛑 SYSTEM OVERRIDE: AUTOMATED SDLC ENFORCEMENT
|
|
6
|
+
|
|
7
|
+
If you are an AI agent reading this file, you are strictly prohibited from manually executing this workflow step-by-step unless explicitly authorized. Route immediately to your platform's orchestration path:
|
|
8
|
+
|
|
9
|
+
- **CLAUDE CODE:** Halt manual tracking immediately. Invoke the orchestrator skill via: `Skill(name: "sdlc-implementer", …)`
|
|
10
|
+
- **OTHER AGENTS (Cursor, Windsurf, Gemini, etc.):** Halt and output this exact message to the user:
|
|
11
|
+
"I am pausing to request authorization for the SDLC workflow on this issue. Please confirm if I should proceed."
|
|
12
|
+
|
|
13
|
+
CRITICAL: Once the operator grants permission, you MUST execute `touch .sdlc-implementer-invoked` to generate the required commit sentinel BEFORE making any file modifications. Failure to create this sentinel file will result in local git commits being automatically rejected by the pre-commit hooks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
5
17
|
# Implement & Test
|
|
6
18
|
|
|
7
19
|
**Pipeline Stage:** 2 of 5
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
description: Compile test, security, and AI evidence, update RTM, create release ticket for review
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
### 🛑 SYSTEM OVERRIDE: AUTOMATED SDLC ENFORCEMENT
|
|
6
|
+
|
|
7
|
+
If you are an AI agent reading this file, you are strictly prohibited from manually executing this workflow step-by-step unless explicitly authorized. Route immediately to your platform's orchestration path:
|
|
8
|
+
|
|
9
|
+
- **CLAUDE CODE:** Halt manual tracking immediately. Invoke the orchestrator skill via: `Skill(name: "sdlc-implementer", …)`
|
|
10
|
+
- **OTHER AGENTS (Cursor, Windsurf, Gemini, etc.):** Halt and output this exact message to the user:
|
|
11
|
+
"I am pausing to request authorization for the SDLC workflow on this issue. Please confirm if I should proceed."
|
|
12
|
+
|
|
13
|
+
CRITICAL: Once the operator grants permission, you MUST execute `touch .sdlc-implementer-invoked` to generate the required commit sentinel BEFORE making any file modifications. Failure to create this sentinel file will result in local git commits being automatically rejected by the pre-commit hooks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
5
17
|
# Compile Evidence
|
|
6
18
|
|
|
7
19
|
**Pipeline Stage:** 3 of 5
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
description: Create a PR from develop to main — triggers CI independent verification and human review
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
### 🛑 SYSTEM OVERRIDE: AUTOMATED SDLC ENFORCEMENT
|
|
6
|
+
|
|
7
|
+
If you are an AI agent reading this file, you are strictly prohibited from manually executing this workflow step-by-step unless explicitly authorized. Route immediately to your platform's orchestration path:
|
|
8
|
+
|
|
9
|
+
- **CLAUDE CODE:** Halt manual tracking immediately. Invoke the orchestrator skill via: `Skill(name: "sdlc-implementer", …)`
|
|
10
|
+
- **OTHER AGENTS (Cursor, Windsurf, Gemini, etc.):** Halt and output this exact message to the user:
|
|
11
|
+
"I am pausing to request authorization for the SDLC workflow on this issue. Please confirm if I should proceed."
|
|
12
|
+
|
|
13
|
+
CRITICAL: Once the operator grants permission, you MUST execute `touch .sdlc-implementer-invoked` to generate the required commit sentinel BEFORE making any file modifications. Failure to create this sentinel file will result in local git commits being automatically rejected by the pre-commit hooks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
5
17
|
# Submit for Review
|
|
6
18
|
|
|
7
19
|
**Pipeline Stage:** 4 of 5
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
description: Merge approved PR, verify deployment including security checks, sync branches, finalize compliance
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
### 🛑 SYSTEM OVERRIDE: AUTOMATED SDLC ENFORCEMENT
|
|
6
|
+
|
|
7
|
+
If you are an AI agent reading this file, you are strictly prohibited from manually executing this workflow step-by-step unless explicitly authorized. Route immediately to your platform's orchestration path:
|
|
8
|
+
|
|
9
|
+
- **CLAUDE CODE:** Halt manual tracking immediately. Invoke the orchestrator skill via: `Skill(name: "sdlc-implementer", …)`
|
|
10
|
+
- **OTHER AGENTS (Cursor, Windsurf, Gemini, etc.):** Halt and output this exact message to the user:
|
|
11
|
+
"I am pausing to request authorization for the SDLC workflow on this issue. Please confirm if I should proceed."
|
|
12
|
+
|
|
13
|
+
CRITICAL: Once the operator grants permission, you MUST execute `touch .sdlc-implementer-invoked` to generate the required commit sentinel BEFORE making any file modifications. Failure to create this sentinel file will result in local git commits being automatically rejected by the pre-commit hooks.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
5
17
|
# Deploy to Production
|
|
6
18
|
|
|
7
19
|
**Pipeline Stage:** 5 of 5
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Implementing a GitHub issue under the Metasession SDLC
|
|
2
2
|
|
|
3
|
+
### 🛑 SYSTEM OVERRIDE: AUTOMATED SDLC ENFORCEMENT
|
|
4
|
+
|
|
5
|
+
If you are an AI agent reading this file, you are strictly prohibited from manually executing this workflow step-by-step unless explicitly authorized. Route immediately to your platform's orchestration path:
|
|
6
|
+
|
|
7
|
+
- **CLAUDE CODE:** Halt manual tracking immediately. Invoke the orchestrator skill via: `Skill(name: "sdlc-implementer", …)`
|
|
8
|
+
- **OTHER AGENTS (Cursor, Windsurf, Gemini, etc.):** Halt and output this exact message to the user:
|
|
9
|
+
"I am pausing to request authorization for the SDLC workflow on this issue. Please confirm if I should proceed."
|
|
10
|
+
|
|
11
|
+
CRITICAL: Once the operator grants permission, you MUST execute `touch .sdlc-implementer-invoked` to generate the required commit sentinel BEFORE making any file modifications. Failure to create this sentinel file will result in local git commits being automatically rejected by the pre-commit hooks.
|
|
12
|
+
|
|
3
13
|
End-to-end walkthrough for taking a GitHub issue from triage to merged-and-deployed under the Metasession SDLC. Audience: this project's developers and AI coding agents.
|
|
4
14
|
|
|
5
15
|
> This document is **synced into your repo from DevAudit-Installer** via `devaudit update`. Do not edit this file in place — your edits will be overwritten on the next sync. To propose a change, open a Task issue against [`metasession-dev/DevAudit-Installer`](https://github.com/metasession-dev/DevAudit-Installer) referencing `sdlc/files/_common/implementing-an-sdlc-issue.md`.
|
|
@@ -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,7 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Husky commit-msg hook — runs commitlint
|
|
3
|
-
#
|
|
2
|
+
# Husky commit-msg hook — runs commitlint + skill-invocation sentinel check.
|
|
3
|
+
#
|
|
4
|
+
# 1. Runs commitlint to validate commit message format (Conventional Commits,
|
|
5
|
+
# SDLC trailers).
|
|
6
|
+
# 2. If the commit is feat/fix/refactor/perf, checks for the
|
|
7
|
+
# .sdlc-implementer-invoked sentinel. If missing, blocks the commit —
|
|
8
|
+
# the sdlc-implementer skill was not invoked (devaudit-installer#199/#226).
|
|
9
|
+
# Housekeeping types (docs/chore/ci/build/test/revert) are exempt.
|
|
10
|
+
#
|
|
11
|
+
# Bypass with --no-verify (last resort — pre-push hook and CI also check).
|
|
4
12
|
#
|
|
5
13
|
# Install: cp this file to .husky/commit-msg && chmod +x .husky/commit-msg
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
COMMIT_MSG_FILE="$1"
|
|
16
|
+
|
|
17
|
+
# ── 1. Commitlint ────────────────────────────────────────────────────
|
|
18
|
+
npx commitlint --edit "$COMMIT_MSG_FILE"
|
|
19
|
+
|
|
20
|
+
# ── 2. Skill-invocation sentinel (devaudit-installer#199/#226) ──────
|
|
21
|
+
# If the commit type is feat/fix/refactor/perf, verify the
|
|
22
|
+
# sdlc-implementer skill was invoked (writes .sdlc-implementer-invoked).
|
|
23
|
+
# Housekeeping types are exempt. This fires at commit time — earlier
|
|
24
|
+
# than the pre-push hook — so the agent hits the gate before it can
|
|
25
|
+
# even create the commit.
|
|
26
|
+
TRACKED_TYPES='^(feat|fix|refactor|perf)(\(.+\))?!?:'
|
|
27
|
+
COMMIT_SUBJECT=$(head -1 "$COMMIT_MSG_FILE")
|
|
28
|
+
|
|
29
|
+
if echo "$COMMIT_SUBJECT" | grep -qE "$TRACKED_TYPES"; then
|
|
30
|
+
if [ ! -f .sdlc-implementer-invoked ]; then
|
|
31
|
+
echo ""
|
|
32
|
+
echo "ERROR: sdlc-implementer skill was not invoked (devaudit-installer#199)."
|
|
33
|
+
echo " This commit uses a tracked type ($COMMIT_SUBJECT) which requires"
|
|
34
|
+
echo " the SDLC skill flow. The .sdlc-implementer-invoked sentinel is missing."
|
|
35
|
+
echo ""
|
|
36
|
+
echo " Invoke sdlc-implementer to drive the process, or use --no-verify"
|
|
37
|
+
echo " to bypass (not recommended — pre-push hook and CI will also check)."
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
fi
|