AI & Coding Agent Authoring Guide
Machine-readable endpoints, hard parser invariants, common LLM hallucinations to reject, and the deterministic CLI validation loop for generating high-performance FastCi pipelines.
1. Canonical Machine-Readable Endpoints
Point coding agents, IDE instruction files, or RAG indexers directly at these clean, zero-HTML files:
| Artifact | URL | Purpose |
|---|---|---|
| llms.txt | /llms.txt |
Compact ~4 KB index + non-negotiable invariants for low-context injection. |
| llms-full.txt | /llms-full.txt |
Complete ~20 KB single-file reference covering manifest, CLI, env vars, Action inputs, and tuning rules. |
| JSON Schema | /schema/fastci.schema.json |
Strict Draft 2020-12 schema matching src/pipeline/manifest.c with additionalProperties: false. |
2. Hard Invariants for Generated Pipelines
Every AI-generated fastci.json or GitHub Actions workflow MUST obey these rules:
- Always attach
"$schema":"https://seregonwar.github.io/FastCi/schema/fastci.schema.json". - Prefer
cmdovershell: Direct argv execution avoids shell startup overhead and Windows quoting errors. - Never omit
outputson cached build jobs: A job withcache: trueand emptyoutputscaches only the exit status, not build artifacts. - Put build-shaping files in
critical_inputs: Lockfiles,CMakeLists.txt,Cargo.toml, and compiler scripts belong incritical_inputs, and set"verify_inputs": "sample"at top level. - Pin compiler versions with
toolchain_cmd: E.g.["cc", "--version"]or["rustc", "--version"]. - Use forward slashes
/in all paths & globs: Exclude build output directories (!build/**) frominputsto prevent self-invalidating cache keys. - Windows MSVC rule: Always configure
-G Ninjaand/Z7(never/Zi). - Remote CAS security rule: On
pull_requestworkflows, enforceFASTCI_REMOTE_READ_ONLY=1.
3. Common LLM Hallucinations to Reject
FastCi's C parser rejects unknown keys or silently ignores invented names. Never emit the left column:
| Invalid / Hallucinated | Actual FastCi Key / Value |
|---|---|
"command" / "run" / "script" | "cmd": ["..."] or "shell": "..." |
"depends_on" / "after" | "needs": ["job-id"] |
"cacheable" / "enable_cache" | "cache": true | false |
"concurrency" / "parallelism" | "workers": 4 (top-level) & "cpu_slots": 2 (job) |
"timeout" (seconds) | "timeout_ms": 60000 (milliseconds) |
"working_directory" | "cwd": "subdir" |
"artifacts" | "outputs": ["build/app"] |
"continue_on_error" | "allow_failure": true |
fastci build / fastci exec | fastci run -f fastci.json |
FASTCI_READ_ONLY=1 | FASTCI_REMOTE_READ_ONLY=1 |
4. Mandatory Agent Verification Loop
Never declare a CI pipeline edit complete until all four deterministic checks succeed:
# 1. Static manifest validation (schema, DAG cycles, hard limits)
fastci validate -f fastci.json
# 2. Verify topological critical-path order and matrix expansion
fastci plan -f fastci.json
# 3. Simulate execution without mutating workspace or cache
fastci run -f fastci.json --dry-run
# 4. Machine-readable cache & environment diagnostics
fastci doctor --json
fastci cache stats --json
5. Copy-Paste Prompt for Optimizing Any Repo
Read https://seregonwar.github.io/FastCi/llms-full.txt and https://seregonwar.github.io/FastCi/schema/fastci.schema.json.
Analyze this repository's build system and existing CI workflows, then:
1. Create or optimize `fastci.json` with `"$schema"`, `"verify_inputs": "sample"`, direct-spawn `"cmd"` arrays, `"toolchain_cmd"`, `"critical_inputs"`, `"scan_deps"`, realistic critical-path `"weight"`, and `"cpu_slots"` / `"mem_mb"` limits.
2. Update `.github/workflows/ci.yml` to use `seregonwar/FastCi@v0.3.0`, Ninja + `/Z7` on Windows, and read-only remote cache on untrusted pull requests.
3. Run `fastci validate -f fastci.json`, `fastci plan -f fastci.json`, and `fastci run -f fastci.json --dry-run` to confirm zero errors.