agentleFS
MesteriisMesteriis/Engineering-Bible-AI/skills/core-engineering/SKILL.md

core-engineering

Skill0 starsChanged 4 months agoMITView on GitHub

General implementation only when no narrower task or ecosystem skill fits.

We split this skill into the rules it gives an agent

30 rules. 0 are common, 26 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 26

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer the smallest correct change.

    line 15
  2. Distinctive:

    Do not introduce unrelated refactors.

    line 18
  3. Distinctive:

    Do not invent files, APIs, schemas, commands, or test results.

    line 19
  4. Distinctive:

    Do not use placeholders as implementation.

    line 20
  5. Distinctive:

    Do not leave dead code.

    line 21
  6. Distinctive:

    Do not hide uncertainty.

    line 22
  7. Distinctive:

    If ambiguity blocks correctness, ask one precise question.

    line 36
  8. Distinctive:

    If ambiguity is manageable, proceed with an explicit assumption.

    line 38
  9. Distinctive:

    Before writing code, inspect:

    line 42
  10. Distinctive:

    Create a concise plan:

    line 53
  11. Distinctive:

    no hidden global state;

    line 72
  12. Distinctive:

    no unrelated formatting churn.

    line 73
  13. Distinctive:

    no new dependencies unless justified.

    line 74
  14. Distinctive:

    Use the strongest relevant local tool when it is available:

    line 78
  15. Distinctive:

    If the preferred tool is unavailable, use the best fallback and name the gap only when it materially affects confidence or reproducibility.

    line 88
  16. Distinctive:

    Use the same question-based routing as the steady global prompt, when the current host exposes the relevant capability:

    line 93
  17. Distinctive:

    Do not run every search tool for each task.

    line 106
  18. Distinctive:

    Before broad reads or repeated cross-file exploration, do a cheap state check:

    line 113
  19. Distinctive:

    Use the result as a decision gate:

    line 120
  20. Very specific:

    read-only, security, validation-critical, or "do not modify files" task -> ask before creating .serena/, graphify-out/, context packs, …

    line 129
  21. Distinctive:

    After edits, refresh the affected index scope and confirm one changed symbol or document is found.

    line 141
  22. Distinctive:

    Do not run persistent hook/config upgrades such as Graphify hooks or Git hooks without an explicit user request.

    line 146
  23. Distinctive:

    Before enabling an automatic wrapper, run an intentionally failing test and verify its raw exit code and failure remain visible.

    line 161
  24. Very specific:

    Do not run context-mode upgrade for small, localized, read-only, security, or validation-critical tasks.

    line 169
  25. Very specific:

    Run context-mode upgrade only after explicit user authorization to modify persistent Codex hooks/config.

    line 174
  26. Very specific:

    After enabling hooks, run context-mode doctor and report modified global files such as ~/.codex/config.toml, ~/.codex/hooks.json, and any …

    line 179
  27. Distinctive:

    Run the best available targeted validation.

    line 184
  28. Distinctive:

    If validation fails, report the failure honestly and fix root causes when in scope.

    line 186
  29. Distinctive:

    If validation cannot be run, explain exactly why.

    line 188
  30. Distinctive:

    no fake placeholders remain.

    line 216

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: core-engineering

Purpose

Apply the default engineering workflow for production-grade implementation work.

Core Rules

  • Verify before acting.
  • Prefer the smallest correct change.
  • Preserve public contracts unless explicitly asked to change them.
  • Match existing project style.
  • Do not introduce unrelated refactors.
  • Do not invent files, APIs, schemas, commands, or test results.
  • Do not use placeholders as implementation.
  • Do not leave dead code.
  • Do not hide uncertainty.

Workflow

1. Understand

Identify:

  • requested behavior;
  • expected output;
  • constraints;
  • ambiguous points;
  • relevant domain boundaries.

If ambiguity blocks correctness, ask one precise question.

If ambiguity is manageable, proceed with an explicit assumption.

2. Inspect

Before writing code, inspect:

  • relevant files;
  • nearby related code;
  • project config;
  • tests;
  • existing patterns;
  • validation commands.

3. Plan

Create a concise plan:

  • target files;
  • intended changes;
  • expected behavior;
  • validation method;
  • risks/assumptions.

For small tasks, one short paragraph is enough. The plan is a tool, not a paperwork shrine.

4. Implement

Implement in small focused slices.

Rules:

  • one concern per change;
  • explicit control flow;
  • explicit error handling;
  • no hidden global state;
  • no unrelated formatting churn;
  • no new dependencies unless justified.

Tooling Defaults

Use the strongest relevant local tool when it is available:

  • rg and rg --files before slower text or file search;
  • fd for file discovery when it improves the search;
  • ast-grep or tree-sitter for syntax-aware search and safe mechanical rewrites;
  • jq or yq for structured JSON/YAML inspection and transformation;
  • just when a justfile owns project commands;
  • delta for local diff review when useful;
  • fzf only for interactive narrowing, not as a required automation dependency.

If the preferred tool is unavailable, use the best fallback and name the gap only when it materially affects confidence or reproducibility.

Context Tooling Tiers

Use the same question-based routing as the steady global prompt, when the current host exposes the relevant capability:

NeedFirst route
Local edit or literalrg, path filters, and targeted reads
Definitions and referencesSerena's LSP-backed symbol navigation
Architecture and impactGraphify, with fresh source verification
Documentation and ADRsQMD over allowed roots; wiki-query for read-only wiki questions
External library documentationContext7 for the installed library version
Dependency sourceopensrc for the exact dependency revision
Worker handoffcontext-pack; Repomix when an export is useful

Do not run every search tool for each task. Keep path filters and bounded excerpts. A package installation does not prove host availability. If a route is unavailable, use targeted local evidence and report the material gap. Repomix is an export, not a live code index.

Project Context Bootstrap

Before broad reads or repeated cross-file exploration, do a cheap state check:

  • Serena: .serena/project.yml plus any exposed Serena MCP/symbol tools;
  • Graphify: graphify-out/graph.json;
  • Repomix/context pack: existing requested pack path;
  • output compressors: command availability and raw-output location.

Use the result as a decision gate:

  • localized task -> use rg, symbol lookup, and targeted reads;
  • existing Serena, Graphify, or QMD state -> compare its source revision and file hashes with the required scope, including uncommitted changes, before trusting it; an index older than an edit is stale evidence;
  • missing state but architecture-heavy, symbol-heavy, dependency/call-graph, or repeated onboarding task -> initialize the narrowest useful project-local state when file mutation is allowed;
  • read-only, security, validation-critical, or "do not modify files" task -> ask before creating .serena/, graphify-out/, context packs, hooks, or other repo-local artifacts.

Serena may be initialized with serena project index . when the CLI is available and LSP-backed navigation will materially reduce file reads. Report new .serena/ files and never stage or commit them unless asked.

Graphify belongs to architecture/dependency/call-graph work. If no graph exists, build a scoped graph only when it will reduce repeated reading; report graphify-out/ as generated state and verify important claims against source.

After edits, refresh the affected index scope and confirm one changed symbol or document is found. If freshness cannot be established, read current source and mark the index unverified. QMD roots must be an explicit allowlist; do not add other repositories, personal notes, or home directories automatically.

Do not run persistent hook/config upgrades such as Graphify hooks or Git hooks without an explicit user request.

Output Compression Guardrail

Select one transformation: jq or deterministic filters for structured data, RTK for supported noisy CLI output, Context Mode for large results with selective retrieval, or Distill for semantic grouping. Do not chain multiple summarizers by default. Distill is not sole evidence of a successful test.

Capture stdout/stderr and the original command's exit code before any filter or summarizer. Store raw artifacts outside tracked files. Record command, working directory, source revision, and raw artifact path separately from the summary. A nonzero test exit remains FAIL even when a filter exits zero; preserve scanner errors separately from findings and SKIP separately from PASS. Before enabling an automatic wrapper, run an intentionally failing test and verify its raw exit code and failure remain visible. Read raw evidence before claiming validation or explaining ambiguous failures.

Context Mode hook enablement is a separate decision from using output compression. context-mode doctor may diagnose missing hooks, but that result does not authorize installing them.

Do not run context-mode upgrade for small, localized, read-only, security, or validation-critical tasks. Propose it only when the work is multi-session, repeated, or likely to produce large/noisy outputs where automatic capture will materially reduce context loss.

Run context-mode upgrade only after explicit user authorization to modify persistent Codex hooks/config. If the user asks to "reduce context/log noise automatically", summarize that this requires persistent hook/config changes and ask for confirmation before running it.

After enabling hooks, run context-mode doctor and report modified global files such as ~/.codex/config.toml, ~/.codex/hooks.json, and any backups.

5. Validate

Run the best available targeted validation.

If validation fails, report the failure honestly and fix root causes when in scope.

If validation cannot be run, explain exactly why.

6. Report

Report:

  • changed files;
  • summary;
  • validation command and result;
  • assumptions;
  • remaining risks.

Assumptions Format

Assumption: <clear assumption>
Reason: <why this assumption is reasonable>
Risk: <what breaks if it is wrong>

Definition of Done

The task is done when:

  • behavior is implemented;
  • architecture is respected;
  • tests/validation are handled;
  • assumptions and risks are explicit;
  • no fake placeholders remain;
  • output is understandable to a senior engineer.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.