Skip to content

Add AI agent guidance, architecture docs, and project skills#7550

Open
The-E wants to merge 10 commits into
scp-fs2open:masterfrom
The-E:feature/agent-guidance
Open

Add AI agent guidance, architecture docs, and project skills#7550
The-E wants to merge 10 commits into
scp-fs2open:masterfrom
The-E:feature/agent-guidance

Conversation

@The-E

@The-E The-E commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

This branch adds onboarding/guidance material for AI coding agents (and
humans) working in the FSO tree, plus two small CI fixes turned up while
writing that guidance.

Top-level & per-module agent guidance

  • AGENTS.md — vendor-agnostic entry-point guide for agents: project
    overview, core philosophies (backwards compatibility, optional/gated
    gameplay changes, graceful hardware fallbacks), repo layout, build/test/style
    conventions, CI pipeline requirements (what actually has to pass — fatal
    warnings, the full compiler/platform matrix, valgrind on Linux Debug,
    clang-tidy's real scope), and runtime logging guidance (mprintf vs
    nprintf, per-frame logging pitfalls).
  • CLAUDE.md — thin Claude Code entry point that imports AGENTS.md via
    @AGENTS.md and indexes the Claude-specific skill stubs.
  • Per-module AGENTS.md stubs across code/* (ai, cfile, cmdline,
    globalincs, graphics, hud, io, lab, localization, menuui, mission,
    mod_table, model, network, object, options, parse, physics, scripting,
    ship, sound, ui, weapon) plus fred2/ and qtfred/.

Architecture & module documentation

  • documentation/ARCHITECTURE.md — high-level map of the engine's
    subsystems and where concepts live.
  • documentation/modules/*.md — per-module entry-point guides (~25 modules)
    so agents can navigate without blind grepping.

Vendor-agnostic project skills

  • .agents/skills/ is the canonical, tool-agnostic source of truth for FSO
    workflow skills: fso-add-table-field, fso-add-sexp, fso-add-lua-api,
    fso-add-object-type, fso-add-hud-gauge, fso-build-and-test, and
    thermo-nuclear-code-quality-review (an opt-in, strict
    maintainability/abstraction review, explicit invocation only), each
    encoding the exact files to touch and how to verify.
  • .claude/skills/ and .cursor/skills/ contain thin pointer stubs to the
    canonical .agents/skills/<name>/SKILL.md playbooks, so the guidance is
    authored once and shared across agent tools.
  • .agents/skills/README.md indexes the available skills and authoring
    conventions.

CI fixes found while documenting the pipeline

  • ci/linux/run_tests.sh: fixed a missing space ([ "$CONFIGURATION" = "Debug"]) that made the valgrind-vs-plain-test check always evaluate
    false — valgrind's leak checking was silently never running on the Linux
    Debug leg.
  • .github/workflows/test-pull_request.yaml: removed the macOS job's
    "Run Clang Tidy" / "Process clang-tidy warnings" steps. They were dead
    code (the if: startsWith(matrix.compiler, 'clang-') condition can never
    match macOS's bare clang compiler name) and, separately, clang_tidy.sh
    hardcodes a Linux-container-only binary path, so they couldn't have worked
    as written. clang-tidy remains Linux-only, as documented in AGENTS.md.

Why

FSO is a large, legacy-heavy, cross-platform C++ codebase. These docs give
agents (and new contributors) a navigable map of subsystems, the project's
build/style/CI conventions, and repeatable, FSO-correct workflows for common
engine extensions — reducing blind exploration and convention mistakes.

@The-E The-E force-pushed the feature/agent-guidance branch from f6bbf9f to bc3a6ca Compare July 5, 2026 09:37
@The-E The-E requested review from asarium and z64555 as code owners July 5, 2026 09:37
The-E and others added 2 commits July 5, 2026 12:40
The recent CI script typo fix (missing space in a bash test) means
valgrind now actually runs on Debug Linux builds, surfacing a
pre-existing one-time internal SDL2 allocation on SDL_Init that is
attributed to whichever test fixture's SetUp happens to run first
under --gtest_shuffle. This mirrors the existing gr_init suppression
below it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Valgrind 3.18.1 (used by CI) cannot parse the DWARF5 debug info that
clang-16 emits by default, causing the "unhandled dwarf2 abbrev form
code" errors and a hard valgrind abort before memcheck can even run.
Force -gdwarf-4 for Linux clang Debug builds (toolchain-clang.cmake is
Linux-only; macOS uses toolchain-apple-clang.cmake and never runs
valgrind) to keep the binary symbolizable.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant