agentleFS
ElasticKnown publisherelastic/terraform-provider-ec/.agents/skills/new-entity-requirements/SKILL.md

new-entity-requirements

Skill183 starsChanged 21 days agoApache-2.0View on GitHub

Gather requirements for a brand-new Terraform resource or data source from Elastic Cloud APIs and user decisions, then write an OpenSpec change (proposal, design, tasks, delta specs)—not a canonical spec under openspec/specs/. Use when adding a new entity that does not exist in the provider yet. Do not use to document an existing type (existing-entity-requirements) or to backfill the surface.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    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. Very specific:

    Do not write unimplemented behavior into openspec/specs/.

    line 10
  2. Very specific:

    If the request is a slice of ec_deployment, the capability id names the slice (deployment-integrations-server), not deployment.

    line 31
  3. Distinctive:

    If the user gave a doc URL, use it.

    line 38
  4. Very specific:

    Follow openspec-propose until every applyRequires artifact is done.

    line 43
  5. Very specific:

    Every requirement comes from the API/client/docs or a user answer.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill 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.

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

New entity requirements

Gather initial requirements for an entirely new Terraform resource or data source, then materialize them as an OpenSpec change: openspec/changes/<name>/ with proposal.md, design.md, tasks.md, and delta capability specs. Sources: API clients in this repo, Elastic API docs (Elastic docs MCP when available, otherwise web), and the user for decisions code and docs cannot answer.

Do not write unimplemented behavior into openspec/specs/.

For the CLI sequence (create change, artifact order, openspec instructions), follow openspec-propose. This skill adds what to research and what to put in each artifact.

Input

  • Entity concept: the user names the target (e.g. “serverless snapshot policy”, “hosted extension variant”). Optionally: resource vs data source, proposed type name (ec_…).
  • API scope: hosted Elastic Cloud (cloud-sdk-go) vs serverless (ec/internal/gen/serverless/), and an API name or doc URL if known.
  • Change name (optional): kebab-case id for openspec new change. If missing, derive one and confirm when ambiguous.

Workflow

1. Resolve API surface

Client map: repo-structure.md (two API clients) and generated-clients.md (serverless OpenAPI). Details in reference.md.

  • Hosted ESS / ECE: github.com/elastic/cloud-sdk-go — typically pkg/api/…. Configure uses internal.ProviderClients.Stateful.
  • Serverless projects: generated client ec/internal/gen/serverless/ (ClientWithResponsesInterface). Configure uses ProviderClients.Serverless. Do not hand-edit generated files; a new serverless endpoint may need a spec refresh + make gen (human/follow-up).

Identify create/update (PUT/POST), read (GET), delete, request/response shapes, identifiers. Note feature flags if any.

If the request is a slice of ec_deployment, the capability id names the slice (deployment-integrations-server), not deployment. Confirm that with the user.

2. Examine Elastic API docs

  • Preferred: Elastic docs MCP when configured.
  • Fallback: web fetch/search. URL patterns in reference.md.
  • Extract: endpoints, required vs optional fields, validation, errors (404), whether create and update share an API.
  • If the user gave a doc URL, use it.

3. Create the OpenSpec change

  1. openspec new change "<name>" (pinned CLI: npx openspec / ./node_modules/.bin/openspec after make setup-openspec).
  2. Follow openspec-propose until every applyRequires artifact is done.
  3. Entity-specific content:
    • proposal.md: what and why; scope / non-goals; doc URLs.
    • design.md: API ↔ Terraform mapping; which client; identity; import; error handling; Plugin Framework (no SDKv2). Sources note (client paths, docs, MCP vs web).
    • tasks.md: schema, CRUD, unit tests, docs. Acc tests (ec/acc/, TestAcc…) are a separate human/Buildkite task — never instruct an agent to run make testacc or set TF_ACC. Changelog .changelog/{PR}.txt for user-facing implementation.
    • Delta spec(s): per openspec-requirements.md. Include Resource implementation: / Data source implementation: as the intended package path. SHALL/MUST + scenarios. Mark unknowns TBD. Freeze heading names — later deltas match on that text.

4. Interview the user

Unanswered questions from the draft: use the bank in reference.md. Prefer a structured question tool (AskQuestion / AskUserQuestion) when available; otherwise ask in chat. Record answers in the delta spec (and proposal/design as needed). Deferred decisions stay TBD with an Open point.

5. Finalize

Every requirement comes from the API/client/docs or a user answer. No invented behavior. openspec status --change "<name>" apply-ready. make check-openspec (or openspec validate --all).

Output

  • Deliverable: a complete change under openspec/changes/<name>/, not a file only under openspec/specs/.
  • Traceability: requirements tied to API docs or user decisions.

Reference

  • CLI: openspec-propose
  • Authoring: dev-docs/high-level/openspec-requirements.md
  • Resource exemplar (style only, after drafting the delta): openspec/specs/deployment-traffic-filter/spec.md
  • Data-source exemplar (style only, after drafting the delta): openspec/specs/stack/spec.md
  • Clients, docs URLs, interview bank: reference.md

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.