Skip to content

Add four GitHub Actions for structure, docs consistency, AI-HPP audit, and auto-archive#68

Merged
tryblackjack merged 1 commit intomainfrom
codex/install-github-actions-workflows
Apr 8, 2026
Merged

Add four GitHub Actions for structure, docs consistency, AI-HPP audit, and auto-archive#68
tryblackjack merged 1 commit intomainfrom
codex/install-github-actions-workflows

Conversation

@tryblackjack
Copy link
Copy Markdown
Owner

Motivation

  • Enforce a minimal, predictable repo root so the project doesn't accumulate stray files.
  • Keep documentation healthy by catching Markdown style and broken internal links early.
  • Run lightweight AI-HPP standard and code linters to catch unsafe terms and style issues.
  • Automatically archive unexpected root items to a dated archive/ folder to avoid destructive deletions.

Description

  • Added four workflow files under .github/workflows: structure-validator.yml, spec-consistency.yml, hpp-standard-audit.yml, and auto-archive.yml with the exact logic provided.
  • structure-validator.yml validates allowed root entries and required directories, failing the job on unexpected items or missing required folders.
  • spec-consistency.yml installs markdownlint-cli, runs markdownlint across Markdown files, and checks for broken internal links.
  • hpp-standard-audit.yml installs ruff and eslint, lints Python and JS locations if present, and scans repository files for forbidden and required AI-HPP keywords.
  • auto-archive.yml scans the repo root and moves unexpected items into archive/<YYYY-MM-DD>/auto-archive to preserve data without deleting anything.
  • The new workflows were created only if .github/workflows did not exist, and no existing repository files were removed or modified.

Testing

  • Parsed each workflow YAML with Ruby YAML.safe_load to validate YAML syntax, and all files parsed successfully.
  • Programmatically checked that only the four new workflow files were introduced to the repository changes, and no other files were altered.
  • Verified that each workflow file contains the intended steps (checkout, installs, lint/audit or archive logic) as provided, and all automated checks passed.
  • Summary status: all automated validations succeeded and the four workflows are installed successfully.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28e376529b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +57 to +60
required=("safety_gate" "state_lock" "signal_model")

for r in "${required[@]}"; do
if ! grep -R "$r" spec > /dev/null; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove unconditional missing-keyword gate

This audit rule makes the new workflow fail on every run because it requires safety_gate, state_lock, and signal_model to exist under spec/, but those strings are not present in the current repository content, so violations is always set and the job exits 1. That turns CI red for unrelated changes and blocks merges until either the spec is updated in the same change or this check is made non-blocking/conditional.

Useful? React with 👍 / 👎.

Comment on lines +30 to +33
while IFS='](' read -r _ link; do
link=${link%%)*}
[[ "$link" == http* ]] && continue
[[ -f "$link" || -d "$link" ]] || {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Parse markdown links correctly before existence checks

The link checker currently misclassifies valid links as broken: IFS='](' read leaves a leading ( in link, and the existence test is then done against that malformed value (and from repo root), so normal links/anchors in docs are flagged. In this repo, links such as (#purpose) and (architecture.md) in docs/ai-hpp-standard.md will fail despite being valid, causing the workflow to fail on healthy documentation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant