diff --git a/.github-society-intelligence/docs/design/COST-REDUCTION.md b/.github-society-intelligence/docs/design/COST-REDUCTION.md index e2b84f8..bf351f1 100644 --- a/.github-society-intelligence/docs/design/COST-REDUCTION.md +++ b/.github-society-intelligence/docs/design/COST-REDUCTION.md @@ -145,7 +145,7 @@ Each pattern is identified (P-n), states what it does, names the cost axis it at ### P10 — Reusable workflow (`workflow_call`) for shared checkout-and-setup; composite actions for shared steps. -- **What.** Factor the common preamble of every censor job (`actions/checkout`, language setup, schema-tool install) into a composite action under `.github/actions/setup-society/`. Factor the common workflow envelope (concurrency, permissions, `paths`, `if:` filters) into a single reusable workflow `.github/workflows/_call-censor.yml` invoked by `censors.yml` jobs via `workflow_call`. Each call still counts as a job, but cache reuse and step deduplication shrink per-job overhead enough that one consolidated workflow stays under the per-workflow time cap. +- **What.** Factor the common preamble of every censor job (`actions/checkout`, language setup, schema-tool install) into a composite action under `.github-society-intelligence/lifecycle/society/setup-society/`. Factor the common workflow envelope (concurrency, permissions, `paths`, `if:` filters) into a single reusable workflow `.github/workflows/_call-censor.yml` invoked by `censors.yml` jobs via `workflow_call`. Each call still counts as a job, but cache reuse and step deduplication shrink per-job overhead enough that one consolidated workflow stays under the per-workflow time cap. - **Cost axes.** Reduces per-job *minutes*, not launches; included here because it makes P1's consolidation *feasible* at scale (without it, `censors.yml` risks approaching the 8-hour per-run cap at high stages when many jobs share a single workflow). - **Applies to.** All `C-*` jobs from `PLAN.md §B.4`. - **Constraint.** `workflow_call` itself counts as a workflow run; for very small censors, an inline composite action is cheaper. Choose per-check. diff --git a/.github-society-intelligence/docs/design/FINAL-PLAN.md b/.github-society-intelligence/docs/design/FINAL-PLAN.md index 5f5f077..37e4295 100644 --- a/.github-society-intelligence/docs/design/FINAL-PLAN.md +++ b/.github-society-intelligence/docs/design/FINAL-PLAN.md @@ -29,7 +29,7 @@ This invariant is enforced by `censor/mode-gating`, `censor/job-naming`, and `ce Implemented surfaces: - `setup` dispatcher job. -- `.github/actions/setup-society/action.yml` as the workflow dispatcher implementation. +- `.github-society-intelligence/lifecycle/society/setup-society/action.yml` as the workflow dispatcher implementation. - `act-install`, preserving the installer/upgrader. - `act-conversational-bee-respond`, preserving issue/comment response behavior. - stage-one think-mode censors. diff --git a/.github-society-intelligence/docs/design/FINAL.md b/.github-society-intelligence/docs/design/FINAL.md index df31b6f..6f50d30 100644 --- a/.github-society-intelligence/docs/design/FINAL.md +++ b/.github-society-intelligence/docs/design/FINAL.md @@ -42,7 +42,7 @@ Mode routing: | `workflow_dispatch: delegate` | `delegate` | Governed inter-agency channel hop surface. | | `push` to `main` / `workflow_dispatch: settle` | `settle` | Settlement-side effects and closure surface. | -The canonical dispatcher implementation for the workflow is `.github/actions/setup-society/action.yml`. The TypeScript implementation at `.github-society-intelligence/lifecycle/society/dispatcher.ts` mirrors it for local regression tests. +The canonical dispatcher implementation for the workflow is `.github-society-intelligence/lifecycle/society/setup-society/action.yml`. The TypeScript implementation at `.github-society-intelligence/lifecycle/society/dispatcher.ts` mirrors it for local regression tests. ## Workflow Architecture @@ -138,7 +138,7 @@ Additional future checks from `PLAN-SINGLE.md` land only when their stages are i Documentation and implementation must move together: - Any job graph change updates this file and `FINAL-PLAN.md`. -- Any dispatcher route change updates `.github/actions/setup-society/action.yml`, `.github-society-intelligence/lifecycle/society/dispatcher.ts`, and dispatcher tests. +- Any dispatcher route change updates `.github-society-intelligence/lifecycle/society/setup-society/action.yml`, `.github-society-intelligence/lifecycle/society/dispatcher.ts`, and dispatcher tests. - Any new required check updates `censors/registry.yaml`, Branch Protection documentation, and workflow validation tests. - Any new durable artifact type adds a schema or fixture before the artifact is used by a settlement. @@ -179,7 +179,7 @@ Implemented now: - `FINAL.md`. - The stage-one society directory skeleton. -- `setup` dispatcher via `.github/actions/setup-society/action.yml`. +- `setup` dispatcher via `.github-society-intelligence/lifecycle/society/setup-society/action.yml`. - Mode-gated expansion of the existing workflow. - Workflow static validation script. - Dispatcher regression tests. diff --git a/.github-society-intelligence/docs/design/PLAN-SINGLE.md b/.github-society-intelligence/docs/design/PLAN-SINGLE.md index 5579b79..f7cbc7d 100644 --- a/.github-society-intelligence/docs/design/PLAN-SINGLE.md +++ b/.github-society-intelligence/docs/design/PLAN-SINGLE.md @@ -93,7 +93,7 @@ These principles bind the *implementer* when applying the §C structure. They si - **`event-class`** — a finer-grained tag (`pr-open`, `pr-sync`, `pr-merge-queue`, `comment-issue`, `cron-hourly`, `cron-daily`, `dispatch-delegate`, `dispatch-settle`, `tail-completion`, …) used by individual jobs' `if:` gates to scope themselves further. - **`settlement-id`** — the active settlement identifier if one is in scope (read from the PR branch name, the dispatch payload, or `workspace/active-settlements/`), or empty. -`setup`'s implementation is a single composite action (`COST-REDUCTION.md §C P10`) under `.github/actions/setup-society/`. Every other job in `agent.yml` declares `needs: setup` and an `if:` gating on `needs.setup.outputs.mode == ''` (and optionally `event-class` and `settlement-id`). +`setup`'s implementation is a single composite action (`COST-REDUCTION.md §C P10`) under `.github-society-intelligence/lifecycle/society/setup-society/`. Every other job in `agent.yml` declares `needs: setup` and an `if:` gating on `needs.setup.outputs.mode == ''` (and optionally `event-class` and `settlement-id`). ### C.2 The job pools @@ -263,7 +263,7 @@ These would honour the file cap but violate `PLAN.md`, `COST-REDUCTION.md`, or ` | Branch Protection management of N required checks emitted by N jobs in one file is harder to administer than the same N checks across N files | Required checks are addressed by name, not file; administration is identical. The administrative *legibility* burden is the trade-off the one-file shape makes consciously, and the §D mapping tables exist to mitigate it. | | A `workflow_run`-style cascade from `act` to `settle` requires the cascade to live in the same file | This plan permits intra-file `needs:`-chained cascades; `workflow_run` from `agent.yml` to itself is permitted but discouraged (prefer Branch Protection + a fresh PR), per the §B item 9 reading of `PLAN-MINIMUM.md §B item 4`. | | Concurrency-group collisions across modes on the same `ref` | The mode-derived group of §C.4 prevents collision between modes; collisions *within* a mode are handled by `cancel-in-progress` (think) or queueing (act, delegate, settle, observe). | -| A regression in `setup` cascades to every job in the file | C-DI's fixture suite plus `C-MG`'s static gate ensure every job is mode-gated and the dispatcher is verifiable; the rollback for a bad `setup` change is a single PR reverting the composite action under `.github/actions/setup-society/`. | +| A regression in `setup` cascades to every job in the file | C-DI's fixture suite plus `C-MG`'s static gate ensure every job is mode-gated and the dispatcher is verifiable; the rollback for a bad `setup` change is a single PR reverting the composite action under `.github-society-intelligence/lifecycle/society/setup-society/`. | | Public-fabric workflow's owners refuse consolidation, forcing the PLAN-derived cap to stay at one indefinitely | This is the *expected* steady state; no mitigation is required. The cap is a feature. | ### F.3 Reversibility summary diff --git a/.github/actions/setup-society/action.yml b/.github-society-intelligence/lifecycle/society/setup-society/action.yml similarity index 100% rename from .github/actions/setup-society/action.yml rename to .github-society-intelligence/lifecycle/society/setup-society/action.yml diff --git a/.github/workflows/github-society-intelligence-agent.yml b/.github/workflows/github-society-intelligence-agent.yml index 13af86a..2c7b2a7 100644 --- a/.github/workflows/github-society-intelligence-agent.yml +++ b/.github/workflows/github-society-intelligence-agent.yml @@ -112,7 +112,7 @@ jobs: - name: Classify society event id: classify - uses: ./.github/actions/setup-society + uses: ./.github-society-intelligence/lifecycle/society/setup-society with: intent: ${{ github.event.inputs.intent || '' }} settlement_id: ${{ github.event.inputs.settlement_id || '' }} @@ -223,11 +223,6 @@ jobs: cp "$TARGET/install/settings.json" "$TARGET/.pi/settings.json" fi - if [ -d "$EXTRACTED/.github/actions" ]; then - mkdir -p ".github/actions" - cp -R "$EXTRACTED/.github/actions/setup-society" ".github/actions/setup-society" - fi - - name: Ensure .gitignore entries if: steps.check-folder.outputs.action != 'skip' run: | @@ -258,7 +253,7 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add .github-society-intelligence/ .github/actions/ .gitignore .gitattributes + git add .github-society-intelligence/ .gitignore .gitattributes ACTION="${{ steps.check-folder.outputs.action }}" if [ "$ACTION" = "upgrade" ]; then