Compare commits

...
1 Commits
Author SHA1 Message Date
arnaud.dartois b643ffe51b docs: centralize shared workflow skill rules
Build Bifrost / build (push) Successful in 1m6s
2026-11-16 15:37:23 +01:00
4 changed files with 46 additions and 50 deletions

No files matched your search

+10 -12
View File
@@ -1,19 +1,17 @@
---
name: docker-test-environment
description: Use when changing the local Docker build, test Compose stack, SonarQube/Gitea/PostgreSQL images, or plugin mounting.
description: Use when changing Bifrost's local Docker build, disposable SonarQube/Gitea/PostgreSQL stack, or plugin mounting.
---
# Docker test environment
- Pin SonarQube Community Build to `25.9.0.112764-community` and pin PostgreSQL and Gitea image tags.
- Provide health checks and start dependencies before SonarQube; persist database data in named volumes.
- Mount the plugin JAR read-only into `/opt/sonarqube/extensions/plugins/` and restart SonarQube after packaging.
- Use test-only credentials from environment variables; never commit live tokens.
- Document Linux kernel prerequisites for Docker hosts (including `vm.max_map_count` where needed by the bundled search engine).
- Keep the Compose test stack isolated from production volumes and endpoints.
- Run full import tests under a dedicated Compose project name (`bifrost-e2e`) with its own named volumes. A clean reset may remove only that project's volumes. On Windows use `./scripts/e2e.ps1`; it invokes the native Windows Docker CLI rather than WSL Docker.
- Pin the browser runner image and Playwright npm dependency to the same release; keep `package-lock.json` and install with `npm ci`.
- Follow common `disposable-test-environment` and `devops-engineering` for isolation, synthetic data, secret handling, and exact cleanup verification. This skill defines Bifrost's service graph and plugin-specific acceptance recipe.
- Pin SonarQube Community Build to `25.9.0.112764-community`; pin PostgreSQL and Gitea image tags. Provide health checks, start dependencies before SonarQube, and persist database data in named volumes.
- Mount the built plugin JAR read-only into `/opt/sonarqube/extensions/plugins/` and restart SonarQube after packaging. Keep the Compose test stack isolated from production volumes and endpoints.
- Use test-only credentials from environment variables; never commit live tokens. Document Linux Docker host kernel prerequisites, including `vm.max_map_count` when required by the bundled search engine.
- Run full import tests under dedicated Compose project `bifrost-e2e` and its named volumes. A reset may remove only that project's volumes. On Windows use `./scripts/e2e.ps1`, which invokes the native Windows Docker CLI rather than WSL Docker.
- Pin the browser runner image and Playwright npm dependency to the same release; retain `package-lock.json` and install with `npm ci`.
- Bootstrap Gitea through its CLI and documented API; configure SonarQube through documented Web APIs, then run a real Chromium page test.
- Leave the successful isolated stack available for inspection and document the exact command that removes it.
- The successful isolated stack is intentionally left available for inspection after a pass; document the exact dedicated-project command that removes it. On failure retain the stack and Playwright diagnostics as specified in `local-e2e-validation`.
## Checklist
- [ ] All service image tags pinned.
@@ -27,9 +25,9 @@ description: Use when changing the local Docker build, test Compose stack, Sonar
- SonarQube Docker setup: https://docs.sonarsource.com/sonarqube-community-build/server-update-and-maintenance/update/update (consulted 2026-10-28)
- SonarQube Docker image tags: https://hub.docker.com/_/sonarqube (consulted 2026-10-28)
- Docker Compose specification: https://docs.docker.com/compose/compose-file/ (consulted 2026-10-28)
- Playwright Docker image: https://playwright.dev/docs/docker (consulted 2026-10-29)
- Playwright Docker: https://playwright.dev/docs/docker (consulted 2026-10-29)
- Gitea administration CLI: https://docs.gitea.com/administration/command-line/ (consulted 2026-10-29)
- Gitea API 1.23 token creation: https://docs.gitea.com/api/1.23/operations/user-create-token/ (consulted 2026-10-29)
- Gitea 1.23 token creation: https://docs.gitea.com/api/1.23/operations/user-create-token/ (consulted 2026-10-29)
- Gitea 1.23 organization repository creation: https://docs.gitea.com/api/1.23/operations/create-org-repo/ (consulted 2026-10-29)
- SonarQube page extension: https://docs.sonarsource.com/sonarqube-community-build/extension-guide/developing-a-plugin/adding-pages-to-the-webapp (consulted 2026-10-29)
+13 -14
View File
@@ -1,29 +1,28 @@
---
name: gitea-actions-ci
description: Use when creating or changing CI workflows, artifact upload, release commits, tags, or Gitea release publishing.
description: Use when changing Bifrost's Gitea Actions workflow, Maven artifact upload, release commits, tags, or Gitea release publishing.
---
# Gitea Actions CI
- Use `.gitea/workflows/*.yml`; trigger push, pull request, and manual dispatch as required.
- Fetch complete history and tags before version calculation (`fetch-depth: 0` where supported).
- Pin actions to immutable commits or exact versions and document when a mirror is required; act_runner compatibility must be checked.
- Cache Maven dependencies without caching secrets. Never put tokens in command output.
- Gate release on push to the configured main branch, version script release-needed output, and a workflow-generated-commit guard. Do not rely only on `[skip ci]`.
- Update changelog, commit, tag that commit, push commit and tag, then create Gitea release from the exact changelog section.
- Use repository secrets for API credentials; describe branch protection permissions required for the release identity.
- Avoid release loops by checking actor/commit marker and tag state.
- Follow common `devops-engineering` and `gitea-delivery-workflow` for general CI security, runner, permissions, PR validation, and delivery policy. This skill defines only Bifrost's workflow behavior and Maven graph.
- Store workflows in `.gitea/workflows/*.yml`; configure push, pull request, and manual dispatch as needed. The current build graph checks out complete history and tags before running `scripts/version.sh`, sets up Java 17, validates changelog formatting on pull requests, runs Maven verification, and uploads `sonar-bifrost-plugin-${revision}.jar`.
- Preserve Maven's version injection through `-Drevision` and its pinned wrapper/toolchain. Cache only Maven dependencies; never cache secrets or print tokens.
- The release job is restricted to a push to the configured main branch, a release-needed result from the version script, and a workflow-generated-commit guard. Do not rely only on `[skip ci]`.
- Release publication follows `release-versioning-changelog`: update changelog, commit, tag that commit, push commit/tag, and create a Gitea release from the exact changelog section. Use repository secrets only for authenticated push/release, and document the branch protection permissions required for that identity.
- Prevent release loops by checking the release actor/commit marker and tag state. Never force-move a published tag.
- Verify actual Gitea and act_runner versions, supported actions/images, mirrors, and branch protection before claiming workflow compatibility. Current action sources are GitHub-hosted (`actions/checkout`, `actions/setup-java`, `actions/upload-artifact`); an isolated runner may require mirrors or outbound GitHub access.
## Checklist
- [ ] Full history/tags available.
- [ ] PR validates changelog without mutation.
- [ ] Full history and tags available before version calculation.
- [ ] PR validates changelog without mutation and builds the Maven artifact.
- [ ] Release job guarded against loops and branch scope.
- [ ] Secret only used for authenticated push/release.
- [ ] Release secret is only used for authenticated publication.
- [ ] Actions are act_runner compatible or mirror requirements documented.
## Sources
- Gitea Actions documentation: https://docs.gitea.com/usage/actions/overview (consulted 2026-10-28)
- Gitea Actions migration guide: https://docs.gitea.com/usage/actions/comparison (consulted 2026-10-28)
- Gitea API documentation: https://docs.gitea.com/api/ (consulted 2026-10-28)
- Gitea Actions API documentation: https://docs.gitea.com/api/ (consulted 2026-10-28)
## Not verified
- Runner version, main branch name, and protected-branch policy are unspecified.
- Runner version, main branch name, protected-branch policy, and release workflow against a live Gitea runner are not confirmed by repository configuration.
+14 -15
View File
@@ -1,28 +1,27 @@
---
name: project-workflow
description: Use for every task in this repository to enforce its implementation order, evidence rules, skills, language, and definition of done.
description: Use for every task in this repository to enforce Bifrost-specific implementation order, evidence, and definition of done.
---
# Project workflow
- Keep all source, docs, UI, logs, comments, workflows, and commit messages in English. Use ASCII identifiers; display text may use `Bifröst` only if UTF-8 manifest encoding is verified.
- Before implementation, read relevant project skills and verify any version-sensitive claims against their listed primary sources.
- Work in this order: compatibility research, skills, design, implementation, tests/build, packaging inspection, compliance review.
- If reality conflicts with a skill, confirm with primary documentation, fix the skill in the same change, and explain the correction.
- Keep security boundaries server-side; never trust UI visibility or client-provided organization names.
- Do not claim build, runtime, browser, or integration verification unless actually performed.
- When the user requests local integration proof, include the isolated zero-to-import stack and run its browser-based end-to-end test; unit tests alone are not completion.
- Definition of done: requested artifacts exist, unit tests/build pass, packaged metadata inspected, requested runtime flow verified at the stated level, limitations documented, and each skill checklist reviewed.
- Use Conventional Commit messages; do not claim commits were created unless the repository is a Git checkout and the commit actually exists.
- Keep source, docs, UI, logs, comments, workflows, and commit messages in English. Use ASCII identifiers; display text may use `Bifrost` unless UTF-8 manifest encoding is verified.
- Before implementation, read repository instructions and applicable project and common skills. Verify version-sensitive SonarQube claims against the listed primary sources.
- For Gitea issue intake, Orca task coordination, PR lifecycle, release assessment, CI/DevOps, secret handling, disposable infrastructure, and worktree cleanup, follow the installed common skills `gitea-delivery-workflow`, `orca-parallel-work`, `pr-lifecycle`, `release-assessment`, `devops-engineering`, `gitea-auth`, `infisical-cli`, `disposable-test-environment`, and `worktree-cleanup`. This skill defines no alternate delivery lifecycle.
- Bifrost-specific implementation order: compatibility research, project-skill updates when needed, design, Java/JavaScript implementation, Maven verification, JAR packaging inspection, and SonarQube compatibility/security review. For skills-only or Markdown-only changes, perform relevant documentation checks; do not run product builds or application recipes unless the changed instructions require them.
- If actual behavior conflicts with a project skill, confirm against primary documentation or the pinned artifact, update the skill in the same change, and explain the correction.
- Keep security boundaries server-side; never trust UI visibility or client-provided organization names. Follow `secure-coding-plugin` for SonarQube authorization, Gitea credentials, outbound requests, and token handling.
- Do not claim build, runtime, browser, integration, CI, or independent review evidence unless actually observed. Keep local checks, CI, disposable recipe, and external deployment evidence distinct.
- When the user requests local integration proof, follow `local-e2e-validation`: isolated zero-to-import stack and browser-based end-to-end test, with exact cleanup/evidence rules.
## Checklist
- [ ] Relevant skills loaded and followed.
- [ ] Relevant project and common skills loaded and followed.
- [ ] English-only content and ASCII identifiers.
- [ ] Verification evidence accurately reported.
- [ ] Skill checklists and limitations reviewed.
- [ ] SonarQube/API compatibility checked where relevant.
- [ ] Verification evidence and limits accurately reported.
- [ ] Relevant skill checklists reviewed.
## Sources
- User project requirements in the initial task (consulted 2026-10-28)
- SonarQube Community Build plugin basics: https://docs.sonarsource.com/sonarqube-community-build/extension-guide/developing-a-plugin/plugin-basics (consulted 2026-10-28)
## Not verified
- Repository hosting policy, default branch, and commit identity are unspecified.
- SonarQube target compatibility and runtime evidence are recorded in the relevant SonarQube skills; they must be refreshed when the target changes.
@@ -1,22 +1,22 @@
---
name: release-versioning-changelog
description: Use when changing semantic version calculation, release automation, Conventional Commit parsing, or CHANGELOG.md generation and validation.
description: Use when changing Bifrost version calculation, release automation, Conventional Commit parsing, or CHANGELOG.md generation and validation.
---
# Release versioning and changelog
- Treat `vMAJOR.MINOR.PATCH` Git tags as the sole release version source.
- Parse commits since the latest reachable version tag: breaking change or `!` bumps major; `feat` bumps minor; `fix`, `perf`, and `refactor` bump patch; other types do not request release.
- Use a valid plugin manifest version format; keep snapshot metadata out of release tags.
- Keep `CHANGELOG.md` in Keep a Changelog 1.1.0 structure, newest first, with only Added, Changed, Deprecated, Removed, Fixed, and Security categories.
- Follow the common `release-assessment` skill for PR impact and `gitea-delivery-workflow` for delivery. This skill records only Bifrost's version source and release format.
- Treat reachable Git tags `vMAJOR.MINOR.PATCH` as the sole release version source. Calculate from commits since the latest reachable version tag: breaking change or `!` bumps major; `feat` bumps minor; `fix`, `perf`, and `refactor` bump patch; other types do not request release.
- Use a version format accepted by the SonarQube plugin manifest; keep snapshot metadata out of release tags. The built JAR is `sonar-bifrost-plugin-${revision}.jar`.
- Keep `CHANGELOG.md` in Keep a Changelog 1.1.0 structure, newest first, using only Added, Changed, Deprecated, Removed, Fixed, and Security categories.
- Never invent a user-facing changelog detail from an unclear commit. Allow maintainers to edit generated entries before release.
- Validate headings, dates, allowed categories, order, and comparison links with a script.
- Extract release body directly from the version section in `CHANGELOG.md`.
- Validate headings, dates, allowed categories, order, and comparison links with the repository validator. Extract the release body directly from the matching version section in `CHANGELOG.md`.
- The Gitea release flow updates the changelog, commits it, tags that commit, pushes the commit and tag, then creates a Gitea release from that exact changelog section and attaches the versioned plugin JAR. Never force-update a published tag.
## Checklist
- [ ] Tag parsing is deterministic and handles no-tag repositories.
- [ ] Bump mapping matches repository policy.
- [ ] Changelog validator catches malformed sections and links.
- [ ] Release tag points to the changelog update commit.
- [ ] Release tag points to the changelog update commit and release asset matches the tag.
## Sources
- Keep a Changelog 1.1.0: https://keepachangelog.com/en/1.1.0/ (consulted 2026-10-28)
@@ -24,4 +24,4 @@ description: Use when changing semantic version calculation, release automation,
- Conventional Commits 1.0.0: https://www.conventionalcommits.org/en/v1.0.0/ (consulted 2026-10-28)
## Not verified
- SonarQube's exact accepted plugin manifest version grammar needs build-time confirmation against target 25.9.
- SonarQube's accepted plugin manifest version grammar must be confirmed against the pinned packaging plugin and target when changed.