Add four GitHub Actions for structure, docs consistency, AI-HPP audit, and auto-archive#68
Conversation
There was a problem hiding this comment.
💡 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".
| required=("safety_gate" "state_lock" "signal_model") | ||
|
|
||
| for r in "${required[@]}"; do | ||
| if ! grep -R "$r" spec > /dev/null; then |
There was a problem hiding this comment.
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 👍 / 👎.
| while IFS='](' read -r _ link; do | ||
| link=${link%%)*} | ||
| [[ "$link" == http* ]] && continue | ||
| [[ -f "$link" || -d "$link" ]] || { |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
archive/folder to avoid destructive deletions.Description
.github/workflows:structure-validator.yml,spec-consistency.yml,hpp-standard-audit.yml, andauto-archive.ymlwith the exact logic provided.structure-validator.ymlvalidates allowed root entries and required directories, failing the job on unexpected items or missing required folders.spec-consistency.ymlinstallsmarkdownlint-cli, runsmarkdownlintacross Markdown files, and checks for broken internal links.hpp-standard-audit.ymlinstallsruffandeslint, lints Python and JS locations if present, and scans repository files for forbidden and required AI-HPP keywords.auto-archive.ymlscans the repo root and moves unexpected items intoarchive/<YYYY-MM-DD>/auto-archiveto preserve data without deleting anything..github/workflowsdid not exist, and no existing repository files were removed or modified.Testing
YAML.safe_loadto validate YAML syntax, and all files parsed successfully.Codex Task