Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/ROUTINE_TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The following matrix categorizes all project routine tasks by operational layer,
| **Observability & Diagnostics** | Command Output, Logs, Metrics & Trace Audit | Continuous / On Execution | `devops telemetry status` / `devops telemetry logfire` | Comprehensive review of command outputs, application logs (`.data/logs/`), metrics, and tracing spans for latency, misconfigurations, and warnings | Nominal latencies, zero unhandled errors/warnings |
| **Workspace & Sync** | DevContainer Lifecycle Hooks | Daily / On Start | `devops devcontainer run-lifecycle --post-start` | Cross-platform container initialization tasks | All lifecycle tasks complete successfully |
| **Workspace & Sync** | Multi-Repo Synchronization | Daily / On Demand | `devops repos sync` / `devops repos list` | Pulls upstream changes across all managed repos | All repositories up to date |
| **Workspace & Sync** | GitHub Pages Publishing & Readiness Audit | Pre-PR | `devops gh pages status` / `devops gh pages verify` | Inspects live publishing health, HTTPS enforcement, and validates local Jekyll `docs/github-pages.config.yaml` / `docs/` | Clean verification; HTTPS strictly enforced |
| **Workspace & Sync** | GitHub Pages Publishing & Readiness Audit | Pre-PR | `devops gh pages status` / `devops gh pages verify` | Inspects live publishing health, HTTPS enforcement, and validates `docs/_config.yml`, the site settings that the Pages build reads, and `docs/` | Clean verification; HTTPS strictly enforced |
| **Workspace & Sync** | GitHub Issues Lifecycle & Triage Audit | Daily / Pre-PR | `devops gh issues triage` / `devops gh issues status` | Audits open issues for mandatory taxonomy labels (`type/*`, `scope/*`, `priority/*`) and reports those not on the board as awaiting intake | Zero untriaged open issues; `devops roadmap intake` clears those awaiting intake |
| **Workspace & Sync** | GitHub Projects & Issues Views Sync & Audit | On Demand / Pre-PR | `devops gh project sync` / `devops gh project audit` / `devops gh views audit` | Provisions and links the board, reconciles card fields, and audits the 4 declarative project views | All projects and views populated with zero drift or empty state (`projects` & `issues/views`) |
| **Workspace & Sync** | SSH Keys & Host Audit | On Demand | `devops ssh status` / `devops ssh audit` | Validates ED25519 keys, permissions, and GitHub keys | No keys past rotation_days |
Expand Down Expand Up @@ -138,7 +138,7 @@ Executed at the final stage of work after all iterative feature modifications an
- Review execution durations, OpenTelemetry spans, metric gauges, and application log output generated during test runs and CLI executions.
- Verify absence of performance bottlenecks, resource leaks, configuration warnings, or suppressed exceptions.
4. **Validate GitHub Governance, Pages Readiness & Issues Triage**:
- Verify local Jekyll `docs/github-pages.config.yaml` syntax and `docs/` publishing root existence via `devops gh pages verify`.
- Verify the syntax and the required keys of `docs/_config.yml`, the one file of site settings that the Pages build reads, and the `docs/` publishing root, with `devops gh pages verify`.
- Audit open issues for mandatory taxonomy labels (`type/*`, `scope/*`, `priority/*`) via `devops gh issues triage`, and run `devops roadmap intake` for those it reports as awaiting intake.
- Inspect issue portfolio distribution via `devops gh issues status`.
- Validate remote project views template compliance via `devops gh views audit`.
Expand Down Expand Up @@ -315,7 +315,7 @@ Executed on workspace initialization (DevContainer startup) or on-demand.
#### 4. GitHub Governance, Pages, Issues & Views Auditing
- **Frequency**: Pre-PR or On-Demand.
- **Methodology**:
- Validates GitHub Pages deployment health and verifies local publishing assets (`docs/github-pages.config.yaml` and `docs/`).
- Validates GitHub Pages deployment health and verifies local publishing assets (`docs/_config.yml` and `docs/`).
- Audits live open issues for missing taxonomy labels (`type/*`, `scope/*`, `priority/*`).
- Audits remote GitHub Projects v2 boards and views against `.github/project-template.json` to prevent configuration drift.
- **Commands**:
Expand Down
47 changes: 40 additions & 7 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
# GitHub Pages builds this directory with Jekyll, which parses `{% ... %}` and
# `{{ ... }}` as Liquid before rendering Markdown. The agent records in `agent/`
# document this project's Jinja2 templating and CI expressions, so they contain those
# delimiters as prose. Liquid tries to execute them: an unclosed `{% if minikube %}` in
# one record aborted the whole build and failed every Pages deployment on main.
# The site settings of https://dan-petty.github.io/devops-cli/. GitHub Pages builds `main:/docs`
# and runs Jekyll with no `--config` option, so Jekyll reads this file and no other. Keep every
# site setting here: a setting in a different file has no effect, and Pages publishes that file
# as a static file. `devops gh pages verify` checks this file.
#
# These files are internal records rather than published documentation, so they are
# excluded from the site rather than escaped one by one.
# This is not the runtime configuration of devops-cli, which is `config.yaml`.

title: "devops-cli"
description: "A Python command-line tool that automates workstation, GitHub, Kubernetes and code-review work"
# The Pages build gets the same url and baseurl from the GitHub metadata. The offline build of
# the `docs-site` job has no metadata, so these two lines make it build the published links.
url: "https://dan-petty.github.io"
baseurl: "/devops-cli"
repository: "dan-petty/devops-cli"

markdown: kramdown
kramdown:
input: GFM
hard_wrap: false
syntax_highlighter: rouge
syntax_highlighter_opts:
css_class: "highlight"

# `_layouts/default.html` uses the `{% seo %}` tag of this plugin.
plugins:
- jekyll-seo-tag

# Each page uses `_layouts/default.html`.
defaults:
- scope:
path: ""
values:
layout: "default"

# Jekyll parses `{% ... %}` and `{{ ... }}` as Liquid before it renders Markdown. The agent
# records in `agent/` document this project's Jinja2 templating and CI expressions, so they
# contain those delimiters as prose. Liquid tries to execute them: an unclosed `{% if minikube %}`
# in one record aborted the whole build and failed every Pages deployment on main.
#
# These files are internal records rather than published documentation, so they are excluded
# from the site rather than escaped one by one.
#
# The `docs-site` job of `.github/workflows/ci.yml` builds this directory with the GitHub Pages
# builder on each pull request that changes it, so a Liquid error fails before the merge.
Expand Down
53 changes: 0 additions & 53 deletions docs/github-pages.config.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-10-24
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Design

## Context

GitHub Pages builds the documentation site from `main:/docs` with the legacy builder. The builder runs `github-pages build --source <docs> --destination <site>`, so Jekyll reads `docs/_config.yml` only. The `Docs Site Build` job of `.github/workflows/ci.yml` runs the same builder image offline on each pull request that changes `docs/`. See `proposal.md` for the evidence.

## Goals / Non-Goals

**Goals:**

- One file holds the site settings, and it is the file that the Pages build reads.
- `devops gh pages verify` checks that file.
- The offline build of the `Docs Site Build` job makes the same links as the published site.

**Non-Goals:**

- Change the layout, the navigation links or the pages of the site.
- Change the Pages source or the build type. These are repository settings, which only a person changes.

## Decisions

### 1. Move the settings into docs/_config.yml and delete the second file

`docs/_config.yml` gets `title`, `description`, `url`, `baseurl`, `repository`, `markdown`, `kramdown`, `plugins` and `defaults`, and keeps `exclude: [agent/]`.

- **Rejected alternative: add the second file to the build with `--config`.** The legacy Pages build has no setting for a configuration file: `entrypoint.sh` of `actions/jekyll-build-pages` v1.0.13 passes `--source` and `--destination` only, and the `build` command of the `github-pages` gem has no `--config` option. A custom Actions workflow could pass the option, but that changes the Pages build type, which is a repository setting, and it keeps two files.
- **Rejected alternative: let `devops gh pages verify` read both files.** The check then passes on settings that the site does not use, which is the defect of #2001.

### 2. Keep url and baseurl in the file

`jekyll-github-metadata` sets `url` and `baseurl` in the Pages build when they are not set, and gives the same values as the file. The offline build of the `Docs Site Build` job has no metadata. Without the two values, a local run of the builder makes each link start with `/pages/dan-petty/devops-cli/`, so the job does not build what Pages publishes.

- **Rejected alternative: delete url and baseurl and use the metadata.** The local run above shows that the offline build then makes different links from the published site.

### 3. Do not move the exclude entries for the repository root

The second file excluded `.venv/`, `.data/`, `tests/`, three cache directories, `uv.lock` and `pyproject.toml`. These are paths at the repository root. The Pages source is `docs/`, which has none of them, and Jekyll ignores names that start with a dot. The entries have no effect, so they are not moved.

### 4. Write the description in ASD-STE100

The description goes into the meta tags of each page, so it is an output string. It replaces the noun cluster "Workstation DevOps CLI & Automated Code Review Platform" with one sentence that agrees with the first sentence of `AGENTS.md`.

## Risks / Trade-offs

- [Risk] The published meta description changes from the repository description to the description of `docs/_config.yml`. → Mitigation: this is the purpose of the setting. The text agrees with `AGENTS.md`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Proposal

## Why

Issue #2001: `docs/github-pages.config.yaml` said that GitHub Pages reads it, but the Pages build reads `docs/_config.yml` only. Thus the title, description, url, baseurl, plugins, kramdown settings and layout defaults of the second file had no effect. Pages also published the second file as a static file at `/devops-cli/github-pages.config.yaml`. `devops gh pages verify`, `docs/ROUTINE_TASKS.md` and the knowledge base named the second file as the Pages configuration, so the check passed on settings that the site did not use.

## What Changes

- `docs/_config.yml` holds every site setting: the settings of `docs/github-pages.config.yaml` move into it, next to the `exclude: [agent/]` setting that it already held.
- `docs/github-pages.config.yaml` is deleted.
- `devops gh pages verify` reads `docs/_config.yml`. When that file is missing, the check fails and names `_config.yml`. A file with a different name does not pass the check.
- `docs/ROUTINE_TASKS.md` and the GitHub project management guide of the knowledge base name `docs/_config.yml`.

The `devops gh pages verify` result is observable, so the change has a spec delta.

This change fits one pull request.

## Capabilities

### New Capabilities

- `github-pages`: The site settings of the documentation site, and the local check of them that `devops gh pages verify` runs.

### Modified Capabilities

None.

## Impact

- `docs/_config.yml`: holds every site setting.
- `docs/github-pages.config.yaml`: deleted.
- `src/devops_cli/github/pages.py`: `verify_pages_configuration` reads `docs/_config.yml`.
- `tests/test_github_pages.py`: the verify tests write `docs/_config.yml`; two tests are added.
- `docs/ROUTINE_TASKS.md`, `src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md`: name `docs/_config.yml`.
- The published site: the meta description, the canonical URL and the links of the `Docs Site Build` job's offline build agree with the published site, and `/devops-cli/github-pages.config.yaml` is no longer published.

## Feasibility

The premise is true. I confirmed it on 2026-10-24 with these sources:

- `GET repos/dan-petty/devops-cli/pages` returns `build_type: legacy` and the source `main:/docs`.
- The GitHub Pages documentation ("About GitHub Pages and Jekyll") says: "You can configure most Jekyll settings, such as your site's theme and plugins, by editing your `_config.yml` file."
- The pinned builder image `ghcr.io/actions/jekyll-build-pages@sha256:6791ebfd...` (v1.0.13, github-pages 232, Jekyll 3.10.0): `entrypoint.sh` runs `github-pages build` with `--source` and `--destination` only. The `build` command of the `github-pages` gem has no `--config` option. `Jekyll::Configuration#config_files` reads `<source>/_config.yml` or `<source>/_config.yaml` when no `config` option is set.
- A local run of that image on `docs/` of the base logs `Configuration file: /github/workspace/docs/_config.yml` and writes `github-pages.config.yaml` into the site as a static file. Its pages have no meta description, and their links start with `/pages/dan-petty/devops-cli/`.
- The published site has the repository description in its meta description, not the description of the second file, and `https://dan-petty.github.io/devops-cli/github-pages.config.yaml` returns HTTP 200.
- After the change, the same local run reads `docs/_config.yml`, writes no `github-pages.config.yaml`, and gives the meta description of `docs/_config.yml`, the canonical URL `https://dan-petty.github.io/devops-cli/CLI_REFERENCE.html` and the stylesheet link `/devops-cli/assets/css/style.css`. The canonical URL and the stylesheet link are the same as on the published site. The page bodies do not change.

## Existing Tool Considered

Jekyll reads `_config.yml`, and the `github-pages` gem and `jekyll-github-metadata` supply the defaults and the url and baseurl of a Pages build. The change uses that file and builds nothing. It deletes `docs/github-pages.config.yaml` and the code path of `devops gh pages verify` that read it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Spec Delta

## Purpose

Keeps the settings of the GitHub Pages documentation site in the one file that the Pages build reads, and checks that file locally with `devops gh pages verify`.

## ADDED Requirements

### Requirement: The site settings are in docs/_config.yml only

The repository SHALL keep every setting of the documentation site in `docs/_config.yml`, and SHALL have no other YAML file at the top of `docs/`. GitHub Pages builds `main:/docs` and runs Jekyll with no `--config` option, so Jekyll reads `docs/_config.yml` and no other file.

#### Scenario: The repository has one site configuration file

- **WHEN** the top level of `docs/` of the repository is listed
- **THEN** `_config.yml` is the only YAML file
- **AND** `devops gh pages verify` passes on the repository

### Requirement: devops gh pages verify checks docs/_config.yml

`devops gh pages verify` SHALL read `docs/_config.yml` under the project root, and SHALL pass only when that file is valid YAML with a value for each of `title`, `url`, `baseurl` and `markdown`, and `docs/` holds a Markdown file.

#### Scenario: A complete docs/_config.yml passes

- **WHEN** `docs/_config.yml` sets `title`, `url`, `baseurl` and `markdown`, and `docs/` holds a Markdown file
- **THEN** the check passes and reports that the Jekyll configuration is valid

#### Scenario: A missing docs/_config.yml fails

- **WHEN** `docs/` has no `_config.yml`
- **THEN** the check fails and the diagnostic names `_config.yml`

#### Scenario: Settings in a different file fail

- **WHEN** `docs/` has no `_config.yml`, and a different YAML file in `docs/` sets `title`, `url`, `baseurl` and `markdown`
- **THEN** the check fails and the diagnostic names `_config.yml`

#### Scenario: A docs/_config.yml with missing keys fails

- **WHEN** `docs/_config.yml` sets `title` only
- **THEN** the check fails and the diagnostic names the missing Jekyll configuration keys
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Tasks

## 1. One file of site settings, checked by devops gh pages verify

- [x] 1.1 Change the verify tests of `tests/test_github_pages.py` to write `docs/_config.yml`, and add `test_verify_pages_configuration_reads_only_the_file_jekyll_reads` and `test_the_repository_site_settings_are_in_the_one_file_jekyll_reads`, and verify that `uv run devops ci test tests/test_github_pages.py` fails on the base with 5 failed tests
- [x] 1.2 Make `verify_pages_configuration` in `src/devops_cli/github/pages.py` read `docs/_config.yml`, and verify that `uv run devops ci test tests/test_github_pages.py tests/test_gh_cmd.py` passes
- [x] 1.3 Move the site settings of `docs/github-pages.config.yaml` into `docs/_config.yml` and delete the second file, and verify that `uv run devops ci test tests/test_github_pages.py` passes
- [x] 1.4 Name `docs/_config.yml` in `docs/ROUTINE_TASKS.md` and in `src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md`, and verify that `git grep -n "github-pages.config" -- . ':!docs/agent/archive' ':!docs/adr' ':!openspec/changes/archive'` finds only the test fixture of 1.1
- [x] 1.5 Run `uv run devops docs generate --sync-readme`, and verify that `uv run devops docs check` passes

## 2. Build the site with the Pages builder

- [x] 2.1 Run the `docker run` command of the `Docs Site Build` job on `docs/`, with a writable directory at `/github/site`, and verify that the log names `docs/_config.yml`, that the site has no `github-pages.config.yaml`, and that `CLI_REFERENCE.html` has the meta description of `docs/_config.yml`, the canonical URL `https://dan-petty.github.io/devops-cli/CLI_REFERENCE.html` and the stylesheet link `/devops-cli/assets/css/style.css`
- [x] 2.2 Run `uv run devops openspec check`, and verify that it passes

## Workflow follow-up

- Pending a person: after the Pages build of the merge commit, verify that `https://dan-petty.github.io/devops-cli/CLI_REFERENCE.html` has the meta description of `docs/_config.yml`, and that `https://dan-petty.github.io/devops-cli/github-pages.config.yaml` returns HTTP 404.
- Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).
Loading