Presets
llms.txt lists every page for an agent
Show the whole prompt
Read https://intentius.io/chant/guide/presets/.
Find property values that several resources of one type repeat, and move them into an exported `const` preset that each resource spreads, as the page shows.
Spread only `const` bindings (EVL004), and remember that a nested object in the preset is replaced, not merged.
Run `npx chant build` and `npx chant lint`, check that the built output is unchanged, and open a pull request.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.Optional: hand this page to your coding agent
Read https://intentius.io/chant/guide/presets/.Find property values that several resources of one type repeat, and move them into an exported `const` preset that each resource spreads, as the page shows.Spread only `const` bindings (EVL004), and remember that a nested object in the preset is replaced, not merged.Run `npx chant build` and `npx chant lint`, check that the built output is unchanged, and open a pull request.Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.Presets are shared default values that resource definitions reference. Use one when several resources of the same type share settings.
Defining a Preset
Section titled “Defining a Preset”Extract shared properties into exported const declarations:
import { ServerSideEncryptionByDefault, PublicAccessBlockConfiguration } from "@intentius/chant-lexicon-aws";
export const encryptionDefault = new ServerSideEncryptionByDefault({ SSEAlgorithm: "AES256",});
export const publicAccessBlock = new PublicAccessBlockConfiguration({ BlockPublicAcls: true, BlockPublicPolicy: true, IgnorePublicAcls: true, RestrictPublicBuckets: true,});Using a Preset
Section titled “Using a Preset”Import the preset and use it in resource properties:
import { Bucket, BucketEncryption, ServerSideEncryptionRule, Sub, AWS, Ref } from "@intentius/chant-lexicon-aws";import { publicAccessBlock, encryptionDefault } from "./preset-defaults";import { environment } from "./parameters";
export const secureBucket = new Bucket({ BucketName: Sub`${AWS.StackName}-${Ref(environment)}-secure-data`, PublicAccessBlockConfiguration: publicAccessBlock, BucketEncryption: new BucketEncryption({ ServerSideEncryptionConfiguration: [ new ServerSideEncryptionRule({ ServerSideEncryptionByDefault: encryptionDefault, }), ], }),});Properties listed after the preset reference override the preset values.
- The spread source must be a
constbinding, declared in the file or imported from another module. Spreading fromlet,var, or function calls triggers lint rule EVL004. - Preset objects are plain data, not resource instances.
- Properties in the spread are merged shallowly. Nested objects are replaced entirely, not deep-merged.
See your lexicon’s documentation for working preset examples with concrete resource types.