@tenkara/afm-linux-arm64 4.0.0-alpha.10 → 4.0.0-alpha.11
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/bin/afm +1 -1
- package/content/CHANGELOG.md +10 -0
- package/content/ops/obligations.md +145 -0
- package/content/questions/obligations.questions.yaml +17 -0
- package/content/skills/obligations.md +27 -0
- package/package.json +1 -1
- package/plugin/agy/plugin.json +1 -1
- package/plugin/agy/skills/afm-obligations/SKILL.md +31 -0
- package/plugin/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugin/claude-code/skills/obligations/SKILL.md +31 -0
- package/plugin/opencode/skills/afm-obligations/SKILL.md +31 -0
package/bin/afm
CHANGED
package/content/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,16 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning [Se
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [4.0.0-alpha.11] - 2026-10-23
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`ops/obligations.md`, `skills/obligations.md` and `questions/obligations.questions.yaml`.** The AI step of the obligations root: read a contract, map every operator obligation into a typed entry (`hard` only with a built-in check), loop `afm obligations lint` to clean, and install the hooks only on an explicit answer.
|
|
17
|
+
|
|
18
|
+
### Consumer migration
|
|
19
|
+
|
|
20
|
+
- **record-pristine-alpha11.** A docs file already equal to what afm init writes today is recorded in the manifest as AFM's own. (ops: custom)
|
|
21
|
+
|
|
12
22
|
## [4.0.0-alpha.10] - 2026-10-21
|
|
13
23
|
|
|
14
24
|
### Changed
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: op
|
|
3
|
+
description: Maps a contract into an obligations root in a parent folder, so git enforces the mechanical obligations on every repository below it.
|
|
4
|
+
load: warm
|
|
5
|
+
writes: [".afm-obligations/*"]
|
|
6
|
+
composes: []
|
|
7
|
+
---
|
|
8
|
+
# Sub-flow: map a contract into an obligations root (`obligations`)
|
|
9
|
+
|
|
10
|
+
> **Form** — effect: `<root>/.afm-obligations/`, and on `install-now` one `includeIf` entry in the global git config (written by `afm obligations install`) · trigger: `afm obligations`, a contract to map · precondition: none (it runs in a parent folder, not in a project) · **degree of freedom: medium**
|
|
11
|
+
|
|
12
|
+
Triggers: `afm obligations`, or natural language: "map this contract", "turn my contract into rules",
|
|
13
|
+
"what does this contract make me do", "set up the obligations for this client folder".
|
|
14
|
+
|
|
15
|
+
## What an obligations root is
|
|
16
|
+
|
|
17
|
+
A parent folder that holds the repositories of one client gets a hidden `.afm-obligations/` folder:
|
|
18
|
+
|
|
19
|
+
| File | What it holds |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `root.toml` | the contract (path, version, dates), who receives notices, the deploy refs, the AI allowlist |
|
|
22
|
+
| `obligations/<id>.md` | one obligation: YAML frontmatter, then the operator's notes |
|
|
23
|
+
| `approvals.jsonl` | the written approvals the operator received, appended with `afm approval add` |
|
|
24
|
+
| `hooks/`, `gitconfig` | written by `afm obligations install` |
|
|
25
|
+
|
|
26
|
+
The root lives outside every project repository and nothing is written inside a project. The operator
|
|
27
|
+
may make `.afm-obligations/` its own repository; the checks treat it as a records repository, never as
|
|
28
|
+
a project. `afm obligations install` adds one `includeIf "gitdir:<root>/"` entry to the global git
|
|
29
|
+
config, so every repository below the root runs the checks at pre-commit and pre-push, then its own
|
|
30
|
+
hooks. No AI and no harness take part in the enforcement.
|
|
31
|
+
|
|
32
|
+
**This op is the only AI step.** The CLI never reads a contract. The op reads it and writes data, and
|
|
33
|
+
the CLI validates and enforces that data.
|
|
34
|
+
|
|
35
|
+
**Questions.** Its two questions (`existing-root`, `install`) are the ones `afm ask obligations`
|
|
36
|
+
prints, but this op runs outside an AFM project, where that command exits 1. Put them to the operator
|
|
37
|
+
in plain words or through the host's question facility, with the same options. Never assume an answer: `install` edits the
|
|
38
|
+
operator's global git config.
|
|
39
|
+
|
|
40
|
+
## Procedure
|
|
41
|
+
|
|
42
|
+
1. **Locate the folder and the contract.** The folder is the parent of the client's repositories (the
|
|
43
|
+
current directory unless the operator names one). The contract is a file the operator points to (PDF
|
|
44
|
+
or text). If a playbook or summary of the contract exists, read it too, but the contract is the
|
|
45
|
+
source: cite clauses from the contract, not from the summary.
|
|
46
|
+
2. **Scaffold.** Run `afm obligations init` in the folder. If a root already exists, ask `existing-root`.
|
|
47
|
+
3. **Fill `root.toml`.** Replace every `[TBD]`; `afm obligations lint` warns while one is left. The full
|
|
48
|
+
shape:
|
|
49
|
+
|
|
50
|
+
```toml
|
|
51
|
+
name = "acme" # the client
|
|
52
|
+
notice_to = "legal@acme.example" # who receives notices under the contract
|
|
53
|
+
deploy_refs = ["refs/heads/main", "refs/heads/master", "refs/heads/production", "refs/tags/v*"]
|
|
54
|
+
ai_allowlist = [] # providers the DELIVERED CODE may call (see the AI row below)
|
|
55
|
+
|
|
56
|
+
[contract]
|
|
57
|
+
file = "~/contracts/acme-2026.pdf" # where the contract already lives; never copy it here
|
|
58
|
+
version = "signed 2026-10-23"
|
|
59
|
+
effective = "2026-10-15" # the contract's dates, not today's
|
|
60
|
+
expires = "2027-10-15"
|
|
61
|
+
|
|
62
|
+
[projects.mobile-app] # optional: a project whose deploy refs differ
|
|
63
|
+
deploy_refs = ["refs/tags/release-*"]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
A deploy ref is a full ref; `*` is the only wildcard. `contract.file` points to the contract where it
|
|
67
|
+
already lives: never copy the contract, an e-mail or client data into the root, which the operator may
|
|
68
|
+
version and push.
|
|
69
|
+
4. **Extract every obligation of the operator.** Read the whole contract, clause by clause, schedules
|
|
70
|
+
and annexes included. Keep only what the operator (the contractor) must do, must not do, must ask
|
|
71
|
+
before doing, must deliver by a date, or must notify. Leave out what binds only the client.
|
|
72
|
+
5. **Map each one** to one file `obligations/<id>.md`, the id in the file name. The frontmatter is YAML
|
|
73
|
+
between two `---` lines; quote every string value, because clause references and remedies hold `:`.
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
---
|
|
77
|
+
id: "OBL-DEPLOY-01"
|
|
78
|
+
source: "Section II; Schedule A, B.2"
|
|
79
|
+
kind: "approval-required"
|
|
80
|
+
enforcement: "hard"
|
|
81
|
+
check: "deploy-approval"
|
|
82
|
+
scope: "deploy"
|
|
83
|
+
remedy: "Ask legal@acme.example for written approval before any deploy or public build; record it with afm approval add --scope deploy."
|
|
84
|
+
evidence: "an approval id in approvals.jsonl"
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
Deploys and public builds need prior written approval. Discord does not count.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- `id`: `OBL-<AREA>-<NN>`, upper case.
|
|
91
|
+
- `source`: the clause or schedule reference, exact.
|
|
92
|
+
- `kind`: `prohibition`, `approval-required`, `deadline`, `recurring` or `notice`.
|
|
93
|
+
- `enforcement` and `check`, by this table, and never stronger than the check can prove:
|
|
94
|
+
|
|
95
|
+
| The obligation… | `enforcement` | `check` |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| forbids a deploy, a public build or a publication without written approval | `hard` | `deploy-approval`, with `kind: approval-required` and `scope: deploy` |
|
|
98
|
+
| forbids credentials or secrets in the work | `hard` | `secrets` |
|
|
99
|
+
| forbids personal data hardcoded in the work | `hard` | `personal-data` |
|
|
100
|
+
| limits which AI providers the delivered code may call | `hard`, or `soft` when the product is expected to use one | `ai-allowlist` |
|
|
101
|
+
| limits which AI tools or models may touch client data (assistants, chat tools, training) | `manual` | none, `kind: approval-required`, `scope: tool` or `model` |
|
|
102
|
+
| needs approval for anything else that fits a scope below | `manual` | none, with `scope` |
|
|
103
|
+
| needs approval for something no scope fits (budget, material decisions, pre-existing material) | `manual` | none, `kind: prohibition`, the condition in the notes |
|
|
104
|
+
| sets a date or a period (report, invoice, incident notice, data return, post-term restriction) | `reminder` | none |
|
|
105
|
+
| anything no built-in check can see (devices, accounts, conduct, tax) | `manual` | none |
|
|
106
|
+
|
|
107
|
+
- What the checks prove, so the map never claims more: `secrets` blocks known token formats and
|
|
108
|
+
plaintext key/value secrets on added lines. `personal-data` blocks Brazilian CPF and CNPJ with valid
|
|
109
|
+
check digits and card numbers that pass Luhn; e-mail addresses and phone numbers only warn. It sees
|
|
110
|
+
only the code, never tools. `ai-allowlist` blocks SDK imports, manifest entries, API hosts and key
|
|
111
|
+
prefixes of providers outside `ai_allowlist`; it says nothing about which assistant the operator
|
|
112
|
+
uses. An approved assistant (for example a coding agent) is a `manual` `scope: tool` entry, and it
|
|
113
|
+
does NOT put its provider in `ai_allowlist`.
|
|
114
|
+
- `scope` (for `approval-required`): `deploy` (deploys, public builds, publications: a public build is
|
|
115
|
+
recorded as `deploy`, because only `deploy` unblocks a push), `build`, `tool`, `vendor`, `library`,
|
|
116
|
+
`third-party`, `subcontractor`, `model`, `public-statement`.
|
|
117
|
+
- `remedy`: what to do, to whom, in how much time, in one or two sentences. It is printed on every
|
|
118
|
+
blocked commit or push, so it carries no confidential text.
|
|
119
|
+
- `evidence`: what proves compliance (an approval id, a sent report, a certificate).
|
|
120
|
+
- The body: the operator's notes. Paraphrase. Never paste confidential text of the contract beyond
|
|
121
|
+
what the operator needs to act.
|
|
122
|
+
6. **Validate.** Run `afm obligations lint` and fix every finding. Loop until it exits 0 and prints no
|
|
123
|
+
`[TBD]` warning. A `hard` or `soft` entry without a `check` is refused: mark it `manual` or `reminder`.
|
|
124
|
+
Never invent a check.
|
|
125
|
+
7. **Show the map.** Print one table: id, source, kind, enforcement, check. Count the entries per
|
|
126
|
+
enforcement level. Then ask `install`.
|
|
127
|
+
8. **Install** only on `install-now`: run `afm obligations install` and report what it wrote and which
|
|
128
|
+
repositories set their own `core.hooksPath` (those are not covered until the operator removes it).
|
|
129
|
+
|
|
130
|
+
## What it must never do
|
|
131
|
+
|
|
132
|
+
- Never give legal advice or interpret a clause beyond what the operator must do. Say once that the
|
|
133
|
+
map reflects the operator's reading and should be reviewed with a lawyer.
|
|
134
|
+
- Never mark an obligation `hard` without a `check`, or invent a check outside the closed set.
|
|
135
|
+
- Never copy the contract, e-mail content, client data or confidential text into the root. Only paths,
|
|
136
|
+
references and metadata.
|
|
137
|
+
- Never write inside a project repository.
|
|
138
|
+
- Never record an approval for the operator. Approvals come from the operator with `afm approval add`,
|
|
139
|
+
each with an e-mail Message-ID or link.
|
|
140
|
+
|
|
141
|
+
## Invariant principles
|
|
142
|
+
|
|
143
|
+
The single canonical source is `afm path PRINCIPLES`. Universals §1-8 apply. #2 (discover-first: the
|
|
144
|
+
contract answers what it can, ask only the irreducible) and #5 (never invent: an obligation without a
|
|
145
|
+
clause is not an obligation).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
questions:
|
|
2
|
+
- id: existing-root
|
|
3
|
+
prompt: This folder already has an obligations root. What should the mapping do?
|
|
4
|
+
header: Root
|
|
5
|
+
options:
|
|
6
|
+
- label: extend
|
|
7
|
+
description: Keep the existing entries and add or update only what the contract changes.
|
|
8
|
+
- label: stop
|
|
9
|
+
description: Change nothing; the existing root stays as it is.
|
|
10
|
+
- id: install
|
|
11
|
+
prompt: The map passes the lint. Install the git hooks for every repository below this folder now?
|
|
12
|
+
header: Install
|
|
13
|
+
options:
|
|
14
|
+
- label: install-now
|
|
15
|
+
description: Adds one includeIf entry to the global git config; every repository below the folder runs the checks, then its own hooks.
|
|
16
|
+
- label: later
|
|
17
|
+
description: Nothing is enforced until the operator runs afm obligations install.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obligations
|
|
3
|
+
description: |
|
|
4
|
+
Maps a contract into an obligations root in a parent folder that holds a client's repositories. Each obligation of the operator becomes a typed entry, and git enforces the mechanical ones on every repository below the folder, with no AI and no harness. It never gives legal advice.
|
|
5
|
+
Activates: `afm obligations`, "map this contract", "turn my contract into rules", "what does this contract make me do", "set up the obligations for this client folder".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Obligations (map a contract into an obligations root)
|
|
9
|
+
|
|
10
|
+
The CLI owns the scaffold, the schema, the lint, the approvals log and the hooks. This skill keeps the
|
|
11
|
+
judgment: reading the contract and mapping each obligation honestly.
|
|
12
|
+
|
|
13
|
+
## When NOT to activate
|
|
14
|
+
|
|
15
|
+
To record an approval the operator received, run `afm approval add`. To check a project's code against
|
|
16
|
+
the AFM rules, run `afm gate`. A project's own rules belong to `afm rule`.
|
|
17
|
+
|
|
18
|
+
## Pre-check
|
|
19
|
+
|
|
20
|
+
None: the op runs in a parent folder, which is not an AFM project. The operator must point to the
|
|
21
|
+
contract file. Without one, ask for it in plain words and stop.
|
|
22
|
+
|
|
23
|
+
## Procedure (judgment only)
|
|
24
|
+
|
|
25
|
+
Map honestly: an obligation is `hard` only when a built-in check can prove it, and every entry cites
|
|
26
|
+
its clause. Outside an AFM project `afm ask` exits 1: put the op's two questions to the operator in plain
|
|
27
|
+
words, and never install without an explicit `install-now`.
|
package/package.json
CHANGED
package/plugin/agy/plugin.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-obligations
|
|
3
|
+
description: |
|
|
4
|
+
Maps a contract into an obligations root in a parent folder that holds a client's repositories. Each obligation of the operator becomes a typed entry, and git enforces the mechanical ones on every repository below the folder, with no AI and no harness. It never gives legal advice.
|
|
5
|
+
Activates: `afm-obligations`, "map this contract", "turn my contract into rules", "what does this contract make me do", "set up the obligations for this client folder".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Obligations (map a contract into an obligations root)
|
|
9
|
+
|
|
10
|
+
> **Procedure.** Run `afm read ops/obligations.md` and follow it; read an on-demand section when its condition holds.
|
|
11
|
+
|
|
12
|
+
The CLI owns the scaffold, the schema, the lint, the approvals log and the hooks. This skill keeps the
|
|
13
|
+
judgment: reading the contract and mapping each obligation honestly.
|
|
14
|
+
|
|
15
|
+
## When NOT to activate
|
|
16
|
+
|
|
17
|
+
To record an approval the operator received, run `afm approval add`. To check a project's code against
|
|
18
|
+
the AFM rules, run `afm gate`. A project's own rules belong to `afm-rule`.
|
|
19
|
+
|
|
20
|
+
## Pre-check
|
|
21
|
+
|
|
22
|
+
None: the op runs in a parent folder, which is not an AFM project. The operator must point to the
|
|
23
|
+
contract file. Without one, ask for it in plain words and stop.
|
|
24
|
+
|
|
25
|
+
## Procedure (judgment only)
|
|
26
|
+
|
|
27
|
+
Map honestly: an obligation is `hard` only when a built-in check can prove it, and every entry cites
|
|
28
|
+
its clause. Outside an AFM project `afm ask` exits 1: put the op's two questions to the operator in plain
|
|
29
|
+
words, and never install without an explicit `install-now`.
|
|
30
|
+
|
|
31
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "afm",
|
|
3
3
|
"description": "Agent Flow Methodology: autonomous discovery, a strict TDD delivery loop, and documentation that evolves from measured evidence. The CLI owns state, ids, gates and lint; the skills carry the judgment.",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.11",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mapree"
|
|
7
7
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obligations
|
|
3
|
+
description: |
|
|
4
|
+
Maps a contract into an obligations root in a parent folder that holds a client's repositories. Each obligation of the operator becomes a typed entry, and git enforces the mechanical ones on every repository below the folder, with no AI and no harness. It never gives legal advice.
|
|
5
|
+
Activates: `/afm:obligations`, "map this contract", "turn my contract into rules", "what does this contract make me do", "set up the obligations for this client folder".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Obligations (map a contract into an obligations root)
|
|
9
|
+
|
|
10
|
+
> **Procedure.** Run `afm read ops/obligations.md` and follow it; read an on-demand section when its condition holds.
|
|
11
|
+
|
|
12
|
+
The CLI owns the scaffold, the schema, the lint, the approvals log and the hooks. This skill keeps the
|
|
13
|
+
judgment: reading the contract and mapping each obligation honestly.
|
|
14
|
+
|
|
15
|
+
## When NOT to activate
|
|
16
|
+
|
|
17
|
+
To record an approval the operator received, run `afm approval add`. To check a project's code against
|
|
18
|
+
the AFM rules, run `afm gate`. A project's own rules belong to `/afm:rule`.
|
|
19
|
+
|
|
20
|
+
## Pre-check
|
|
21
|
+
|
|
22
|
+
None: the op runs in a parent folder, which is not an AFM project. The operator must point to the
|
|
23
|
+
contract file. Without one, ask for it in plain words and stop.
|
|
24
|
+
|
|
25
|
+
## Procedure (judgment only)
|
|
26
|
+
|
|
27
|
+
Map honestly: an obligation is `hard` only when a built-in check can prove it, and every entry cites
|
|
28
|
+
its clause. Outside an AFM project `afm ask` exits 1: put the op's two questions to the operator in plain
|
|
29
|
+
words, and never install without an explicit `install-now`.
|
|
30
|
+
|
|
31
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-obligations
|
|
3
|
+
description: |
|
|
4
|
+
Maps a contract into an obligations root in a parent folder that holds a client's repositories. Each obligation of the operator becomes a typed entry, and git enforces the mechanical ones on every repository below the folder, with no AI and no harness. It never gives legal advice.
|
|
5
|
+
Activates: `afm-obligations`, "map this contract", "turn my contract into rules", "what does this contract make me do", "set up the obligations for this client folder".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Obligations (map a contract into an obligations root)
|
|
9
|
+
|
|
10
|
+
> **Procedure.** Run `afm read ops/obligations.md` and follow it; read an on-demand section when its condition holds.
|
|
11
|
+
|
|
12
|
+
The CLI owns the scaffold, the schema, the lint, the approvals log and the hooks. This skill keeps the
|
|
13
|
+
judgment: reading the contract and mapping each obligation honestly.
|
|
14
|
+
|
|
15
|
+
## When NOT to activate
|
|
16
|
+
|
|
17
|
+
To record an approval the operator received, run `afm approval add`. To check a project's code against
|
|
18
|
+
the AFM rules, run `afm gate`. A project's own rules belong to `afm-rule`.
|
|
19
|
+
|
|
20
|
+
## Pre-check
|
|
21
|
+
|
|
22
|
+
None: the op runs in a parent folder, which is not an AFM project. The operator must point to the
|
|
23
|
+
contract file. Without one, ask for it in plain words and stop.
|
|
24
|
+
|
|
25
|
+
## Procedure (judgment only)
|
|
26
|
+
|
|
27
|
+
Map honestly: an obligation is `hard` only when a built-in check can prove it, and every entry cites
|
|
28
|
+
its clause. Outside an AFM project `afm ask` exits 1: put the op's two questions to the operator in plain
|
|
29
|
+
words, and never install without an explicit `install-now`.
|
|
30
|
+
|
|
31
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|