Make AGENTS.md actionable for future agents by recording what was learned while fixing the provisioning scripts: - Add a Repository Layout section: the KNELShellFramework is vendored under vendor/.../KNELShellFramework (not at repo root), scripts must self-locate via BASH_SOURCE, configs are read locally (no CDN), and some .sh agents are actually PHP - Replace the vague "commit immediately" note with an explicit Autonomous Git Workflow section authorizing agents to commit AND push without being asked, grouped into coherent atomic commits 🤖 Generated with [Crush](https://github.com/charmassociates/crush) Assisted-by: GLM-5 via Crush <crush@charm.land>
3.0 KiB
3.0 KiB
Agent Guidelines
Repository Layout
Knowing where things live prevents broken edits:
- Vendored framework:
KNELShellFrameworklives atvendor/git@git.knownelement.com/29418/KNEL/KNELShellFramework/, not at the repo root. Its includes are underFramework-Includes/there. Never assume./Framework-Includesexists relative to the repo root. - Self-locating scripts: All provisioning scripts derive their own
location via
BASH_SOURCEand computePROJECT_ROOT_PATHfrom it. They must never depend on the current working directory or oncd/realpath ..chains. Run them from anywhere —sudo bash SetupNewSystem.shworks. - Local config files are the source of truth: Configs in
ProjectCode/ConfigFiles/are read withcat/cp. Do not re-introducecurl ${DL_ROOT}/...downloads fromdl.knownelement.com— that CDN is deprecated for this repo. - Path variables: Scripts export
PROJECT_ROOT_PATH,CONFIGFILES_PATH,MODULES_PATH,SCRIPTS_PATH, andAGENTS_PATHfor locating repo content. - Non-bash agents: Some files under
ProjectCode/Agents/carry a.shextension but are PHP (e.g.mysql.sh, shebang#!/usr/bin/php). Syntax checkers must skip these.
Git Commit Requirements
When making changes to this repository, ALWAYS:
- Commit atomically: Each logical change should be its own commit
- Use conventional commit format:
feat(scope): description- New featurefix(scope): description- Bug fixdocs: description- Documentation changesrefactor(scope): description- Code refactoringtest(scope): description- Test additions/changeschore: description- Maintenance tasks
- Write verbose, beautifully formatted messages:
- Title line (50 chars max)
- Blank line
- Body explaining WHAT and WHY (not how)
- Reference related files/issues
- Include footer with attribution
Example Commit
feat(security-hardening): implement SCAP-STIG compliance logic
Refactor apply script to implement comprehensive security hardening:
- Add GRUB bootloader permission hardening (root:root, mode 0400)
- Disable and remove autofs service per STIG requirements
- Deploy modprobe configurations for kernel module blacklisting
- Create STIG-compliant network protocol blacklist
This ensures servers meet DoD security requirements for production
deployment.
🤖 Generated with [Crush](https://github.com/charmassociates/crush)
Assisted-by: GLM-5 via Crush <crush@charm.land>
Autonomous Git Workflow
Agents are authorized to commit AND push autonomously. Do not wait to be asked. After each logical unit of work:
- Stage only the files belonging to that logical change.
- Commit with a conventional, well-formed message (see above).
- Push to
origin(git push). The branch tracksorigin/main. - Repeat per logical unit.
Group changes so each commit is coherent on its own (a reader should understand the commit without seeing the others). Never batch unrelated changes into one commit.