@metasession.co/devaudit-sdlc 0.3.7 → 0.3.9

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": "@metasession.co/devaudit-sdlc",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "DevAudit SDLC CLI Engine — cross-agent terminal-driven SDLC orchestrator.",
5
5
  "bin": {
6
6
  "devaudit-sdlc": "./src/bin/devaudit-sdlc.js"
@@ -50,11 +50,30 @@ if (viewOnly) {
50
50
  }
51
51
 
52
52
  try {
53
+ // Detect the invoking agent type (devaudit-installer#278):
54
+ // - 'skill' when invoked via a skill mechanism (Claude Code Skill, etc.)
55
+ // - 'native-agent' when invoked directly by the native agent (Cursor, Windsurf, etc.)
56
+ // - 'cli' when invoked manually from the terminal
57
+ const invokedBySkill = !!(process.env.DEVAUDIT_SKILL_NAME || process.env.DEVAUDIT_SKILL_INVOKED);
58
+ const invokedByAgent = !!(process.env.DEVAUDIT_AGENT || process.env.AI_AGENT_ID);
59
+ const initializedBy = invokedBySkill ? 'skill' : invokedByAgent ? 'native-agent' : 'cli';
60
+
61
+ // Extract REQ ID from args or environment (devaudit-installer#278)
62
+ let reqId = null;
63
+ const reqArg = args.find(arg => arg.startsWith('--req='));
64
+ if (reqArg) {
65
+ reqId = reqArg.split('=')[1];
66
+ } else if (process.env.DEVAUDIT_REQ_ID) {
67
+ reqId = process.env.DEVAUDIT_REQ_ID;
68
+ }
69
+
53
70
  const newRecord = {
54
71
  activatedAt: new Date().toISOString(),
55
72
  currentPhase: phase,
56
- initializedBy: 'devaudit-cli-engine',
57
- status: 'active'
73
+ initializedBy: initializedBy,
74
+ status: 'active',
75
+ reqId: reqId,
76
+ agentType: invokedBySkill ? (process.env.DEVAUDIT_SKILL_NAME || 'skill') : (invokedByAgent ? (process.env.DEVAUDIT_AGENT || 'native-agent') : 'manual'),
58
77
  };
59
78
 
60
79
  // Read existing sentinel and append, or create new array
@@ -83,6 +102,7 @@ try {
83
102
  console.log(`\n✅ SDLC Gateway Initialized: Appended phase ${phase} record to sentinel at ${sentinelPath}`);
84
103
  console.log(`🚀 Phase ${phase} orchestration active. Your local git commit gates are now open.`);
85
104
  console.log(`📋 Phase history: ${phaseHistory.map(r => r.currentPhase).join(' → ')}`);
105
+ console.log(`👤 Initialized by: ${initializedBy}${reqId ? ` (REQ-${reqId})` : ''}`);
86
106
 
87
107
  if (fs.existsSync(blueprintPath)) {
88
108
  console.log(`\n--- PHASE EXECUTION MANIFEST ---`);
@@ -149,17 +149,17 @@ cat > compliance/evidence/REQ-XXX/test-execution-summary.md << 'EOF'
149
149
 
150
150
  ## Test design (devaudit#50)
151
151
 
152
- Records the design-time decisions before listing run results — what was tested, what was deliberately deferred, who/what decided. Auditors (and future maintainers) can see the scope decision was *made*, not implicit.
152
+ Records the design-time decisions before listing run results — what was tested, what was deliberately exempted, who/what decided. Auditors (and future maintainers) can see the scope decision was *made*, not implicit.
153
153
 
154
154
  **Layers planned:** [unit | integration | e2e | visual | manual — pick the ones that apply to this REQ]
155
155
 
156
- **Layers covered:** [same list, marked ✓ for shipped layers / `deferred` for skipped ones]
156
+ **Layers covered:** [same list, marked ✓ for shipped layers / `NOT_NEEDED` for skipped ones with reason]
157
157
 
158
- **Deferrals (if any):**
158
+ **Exemptions (if any):**
159
159
 
160
- - [e.g. "e2e N/A — schema-only change, no UI surface reads the new fields yet; deferred to REQ-NNN when the admin form lands"]
161
- - [e.g. "visual regression N/A — backend service change, no UI affected"]
162
- - A deferral without a stated rationale is a gap, not a deferral. Either name *why* it was skipped or do the work.
160
+ - [e.g. "e2e NOT_NEEDED — schema-only change, no UI surface reads the new fields yet; will be covered in REQ-NNN when the admin form lands"]
161
+ - [e.g. "visual regression NOT_NEEDED — backend service change, no UI affected"]
162
+ - An exemption without a stated rationale is a gap, not an exemption. Either name *why* it was skipped or do the work.
163
163
 
164
164
  **Skill invocation:** [`e2e-test-engineer` invoked on turn N during Phase 2 — verifiable from the chat transcript] / [`manual scope decision` — operator chose layers directly because <reason>]
165
165
 
@@ -175,6 +175,20 @@ Records the design-time decisions before listing run results — what was tested
175
175
  | E2E Tests | PASS | [N]/[N] passed |
176
176
  | Build | PASS | Production build succeeded |
177
177
 
178
+ ## Accepted skips
179
+
180
+ Required when E2E gate result is `SKIPPED`. Optional when no accepted skips exist.
181
+
182
+ | Spec | Test | REQ/AC | Classification | Resolution attempted | Approved by | Rationale |
183
+ |------|------|--------|---------------|---------------------|-------------|----------|
184
+ | e2e/foo.spec.ts | "AC3: bar dialog" | REQ-XXX/AC3 | intentional_non_applicability | N/A — API-only change | [operator] | API-only change, no UI surface |
185
+
186
+ Rules:
187
+ - Each row must have a non-empty `Approved by` value.
188
+ - Classification must be one of: `environment_gap`, `precondition_gap`, `intentional_non_applicability`, `obsolete_or_quarantined`.
189
+ - `environment_gap` and `precondition_gap` skips must be resolved before listing — if they appear here, the gate is not truly `SKIPPED` with operator approval.
190
+ - A skipped test never proves an acceptance criterion.
191
+
178
192
  ## Test Cycles
179
193
 
180
194
  | Cycle | CI Run | Gate Status | E2E Result | Coverage | Date |