chore: adopt Corestack project standards #3

Merged
end merged 4 commits from chore/scaffold-project into main 2026-10-25 14:39:59 -07:00
Owner

Adopt the ADRs-only documentation tier and base + Go rules in root AGENTS.md, preserving the module reading map, dependency limit and permanent record paths. Add the project-owned documentation policy from standards commit a36288e7cec933a32f4819a1308201027c9f57ec and the Go comment lint configuration. No new ADR, plan, application code or dependency is needed.

Documentation validation runs on every pull request and every push to main, without path filters: go run ./cmd/docs check. This repository's local checker is the source of truth, including as its format evolves. The released v0.1.0 checker and TODO scan are removed from the documentation workflow. Root instructions use the same local command.

Implementation CI uses paths-ignore, not a module allowlist, on both PRs and pushes to main. It keeps formatting, vet, race tests, TODO scanning, comment lint and GoReleaser checks/snapshot. New root modules such as lifecycle/, page/ and migrate/ automatically receive CI. Release tag triggers remain unchanged.

Template exception and trade-off: this server runs Gitea 28.2.0. Its paths-ignore matcher stops at the first matching pattern; adding !internal/docs/templates/** cannot undo an earlier **/*.md match. CI therefore ignores *.md (root Markdown only) and docs/**, rather than all Markdown recursively. Embedded internal/docs/templates/*.md always runs CI. Nested Markdown outside docs/ may trigger an extra CI run; this intentionally favors extra coverage over skipping checks.

Expected workflow routing (PR updates and pushes to main):

Change Documentation / docs ci / check
Docs-only under docs/ or root Markdown Run Skip
Code-only, including a new root module Run Run
Template-only under internal/docs/templates/ Run Run
Rename/delete an implementation file linked from an ADR Run; fail if its ADR link is left stale Run
Rename/delete a linked file under docs/ Run; fail if its ADR link is left stale Skip
Nested Markdown elsewhere Run Run (conservative extra run)

Feature-branch pushes do not independently duplicate PR runs. Mixed changes containing any non-ignored file run both workflows. This PR changes workflow/lint configuration, so both PR workflows are expected.

Validation:

  • YAML parses; assertions verify both events, main-only pushes, identical CI ignore lists, no docs filters, only the local checker in docs, and retained CI checks.
  • Eleven routing cases cover root/docs Markdown, templates, new root modules, Go code, dependencies and workflow configuration.
  • TODO repository scan, local docs check (1 record), go test ./internal/docs (including link validation), and git diff --check pass. An isolated copy of the accepted ADR passes initially and fails after renaming its linked docs-format.md target, confirming stale-link detection.
  • Earlier scaffold validation passed build, vet, race tests, pinned golangci-lint v2.15.0 (0 issues), formatting and rule-size checks.

Hosted verification at commit 864749c61c: exactly two runs were created, both pull_request events, with no duplicate feature-branch push runs. This matches the matrix because this PR changes workflow/lint configuration. CI run 2342 passed in 54 seconds. Documentation run 2343 was triggered and is still preparing required actions; its checker has not started, so no hosted docs success is claimed. The routing matrix's isolated cases were checked locally, not by creating extra test PRs. No merge performed.

Adopt the ADRs-only documentation tier and base + Go rules in root AGENTS.md, preserving the module reading map, dependency limit and permanent record paths. Add the project-owned documentation policy from standards commit a36288e7cec933a32f4819a1308201027c9f57ec and the Go comment lint configuration. No new ADR, plan, application code or dependency is needed. Documentation validation runs on every pull request and every push to main, without path filters: `go run ./cmd/docs check`. This repository's local checker is the source of truth, including as its format evolves. The released v0.1.0 checker and TODO scan are removed from the documentation workflow. Root instructions use the same local command. Implementation CI uses paths-ignore, not a module allowlist, on both PRs and pushes to main. It keeps formatting, vet, race tests, TODO scanning, comment lint and GoReleaser checks/snapshot. New root modules such as lifecycle/, page/ and migrate/ automatically receive CI. Release tag triggers remain unchanged. Template exception and trade-off: this server runs Gitea 28.2.0. Its [paths-ignore matcher](https://github.com/go-gitea/gitea/blob/v28.2.0/modules/actions/workflowpattern/workflow_pattern.go#L48-L63) stops at the first matching pattern; adding `!internal/docs/templates/**` cannot undo an earlier `**/*.md` match. CI therefore ignores `*.md` (root Markdown only) and `docs/**`, rather than all Markdown recursively. Embedded internal/docs/templates/*.md always runs CI. Nested Markdown outside docs/ may trigger an extra CI run; this intentionally favors extra coverage over skipping checks. Expected workflow routing (PR updates and pushes to main): | Change | Documentation / docs | ci / check | | --- | --- | --- | | Docs-only under docs/ or root Markdown | Run | Skip | | Code-only, including a new root module | Run | Run | | Template-only under internal/docs/templates/ | Run | Run | | Rename/delete an implementation file linked from an ADR | Run; fail if its ADR link is left stale | Run | | Rename/delete a linked file under docs/ | Run; fail if its ADR link is left stale | Skip | | Nested Markdown elsewhere | Run | Run (conservative extra run) | Feature-branch pushes do not independently duplicate PR runs. Mixed changes containing any non-ignored file run both workflows. This PR changes workflow/lint configuration, so both PR workflows are expected. Validation: - YAML parses; assertions verify both events, main-only pushes, identical CI ignore lists, no docs filters, only the local checker in docs, and retained CI checks. - Eleven routing cases cover root/docs Markdown, templates, new root modules, Go code, dependencies and workflow configuration. - TODO repository scan, local docs check (1 record), go test ./internal/docs (including link validation), and git diff --check pass. An isolated copy of the accepted ADR passes initially and fails after renaming its linked docs-format.md target, confirming stale-link detection. - Earlier scaffold validation passed build, vet, race tests, pinned golangci-lint v2.15.0 (0 issues), formatting and rule-size checks. Hosted verification at commit 864749c61c8a69ebff41b9e5deb2db6d489ac744: exactly two runs were created, both pull_request events, with no duplicate feature-branch push runs. This matches the matrix because this PR changes workflow/lint configuration. [CI run 2342](https://gitea.auvem.com/corestack/go/actions/runs/2342) passed in 54 seconds. [Documentation run 2343](https://gitea.auvem.com/corestack/go/actions/runs/2343) was triggered and is still preparing required actions; its checker has not started, so no hosted docs success is claimed. The routing matrix's isolated cases were checked locally, not by creating extra test PRs. No merge performed.
end added 1 commit 2026-10-25 14:21:41 -07:00
chore: adopt Corestack project standards
Documentation / docs (push) Successful in 17s
Documentation / docs (pull_request) Successful in 25s
ci / check (push) Successful in 1m26s
ci / check (pull_request) Successful in 1m22s
6fee9584e5
end added 1 commit 2026-10-25 14:24:59 -07:00
end added 1 commit 2026-10-25 14:29:32 -07:00
ci: filter documentation and implementation workflows by changed paths
Documentation / docs (pull_request) Successful in 19s
ci / check (pull_request) Successful in 56s
e9dcaaa22c
end added 1 commit 2026-10-25 14:33:46 -07:00
ci: always validate docs and safely ignore documentation-only changes
ci / check (pull_request) Successful in 54s
Documentation / docs (pull_request) Successful in 15s
864749c61c
end merged commit 7d36785649 into main 2026-10-25 14:39:59 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: corestack/go#3