Skip to content

Commit bc6533d

Browse files
committed
ci: enforce the house-style rules instead of documenting them
The rules in `.taskless/` have been in the tree for nine commits with nothing running them. `validate.yml` had no Taskless step at all, so every finding they can produce depended on a person remembering to run `pnpm cli check` locally. #104 asks for enforcement, and a rule nothing runs is documentation. A step inside the existing `Validate` job rather than the standalone `.github/workflows/taskless.yml` the `taskless agent ci` recipe writes. The recipe is right for a consumer being onboarded, where touching a pipeline you do not own is the larger risk; here the two things the check needs only exist inside this job. Branch protection requires `Validate` and nothing else, so a separate workflow would run, report, and block nothing. And the job has already built `dist/` from this exact commit by the time the step runs, so the check costs one process rather than a second checkout, install, and build. It runs `pnpm cli check`, the workspace build, not `npx @taskless/cli`. This repository IS the CLI: checking our own documents with a published release would exempt the engine at HEAD from its own rules and defer a rule-evaluation regression to whenever the next version ships. The step comment says this is a deliberate divergence from the recipe so a future reader does not correct it back. It blocks. `check` exits non-zero on an error-severity finding and on an engine that failed or timed out, so an em dash added to a README, CLAUDE.md, or `.conventions/*.md` turns the build red. That is the intended cost. Warning-severity rules still only report, which is what `severity: warning` means. Verified non-vacuous rather than assumed. Appending an em dash to CLAUDE.md and to README.md each exits 1; a missing `dist/` exits 1 rather than passing empty; a `branches:` filter added under `pull_request:` exits 1, which is the ast-grep engine reporting on this very file. Clean tree exits 0. Both engines are therefore live, not silently skipped. Full scan, not the recipe's diff scan, for the reason the `Validate specs` step gives: rot accumulates in the files a PR does not touch, and the scoped corpus is small enough that a diff scan buys nothing. No secrets. Static rules run unauthenticated; `.taskless/rules/runtime/` is empty, so there is nothing a `TASKLESS_TOKEN` would unlock yet. Fixes #104
1 parent a58350a commit bc6533d

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

‎.github/workflows/validate.yml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,51 @@ jobs:
6565
- name: Test workflow scripts
6666
run: node --test .github/scripts/*.test.cjs
6767

68+
# House style, enforced rather than documented. The rules live in
69+
# `.taskless/` and are scoped to the documents people and agents actually
70+
# read: every README, CLAUDE.md, `.conventions/*.md`, this directory's
71+
# workflows, and comments under `packages/cli/src/`.
72+
#
73+
# A step here, not a standalone `taskless.yml`. The canonical recipe
74+
# (`taskless agent ci`) writes a separate workflow so that onboarding
75+
# never touches a pipeline it does not own, but the two things this repo
76+
# needs are only available inside this job. Branch protection requires
77+
# `Validate` and nothing else, so a separate workflow would report and
78+
# block nothing, which is the whole of what #104 asked for; and `check`
79+
# runs this repo's own build, which the `Build` step above has already
80+
# produced. Full scan rather than the recipe's diff scan, for the reason
81+
# `Validate specs` gives below: rot accumulates in the files a PR does
82+
# not touch, and the scoped corpus is small enough that a diff scan buys
83+
# nothing.
84+
#
85+
# Placed after the test steps rather than immediately after `Build`, so
86+
# that the existing signal order (lint, types, build, tests) stays intact
87+
# for anyone used to reading these logs. It only needs to be after
88+
# `Build`; nothing above it depends on it.
89+
#
90+
# `pnpm cli` is the workspace build (`packages/cli/dist/index.js`), NOT a
91+
# published release, and that is a deliberate divergence from `ci.txt`.
92+
# The recipe is written for consumers installing the published CLI; here
93+
# the repository IS the CLI, so running `npx @taskless/cli check` would
94+
# test the published artifact and exempt the engine at HEAD from its own
95+
# rules. Do NOT "fix" this back to `npx`: a commit that breaks rule
96+
# evaluation has to fail on the commit that breaks it, not one release
97+
# later. `Build` above ran `pnpm build` on this same commit, so `dist/`
98+
# here can be neither stale nor missing, and an absent `dist/` would fail
99+
# this step loudly rather than pass it empty.
100+
#
101+
# This blocks. `check` exits non-zero on any error-severity finding and
102+
# on an engine that failed or timed out, so an em dash added to a covered
103+
# document turns the build red. Warning-severity rules report without
104+
# failing, which is what `severity: warning` in a rule means.
105+
#
106+
# No authentication and no secrets: static rules (Vale and ast-grep) run
107+
# unauthenticated. Runtime rules under `.taskless/rules/runtime/` are
108+
# skipped without a token; that directory is empty today, and wiring
109+
# `TASKLESS_TOKEN` is the separate decision to make when it is not.
110+
- name: Check house style
111+
run: pnpm cli check
112+
68113
# Repo-wide, not changed-files-only: spec rot accumulates in the specs a
69114
# PR does not touch, so a scoped check would never surface it.
70115
- name: Validate specs

0 commit comments

Comments
 (0)