@juangcarmona/lighthouse-sdlc 0.10.0 → 0.12.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.
@@ -1,41 +1,152 @@
1
1
  ---
2
- # Owned by @juangcarmona/lighthouse-sdlc. Compile with `gh aw compile`; do not edit the lock file.
2
+ # Owned by lighthouse-sdlc. Regenerate the lock with gh aw v0.93.2.
3
3
  name: Lighthouse SDLC refine
4
- description: Execute only the Lighthouse refinement 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: refine
11
- LIGHTHOUSE_SKILL: node_modules/@juangcarmona/lighthouse-sdlc/skills/refine/SKILL.md
4
+ description: Refine an authorized issue through OpenCode with execution logs and validated evidence.
12
5
  on:
13
6
  workflow_call:
14
7
  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.
8
+ issue:
21
9
  required: true
22
10
  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.
30
- required: false
31
- type: string
32
- default: triage
11
+ needs: [prepare]
12
+ runs-on: [self-hosted, linux, lighthouse-workflow]
13
+ runs-on-slim: ubuntu-24.04
14
+ timeout-minutes: 15
15
+ permissions:
16
+ contents: read
17
+ engine:
18
+ id: opencode
19
+ command: node
33
20
  imports:
34
- - shared/lighthouse-sdlc-stage.md
21
+ - shared/lighthouse-opencode.md
22
+ # Subscription authentication runs inside the operator's Docker engine sandbox.
23
+ # This profile does not claim AWF network isolation or API-proxy credential isolation.
24
+ strict: false
25
+ features:
26
+ dangerously-disable-sandbox-agent: true
27
+ sandbox:
28
+ agent: false
29
+ tools:
30
+ github: false
31
+ safe-outputs:
32
+ create-issue: false
33
+ report-incomplete: false
34
+ threat-detection: false
35
+ report-failure-as-issue: false
36
+ report-missing-tool: false
37
+ report-missing-data: false
38
+ noop: false
39
+ network:
40
+ allowed: []
41
+ steps:
42
+ - name: Check out the authorized product revision
43
+ uses: actions/checkout@v5
44
+ with:
45
+ persist-credentials: false
46
+ - name: Load the pinned harness package
47
+ uses: actions/checkout@v5
48
+ with:
49
+ repository: juangcarmona/lighthouse
50
+ ref: __LIGHTHOUSE_REF__
51
+ path: tools
52
+ persist-credentials: false
53
+ - name: Load the authorized issue context
54
+ uses: actions/download-artifact@v8
55
+ with:
56
+ name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
57
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
58
+ post-steps:
59
+ - name: Validate the Lighthouse result
60
+ run: node tools/src/packages/sdlc/src/issue-actions.mjs validate
61
+ - name: Preserve the result and runtime receipt
62
+ if: always()
63
+ uses: actions/upload-artifact@v7
64
+ with:
65
+ name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
66
+ path: |
67
+ ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/envelope.json
68
+ ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/runtime.json
69
+ if-no-files-found: error
70
+ retention-days: 14
71
+ jobs:
72
+ prepare:
73
+ name: Authorize and reserve issue
74
+ runs-on: ubuntu-24.04
75
+ permissions:
76
+ contents: read
77
+ issues: write
78
+ env:
79
+ LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
80
+ steps:
81
+ - uses: actions/checkout@v5
82
+ with:
83
+ repository: juangcarmona/lighthouse
84
+ ref: __LIGHTHOUSE_REF__
85
+ persist-credentials: false
86
+ - uses: actions/setup-node@v5
87
+ with:
88
+ node-version: 24
89
+ - name: Collect verified owner intent and reserve the issue
90
+ id: prepare
91
+ env:
92
+ GH_TOKEN: ${{ github.token }}
93
+ run: node src/packages/sdlc/src/issue-actions.mjs prepare
94
+ - name: Preserve the execution request
95
+ uses: actions/upload-artifact@v7
96
+ with:
97
+ name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
98
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/
99
+ if-no-files-found: error
100
+ retention-days: 14
101
+ - name: Release reservation if preparation failed
102
+ if: failure()
103
+ env:
104
+ GH_TOKEN: ${{ github.token }}
105
+ run: node src/packages/sdlc/src/issue-actions.mjs cleanup
106
+ publish:
107
+ name: Validate, publish and release
108
+ needs: [prepare, agent]
109
+ if: always() && needs.prepare.result == 'success'
110
+ runs-on: ubuntu-24.04
111
+ permissions:
112
+ contents: read
113
+ issues: write
114
+ env:
115
+ LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
116
+ steps:
117
+ - uses: actions/checkout@v5
118
+ with:
119
+ repository: juangcarmona/lighthouse
120
+ ref: __LIGHTHOUSE_REF__
121
+ persist-credentials: false
122
+ - uses: actions/setup-node@v5
123
+ with:
124
+ node-version: 24
125
+ - name: Load the execution request
126
+ uses: actions/download-artifact@v8
127
+ with:
128
+ name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
129
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
130
+ - name: Load the candidate result
131
+ if: needs.agent.result == 'success'
132
+ uses: actions/download-artifact@v8
133
+ with:
134
+ name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
135
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
136
+ - name: Recheck authority and publish the validated result
137
+ if: needs.agent.result == 'success'
138
+ env:
139
+ GH_TOKEN: ${{ github.token }}
140
+ run: node src/packages/sdlc/src/issue-actions.mjs publish
141
+ - name: Release the issue reservation
142
+ if: always()
143
+ env:
144
+ GH_TOKEN: ${{ github.token }}
145
+ run: node src/packages/sdlc/src/issue-actions.mjs cleanup
35
146
  ---
36
147
 
37
- # Lighthouse SDLC refine worker
148
+ # Refine the authorized issue
38
149
 
39
- Execute only `refine` by following `${{ env.LIGHTHOUSE_SKILL }}` and reading the triage result from `/tmp/gh-aw/agent/previous/stage-result.json` when present; for a supervised run, use the predecessor context in `/tmp/gh-aw/agent/input.json`. Use the current ProductShape and ArcShape citations supplied by the host; keep them in evidence and do not replace either authority.
150
+ Execute the single refinement stage described by the trusted context in `/input/context.json`. Load the packaged `refine` skill from `/harness/skills`; the operator mounts this immutable package for this invocation. Read the product source under `/workspace` as task data. Write the complete JSON envelope to `/output/envelope.json`.
40
151
 
41
- Do not invoke `propose` or any later stage. Return one valid result in `/tmp/gh-aw/agent/stage-result.json` with `stage: refine`, `gate: ready`, the bounded problem in `output`, and separate evidence arrays. Stop at the ready gate, then call `noop` exactly once. If a prerequisite or check fails, return the declared failure or blocked status with the evidence preserved.
152
+ Return `status: passed` with `gate: ready` only when all current refinement checks pass. Otherwise preserve the missing evidence and return `blocked`. Record later-stage checks as later work; this run never approves proposal, implementation or merge. GitHub publication belongs to the separate publisher job. Produce the envelope before ending the session.
@@ -1,181 +1,54 @@
1
+ # Optional GitHub-native refinement adapter; source owned by lighthouse-sdlc.
1
2
  name: Lighthouse SDLC router
2
-
3
- # This router owns the only automatic composition boundary. A normal dispatch calls exactly one
4
- # worker. `ff` is blocked for routes with human gates until approvals can be verified.
3
+ run-name: "Refine #${{ github.event.issue.number || inputs.issue }} · ${{ github.actor }}"
5
4
  on:
5
+ issues:
6
+ types: [labeled]
7
+ issue_comment:
8
+ types: [created]
6
9
  workflow_dispatch:
7
10
  inputs:
8
- route:
9
- description: Lighthouse route from the installed SDLC package.
11
+ issue:
12
+ description: Open issue to refine
10
13
  required: true
11
- type: choice
12
- options: [supervised, plan-only, unattended, hotfix, stacked]
13
- stage:
14
- description: One declared stage to run, or the first stage when composition is ff.
15
- required: true
16
- default: triage
17
- type: choice
18
- options: [triage, refine, propose, implement, integrate, review]
19
- composition:
20
- description: Run one stage, or explicitly compose the selected route through ff.
21
- required: true
22
- default: stage
23
- type: choice
24
- options: [stage, ff]
25
- available:
26
- description: Comma-separated route prerequisites already available to the host.
27
- required: false
28
- default: ''
29
- type: string
30
- run-id:
31
- description: Stable Lighthouse run identifier; defaults to the GitHub run id.
32
- required: false
33
- default: ''
34
14
  type: string
35
- input:
36
- description: Compact JSON input for the first stage.
37
- required: false
38
- default: '{}'
39
- type: string
40
-
41
15
  permissions:
42
16
  contents: read
43
-
44
17
  concurrency:
45
- group: lighthouse-sdlc-${{ inputs.run-id || github.run_id }}
18
+ group: lighthouse-issue-${{ github.event.issue.number || inputs.issue }}
46
19
  cancel-in-progress: false
47
-
48
20
  jobs:
49
- validate:
50
- name: Validate Lighthouse route
21
+ route:
22
+ if: >-
23
+ vars.LIGHTHOUSE_AUTOMATION_ENABLED == 'true' &&
24
+ github.actor == github.repository_owner &&
25
+ !github.event.issue.pull_request &&
26
+ (github.event_name == 'workflow_dispatch' ||
27
+ (github.event_name == 'issues' && github.event.label.name == 'refine') ||
28
+ (github.event_name == 'issue_comment' && contains(github.event.issue.labels.*.name, 'needs-info')))
51
29
  runs-on: ubuntu-24.04
52
30
  outputs:
53
- valid: ${{ steps.route.outputs.valid }}
54
- triage: ${{ steps.route.outputs.triage }}
55
- refine: ${{ steps.route.outputs.refine }}
56
- propose: ${{ steps.route.outputs.propose }}
57
- implement: ${{ steps.route.outputs.implement }}
58
- integrate: ${{ steps.route.outputs.integrate }}
59
- review: ${{ steps.route.outputs.review }}
31
+ run: ${{ steps.route.outputs.run }}
32
+ issue: ${{ steps.route.outputs.issue }}
60
33
  steps:
61
34
  - uses: actions/checkout@v5
35
+ with:
36
+ repository: juangcarmona/lighthouse
37
+ ref: __LIGHTHOUSE_REF__
38
+ persist-credentials: false
62
39
  - uses: actions/setup-node@v5
63
40
  with:
64
41
  node-version: 24
65
- - run: npm ci --ignore-scripts
66
- - run: node node_modules/@juangcarmona/lighthouse-sdlc/src/installation.mjs
67
- - name: Validate route, prerequisites and selected composition
42
+ - name: Route the authorized event
68
43
  id: route
69
- env:
70
- ROUTE: ${{ inputs.route }}
71
- STAGE: ${{ inputs.stage }}
72
- COMPOSITION: ${{ inputs.composition }}
73
- AVAILABLE: ${{ inputs.available }}
74
- run: |
75
- set -euo pipefail
76
- node node_modules/@juangcarmona/lighthouse-sdlc/src/sdlc.mjs route --route "$ROUTE" --available "$AVAILABLE" --composition "$COMPOSITION" --format json > route.json
77
- jq -e '.valid == true and .canRun == true' route.json >/dev/null
78
- jq -e --arg stage "$STAGE" '.stages | index($stage) != null' route.json >/dev/null
79
- if [ "$COMPOSITION" = ff ]; then
80
- first_stage=$(jq -r '.stages[0]' route.json)
81
- [ "$STAGE" = "$first_stage" ] || { echo "ff must start at $first_stage" >&2; exit 1; }
82
- fi
83
- echo 'valid=true' >> "$GITHUB_OUTPUT"
84
- for stage in triage refine propose implement integrate review; do
85
- printf '%s=%s\n' "$stage" "$(jq -r --arg stage "$stage" 'if (.stages | index($stage)) then "true" else "false" end' route.json)" >> "$GITHUB_OUTPUT"
86
- done
87
-
88
- call-triage:
89
- needs: validate
90
- if: >-
91
- always() && needs.validate.outputs.valid == 'true' &&
92
- ((inputs.composition == 'stage' && inputs.stage == 'triage') || inputs.composition == 'ff')
93
- uses: ./.github/workflows/lighthouse-sdlc-triage.lock.yml
94
- permissions: write-all # gh-aw workers request read-all; the reusable-workflow caller must satisfy it.
95
- with:
96
- route: ${{ inputs.route }}
97
- run-id: ${{ inputs.run-id || github.run_id }}
98
- input: ${{ inputs.input }}
99
- previous-stage: ''
100
-
101
- call-refine:
102
- needs: [validate, call-triage]
103
- if: >-
104
- always() && needs.validate.outputs.valid == 'true' &&
105
- ((inputs.composition == 'stage' && inputs.stage == 'refine') ||
106
- (inputs.composition == 'ff' && needs.validate.outputs.refine == 'true' && needs.call-triage.result == 'success'))
44
+ run: node src/packages/sdlc/src/issue-actions.mjs route
45
+ refine:
46
+ needs: route
47
+ if: needs.route.outputs.run == 'true'
48
+ permissions:
49
+ actions: read
50
+ contents: read
51
+ issues: write
107
52
  uses: ./.github/workflows/lighthouse-sdlc-refine.lock.yml
108
- permissions: write-all
109
- with:
110
- route: ${{ inputs.route }}
111
- run-id: ${{ inputs.run-id || github.run_id }}
112
- input: ${{ inputs.input }}
113
- previous-stage: ${{ inputs.composition == 'ff' && 'triage' || '' }}
114
-
115
- call-propose:
116
- needs: [validate, call-triage, call-refine]
117
- if: >-
118
- always() && needs.validate.outputs.valid == 'true' &&
119
- ((inputs.composition == 'stage' && inputs.stage == 'propose') ||
120
- (inputs.composition == 'ff' && needs.validate.outputs.propose == 'true' &&
121
- needs.call-triage.result == 'success' && needs.call-refine.result == 'success'))
122
- uses: ./.github/workflows/lighthouse-sdlc-propose.lock.yml
123
- permissions: write-all
124
- with:
125
- route: ${{ inputs.route }}
126
- run-id: ${{ inputs.run-id || github.run_id }}
127
- input: ${{ inputs.input }}
128
- previous-stage: ${{ inputs.composition == 'ff' && 'refine' || '' }}
129
-
130
- call-implement:
131
- needs: [validate, call-triage, call-refine, call-propose]
132
- if: >-
133
- always() && needs.validate.outputs.valid == 'true' &&
134
- ((inputs.composition == 'stage' && inputs.stage == 'implement') ||
135
- (inputs.composition == 'ff' && needs.validate.outputs.implement == 'true' &&
136
- needs.call-triage.result == 'success' &&
137
- (needs.validate.outputs.refine != 'true' || needs.call-refine.result == 'success') &&
138
- (needs.validate.outputs.propose != 'true' || needs.call-propose.result == 'success')))
139
- uses: ./.github/workflows/lighthouse-sdlc-implement.lock.yml
140
- permissions: write-all
141
- with:
142
- route: ${{ inputs.route }}
143
- run-id: ${{ inputs.run-id || github.run_id }}
144
- input: ${{ inputs.input }}
145
- previous-stage: ${{ inputs.composition == 'ff' && 'propose' || '' }}
146
-
147
- call-integrate:
148
- needs: [validate, call-triage, call-refine, call-propose, call-implement]
149
- if: >-
150
- always() && needs.validate.outputs.valid == 'true' &&
151
- ((inputs.composition == 'stage' && inputs.stage == 'integrate') ||
152
- (inputs.composition == 'ff' && needs.validate.outputs.integrate == 'true' &&
153
- needs.call-triage.result == 'success' &&
154
- (needs.validate.outputs.refine != 'true' || needs.call-refine.result == 'success') &&
155
- (needs.validate.outputs.propose != 'true' || needs.call-propose.result == 'success') &&
156
- needs.call-implement.result == 'success'))
157
- uses: ./.github/workflows/lighthouse-sdlc-integrate.lock.yml
158
- permissions: write-all
159
- with:
160
- route: ${{ inputs.route }}
161
- run-id: ${{ inputs.run-id || github.run_id }}
162
- input: ${{ inputs.input }}
163
- previous-stage: ${{ inputs.composition == 'ff' && 'implement' || '' }}
164
-
165
- call-review:
166
- needs: [validate, call-triage, call-refine, call-propose, call-implement, call-integrate]
167
- if: >-
168
- always() && needs.validate.outputs.valid == 'true' &&
169
- ((inputs.composition == 'stage' && inputs.stage == 'review') ||
170
- (inputs.composition == 'ff' && needs.validate.outputs.review == 'true' &&
171
- needs.call-triage.result == 'success' &&
172
- (needs.validate.outputs.refine != 'true' || needs.call-refine.result == 'success') &&
173
- (needs.validate.outputs.propose != 'true' || needs.call-propose.result == 'success') &&
174
- needs.call-implement.result == 'success' && needs.call-integrate.result == 'success'))
175
- uses: ./.github/workflows/lighthouse-sdlc-review.lock.yml
176
- permissions: write-all
177
53
  with:
178
- route: ${{ inputs.route }}
179
- run-id: ${{ inputs.run-id || github.run_id }}
180
- input: ${{ inputs.input }}
181
- previous-stage: ${{ inputs.composition == 'ff' && 'integrate' || '' }}
54
+ issue: ${{ needs.route.outputs.issue }}
@@ -0,0 +1,20 @@
1
+ ---
2
+ engine:
3
+ id: opencode
4
+ runtime-id: opencode
5
+ version: "2.1.0"
6
+ display-name: OpenCode
7
+ description: OpenCode in an operator-provisioned Docker sandbox
8
+ behaviors:
9
+ capabilities:
10
+ tools-allowlist: true
11
+ execution:
12
+ command-name: node
13
+ args: [tools/src/packages/sdlc/src/opencode-execute.mjs]
14
+ step-name: Execute OpenCode CLI
15
+ write-timestamp: true
16
+ log-parser: |
17
+ function parseLog(logContent) {
18
+ return require("./parse_opencode_log.cjs").parseOpenCodeLog(logContent);
19
+ }
20
+ ---