From d5688c08ec912c8227ca57cb6c77bfb7c44c117e Mon Sep 17 00:00:00 2001 From: Martin Galik Date: Tue, 15 Sep 2026 16:34:00 +0200 Subject: [PATCH] added ddr script skills --- AGENTS.md | 7 +- skills/ddr-analysis/SKILL.md | 2 +- skills/filemaker-ddr-script/SKILL.md | 55 +++++ .../filemaker-ddr-script/agents/openai.yaml | 4 + .../filemaker-ddr-script/all-script-steps.txt | 220 ++++++++++++++++++ 5 files changed, 284 insertions(+), 4 deletions(-) create mode 100644 skills/filemaker-ddr-script/SKILL.md create mode 100644 skills/filemaker-ddr-script/agents/openai.yaml create mode 100644 skills/filemaker-ddr-script/all-script-steps.txt diff --git a/AGENTS.md b/AGENTS.md index 65249ae..2adaacd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,7 +28,7 @@ Use these locations for a workspace that follows the standard project layout. A - `TICKETS/`: one folder per ticket or workstream. Keep its source requests, handoffs, analysis, questions, reports, assets, and ticket-specific scripts together. Use a `scripts/` subfolder when it helps navigation. - `FMSCRIPTS/`: tracked complete `.fmscript` files that are not clearly ticket-specific or apply across several workstreams; keep one `.fmscript` file per FileMaker script. - `NOTES/`: confirmed knowledge and business rules that apply across more than one ticket. -- `DDR-Parsed/`: tracked generated FileMaker reference material. Do not edit it manually. +- `DDR-Parsed/`: tracked FileMaker reference material generated by DDRparser. Do not manually edit generated definitions outside `Scripts/`. When a project uses the DDRparser copy-and-paste workflow, edit the affected `Scripts/*.txt` file in place for Git review, paste it into FileMaker, regenerate the DDR, and verify the round trip. - `ddr-parse.sh`: run `zsh ddr-parse.sh` from the project root to parse the latest DDR into `DDR-Parsed/` when an up-to-date reference is needed. ## Select the relevant skill @@ -37,6 +37,7 @@ Read only the skill that matches the work; do not load every shared reference by - Ticket, request, email, or handoff: `skills/ticket-analysis/SKILL.md` - Current implementation, schema, script, calculation, layout, relationship, security, reporting, or integration analysis: `skills/ddr-analysis/SKILL.md` +- Any DDRparser-format script generation, edit, review, syntax question, or copy-and-paste preparation: `skills/filemaker-ddr-script/SKILL.md` - Any `.fmscript` generation, edit, review, or syntax question: `skills/filemaker-fmscript/SKILL.md` and the examples it selects - New or changed FileMaker object, field, variable, parameter, or result names: `skills/filemaker-naming/SKILL.md` - Project-manager reply or short billable work report: `skills/ticket-delivery/SKILL.md` @@ -53,7 +54,7 @@ Read only the skill that matches the work; do not load every shared reference by ## Core rules - Do not invent business rules, schema details, permissions, or implementation status. Separate confirmed behavior, verified current behavior, proposals, and open questions. -- Use parsed DDR as generated reference data. Do not edit it manually; defer to direct FileMaker verification when the two conflict. +- Use parsed DDR as generated reference data and defer to direct FileMaker verification when the two conflict. The only standard manual-edit exception is an authorized DDRparser-format script change under `DDR-Parsed//Scripts/`; paste it into FileMaker and regenerate the DDR before calling it implemented. - Keep work practical and minimal. Review affected data, permissions, workflows, layouts, reporting, integrations, and regression risk where relevant. - Do not make production changes, send client messages, or modify project files unless explicitly asked. - Do not expose credentials or other sensitive values found in source material. @@ -77,4 +78,4 @@ Read only the skill that matches the work; do not load every shared reference by ## Response format - Do not hard-wrap Markdown prose. Use line breaks only where Markdown structure or meaning requires them. -- Present every FileMaker script snippet, including partial sections, in a fenced `text` block and use valid `.fmscript` format. +- Present every FileMaker script snippet, including partial sections, in a fenced `text` block. Use DDRparser text format when the request or project uses `filemaker-ddr-script`; use `.fmscript` format only when the request or project selects `filemaker-fmscript`. diff --git a/skills/ddr-analysis/SKILL.md b/skills/ddr-analysis/SKILL.md index 2dda472..556670d 100644 --- a/skills/ddr-analysis/SKILL.md +++ b/skills/ddr-analysis/SKILL.md @@ -25,5 +25,5 @@ Follow the consuming project's `AGENTS.md` for the active parsed DDR location, d ## Rules -- Parsed DDR is generated reference data: do not edit it manually. +- DDR analysis is read-only: do not edit parsed definitions while performing analysis. Use `filemaker-ddr-script` for an authorized script change in `DDR-Parsed//Scripts/`. - Do not call a proposal implemented unless the current DDR or direct FileMaker verification proves it. diff --git a/skills/filemaker-ddr-script/SKILL.md b/skills/filemaker-ddr-script/SKILL.md new file mode 100644 index 0000000..4b54e94 --- /dev/null +++ b/skills/filemaker-ddr-script/SKILL.md @@ -0,0 +1,55 @@ +--- +name: filemaker-ddr-script +description: Read, create, edit, or review FileMaker scripts in DDRparser's copy-and-paste-compatible text format. Use for script files in a project's parsed DDR Scripts directory, DDRparser script syntax, or script steps intended to be converted and pasted into FileMaker. Do not use for `.fmscript` or ai2fm output. +--- + +# FileMaker DDR script + +Produce FileMaker script text that matches DDRparser output and the active project's established script style. DDRparser-compatible text can be converted and pasted into FileMaker as script steps. + +## Follow project evidence + +1. Read the active project's `AGENTS.md`, `PROJECT.md`, ticket material, and any script-specific instructions before changing a script. +2. Locate the active solution under the project's `DDR-Parsed/` directory. Confirm the target script name, group, filename, and relevant FileMaker objects from current project evidence. +3. Read the target script and structurally similar scripts from the same project. Prefer examples from the same feature, script group, caller/callee chain, and supported FileMaker version. Read a project script template when one exists and applies. +4. Match the project's script structure, comments, section order, error handling, parameter/result conventions, calculation layout, indentation, naming, and use of enabled or disabled steps. +5. Inspect callers, called scripts, fields, layouts, table occurrences, custom functions, and other affected definitions when they determine the script's behavior. Use `ddr-analysis` alongside this skill when broader dependency analysis is needed. + +Do not copy conventions or business logic from another client project. Example DDRs used while developing this skill are not part of the skill and are not fallback sources during project work. + +## Resolve script-step format + +Use this evidence order for every unfamiliar step or parameter form: + +1. An exact current instance in the active project's `DDR-Parsed//Scripts/` directory. +2. A closely related current script from the same project. +3. [`all-script-steps.txt`](all-script-steps.txt) for the general step name and base form. + +Search the active project with `rg` before deciding that a step form is unavailable. Copy an exact project's step name, option labels, option order, punctuation, brackets, quotes, and spacing when a matching form exists. The general catalog permits a step name and shows a base form; it does not authorize inventing unshown options or project object names. + +If the required form is still unknown, identify the missing step or option and request a known-good example. Do not substitute a similar step, borrow another client's syntax, translate from `.fmscript`, or infer a parameter form from general FileMaker knowledge. + +## Read and write the text format + +- Treat the `// Script:` header and any `// Group:` line as file metadata. Preserve the existing header; for a new script, derive only the header fields supported by confirmed project naming and group evidence. +- Treat `#` lines as FileMaker Comment steps. Preserve the project's comment wording and section style. +- Treat `// ` before a step as DDRparser's disabled-step representation. Retain disabled steps unless the requested change explicitly enables or removes them. +- Preserve control-block structure and use the project's indentation for nested `If`, `Else If`, `Else`, `Loop`, and corresponding closing steps. Every opened control block must have its matching close. +- Preserve multiline calculations as a single script step, including calculation comments, tabs, line breaks, operators, and the final closing bracket. +- Use the active project's representation for empty options, named objects, curly or straight quotes, semicolon spacing, and option continuation lines. +- Preserve supported plug-in steps only when their exact form is present in the current project or the general catalog. +- Keep changes minimal. Do not rewrite unaffected comments, calculations, formatting, or neighboring steps merely to normalize them. +- Do not invent business rules, FileMaker objects, functions, fields, layouts, scripts, relationships, parameters, results, or error behavior. + +For a requested snippet, return DDRparser-format text in a fenced `text` block. For a requested project change, edit the complete tracked `.txt` file at `DDR-Parsed//Scripts/