@cratis/pi 7.103.1 → 7.103.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*.sh,**/*.py,**/*.mjs,**/*.cjs,**/*.ps1,**/scripts/**,**/tools/**,**/.github/workflows/**,**/.cratis/ai/hooks/**"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.sh"
|
|
5
|
+
- "**/*.py"
|
|
6
|
+
- "**/*.mjs"
|
|
7
|
+
- "**/*.cjs"
|
|
8
|
+
- "**/*.ps1"
|
|
9
|
+
- "**/scripts/**"
|
|
10
|
+
- "**/tools/**"
|
|
11
|
+
- "**/.github/workflows/**"
|
|
12
|
+
- "**/.cratis/ai/hooks/**"
|
|
13
|
+
---
|
|
14
|
+
<!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
|
|
15
|
+
|
|
16
|
+
# Scripts and tooling
|
|
17
|
+
|
|
18
|
+
- Write repository scripts, CI helpers and tooling in Node (`.mjs`, or `.ts` limited to erasable syntax: no enums, no parameter properties), using only `node:` built-ins (`fs.glob`, `util.parseArgs`, `fetch`, `node:test`). Node and the .NET SDK are the only runtimes every Cratis build machine and runner is guaranteed to have.
|
|
19
|
+
- Use a C# file-based app (`dotnet run --file tool.cs`, `#:package` pinned) when the script needs .NET or Cratis libraries or shares types with the product. Do not use one in hooks or on per-call hot paths.
|
|
20
|
+
- Hooks under `.cratis/ai/hooks` are POSIX sh compatible with bash 3.2, or Node. Read stdin with `IFS= read -r -d '' x || true`, never `$(</dev/stdin)`.
|
|
21
|
+
- Do not add Python scripts or `python3` workflow steps to Cratis repositories unless the project itself is Python (for example the Chronicle Python client). Existing Python scripts are ported to Node opportunistically: when you substantially change one, port it in the same PR. There is no bulk port.
|
|
22
|
+
- Agents: edit files with the edit/write tools, query JSON with `gh --jq`/`jq`, and use `node -e` or `node --input-type=module - <<'EOF'` for ad-hoc logic. Never `python3 -c`, and never rewrite files by script.
|
|
@@ -149,11 +149,11 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
149
149
|
| Before any browser call: production permit, handoff, artifact paths, evidence | `browser.md` |
|
|
150
150
|
| Whether you are allowed to do the thing you are able to do | `capability-is-not-authority.md` |
|
|
151
151
|
| Before running a command that could print a credential, or when a secret value appears in output | `secrets.md` |
|
|
152
|
-
| What must stop and ask a human | `capability-is-not-authority.md`
|
|
152
|
+
| What must stop and ask a human | `capability-is-not-authority.md` |
|
|
153
153
|
| What counts as evidence that something works | `verification-discipline.md` |
|
|
154
154
|
| Before writing a session note, plan or handover: where they may live (`.ai-work/` only) | `local-work-artifacts.md` |
|
|
155
155
|
| What may be written into the `.cratis/` folder (configuration and the corpus only, never deliverables) | `cratis-folder-is-configuration.md` |
|
|
156
|
-
| Exit-code meaning, scripts and wrappers that lose a verdict | `exit-codes-and-wrappers.md` |
|
|
156
|
+
| Exit-code meaning, scripts and wrappers that lose a verdict; which language a script uses | `exit-codes-and-wrappers.md`, `scripting.md` |
|
|
157
157
|
| Writing a scan, allowlist, script or CI check, or a destructive pass, that cannot pass vacuously | `guards-and-fuses.md` |
|
|
158
158
|
| How the shared corpus is installed, updated and rolled back | `ai-distribution.md` |
|
|
159
159
|
| Code-level event modeling / schema migration / calling commands from code / paging / cross-cutting metadata / multi-tenancy | the matching skills |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*.sh,**/*.py,**/*.mjs,**/*.cjs,**/*.ps1,**/scripts/**,**/tools/**,**/.github/workflows/**,**/.cratis/ai/hooks/**"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.sh"
|
|
5
|
+
- "**/*.py"
|
|
6
|
+
- "**/*.mjs"
|
|
7
|
+
- "**/*.cjs"
|
|
8
|
+
- "**/*.ps1"
|
|
9
|
+
- "**/scripts/**"
|
|
10
|
+
- "**/tools/**"
|
|
11
|
+
- "**/.github/workflows/**"
|
|
12
|
+
- "**/.cratis/ai/hooks/**"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Scripts and tooling
|
|
16
|
+
|
|
17
|
+
- Write repository scripts, CI helpers and tooling in Node (`.mjs`, or `.ts` limited to erasable syntax: no enums, no parameter properties), using only `node:` built-ins (`fs.glob`, `util.parseArgs`, `fetch`, `node:test`). Node and the .NET SDK are the only runtimes every Cratis build machine and runner is guaranteed to have.
|
|
18
|
+
- Use a C# file-based app (`dotnet run --file tool.cs`, `#:package` pinned) when the script needs .NET or Cratis libraries or shares types with the product. Do not use one in hooks or on per-call hot paths.
|
|
19
|
+
- Hooks under `.cratis/ai/hooks` are POSIX sh compatible with bash 3.2, or Node. Read stdin with `IFS= read -r -d '' x || true`, never `$(</dev/stdin)`.
|
|
20
|
+
- Do not add Python scripts or `python3` workflow steps to Cratis repositories unless the project itself is Python (for example the Chronicle Python client). Existing Python scripts are ported to Node opportunistically: when you substantially change one, port it in the same PR. There is no bulk port.
|
|
21
|
+
- Agents: edit files with the edit/write tools, query JSON with `gh --jq`/`jq`, and use `node -e` or `node --input-type=module - <<'EOF'` for ad-hoc logic. Never `python3 -c`, and never rewrite files by script.
|