Guidance for agentic coding tools working in this LinuxAid repository.
LinuxAid is a Puppet/OpenVox codebase with:
- Environment entry manifests in
manifests/ - First-party modules in
modules/enableit/ - Vendored/third-party modules in
modules/upstream/ - CI workflows in
.gitea/workflows/and.github/workflows/
Checked for repository-specific agent rules in:
.cursorrules.cursor/rules/.github/copilot-instructions.md
Current status:
- No Cursor rules found
- No Copilot instructions file found
If these files are added, treat them as higher-priority instructions and update this file.
manifests/site.pp: top-level role selection and guardrailsmanifests/defaults.pp: shared defaultsmodules/enableit/: first-party LinuxAid logicmodules/upstream/: externally sourced modules.puppet-lint.rc: root puppet-lint config.yamllint: root YAML lint configbin/: helper scripts (release/docs)
This repo is module-oriented, not a single-app build. Run checks from impacted module roots.
yamllint -c .yamllint .puppet-lint --config .puppet-lint.rc manifests/**/*.pp modules/enableit/**/*.ppNotes:
.yamllintignoresmodules/upstream- root puppet-lint config relaxes some defaults (for legacy compatibility)
From an affected module directory (examples: modules/enableit/thinlinc, modules/upstream/apache):
bundle install --path vendor/bundle
bundle exec rake -T
bundle exec rake lint
bundle exec rake validate
bundle exec rake specCommon optional tasks (module-dependent):
bundle exec rake test
bundle exec rake rubocop
bundle exec rake parallel_spec
bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocopPreferred patterns:
bundle exec rake spec SPEC=spec/path/to/file_spec.rb
bundle exec rspec spec/path/to/file_spec.rb
bundle exec rspec spec/path/to/file_spec.rb:LINEUse file+line targeting for fast iteration when fixing one expectation.
Some first-party modules (for example modules/enableit/functions) include Rakefile/specs but no local Gemfile.
In those cases:
- run available
rake/rspectasks in the current environment, or - use the project CI/container image if local dependencies are missing
Primary PR CI is in .gitea/workflows/puppet.yaml and includes:
- shell lint/check scripts
- EPP lint
- ERB lint
- Puppet + puppet-lint checks
- secret scanning over
modules/enableit - JSON lint
- YAML lint
Agent behavior:
- if you edit
*.pp,*.epp,*.erb,*.sh, or*.json, run matching local checks when possible - if exact CI scripts are unavailable locally, run closest equivalent and call out the gap
- Keep edits minimal, scoped, and consistent with nearby code
- Do not refactor unrelated files while implementing a targeted fix
- Preserve existing behavior unless the task explicitly changes it
- Add/update tests when behavior changes
- Use 2-space indentation and existing alignment conventions
- Prefer typed parameters for class/defined type APIs
- Keep Hiera lookups explicit (
lookup(...)) with defaults/types when practical - Prefer
$facts[...]-based decisions over shell calls - Use
contain/includeconsistently with local module style - Keep titles/resource names stable and descriptive
- Fail early for invalid role combinations or unsupported states
- Write actionable failure messages (what failed, what to fix)
- Follow module
.rubocop.ymlwhen present - Keep
requirestatements at top of file - Validate arguments and raise specific errors (
ArgumentError, etc.) - Rescue narrowly (expected exceptions only), re-raise with context
- Avoid silent rescue/fallbacks that hide misconfiguration
- Keep helpers small and side effects explicit
- Puppet: add explicit ordering/dependencies only when necessary
- Ruby: require only what is needed
- Do not introduce heavy/new dependencies without clear necessity
- Puppet class/type names: lowercase snake_case + namespace (
module::subclass) - Role classes follow existing
role::...patterns - Variables: descriptive snake_case
- Specs:
*_spec.rb, usually mirroring implementation paths
- Avoid mass reformatting unrelated blocks
- Preserve heredoc/template style already used in file
- Keep Puppet Strings docs in sync for public module interfaces where used
- Puppet: use
fail()for compile-time invalid states that must stop catalog compilation - Ruby: validate inputs early and raise precise exceptions
- External I/O (HTTP/files): handle expected failure modes and include context in raised errors
- Prefer changes in
modules/enableitfor LinuxAid behavior - Touch
modules/upstreamonly when task explicitly requires it - Never commit secrets, certs, keys, or environment credentials
- Do not run release/tag/push flows unless explicitly requested
- Identify touched modules/files.
- Run narrow tests first (single spec file or line).
- Run module lint/validate/spec tasks.
- Run root checks if change spans multiple modules or YAML/manifest roots.
- Report commands actually run and anything not runnable locally.