@juangcarmona/lighthouse-sdlc 0.13.0 → 0.15.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.
Files changed (57) hide show
  1. package/README.md +65 -12
  2. package/capabilities.json +3 -0
  3. package/completion.md +6 -4
  4. package/execution-environments.md +43 -0
  5. package/model-profiles.md +101 -0
  6. package/package.json +9 -1
  7. package/request-triage.md +30 -0
  8. package/schemas/estimate.schema.json +23 -0
  9. package/schemas/execution-environment.schema.json +12 -0
  10. package/schemas/request-analysis.schema.json +37 -0
  11. package/schemas/triage.schema.json +1 -0
  12. package/skills/concise-results/SKILL.md +10 -0
  13. package/skills/implement/SKILL.md +9 -8
  14. package/skills/refine/SKILL.md +1 -1
  15. package/skills/triage/SKILL.md +3 -3
  16. package/src/actions-artifact.mjs +17 -0
  17. package/src/completion-actions.mjs +30 -10
  18. package/src/completion.mjs +20 -1
  19. package/src/delivery-events.mjs +42 -0
  20. package/src/execution-environment.mjs +78 -0
  21. package/src/host-contract.mjs +3 -0
  22. package/src/implementation-runtime.mjs +56 -32
  23. package/src/implementation.mjs +36 -19
  24. package/src/install-workflows.mjs +16 -7
  25. package/src/integration-evidence.mjs +25 -1
  26. package/src/issue-actions.mjs +315 -49
  27. package/src/model-profiles.mjs +58 -0
  28. package/src/opencode-execute.mjs +35 -12
  29. package/src/pr-state-actions.mjs +106 -0
  30. package/src/pr-state.mjs +75 -0
  31. package/src/process-publication.mjs +1 -1
  32. package/src/profile-delegation.mjs +111 -0
  33. package/src/proposal-review.mjs +91 -0
  34. package/src/proposal.mjs +22 -8
  35. package/src/request-triage.mjs +42 -0
  36. package/src/stage-dispatch.mjs +164 -0
  37. package/src/stage-transition.mjs +35 -0
  38. package/src/triage.mjs +4 -0
  39. package/src/worker-maintenance.mjs +83 -0
  40. package/src/worker-recovery.mjs +106 -0
  41. package/src/worker-reports.mjs +150 -0
  42. package/templates/change-request.yml +24 -0
  43. package/workflows/lighthouse-sdlc-apply-review.lock.yml +1335 -0
  44. package/workflows/lighthouse-sdlc-apply-review.md +206 -0
  45. package/workflows/lighthouse-sdlc-implement.lock.yml +51 -90
  46. package/workflows/lighthouse-sdlc-implement.md +40 -11
  47. package/workflows/lighthouse-sdlc-integrate.lock.yml +36 -83
  48. package/workflows/lighthouse-sdlc-integrate.md +25 -2
  49. package/workflows/lighthouse-sdlc-propose.lock.yml +44 -83
  50. package/workflows/lighthouse-sdlc-propose.md +33 -4
  51. package/workflows/lighthouse-sdlc-refine.lock.yml +45 -83
  52. package/workflows/lighthouse-sdlc-refine.md +37 -2
  53. package/workflows/lighthouse-sdlc-review.lock.yml +36 -83
  54. package/workflows/lighthouse-sdlc-review.md +25 -2
  55. package/workflows/lighthouse-sdlc-router.yml +104 -63
  56. package/workflows/lighthouse-sdlc-triage.md +174 -28
  57. package/workflows/lighthouse-worker-maintenance.yml +126 -0
@@ -1,4 +1,4 @@
1
- # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"4df4392c97dcd16b9b8df8b015b9e277fcd8b223db9a68927ff90d54c1799f7a","body_hash":"13d2a6e093a7dc59f842bf0e8e8ea2a1c5a2879c8608b026dac1197b022baebe","compiler_version":"v0.93.2","agent_id":"opencode","engine_versions":{"opencode":"2.1.0"},"agent_image_runner":"[\"self-hosted\",\"linux\",\"lighthouse-workflow\"]"}
1
+ # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"58805431bb7988869237052ccb9fd922d620fc6250f36e39aa57d55244f6975b","body_hash":"13d2a6e093a7dc59f842bf0e8e8ea2a1c5a2879c8608b026dac1197b022baebe","compiler_version":"v0.93.2","agent_id":"opencode","engine_versions":{"opencode":"2.1.0"},"agent_image_runner":"[\"self-hosted\",\"linux\",\"lighthouse-workflow\"]"}
2
2
  # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_DEFAULT_OTLP_ENDPOINT","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/checkout","sha":"fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09","version":"v5"},{"repo":"actions/download-artifact","sha":"9000827ccba6bdab643e8b6fd33ac0654aef8333","version":"v8.0.2"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"949feb2413d6458794dcd2491c4babbbce0c15c1","version":"v7.1.0"},{"repo":"actions/setup-node","sha":"a0853c24544627f65ddf259abe73b1d18a591444","version":"v5"},{"repo":"actions/upload-artifact","sha":"cf430e030ddbb5b0abf93d22962f4752f3646cd9","version":"v7.0.2"},{"repo":"github/gh-aw-actions/setup","sha":"d9128eb3ea40c18b77c76184eda03c0ff2608d79","version":"v0.93.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382","pinned_image":"ghcr.io/github/gh-aw-node@sha256:41835613992df88f51e923bad486f96dfb2e6cda29f13e217df41833284ae382"}],"mcp_servers":[{"name":"safeoutputs","tools":["noop"]}],"threat_detection":{"mode":"disabled"},"admission":false}
3
3
  # This file was automatically generated by gh-aw (v0.93.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
4
4
  #
@@ -30,6 +30,8 @@
30
30
  # - shared/lighthouse-opencode.md
31
31
  #
32
32
  # Frontmatter env variables:
33
+ # - LIGHTHOUSE_DISPATCH_REQUIRED: (main workflow)
34
+ # - LIGHTHOUSE_RECOVERY_ENABLED: (main workflow)
33
35
  # - LIGHTHOUSE_STAGE: (main workflow)
34
36
  #
35
37
  # Secrets used:
@@ -55,38 +57,36 @@
55
57
 
56
58
  name: "Lighthouse SDLC review"
57
59
  on:
58
- workflow_call:
60
+ # roles: all # Roles processed as role check in pre-activation job
61
+ workflow_dispatch:
59
62
  inputs:
60
63
  aw_context:
61
64
  default: ""
62
65
  description: "Agent caller context (Reserved for Agentic Workflows)."
63
66
  required: false
64
67
  type: string
68
+ dispatch-request:
69
+ description: Authenticated router receipt comment ID
70
+ required: true
71
+ type: string
65
72
  issue:
73
+ description: Source issue
66
74
  required: true
67
75
  type: string
68
- secrets:
69
- COPILOT_GITHUB_TOKEN:
70
- required: false
71
- GH_AW_DEFAULT_OTLP_ENDPOINT:
72
- required: false
73
- GH_AW_DEFAULT_OTLP_HEADERS:
74
- required: false
75
- GH_AW_GITHUB_MCP_SERVER_TOKEN:
76
- required: false
77
- GH_AW_GITHUB_TOKEN:
78
- required: false
79
76
 
80
77
  # Jobs receive only their explicitly declared permissions.
81
78
  permissions: {}
82
79
 
83
80
  concurrency:
84
- group: "gh-aw-lighthouse-sdlc-review-${{ github.run_id }}"
81
+ cancel-in-progress: false
82
+ group: lighthouse-issue-${{ inputs.issue }}
85
83
  queue: max
86
84
 
87
- run-name: "Lighthouse SDLC review"
85
+ run-name: "review #${{ inputs.issue }} · request ${{ inputs.dispatch-request }}"
88
86
 
89
87
  env:
88
+ LIGHTHOUSE_DISPATCH_REQUIRED: "true"
89
+ LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
90
90
  LIGHTHOUSE_STAGE: review
91
91
  OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_DEFAULT_OTLP_ENDPOINT || vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}
92
92
  OTEL_SERVICE_NAME: gh-aw.lighthouse-sdlc-review
@@ -101,7 +101,7 @@ jobs:
101
101
  needs:
102
102
  - pre_activation
103
103
  - prepare
104
- if: needs.pre_activation.outputs.activated == 'true'
104
+ if: needs.pre_activation.outputs.activated == 'true' && (needs.prepare.outputs.eligible == 'true')
105
105
  runs-on: ubuntu-24.04
106
106
  # Permissions for the activation job (workflow permissions default to none).
107
107
  permissions:
@@ -111,7 +111,6 @@ jobs:
111
111
  GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
112
112
  GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
113
113
  outputs:
114
- artifact_prefix: ${{ steps.artifact-prefix.outputs.prefix }}
115
114
  aw_context: ${{ steps.generate_aw_info.outputs.aw_context }}
116
115
  comment_id: ""
117
116
  comment_repo: ""
@@ -129,10 +128,6 @@ jobs:
129
128
  setup-span-id: ${{ steps.setup.outputs.span-id }}
130
129
  setup-trace-id: ${{ steps.setup.outputs.trace-id }}
131
130
  stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }}
132
- target_checkout_ref: ${{ steps.resolve-host-repo.outputs.target_checkout_ref }}
133
- target_ref: ${{ steps.resolve-host-repo.outputs.target_ref }}
134
- target_repo: ${{ steps.resolve-host-repo.outputs.target_repo }}
135
- target_repo_name: ${{ steps.resolve-host-repo.outputs.target_repo_name }}
136
131
  steps:
137
132
  - name: Setup Scripts
138
133
  id: setup
@@ -151,27 +146,6 @@ jobs:
151
146
  GH_AW_SETUP_AW_CONTEXT: ${{ inputs.aw_context }}
152
147
  - name: Mask OTLP telemetry headers
153
148
  run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
154
- - name: Resolve host repo for activation checkout
155
- id: resolve-host-repo
156
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
157
- env:
158
- JOB_WORKFLOW_REPOSITORY: ${{ job.workflow_repository }}
159
- JOB_WORKFLOW_SHA: ${{ job.workflow_sha }}
160
- JOB_WORKFLOW_REF: ${{ job.workflow_ref }}
161
- JOB_WORKFLOW_FILE_PATH: ${{ job.workflow_file_path }}
162
- with:
163
- script: |
164
- const path = require('path');
165
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
166
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
167
- setupGlobals(core, github, context, exec, io, getOctokit);
168
- const { main } = require(path.join(actionsDir, 'resolve_host_repo.cjs'));
169
- await main();
170
- - name: Compute artifact prefix
171
- id: artifact-prefix
172
- env:
173
- INPUTS_JSON: ${{ toJSON(inputs) }}
174
- run: bash "${RUNNER_TEMP}/gh-aw/actions/compute_artifact_prefix.sh"
175
149
  - name: Generate agentic run info
176
150
  id: generate_aw_info
177
151
  env:
@@ -194,7 +168,6 @@ jobs:
194
168
  GH_AW_INFO_AGENT_RUNTIME: ""
195
169
  GH_AW_INFO_MODEL_CONFIG: '{"routing":{"enabled":false}}'
196
170
  GH_AW_COMPILED_STRICT: "false"
197
- GH_AW_INFO_TARGET_REPO: ${{ steps.resolve-host-repo.outputs.target_repo }}
198
171
  GH_AW_INFO_FEATURES: '{"dangerously-disable-sandbox-agent":true}'
199
172
  uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
200
173
  with:
@@ -266,19 +239,10 @@ jobs:
266
239
  COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
267
240
  GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
268
241
  GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
269
- - name: Print cross-repo setup guidance
270
- if: failure() && steps.resolve-host-repo.outputs.target_repo != github.repository
271
- run: |
272
- echo "::error::COPILOT_GITHUB_TOKEN must be configured in the CALLER repository's secrets."
273
- echo "::error::For cross-repo workflow_call, secrets must be set in the repository that triggers the workflow."
274
- echo "::error::See: https://github.github.com/gh-aw/patterns/central-repo-ops/#cross-repo-setup"
275
242
  - name: Checkout .github and .agents folders
276
- if: steps.resolve-host-repo.outputs.target_repo == github.repository
277
243
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
278
244
  with:
279
245
  persist-credentials: false
280
- repository: ${{ steps.resolve-host-repo.outputs.target_repo }}
281
- ref: ${{ steps.resolve-host-repo.outputs.target_checkout_ref }}
282
246
  sparse-checkout: |
283
247
  .github
284
248
  .agents
@@ -412,7 +376,7 @@ jobs:
412
376
  if: success() || failure()
413
377
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
414
378
  with:
415
- name: ${{ steps.artifact-prefix.outputs.prefix }}info
379
+ name: info
416
380
  path: /tmp/gh-aw/aw_info.json
417
381
  if-no-files-found: ignore
418
382
  retention-days: ${{ vars.GH_AW_DEFAULT_ARTIFACT_RETENTION_DAYS || '0' }}
@@ -424,7 +388,7 @@ jobs:
424
388
  if: success() || failure()
425
389
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
426
390
  with:
427
- name: ${{ steps.artifact-prefix.outputs.prefix }}activation
391
+ name: activation
428
392
  include-hidden-files: true
429
393
  path: |
430
394
  /tmp/gh-aw/aw_info.json
@@ -447,7 +411,7 @@ jobs:
447
411
  needs:
448
412
  - activation
449
413
  - prepare
450
- if: needs.activation.outputs.daily_ai_credits_exceeded != 'true'
414
+ if: (needs.prepare.outputs.eligible == 'true') && (needs.activation.outputs.daily_ai_credits_exceeded != 'true')
451
415
  runs-on:
452
416
  - self-hosted
453
417
  - linux
@@ -455,9 +419,6 @@ jobs:
455
419
  # Permissions for the agent job (workflow permissions default to none).
456
420
  permissions:
457
421
  contents: read
458
- concurrency:
459
- group: "gh-aw-opencode-lighthouse-sdlc-review"
460
- queue: max
461
422
  timeout-minutes: 60
462
423
  env:
463
424
  DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
@@ -479,7 +440,6 @@ jobs:
479
440
  ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
480
441
  aic: ${{ steps.parse-mcp-gateway.outputs.aic }}
481
442
  ambient_context: ${{ steps.parse-mcp-gateway.outputs.ambient_context }}
482
- artifact_prefix: ${{ needs.activation.outputs.artifact_prefix }}
483
443
  has_patch: ${{ steps.collect_output.outputs.has_patch }}
484
444
  model: ${{ needs.activation.outputs.model }}
485
445
  output: ${{ steps.collect_output.outputs.output }}
@@ -535,7 +495,7 @@ jobs:
535
495
  - name: Download activation artifact
536
496
  uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
537
497
  with:
538
- name: ${{ needs.activation.outputs.artifact_prefix }}activation
498
+ name: activation
539
499
  path: /tmp/gh-aw
540
500
  - name: Check out the authorized product revision
541
501
  uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
@@ -929,7 +889,7 @@ jobs:
929
889
  continue-on-error: true
930
890
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
931
891
  with:
932
- name: ${{ needs.activation.outputs.artifact_prefix }}agent-output-fallback
892
+ name: agent-output-fallback
933
893
  path: |
934
894
  /tmp/gh-aw/agent_output.json
935
895
  /tmp/gh-aw/safeoutputs.jsonl
@@ -951,7 +911,7 @@ jobs:
951
911
  continue-on-error: true
952
912
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
953
913
  with:
954
- name: ${{ needs.activation.outputs.artifact_prefix }}agent
914
+ name: agent
955
915
  path: |
956
916
  /tmp/gh-aw/aw-prompts/prompt.txt
957
917
  /tmp/gh-aw/agent_execution.json
@@ -990,7 +950,7 @@ jobs:
990
950
  actions: read
991
951
  issues: write
992
952
  concurrency:
993
- group: "gh-aw-conclusion-lighthouse-sdlc-review"
953
+ group: "gh-aw-conclusion-lighthouse-sdlc-review-${{ github.run_id }}"
994
954
  cancel-in-progress: false
995
955
  queue: max
996
956
  env:
@@ -1021,7 +981,7 @@ jobs:
1021
981
  continue-on-error: true
1022
982
  uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
1023
983
  with:
1024
- pattern: "{${{ needs.activation.outputs.artifact_prefix }}agent,${{ needs.activation.outputs.artifact_prefix }}agent-output-fallback}"
984
+ pattern: "{agent,agent-output-fallback}"
1025
985
  merge-multiple: true
1026
986
  path: /tmp/gh-aw/
1027
987
  - name: Setup agent output environment variable
@@ -1039,7 +999,7 @@ jobs:
1039
999
  continue-on-error: true
1040
1000
  uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
1041
1001
  with:
1042
- pattern: ${{ needs.activation.outputs.artifact_prefix }}safe-outputs-items
1002
+ pattern: safe-outputs-items
1043
1003
  merge-multiple: true
1044
1004
  path: /tmp/gh-aw/
1045
1005
  - name: Process no-op messages
@@ -1164,7 +1124,7 @@ jobs:
1164
1124
  continue-on-error: true
1165
1125
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
1166
1126
  with:
1167
- name: ${{ needs.activation.outputs.artifact_prefix }}usage
1127
+ name: usage
1168
1128
  path: |
1169
1129
  /tmp/gh-aw/usage/aw_session.jsonl
1170
1130
  /tmp/gh-aw/usage/aw_info.json
@@ -1199,7 +1159,7 @@ jobs:
1199
1159
  continue-on-error: true
1200
1160
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
1201
1161
  with:
1202
- name: ${{ needs.activation.outputs.artifact_prefix }}usage
1162
+ name: usage
1203
1163
  path: |
1204
1164
  /tmp/gh-aw/usage/aw_session.jsonl
1205
1165
  /tmp/gh-aw/usage/aw_info.json
@@ -1234,7 +1194,7 @@ jobs:
1234
1194
  env:
1235
1195
  GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
1236
1196
  outputs:
1237
- activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }}
1197
+ activated: ${{ 'true' }}
1238
1198
  matched_command: ''
1239
1199
  setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
1240
1200
  setup-span-id: ${{ steps.setup.outputs.span-id }}
@@ -1252,20 +1212,6 @@ jobs:
1252
1212
  GH_AW_INFO_VERSION: "2.1.0"
1253
1213
  GH_AW_INFO_ENGINE_ID: "opencode"
1254
1214
  GH_AW_SETUP_AW_CONTEXT: ${{ inputs.aw_context }}
1255
- - name: Check team membership for workflow
1256
- id: check_membership
1257
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1258
- env:
1259
- GH_AW_REQUIRED_ROLES: "admin,maintainer,write"
1260
- with:
1261
- github-token: ${{ secrets.GITHUB_TOKEN }}
1262
- script: |
1263
- const path = require('path');
1264
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
1265
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
1266
- setupGlobals(core, github, context, exec, io, getOctokit);
1267
- const { main } = require(path.join(actionsDir, 'check_membership.cjs'));
1268
- await main();
1269
1215
 
1270
1216
  prepare:
1271
1217
  name: Verify accepted commit, checks and evidence protection
@@ -1280,6 +1226,7 @@ jobs:
1280
1226
  env:
1281
1227
  LIGHTHOUSE_ISSUE: ${{ inputs.issue }}
1282
1228
  outputs:
1229
+ eligible: ${{ steps.prepare.outputs.eligible }}
1283
1230
  revision: ${{ steps.prepare.outputs.revision }}
1284
1231
  steps:
1285
1232
  - name: Configure GH_HOST for enterprise compatibility
@@ -1305,6 +1252,7 @@ jobs:
1305
1252
  env:
1306
1253
  GH_TOKEN: ${{ github.token }}
1307
1254
  - name: Preserve the execution request
1255
+ if: steps.prepare.outputs.eligible == 'true'
1308
1256
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
1309
1257
  with:
1310
1258
  if-no-files-found: error
@@ -1322,7 +1270,7 @@ jobs:
1322
1270
  needs:
1323
1271
  - agent
1324
1272
  - prepare
1325
- if: always() && needs.prepare.result == 'success'
1273
+ if: always() && needs.prepare.result == 'success' && needs.prepare.outputs.eligible == 'true'
1326
1274
  runs-on: ubuntu-24.04
1327
1275
  # Permissions for the publish job (workflow permissions default to none).
1328
1276
  permissions:
@@ -1366,6 +1314,11 @@ jobs:
1366
1314
  with:
1367
1315
  name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
1368
1316
  path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
1317
+ - name: Require an executed agent
1318
+ if: needs.agent.result != 'success'
1319
+ run: |
1320
+ echo 'The authorized agent did not complete successfully; inspect its execution.' >&2
1321
+ exit 1
1369
1322
  - name: Recheck authority and publish the validated result
1370
1323
  if: needs.agent.result == 'success'
1371
1324
  run: node src/packages/sdlc/src/completion-actions.mjs publish
@@ -2,18 +2,34 @@
2
2
  # Owned by lighthouse-sdlc. Regenerate the lock with gh aw v0.93.2.
3
3
  name: Lighthouse SDLC review
4
4
  description: Assess review with OpenCode and retain a verified delivery record.
5
+ run-name: "review #${{ inputs.issue }} · request ${{ inputs.dispatch-request }}"
6
+ concurrency:
7
+ group: lighthouse-issue-${{ inputs.issue }}
8
+ cancel-in-progress: false
9
+ queue: max
10
+ job-discriminator: ${{ github.run_id }}
5
11
  on:
6
- workflow_call:
12
+ # The required preparation job authenticates the originating owner request.
13
+ roles: all
14
+ workflow_dispatch:
7
15
  inputs:
8
16
  issue:
17
+ description: Source issue
18
+ required: true
19
+ type: string
20
+ dispatch-request:
21
+ description: Authenticated router receipt comment ID
9
22
  required: true
10
23
  type: string
11
24
  needs: [prepare]
25
+ if: needs.prepare.outputs.eligible == 'true'
12
26
  runs-on: [self-hosted, linux, lighthouse-workflow]
13
27
  runs-on-slim: ubuntu-24.04
14
28
  timeout-minutes: 15
15
29
  env:
30
+ LIGHTHOUSE_RECOVERY_ENABLED: ${{ vars.LIGHTHOUSE_RECOVERY_ENABLED }}
16
31
  LIGHTHOUSE_STAGE: review
32
+ LIGHTHOUSE_DISPATCH_REQUIRED: "true"
17
33
  permissions:
18
34
  contents: read
19
35
  engine:
@@ -83,6 +99,7 @@ post-steps:
83
99
  jobs:
84
100
  prepare:
85
101
  outputs:
102
+ eligible: ${{ steps.prepare.outputs.eligible }}
86
103
  revision: ${{ steps.prepare.outputs.revision }}
87
104
  name: Verify accepted commit, checks and evidence protection
88
105
  runs-on: ubuntu-24.04
@@ -109,6 +126,7 @@ jobs:
109
126
  GH_TOKEN: ${{ github.token }}
110
127
  run: node src/packages/sdlc/src/completion-actions.mjs prepare
111
128
  - name: Preserve the execution request
129
+ if: steps.prepare.outputs.eligible == 'true'
112
130
  uses: actions/upload-artifact@v7
113
131
  with:
114
132
  name: lighthouse-input-${{ inputs.issue }}-${{ github.run_attempt }}
@@ -126,7 +144,7 @@ jobs:
126
144
  cancel-in-progress: false
127
145
  name: Validate, publish and release
128
146
  needs: [prepare, agent]
129
- if: always() && needs.prepare.result == 'success'
147
+ if: always() && needs.prepare.result == 'success' && needs.prepare.outputs.eligible == 'true'
130
148
  runs-on: ubuntu-24.04
131
149
  permissions:
132
150
  actions: write
@@ -156,6 +174,11 @@ jobs:
156
174
  with:
157
175
  name: lighthouse-result-${{ inputs.issue }}-${{ github.run_attempt }}
158
176
  path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}
177
+ - name: Require an executed agent
178
+ if: needs.agent.result != 'success'
179
+ run: |
180
+ echo 'The authorized agent did not complete successfully; inspect its execution.' >&2
181
+ exit 1
159
182
  - name: Recheck authority and publish the validated result
160
183
  if: needs.agent.result == 'success'
161
184
  env:
@@ -1,11 +1,22 @@
1
1
  # Optional GitHub-native stage adapter; source owned by lighthouse-sdlc.
2
2
  name: Lighthouse SDLC router
3
- run-name: "${{ inputs.stage || github.event.label.name || 'refine' }} #${{ github.event.issue.number || inputs.issue }} · ${{ github.actor }}"
3
+ run-name: "${{ (github.event_name == 'workflow_run' && 'Delivery after CI') || inputs.stage || github.event.label.name || ((github.event.pull_request || github.event.issue.pull_request) && 'PR review') || (github.event_name == 'issue_comment' && 'reply') || 'refine' }} #${{ github.event.issue.number || github.event.pull_request.number || inputs.issue }} · ${{ github.actor }}"
4
4
  on:
5
5
  issues:
6
- types: [labeled]
6
+ types: [labeled, unlabeled]
7
7
  issue_comment:
8
8
  types: [created]
9
+ pull_request_review:
10
+ types: [submitted]
11
+ pull_request_review_comment:
12
+ types: [created]
13
+ pull_request:
14
+ types: [ready_for_review, converted_to_draft, closed, reopened]
15
+ workflow_run:
16
+ workflows: ["*"]
17
+ types: [completed]
18
+ schedule:
19
+ - cron: '*/5 * * * *'
9
20
  workflow_dispatch:
10
21
  inputs:
11
22
  issue:
@@ -17,7 +28,11 @@ on:
17
28
  required: true
18
29
  default: refine
19
30
  type: choice
20
- options: [refine, propose, implement, integrate, review]
31
+ options: [triage, refine, propose, implement, integrate, review]
32
+ after_run:
33
+ description: Recheck a completed execution through the same continuation rules
34
+ required: false
35
+ type: string
21
36
  pull_request:
22
37
  description: PR number for integrate or review
23
38
  required: false
@@ -33,19 +48,53 @@ on:
33
48
  type: boolean
34
49
  permissions:
35
50
  contents: read
36
- concurrency:
37
- group: lighthouse-issue-${{ github.event.issue.number || inputs.issue }}
38
- cancel-in-progress: false
51
+ env:
52
+ LIGHTHOUSE_ENABLED_STAGES: triage,refine,propose,implement,integrate,review
53
+ LIGHTHOUSE_AUTO_IMPLEMENT: true
54
+ LIGHTHOUSE_COMPLETION_ENABLED: true
39
55
  jobs:
56
+ pr-state:
57
+ if: >-
58
+ vars.LIGHTHOUSE_AUTOMATION_ENABLED == 'true' &&
59
+ (github.event_name == 'workflow_run' || github.event_name == 'schedule' ||
60
+ (github.event_name == 'pull_request' && github.actor == github.repository_owner))
61
+ concurrency:
62
+ group: lighthouse-pr-state-${{ github.event.pull_request.number || github.event.workflow_run.head_sha || 'scheduled' }}
63
+ cancel-in-progress: false
64
+ queue: max
65
+ runs-on: ubuntu-24.04
66
+ permissions:
67
+ actions: read
68
+ contents: read
69
+ issues: write
70
+ pull-requests: write
71
+ steps:
72
+ - uses: actions/checkout@v5
73
+ with:
74
+ repository: juangcarmona/lighthouse
75
+ ref: __LIGHTHOUSE_REF__
76
+ persist-credentials: false
77
+ - uses: actions/setup-node@v5
78
+ with:
79
+ node-version: 24
80
+ - name: Project implementation PR state
81
+ env:
82
+ GH_TOKEN: ${{ github.token }}
83
+ run: node src/packages/sdlc/src/pr-state-actions.mjs
40
84
  route:
41
85
  if: >-
42
86
  vars.LIGHTHOUSE_AUTOMATION_ENABLED == 'true' &&
43
- github.actor == github.repository_owner &&
44
- !github.event.issue.pull_request &&
45
- (github.event_name == 'workflow_dispatch' ||
46
- (github.event_name == 'issues' && (github.event.label.name == 'refine' || github.event.label.name == 'propose' || github.event.label.name == 'implement')) ||
47
- (github.event_name == 'issue_comment' && contains(github.event.issue.labels.*.name, 'needs-info')))
87
+ (github.actor == github.repository_owner || github.event_name == 'workflow_run' ||
88
+ (github.event_name == 'workflow_dispatch' && github.actor == 'github-actions[bot]' && inputs.stage == 'implement' && inputs.after_run != '')) &&
89
+ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run' ||
90
+ (github.event_name == 'issues' && (github.event.label.name == 'triage' || github.event.label.name == 'refine' || github.event.label.name == 'propose' || github.event.label.name == 'implement' || (github.event.action == 'unlabeled' && github.event.label.name == 'future'))) ||
91
+ github.event_name == 'issue_comment' || github.event_name == 'pull_request_review' || github.event_name == 'pull_request_review_comment')
48
92
  runs-on: ubuntu-24.04
93
+ permissions:
94
+ actions: read
95
+ contents: read
96
+ issues: write
97
+ pull-requests: write
49
98
  outputs:
50
99
  run: ${{ steps.route.outputs.run }}
51
100
  issue: ${{ steps.route.outputs.issue }}
@@ -61,60 +110,52 @@ jobs:
61
110
  node-version: 24
62
111
  - name: Route the authorized event
63
112
  id: route
113
+ env:
114
+ GH_TOKEN: ${{ github.token }}
115
+ LIGHTHOUSE_COMPLETION_ENABLED: true
64
116
  run: node src/packages/sdlc/src/issue-actions.mjs route
65
- refine:
66
- needs: route
67
- if: needs.route.outputs.run == 'true' && needs.route.outputs.stage == 'refine'
68
- permissions:
69
- actions: read
70
- contents: read
71
- issues: write
72
- uses: ./.github/workflows/lighthouse-sdlc-refine.lock.yml
73
- with:
74
- issue: ${{ needs.route.outputs.issue }}
75
- propose:
76
- needs: route
77
- if: needs.route.outputs.run == 'true' && needs.route.outputs.stage == 'propose'
78
- permissions:
79
- actions: read
80
- contents: write
81
- issues: write
82
- pull-requests: write
83
- uses: ./.github/workflows/lighthouse-sdlc-propose.lock.yml
84
- with:
85
- issue: ${{ needs.route.outputs.issue }}
86
- implement:
117
+ dispatch:
118
+ name: 📥 Dispatch selected stage
87
119
  needs: route
88
- if: needs.route.outputs.run == 'true' && needs.route.outputs.stage == 'implement'
89
- permissions:
90
- actions: read
91
- contents: write
92
- issues: write
93
- pull-requests: write
94
- uses: ./.github/workflows/lighthouse-sdlc-implement.lock.yml
95
- with:
96
- issue: ${{ needs.route.outputs.issue }}
97
- integrate:
98
- needs: route
99
- if: needs.route.outputs.run == 'true' && needs.route.outputs.stage == 'integrate'
100
- permissions:
101
- actions: write
102
- checks: read
103
- contents: write
104
- issues: write
105
- pull-requests: write
106
- uses: ./.github/workflows/lighthouse-sdlc-integrate.lock.yml
107
- with:
108
- issue: ${{ needs.route.outputs.issue }}
109
- review:
110
- needs: route
111
- if: needs.route.outputs.run == 'true' && needs.route.outputs.stage == 'review'
120
+ if: needs.route.outputs.run == 'true'
121
+ concurrency:
122
+ group: lighthouse-dispatch-${{ needs.route.outputs.issue }}
123
+ cancel-in-progress: false
124
+ queue: max
125
+ runs-on: ubuntu-24.04
112
126
  permissions:
113
127
  actions: write
114
- checks: read
115
- contents: write
128
+ contents: read
116
129
  issues: write
117
- pull-requests: write
118
- uses: ./.github/workflows/lighthouse-sdlc-review.lock.yml
119
- with:
120
- issue: ${{ needs.route.outputs.issue }}
130
+ pull-requests: read
131
+ env:
132
+ LIGHTHOUSE_ISSUE: ${{ needs.route.outputs.issue }}
133
+ LIGHTHOUSE_STAGE: ${{ needs.route.outputs.stage }}
134
+ steps:
135
+ - uses: actions/checkout@v5
136
+ with:
137
+ repository: juangcarmona/lighthouse
138
+ ref: __LIGHTHOUSE_REF__
139
+ persist-credentials: false
140
+ - uses: actions/setup-node@v5
141
+ with:
142
+ node-version: 24
143
+ - name: Record the authorized request
144
+ id: request
145
+ env:
146
+ GH_TOKEN: ${{ github.token }}
147
+ run: node src/packages/sdlc/src/issue-actions.mjs dispatch-prepare
148
+ - name: Preserve the request before dispatch
149
+ if: steps.request.outputs.send == 'true'
150
+ uses: actions/upload-artifact@v7
151
+ with:
152
+ name: ${{ steps.request.outputs.artifact }}
153
+ path: ${{ runner.temp }}/lighthouse-${{ github.run_id }}-${{ github.run_attempt }}/dispatch.json
154
+ retention-days: 14
155
+ if-no-files-found: error
156
+ - name: Dispatch the independent stage
157
+ if: steps.request.outputs.send == 'true'
158
+ env:
159
+ GH_TOKEN: ${{ github.token }}
160
+ LIGHTHOUSE_DISPATCH_COMMENT: ${{ steps.request.outputs.comment }}
161
+ run: node src/packages/sdlc/src/issue-actions.mjs dispatch-send