@juangcarmona/lighthouse-sdlc 0.7.0 → 0.8.0

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.
@@ -0,0 +1,41 @@
1
+ ---
2
+ # Owned by @juangcarmona/lighthouse-sdlc. Compile with `gh aw compile`; do not edit the lock file.
3
+ name: Lighthouse SDLC triage
4
+ description: Execute only the Lighthouse triage stage and return its declared stage result.
5
+ private: true
6
+ runs-on: [self-hosted, linux, lighthouse-sdlc]
7
+ runs-on-slim: ubuntu-24.04
8
+ strict: true
9
+ env:
10
+ LIGHTHOUSE_STAGE: triage
11
+ LIGHTHOUSE_SKILL: src/packages/sdlc/skills/triage/SKILL.md
12
+ on:
13
+ workflow_call:
14
+ inputs:
15
+ route:
16
+ description: Lighthouse route selected by the host.
17
+ required: true
18
+ type: string
19
+ run-id:
20
+ description: Stable Lighthouse run identifier.
21
+ required: true
22
+ type: string
23
+ input:
24
+ description: Compact JSON input for this stage.
25
+ required: false
26
+ type: string
27
+ default: '{}'
28
+ previous-stage:
29
+ description: Previous stage artifact name; empty for triage.
30
+ required: false
31
+ type: string
32
+ default: ''
33
+ imports:
34
+ - shared/lighthouse-sdlc-stage.md
35
+ ---
36
+
37
+ # Lighthouse SDLC triage worker
38
+
39
+ Execute only `triage` by following `${{ env.LIGHTHOUSE_SKILL }}` and the package contracts in `src/packages/sdlc/routes.json`, `src/packages/sdlc/stages.json` and `src/packages/sdlc/schemas/stage-result.schema.json`. Read ProductShape and ArcShape context when the host provides citations, and preserve those citations in evidence.
40
+
41
+ Do not invoke `refine` or any later stage. Do not invent route names, labels, gates, statuses or evidence fields. Assess the work item, route, owner and evidence as the skill requires. Write one valid result to `/tmp/gh-aw/agent/stage-result.json` with `stage: triage`, `gate: triaged`, the triage record in `output`, and separate `evidence`, `missingEvidence`, `unavailableChecks` and `pendingReview` arrays. Stop at the triaged gate, then call `noop` exactly once.
@@ -0,0 +1,81 @@
1
+ ---
2
+ # Owned by @juangcarmona/lighthouse-sdlc. Shared stage mechanics for the local gh-aw workers.
3
+ description: Shared runner, input, evidence and stage-result mechanics for Lighthouse SDLC workers.
4
+ engine: copilot
5
+ permissions: read-all
6
+ checkout:
7
+ fetch-depth: 0
8
+ tools:
9
+ bash: [cat, find, git, node, npm, npx, rg]
10
+ edit:
11
+ github:
12
+ toolsets: [repos, issues, pull_requests]
13
+ safe-outputs:
14
+ report-failure-as-issue: false
15
+ create-issue: false
16
+ noop:
17
+ max: 1
18
+ report-as-issue: false
19
+ steps:
20
+ - name: Materialize the host input
21
+ shell: bash
22
+ env:
23
+ STAGE_INPUT: ${{ inputs.input }}
24
+ run: |
25
+ set -euo pipefail
26
+ mkdir -p /tmp/gh-aw/agent
27
+ printf '%s\n' "${STAGE_INPUT:-{}}" > /tmp/gh-aw/agent/input.json
28
+ - name: Load the previous stage result
29
+ if: inputs.previous-stage != ''
30
+ uses: actions/download-artifact@v8
31
+ with:
32
+ name: lighthouse-sdlc-${{ inputs.run-id }}-${{ inputs.previous-stage }}
33
+ path: /tmp/gh-aw/agent/previous
34
+ post-steps:
35
+ - name: Preserve the stage result
36
+ if: always()
37
+ shell: bash
38
+ run: |
39
+ set -euo pipefail
40
+ mkdir -p "$GITHUB_WORKSPACE/.lighthouse/gh-aw"
41
+ result=/tmp/gh-aw/agent/stage-result.json
42
+ if [ -f "$result" ]; then
43
+ cp "$result" "$GITHUB_WORKSPACE/.lighthouse/gh-aw/stage-result.json"
44
+ else
45
+ echo "::error::The worker did not produce /tmp/gh-aw/agent/stage-result.json"
46
+ exit 1
47
+ fi
48
+ - name: Validate the stage result and declared gate
49
+ if: always()
50
+ shell: bash
51
+ env:
52
+ EXPECTED_STAGE: ${{ env.LIGHTHOUSE_STAGE }}
53
+ RESULT_FILE: /tmp/gh-aw/agent/stage-result.json
54
+ run: |
55
+ set -euo pipefail
56
+ node src/packages/sdlc/src/sdlc.mjs stage-result --input "$RESULT_FILE" --format json
57
+ EXPECTED_STAGE="$EXPECTED_STAGE" RESULT_FILE="$RESULT_FILE" node --input-type=module <<'NODE'
58
+ import { readFileSync } from 'node:fs';
59
+
60
+ const stage = process.env.EXPECTED_STAGE;
61
+ const result = JSON.parse(readFileSync(process.env.RESULT_FILE, 'utf8'));
62
+ const contract = JSON.parse(readFileSync('src/packages/sdlc/stages.json', 'utf8'));
63
+ const expected = contract.stages.find((item) => item.id === stage);
64
+ if (!expected || result.stage !== stage || result.gate !== expected.gate) {
65
+ console.error(`stage-result does not match stages.json for ${stage}`);
66
+ process.exit(1);
67
+ }
68
+ NODE
69
+ - name: Upload stage evidence
70
+ if: always()
71
+ uses: actions/upload-artifact@v7
72
+ with:
73
+ name: lighthouse-sdlc-${{ inputs.run-id }}-${{ env.LIGHTHOUSE_STAGE }}
74
+ path: ${{ github.workspace }}/.lighthouse/gh-aw/stage-result.json
75
+ if-no-files-found: warn
76
+ retention-days: 14
77
+ ---
78
+
79
+ # Lighthouse SDLC worker mechanics
80
+
81
+ The host input is in `/tmp/gh-aw/agent/input.json`. If this worker has a previous stage, its validated result is in `/tmp/gh-aw/agent/previous/stage-result.json`.