madeby 0.3.0 → 0.3.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.
- package/README.md +41 -17
- package/dist/madeby.mjs +5 -5
- package/package.json +16 -5
package/README.md
CHANGED
|
@@ -1,19 +1,39 @@
|
|
|
1
1
|
# madeby
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Disclose AI authorship of code. Disclosure, not detection.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
false-accusing a contributor is worse than the problem. It reports what contributors **put on the
|
|
8
|
-
record**; what a project *requires* is the maintainer's policy, set in a file in the repo.
|
|
5
|
+
If you are an **AI coding agent** (Claude Code, Copilot, Cursor, Codex, …) and you authored or modified
|
|
6
|
+
code, disclose it in one command after you commit:
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
```sh
|
|
9
|
+
npx madeby ai # adds an `Authored-by-ai:` trailer to HEAD — you (the committer) stay accountable
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
That's the honest **`ai`** disclosure (asserted tier, no session log needed). The three authorship
|
|
13
|
+
categories of the open **ACO standard** (Authorship Certificate of Origin):
|
|
14
|
+
|
|
15
|
+
| Category | Command | What it records |
|
|
16
|
+
|-----------|----------------------------------|----------------------------------------|
|
|
17
|
+
| `ai` | `npx madeby ai [tool]` | `Authored-by-ai:` — an AI authored it |
|
|
18
|
+
| `with_ai` | `npx madeby me --with-ai [tool]` | `Authored-by-human:` + `Assisted-by:` |
|
|
19
|
+
| `human` | `npx madeby me` | `Authored-by-human:` |
|
|
20
|
+
|
|
21
|
+
A repo invites this with an [`AGENTS.md`](https://github.com/MadeByFYI/MadeBy/blob/main/AGENTS.md)
|
|
22
|
+
convention (drop one in with `npx madeby init`); agents that read it disclose unprompted — in a
|
|
23
|
+
[reproducible experiment](https://github.com/MadeByFYI/MadeBy/tree/main/experiments/aco-adoption), three
|
|
24
|
+
AI coding agents did so in **12 of 12 trials, 0 of 14 without the convention.** `madeby` also
|
|
25
|
+
**recognizes disclosure already in the wild** — `Co-Authored-By:` / `Assisted-by:` trailers, DCO
|
|
26
|
+
sign-offs, SPDX AI-disclosure tags — and lets a project **gate PRs** on it (`madeby check`). It never
|
|
27
|
+
guesses whether code is AI; no tool can do that honestly. It reports only what contributors **put on
|
|
28
|
+
the record**.
|
|
29
|
+
|
|
30
|
+
Zero hosted infrastructure — runs against your local git history, on a laptop or in any CI. Nothing
|
|
31
|
+
leaves your machine.
|
|
12
32
|
|
|
13
33
|
## Install
|
|
14
34
|
|
|
15
35
|
```sh
|
|
16
|
-
npx madeby
|
|
36
|
+
npx madeby@latest ai # no install needed
|
|
17
37
|
# or
|
|
18
38
|
npm i -g madeby
|
|
19
39
|
```
|
|
@@ -26,8 +46,10 @@ madeby check [<range>] The gate: do commits meet .madeby/policy.json? (a
|
|
|
26
46
|
gates). <range> e.g. origin/main..HEAD — a PR's own commits. --json too.
|
|
27
47
|
madeby who [<path>] Made by whom? What's on the record about who made this — one file's
|
|
28
48
|
(alias: whom) origin, or the whole repo with no path. --lines=A-B to scope. --json too.
|
|
29
|
-
madeby ai [
|
|
30
|
-
|
|
49
|
+
madeby ai [tool] Made by AI: attest AI authorship of HEAD (an Authored-by-ai trailer).
|
|
50
|
+
`--witness [log]` instead records witnessed spans from a session log.
|
|
51
|
+
madeby me [--with-ai [t]] Made by me: affirm you authored HEAD (Authored-by-human); --with-ai adds
|
|
52
|
+
Assisted-by → with_ai.
|
|
31
53
|
madeby mcp Run the MCP server (stdio) — the tools, agent-callable.
|
|
32
54
|
madeby help
|
|
33
55
|
```
|
|
@@ -138,12 +160,13 @@ an AI agent can use MadeBy with no human in the loop. It exposes the same primit
|
|
|
138
160
|
map an agent reads *before* it works (the witnessed AI surface + commit-level coverage; cheap). The
|
|
139
161
|
line range is the contract — for a symbol, turn it into a range with your own tooling
|
|
140
162
|
(tree-sitter/LSP); MadeBy never parses code. *read (attribution)*
|
|
141
|
-
- **`
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
163
|
+
- **`disclose`** `{ path?, category?, tool? }` — made by ___: disclose authorship on HEAD per ACO.
|
|
164
|
+
`category: "ai"` (an AI authored it; the committer is the accountable human) adds `Authored-by-ai`;
|
|
165
|
+
`"with_ai"` adds `Authored-by-human` + `Assisted-by`; `"human"` adds `Authored-by-human`. The
|
|
166
|
+
agent-native disclosure for the work you just did. *write*
|
|
167
|
+
- **`ai`** `{ path?, log?, ref? }` — the evidence upgrade for the `ai` category: record witnessed AI
|
|
168
|
+
spans from the agent's own session log into `.madeby/spans` (asserted→verified, local; only spans
|
|
169
|
+
structurally present are kept). *write*
|
|
147
170
|
|
|
148
171
|
The server is also **self-teaching** via MCP resources, so an agent can discover *how* to align a
|
|
149
172
|
repo, not just which verbs exist:
|
|
@@ -158,7 +181,8 @@ repo, not just which verbs exist:
|
|
|
158
181
|
- **`madeby://schema/policy`** — the `.madeby/policy.json` schema.
|
|
159
182
|
|
|
160
183
|
So "align my repo with MadeBy" is fully agent-serviceable: the agent reads the guide, calls **`init`**
|
|
161
|
-
to write the policy + CI check,
|
|
184
|
+
to write the policy + CI check, discloses its own work with **`disclose`** (and optionally upgrades it to
|
|
185
|
+
witnessed spans with **`ai`**), and verifies with **`check`** —
|
|
162
186
|
no human in the loop. (Two things stay outside the tools, by design: turning on branch protection is
|
|
163
187
|
the *host's* setting, and historical commits are never backfilled — disclosure is going-forward.
|
|
164
188
|
`ai` cannot claim a higher tier or attribute to anyone else, and nothing leaves the machine.)
|
package/dist/madeby.mjs
CHANGED
|
@@ -1915,9 +1915,9 @@ After you commit, run the matching command (works with no install via \`npx\`):
|
|
|
1915
1915
|
|
|
1916
1916
|
| Category | Command |
|
|
1917
1917
|
|-----------|----------------------------------|
|
|
1918
|
-
| \`human\` | \`npx madeby me\` |
|
|
1919
|
-
| \`with_ai\` | \`npx madeby me --with-ai <tool>\` |
|
|
1920
|
-
| \`ai\` | \`npx madeby ai [tool]\` |
|
|
1918
|
+
| \`human\` | \`npx madeby@latest me\` |
|
|
1919
|
+
| \`with_ai\` | \`npx madeby@latest me --with-ai <tool>\` |
|
|
1920
|
+
| \`ai\` | \`npx madeby@latest ai [tool]\` |
|
|
1921
1921
|
|
|
1922
1922
|
Undisclosed content stays *unknown*, never guessed. See ACO for the standard.
|
|
1923
1923
|
`;
|
|
@@ -1942,7 +1942,7 @@ function initRepo(root, opts = {}) {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
const nextSteps = ["Commit the created files."];
|
|
1944
1944
|
if (created.includes("AGENTS.md")) {
|
|
1945
|
-
nextSteps.push("An AGENTS.md ACO convention was added \u2014 agents that read it disclose authorship (e.g. 'npx madeby me --with-ai <tool>'). Tune it to your repo's tools.");
|
|
1945
|
+
nextSteps.push("An AGENTS.md ACO convention was added \u2014 agents that read it disclose authorship (e.g. 'npx madeby@latest me --with-ai <tool>'). Tune it to your repo's tools.");
|
|
1946
1946
|
} else if (skipped.includes("AGENTS.md")) {
|
|
1947
1947
|
nextSteps.push("You already have an AGENTS.md \u2014 add the ACO disclosure rule to it (reference: https://github.com/MadeByFYI/MadeBy/blob/main/AGENTS.md).");
|
|
1948
1948
|
}
|
|
@@ -1983,7 +1983,7 @@ madeby init \u2014 policy: ${r.policyMode}, host: ${r.host}`);
|
|
|
1983
1983
|
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
1984
1984
|
import { createInterface } from "node:readline";
|
|
1985
1985
|
var DEFAULT_PROTOCOL = "2024-11-05";
|
|
1986
|
-
var SERVER_INFO = { name: "madeby", version: "0.
|
|
1986
|
+
var SERVER_INFO = { name: "madeby", version: "0.3.2" };
|
|
1987
1987
|
function rootFor(path) {
|
|
1988
1988
|
const cwd = path && path.length ? path : process.cwd();
|
|
1989
1989
|
return execFileSync6("git", ["-C", cwd, "-c", "core.quotePath=false", "rev-parse", "--show-toplevel"], { encoding: "utf8" }).trim();
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "madeby",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"mcpName": "io.github.madebyfyi/madeby",
|
|
5
|
+
"description": "Disclose AI authorship of code. `npx madeby ai` adds an Authored-by-ai git trailer; AI coding agents disclose per the ACO standard (human/with_ai/ai) from an AGENTS.md convention. Disclosure, not detection. Gate PRs with `madeby check`.",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"author": {
|
|
@@ -17,14 +18,24 @@
|
|
|
17
18
|
"directory": "packages/cli"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
21
|
+
"ai-authorship",
|
|
22
|
+
"ai-disclosure",
|
|
23
|
+
"authored-by-ai",
|
|
24
|
+
"ai-attribution",
|
|
25
|
+
"ai-provenance",
|
|
26
|
+
"ai-generated-code",
|
|
27
|
+
"coding-agent",
|
|
28
|
+
"agents",
|
|
29
|
+
"agents-md",
|
|
30
|
+
"aco",
|
|
31
|
+
"co-authored-by",
|
|
20
32
|
"provenance",
|
|
21
|
-
"ai",
|
|
22
33
|
"disclosure",
|
|
34
|
+
"attestation",
|
|
23
35
|
"dco",
|
|
24
36
|
"pull-request",
|
|
25
37
|
"ci",
|
|
26
|
-
"
|
|
27
|
-
"code-provenance"
|
|
38
|
+
"mcp"
|
|
28
39
|
],
|
|
29
40
|
"engines": {
|
|
30
41
|
"node": ">=20"
|