agentleFS
delphicleancodedelphicleancode/delphi-spec-kit/.claude/CLAUDE.md

delphi-spec-kit

CLAUDE.md53 starsChanged 8 months agoMITView on GitHub

This is the Delphi AI Spec-Kit, the master guide for Delphi (Object Pascal) development in this repository. (See the AGENTS.md global file and rules/ folder for guidelines specific to frameworks such as FireDAC, Rest, Horse and Database).

The file

Files
CLAUDE.md

Delphi AI Spec-Kit

This is the Delphi AI Spec-Kit, the master guide for Delphi (Object Pascal) development in this repository.

Project Stack

  • Language: Object Pascal (Delphi)
  • Native IDE: RAD Studio / Delphi
  • Main Frameworks: VCL, FMX, FireDAC
  • Tests: DUnitX
  • Build / Tooling: MSBuild, dcc32/dcc64, Boss (Package Manager)

Crucial Directives (Memory Management)

  • Watched Blocks (Required): EVERYTHING you instantiate with .Create (if it is TObject and does not have Owner) MUST have a try..finally on the IMMEDIATELY subsequent line.
    Obj := TMyClass.Create;
    try
      Obj.DoSomething;
    finally
      Obj.Free; //my FreeAndNil(Obj)
    end;
  • DO NOT use with.
  • DO NOT create God Classes. Use SOLID Principles.
  • Isolate visual components (FMX/VCL) from strict business rules. Do not access DBGrid or form edits in pure logical units.
  • For dependency injection, pass abstractions in the constructor.

File Organization & Naming (PascalCase)

  • Classes: Start with T (ex: TCustomer).
  • Interfaces: Start with I (ex: ICustomer).
  • Exceptions: Start with E (ex: EValidationError).
  • Private attributes or fields: Start with F (ex: FName).
  • Local variables: Start with L (ex: LCustomer).
  • Parameters: Start with A (ex: ACustomer).
  • Unit nomenclature: NomeProjeto.Camada.Dominio.Funcionalidade.pas

(See the AGENTS.md global file and rules/ folder for guidelines specific to frameworks such as FireDAC, Rest, Horse and Database).

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.