nwinfo
AGENTS.md702 starsChanged 3 months agoUnlicenseView on GitHub
This file guides coding agents working in the nwinfo repository. 0. Use Visual Studio 2026 Developer PowerShell when possible. If msbuild is not in PATH, resolve it first: If nuget is unavailable but packages\ is already present, continue to build. Build from the solution entry only (nwinfo.sln). Do not compile child project files (*.vcxproj) directly. If /m behaves unreliably in restricted terminals, retry with /m:1. Forbidden example:
We split this AGENTS.md into the rules it gives an agent
18 rules. About 0 are common, 6 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Use Visual Studio 2026 Developer PowerShell when possible.
- Very specific: line 30
If msbuild is not in PATH, resolve it first:
- Very specific: line 44
If nuget is unavailable but packages\ is already present, continue to build.
- Very specific: line 62
If /m behaves unreliably in restricted terminals, retry with /m:1.
- Distinctive: line 77
Keep SPDX header in new source files when applicable:
- Very specific: line 82
Use CRLF line endings for both edited and newly created files.
- Very specific: line 83
Never run compiled programs from this repository (for example nwinfo.exe, gnwinfo.exe, or other built binaries).
- Very specific: line 84
Avoid over-defensive programming.
- Very specific: line 86
Avoid unrelated refactors: no broad reformatting/reordering/renaming.
- Very specific: line 87
Do not modify third-party folders (nuklear/, stb/, libcpuid/) unless required for the task.
- Distinctive: line 91
If CLI options are added/changed, update at least:
- Very specific: line 95
If public APIs change, update declarations and callsites consistently (for example libnw/libnw.h).
- Very specific: line 96
If GUI text changes, check gnwinfo/lang/*.h for localization consistency.
- Distinctive: line 100
Only task-related files are changed.
- Very specific: line 102
Do not commit generated artifacts or temp files (x64/, Win32/, PKG/, report.json, etc.).
- Distinctive: line 107
Prefer small, focused changes over broad rewrites.
- Distinctive: line 108
Prefer CI-consistent commands and paths.
- Distinctive: line 109
Call out potential hardware impact when touching low-level access paths.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file guides coding agents working in the nwinfo repository.
1. Project Summary
- Project:
NWinfo(Win32 hardware and system information tool). - Primary outputs:
nwinfo.exe: CLI.gnwinfo.exe: GUI.libnw,libcdi,libcpuid,liblhm: libraries and helper/test binaries.- Platform and toolchain:
- Windows (Win32/x64/ARM64).
- Visual Studio 2026 + MSBuild (
v145). - C17/C++20, with
TreatWarningAsError=truein most projects.
2. Repository Map
nwinfo.c: CLI entry and argument parsing.gnwinfo/: GUI implementation (Nuklear + GDI+) and language resources.libnw/: core data collection, formatting, and public API.libnw/cpu/,libnw/gpu/,libnw/sensor/: hardware domain modules.ioctl/: low-level driver and hardware access layer.docs/README.md: CLI documentation source (also used to generate README PDF)..github/workflows/msbuild.yml: CI build and packaging workflow.
3. Build (Follow CI First)
- Use Visual Studio 2026 Developer PowerShell when possible.
If
msbuildis not inPATH, resolve it first:
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
-latest -products * -requires Microsoft.Component.MSBuild `
-find MSBuild\**\Bin\MSBuild.exe- Restore dependencies (CI step):
nuget restore .If nuget is unavailable but packages\ is already present, continue to build.
- Minimum local verification build (validated):
& $msbuild /m:1 /p:Configuration=Release /p:Platform=x64 nwinfo.sln- CI/release matrix builds:
msbuild /m /p:Configuration=Release /p:Platform=x64 nwinfo.sln
msbuild /m /p:Configuration=Release /p:Platform=x86 nwinfo.sln
msbuild /m /p:Configuration=DLLRelease /p:Platform=x64 nwinfo.sln
msbuild /m /p:Configuration=DLLRelease /p:Platform=x86 nwinfo.slnBuild from the solution entry only (nwinfo.sln). Do not compile child project files (*.vcxproj) directly.
If /m behaves unreliably in restricted terminals, retry with /m:1.
Forbidden example:
msbuild libnw\libnw.vcxproj /p:Configuration=Release /p:Platform=x64- Packaging resources (when release flow is touched):
.\copy_res.ps1 -TargetFolder PKG4. Style and Change Constraints
- Keep SPDX header in new source files when applicable:
// SPDX-License-Identifier: Unlicense- Preserve local code style:
- return type and function name on separate lines.
- tab-based indentation in existing C/C++ files.
- Use
CRLFline endings for both edited and newly created files. - Never run compiled programs from this repository (for example
nwinfo.exe,gnwinfo.exe, or other built binaries). - Avoid over-defensive programming. For
staticfunctions, prioritize performance and do not add parameter checks. - naming, macros, and error handling consistent with nearby code.
- Avoid unrelated refactors: no broad reformatting/reordering/renaming.
- Do not modify third-party folders (
nuklear/,stb/,libcpuid/) unless required for the task; explain why if changed.
5. Coupled Changes
- If CLI options are added/changed, update at least:
nwinfo.c(option table, parsing, help text).docs/README.md(CLI docs).hw_report.ps1if output shape or option semantics change.- If public APIs change, update declarations and callsites consistently (for example
libnw/libnw.h). - If GUI text changes, check
gnwinfo/lang/*.hfor localization consistency.
6. Pre-Submit Checklist
- Only task-related files are changed.
- At least one impacted configuration is built (minimum:
x64 Release). - Do not commit generated artifacts or temp files (
x64/,Win32/,PKG/,report.json, etc.). - Final notes must state: what changed, why, and how it was checked.
7. Default Working Principles
- Prefer small, focused changes over broad rewrites.
- Prefer CI-consistent commands and paths.
- Call out potential hardware impact when touching low-level access paths.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

