DESIGN.md@crates/rulecC
DESIGN.md@crates/rulec from i2y/ritsu is a DESIGN.md file: the design rules coding agents follow in that repo.
mdr add i2y/ritsu/crates/rulec/DESIGN.md@git:20261106.947564fPins git:20261106.947564f in mdr.lock. Pin the fingerprint instead.
- Audit grade
- C, 11 of 14 checks passed
- Kind
- DESIGN.md file
- Repository
- i2y/ritsu
- Path
crates/rulec/DESIGN.md- Versions recorded
- 15
- Latest version
- git:20261106.947564f, committed Nov 6, 2026
- First version recorded
- Oct 29, 2026
- Size
- 1,946,481 bytes
- Repository stars
- 3
- License
- Apache-2.0
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# rulec 設計文書
業務ルールを決定表として記述し、静的に検査し、Python と Go の両方へ読めるコードを生成する道具の設計を決める。
実装はまだ書かない。
本文の構文例と生成コード例は、決定を説明するためのスケッチである。
合意済みの前提は再論せず、以下の記号で参照する。
- **P1**:最初の対象領域は送料。次がクーポンとポイント、引当は最後
- **P2**:記述の中心は決定表。業務担当者が読めること
- **P3**:ルールは純関数。時刻も在庫も会員区分も入力として渡される
- **P4**:型で守るのは、単位、丸め、完全性、優先順位と重なりの四つ
- **P5**:出力は Python と Go への依存ゼロの読めるコード生成。実行時ランタイムは持たない
- **P6**:道具本体はデータ不要、旧実装があれば等価検証、過去データがあれば影響算出、と段階的に価値が出ること
- **P7**:汎用言語にしない。ループも再帰も状態も GUI も持たない
本書は v0 草案を、公開規約からの転記実測を受けて改訂した v1 である。
実測とは、公開情報(日本郵便ゆうパック基本運賃 東京発、ヤマト宅急便のサイズ区分、楽天市場の送料無料ライン、39 キャンペーン、複数クーポンの計算方法とクーポン利用条件、Yahoo!ショッピングのクーポン利用条件)を 2 本の `.rule` に転記した計測を指す。
規模はゆうパック運賃が 84 行(表 55 行、列 2、群 6)、クーポン割引が表 15 行、列 6 である。
本文で「実測」と言うときはこの転記を指し、転記そのものは回帰コーパスとして §13 に収録する。
実測が支持した決定(二方式の共存、単項セルの制限、線形パイプライン、群、表引き出力への丸め宣言、完全性の常時必須)は各所に一文で記す。
覆った決定は本文を書き換え、v0 が持っていた検査の抜け道は塞いだ経緯ごと残す(§5.3)。
## 0. 全体像
rulec は一本のパイプラインである。
```
.rule ── 構文解析 ──> AST ── 型付け ──> TIR(型付き表 IR)
├──> 領域 IR(圧縮座標上の区画の集合)──> 検査 E101/E102/E105
├──> 参照評価器 ──> 例の検証・ベクタ期待値・verify/replay/diff
└──> コード生成 ──> generated/python/… generated/go/…
```
…Read the whole file at its exact version.
How to install
mdr add i2y/ritsu/crates/rulec/DESIGN.md@sha256:d9255d28ff454186The line at the top of this page pins the label git:20261106.947564f, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_jc244ngvzw5kf7u5)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 15 versions of this file, between Oct 29, 2026 and Nov 6, 2026, more than one a day.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261106.947564f latest | 2026-11-06 | 947564f | 1,946,481 B | C | view · diff |
| git:20261106.2acffb3 | 2026-11-06 | 2acffb3 | 1,942,365 B | C | view · diff |
| git:20261104.53cba2a | 2026-11-04 | 53cba2a | 1,942,258 B | C | view · diff |
| git:20261103.1e26b32 | 2026-11-03 | 1e26b32 | 1,938,518 B | C | view · diff |
| git:20261103.9ae8948 | 2026-11-03 | 9ae8948 | 1,942,538 B | C | view · diff |
| git:20261031.76f9a81 | 2026-10-31 | 76f9a81 | 1,901,957 B | C | view · diff |
| git:20261031.d968c43 | 2026-10-31 | d968c43 | 1,900,587 B | C | view · diff |
| git:20261031.889233e | 2026-10-31 | 889233e | 1,900,530 B | C | view · diff |
| git:20261031.eaef98e | 2026-10-31 | eaef98e | 1,900,446 B | C | view · diff |
| git:20261030.4b0b4bc | 2026-10-30 | 4b0b4bc | 1,890,004 B | C | view · diff |
| git:20261030.77e84d4 | 2026-10-30 | 77e84d4 | 1,865,654 B | C | view · diff |
| git:20261030.49a0408 | 2026-10-30 | 49a0408 | 1,857,073 B | C | view · diff |
| git:20261030.55ae910 | 2026-10-30 | 55ae910 | 1,854,189 B | C | view · diff |
| git:20261029.0c6714d | 2026-10-29 | 0c6714d | 1,828,434 B | C | view · diff |
| git:20261029.071b393 | 2026-10-29 | 071b393 | 1,807,877 B | C | view |
Audit of the latest version
- fail: Size between 200 bytes and 200 KB (1946481 bytes)
- fail: No link to a raw IP address (matched: http://127.0.0.1:8123)
- fail: No script tag (matched: <script)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
Starting a new one? Use a template for DESIGN.md on mdpantry, which passes every one of these checks and says what to change in it.
Source
i2y/ritsu · 3 stars · license Apache-2.0 · pushed 2026-11-07 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_jc244ngvzw5kf7u5 GET https://markdownregistry.com/api/v1/resolve?ref=i2y/ritsu/crates/rulec/DESIGN.md GET https://markdownregistry.com/api/v1/blob/d9255d28ff4541867c66540bf9072aecb8b14f7893a98ff3713a1938ace9678f
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: what DESIGN.md is and how agents use it · which agent file does what.