@maci0/dsh-cordis-review 0.17.1
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.
- package/LICENSE +21 -0
- package/README.md +126 -0
- package/cordis.patch.yml +10 -0
- package/icon.svg +5 -0
- package/lib/check.js +726 -0
- package/lib/cli.js +80 -0
- package/lib/frontmatter.js +308 -0
- package/lib/index.js +29 -0
- package/lib/skills.js +226 -0
- package/lib/types/check.d.ts +39 -0
- package/lib/types/cli.d.ts +10 -0
- package/lib/types/frontmatter.d.ts +46 -0
- package/lib/types/index.d.ts +19 -0
- package/lib/types/skills.d.ts +64 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +68 -0
- package/skills/cordis-doc-review/SKILL.md +207 -0
- package/skills/cordis-review/SKILL.md +210 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marcel W. Wysocki
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# dsh-cordis-review
|
|
2
|
+
|
|
3
|
+
CORDIS review skills in the composer. `/cordis-review` patches context-paradigm violations. `/cordis-doc-review` creates or repairs source-backed tutorials, references, cookbooks, subsystem docs, and package contracts.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
/cordis-review
|
|
7
|
+
/cordis-doc-review
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Paper: [A Programming Paradigm for Spatiotemporal Composability](https://arxiv.org/abs/2608.25512) (Shi, Zhang, Cui; arXiv:2608.25512).
|
|
11
|
+
|
|
12
|
+
## What you get
|
|
13
|
+
|
|
14
|
+
- **Two commands, one product.** `/cordis-review` and `/cordis-doc-review` load their bundled skill bodies through the skill registry and land in the `/` menu, DSH's command surface for user-invocable skills. Workspace defaults to the current one; `/cordis-review <path>` scopes it.
|
|
15
|
+
- **Rubrics that ship with the plugin.** `skills/cordis-review/SKILL.md` audits temporal and spatial composability. `skills/cordis-doc-review/SKILL.md` creates accurate tutorials, references, cookbooks, subsystem docs, and package contracts from source, tests, and configuration.
|
|
16
|
+
- **Patches, not advice.** The skill instructs the agent to fix every applicable hit, grep the callers of anything it touches, fix the shared primitive, and leave one dispose test per registration it adds or repairs. Hits outside the system boundary are skipped with a one-line reason.
|
|
17
|
+
- **A closed-form checker.** `cordis-review-check` prints the four tags that are grammar rather than judgment: `mix-export`, `inject`, `toplevel`, `id`. Every tag is an ast-grep query over JS/TS/TSX, JavaScript/JSX, Python, and YAML.
|
|
18
|
+
- **A real fallback path.** No `ast-grep` on PATH means each covered file warns on stderr and yields an LLM-fallback hit for the review agent to judge. `leak`, `inverse`, `hmr`, and `boundary` stay with the agent by design.
|
|
19
|
+
- **Honest frontmatter handling.** Skill frontmatter is parsed with `yaml`, so block scalars and nested maps behave as the registry expects. The documented invocation keys (`user-invocable`, `disable-model-invocation`) and `whenToUse` project into the registry's summary; unknown keys stay in `metadata`.
|
|
20
|
+
|
|
21
|
+
On DeepSeek Harness and `dsh-*` plugins the paper maps onto existing names: `ctx.effect`, `inject`, `ctx.get`, `apply`, HMR-safety tests.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
> **Install it as a bundle.** `dsh plugin add …` mounts the row from the
|
|
26
|
+
> package's own patch layer, which is what the settings editor can write to. A
|
|
27
|
+
> row added with `--patch` is an overlay: it disappears at the next start.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh plugin --profile web add @maci0/dsh-cordis-review@0.17.1
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This installs the public npm package; no GitHub token or `~/.secrets` setup is needed.
|
|
34
|
+
The version is pinned. To upgrade, run the same command with a newer version,
|
|
35
|
+
then restart `dsh web` (bundle layers compose at boot).
|
|
36
|
+
|
|
37
|
+
The package declares `dsh.bundle` and ships a built `lib/`, so `dsh plugin add` activates its layer. Do not also paste the `id: cordis-review` row into your profile's `cordis.patch.yml`: `insert` does not dedupe ids, so the plugin would mount twice.
|
|
38
|
+
|
|
39
|
+
Uninstall with the **package name**:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
dsh plugin --profile web remove @maci0/dsh-cordis-review
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Use the package name without a version when removing it; pnpm resolves the argument as a dependency key.
|
|
46
|
+
|
|
47
|
+
Skill-only install, without the plugin row (DSH already watches `~/.dsh/skills`):
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
mkdir -p ~/.dsh/skills
|
|
51
|
+
ln -s /path/to/dsh-cordis-review/skills/cordis-review ~/.dsh/skills/cordis-review
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Edits then load on the next `/cordis-review`. A user- or project-level skill of the same name outranks the bundled copy. The symlinked skill's directory has no `lib/` beside it, so run its closed-form step as `node /path/to/dsh-cordis-review/lib/cli.js [scope]`.
|
|
55
|
+
|
|
56
|
+
## Commands
|
|
57
|
+
|
|
58
|
+
| Command | What it runs |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `/cordis-review` | Reviews the current workspace against CORDIS and implements every applicable fix. |
|
|
61
|
+
| `/cordis-review <path>` | Same audit, scoped to `<path>`. |
|
|
62
|
+
| `cordis-review-check [root]` | Prints `file:line: tag: message` per closed-form hit, or `cordis-check: clean`. The package exposes it as the `cordis-review-check` bin. |
|
|
63
|
+
|
|
64
|
+
Checker flags:
|
|
65
|
+
|
|
66
|
+
- `-h`, `--help`: prints the usage.
|
|
67
|
+
|
|
68
|
+
The ast-grep engine is auto-detected. With the binary on PATH, covered files get the closed-form pass; without it, every covered file warns on stderr and takes the LLM-fallback path.
|
|
69
|
+
|
|
70
|
+
Exit status: **0** clean, **1** findings, **2** usage, path, or ast-grep error, or an incomplete scan. An unknown flag, a root that is not an existing directory, or an `ast-grep scan` that fails (non-zero exit, no JSON array) exits 2 with a one-line `cordis-check:` message on stderr. A directory the walk cannot list (permissions, a race with a delete) is never skipped silently: each one gets a `cordis-check: cannot read <dir>: <reason>` line on stderr, findings from the readable part still print, and the run exits 2 instead of claiming `clean`, since nothing under that directory was checked.
|
|
71
|
+
|
|
72
|
+
## Configure
|
|
73
|
+
|
|
74
|
+
None. The Loader row carries no `config`. The only knobs are the skill frontmatter keys:
|
|
75
|
+
|
|
76
|
+
| Key | Default | Meaning |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `name` | directory name | Kebab-case skill name; must be valid or the file is skipped. |
|
|
79
|
+
| `description` | none | Required. Empty description means the skill is skipped with a warning. |
|
|
80
|
+
| `whenToUse` | unset | Extra routing hint, projected into the registry summary. |
|
|
81
|
+
| `disable-model-invocation` | `false` | `true` keeps the model from invoking the skill on its own. |
|
|
82
|
+
| `user-invocable` | `true` | `false` removes `/cordis-review` from the command surface. |
|
|
83
|
+
|
|
84
|
+
Both invocation keys take the spellings the harness accepts: a YAML boolean, `1`/`0`, or `yes`/`no`/`on`/`off`/`true`/`false` in any case. Any other value, or a legacy camelCase key (`userInvocable`, `modelInvocable`, `disableModelInvocation`), skips the skill with a warning. Provider-specific keys survive in `metadata`. One broken skill file is skipped with a warning; it never costs the catalog its other skills. Warnings go to the host logger (`ctx.logger.warn`), prefixed `[cordis-review]`.
|
|
85
|
+
|
|
86
|
+
## How it works
|
|
87
|
+
|
|
88
|
+
1. **Scope:** the current workspace, or the path argument.
|
|
89
|
+
2. **Get the rules:** the skill's own checklist, plus the repo's `AGENTS.md` / `docs/cordis-primer.md` in DSH workspaces.
|
|
90
|
+
3. **Map the runtime:** context object, effect primitives, entrypoints, loader.
|
|
91
|
+
4. **Closed-form pass:** run the checker first.
|
|
92
|
+
5. **Audit, then fix:** each hit becomes a code change unless it is a documented outside-boundary emission.
|
|
93
|
+
6. **Verify:** dispose the contributing fiber and assert the contribution is gone; re-run the checker.
|
|
94
|
+
|
|
95
|
+
A clean checker is not a pass. The runtime does not prove that an inverse actually reverts, or that operations published at one key commute. Those are author obligations, and this review discharges them in code.
|
|
96
|
+
|
|
97
|
+
## Limits
|
|
98
|
+
|
|
99
|
+
- **The checker proves four tags, nothing more.** It is not a correctness oracle and not a substitute for the checklist. Inverse, leak, HMR, and boundary findings come from the agent's judgment.
|
|
100
|
+
- **Without `ast-grep`, every covered file becomes a judgment call.** Install the binary for deterministic results.
|
|
101
|
+
- **The paper is not fetched by default, and the PDF is not usable.** The abs page is the one fetchable URL; the checklist in the skill body is the rubric.
|
|
102
|
+
- **Host source edits remount only with `id: hmr` enabled** and this checkout in `config.root`. There is no browser chrome.
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
TypeScript built to `lib/`; bun runs the tests from source, so no build is needed to test. dsh loads plugins on Node `^22.19.0 || >=24.0.0`; development and tests run on bun.
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
bun install --frozen-lockfile
|
|
110
|
+
bun test # tests/*.test.ts
|
|
111
|
+
bun run typecheck # tsc -p tsconfig.json (no emit)
|
|
112
|
+
bun run build # tsc -p tsconfig.build.json -> lib/
|
|
113
|
+
bun run check # scan this checkout (runs the built lib/cli.js)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Coverage: every checker tag against real fixtures, CLI flag parsing, help, and each non-zero exit, frontmatter block scalars and chomping, skill discovery tolerating a broken sibling, abort settling promptly, and a real Cordis composition that mounts the skill provider and disposes it.
|
|
117
|
+
|
|
118
|
+
For local development, install the checkout as a bundle:
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
dsh plugin --profile <name> add <path-to-checkout>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Licence
|
|
125
|
+
|
|
126
|
+
MIT. Review criteria derived from arXiv:2608.25512; the paper is not redistributed.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# The dsh-cordis-review bundle patch: applied automatically when a profile
|
|
2
|
+
# lists this bundle (`dsh plugin add`/`update` appends the package to
|
|
3
|
+
# dsh.profile.bundles). Users override this row from their profile's own
|
|
4
|
+
# cordis.patch.yml (live-watched; dsh.profile.bundles is frozen at boot) with a
|
|
5
|
+
# `- id: cordis-review` row, which replaces the row's whole `config`.
|
|
6
|
+
# Do not also insert this same row into the profile patch: insert does not
|
|
7
|
+
# dedupe ids, and a second row would register the plugin twice.
|
|
8
|
+
- insert:
|
|
9
|
+
- id: cordis-review
|
|
10
|
+
name: '@maci0/dsh-cordis-review'
|
package/icon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="8" y="6" width="16" height="22" rx="2" fill="#E8F1FF" stroke="#145AF3" stroke-width="1.6"/>
|
|
3
|
+
<path d="M12.6 17.2l2.3 2.3 5-5.2" stroke="#145AF3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M26.5 24.5l4 4" stroke="#145AF3" stroke-width="2.2" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|