@albinocrabs/feynman 0.2.1 → 0.2.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feynman",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "Auto-inject ASCII diagram rules into Codex and Claude Code prompts.",
5
5
  "author": {
6
6
  "name": "apolenkov",
package/CHANGELOG.md CHANGED
@@ -2,11 +2,58 @@
2
2
 
3
3
  All notable changes to this project are documented here.
4
4
 
5
- ## 0.2.1 - 2026-05-07
5
+ ## 0.2.4 - 2026-05-07
6
6
 
7
- Changes since v0.2.0.
7
+ Changes since v0.2.2.
8
+
9
+ ### Fixes
10
+
11
+ - normalize hook bypass docs and lint-safe examples
12
+
13
+ ### CI/CD
14
+
15
+ - make coverage badge commit non-blocking on protected branch
16
+ - stabilize release note extraction by version section
17
+ - auto-update release notes and add npm publish verification
18
+
19
+ ### Documentation
20
+
21
+ - expand examples gallery and add activity sequence
22
+ - update changelog for v0.2.3
23
+ - add advanced before-after examples
8
24
 
9
25
  ### Maintenance
10
26
 
11
- - add open-source automation
27
+ - v0.2.4
28
+ - regenerate changelog for 0.2.3 updates
29
+ - auto-merge #2
30
+ - finalize launch docs, examples and PR auto-merge wiring
31
+ - complete v0.2.0 milestone audit docs
32
+ - sync plugin manifest versions for 0.2.2
33
+
34
+ ## 0.2.3 - 2026-05-07
35
+
36
+ Changes since v0.2.2.
37
+
38
+ ### Fixes
39
+
40
+ - normalize hook bypass docs and lint-safe examples
41
+
42
+ ### CI/CD
43
+
44
+ - make coverage badge commit non-blocking on protected branch
45
+ - stabilize release note extraction by version section
46
+ - auto-update release notes and add npm publish verification
47
+
48
+ ### Documentation
49
+
50
+ - expand examples gallery and add activity sequence
51
+ - update changelog for v0.2.3
52
+ - add advanced before-after examples
53
+
54
+ ### Maintenance
12
55
 
56
+ - auto-merge #2
57
+ - finalize launch docs, examples and PR auto-merge wiring
58
+ - complete v0.2.0 milestone audit docs
59
+ - sync plugin manifest versions for 0.2.2
package/CONTRIBUTING.md CHANGED
@@ -47,6 +47,7 @@ Before opening a pull request:
47
47
  - [ ] `README.md` updated if a user-facing feature changed
48
48
  - [ ] Commit message follows the format: `type(scope): description`
49
49
  (types: `feat`, `fix`, `test`, `docs`, `refactor`, `chore`)
50
+ - [ ] Add labels `auto-merge` and `status:ready` when the PR is fully reviewed and safe to merge automatically
50
51
 
51
52
  ---
52
53
 
package/README.md CHANGED
@@ -19,6 +19,7 @@
19
19
 
20
20
  <p align="center">
21
21
  <a href="#why-feynman">Why</a> •
22
+ <a href="docs/object-passport.md">Passport</a> •
22
23
  <a href="#before--after">Before/After</a> •
23
24
  <a href="#install">Install</a> •
24
25
  <a href="#intensity-levels">Levels</a> •
@@ -35,7 +36,7 @@ plugin that automatically injects ASCII diagram rules into every prompt via the
35
36
  `UserPromptSubmit` hook.
36
37
 
37
38
  ```bash
38
- npx -y @albinocrabs/feynman@latest install --target both
39
+ npx -y @albinocrabs/feynman@latest install --target all
39
40
  npx -y @albinocrabs/feynman@latest doctor --target codex
40
41
  ```
41
42
 
@@ -47,6 +48,15 @@ Code or Codex prompt and injects rules that turn flows into arrows,
47
48
  hierarchies into trees, comparisons into columns, and status into frames. The
48
49
  structure is visible before you have to think about it.
49
50
 
51
+ Conceptually, feynman is inspired by prompt-compression ideas from the Caveman
52
+ agent style: smaller prompts, clearer intent, and explicit diagram-first thinking.
53
+
54
+ ## Governance docs
55
+
56
+ - `AGENTS.md` — project execution contract for Codex-aware tooling.
57
+ - `CLAUDE.md` — canonical project memory, stack, and architecture constraints.
58
+ - Global instructions are loaded from user-level runtime configuration before repo-specific overrides.
59
+
50
60
  ## Before / After
51
61
 
52
62
  <table>
@@ -136,10 +146,10 @@ free | free | $$$
136
146
 
137
147
  ## Install
138
148
 
139
- **Claude Code via npx:**
149
+ **Install to Codex by default (when --target is omitted):**
140
150
 
141
151
  ```bash
142
- npx @albinocrabs/feynman install --target claude
152
+ npx @albinocrabs/feynman install
143
153
  ```
144
154
 
145
155
  **Codex via npx:**
@@ -151,7 +161,7 @@ npx @albinocrabs/feynman install --target codex
151
161
  **Both clients:**
152
162
 
153
163
  ```bash
154
- npx @albinocrabs/feynman install --target both
164
+ npx @albinocrabs/feynman install --target all
155
165
  ```
156
166
 
157
167
  The install command is idempotent: running it again updates the existing
@@ -167,7 +177,7 @@ Restart Claude Code or Codex. Done.
167
177
 
168
178
  **Verify:** `npx @albinocrabs/feynman doctor --target claude` or `npx @albinocrabs/feynman doctor --target codex`
169
179
 
170
- **Uninstall:** `npx @albinocrabs/feynman uninstall --target claude|codex|both`
180
+ **Uninstall:** `npx @albinocrabs/feynman uninstall --target claude|codex|both|all|*`
171
181
 
172
182
  **Plugin manifests:** this repo also ships `.claude-plugin/plugin.json`,
173
183
  `hooks/hooks.json`, `.codex-plugin/plugin.json`, and `hooks.json` so plugin
@@ -253,16 +263,221 @@ npx @albinocrabs/feynman lint response.md
253
263
 
254
264
  See [docs/lint-rules.md](docs/lint-rules.md) for the full L01-L08 reference.
255
265
 
266
+ ### Quick hard-disable / re-enable (testing and emergency)
267
+
268
+ For temporary global disable in Codex (for smoke tests or troubleshooting), use:
269
+
270
+ ```bash
271
+ touch ~/.codex/.feynman-disable-global # hard OFF
272
+ rm ~/.codex/.feynman-disable-global # hard ON
273
+ ```
274
+
275
+ This bypasses `~/.codex/hooks.json` hook execution entirely.
276
+ Regular `/feynman off` and `/feynman on` continue to use normal profile state
277
+ files (`~/.codex/.feynman-active`, `~/.codex/.feynman/state.json`).
278
+
279
+ ## CLI examples
280
+
281
+ Quickly discover and view repository prompt templates:
282
+
283
+ ```bash
284
+ feynman examples
285
+ feynman examples --name feature-planning
286
+ feynman examples --name incident-response
287
+ feynman examples --random
288
+ ```
289
+
290
+ Export a ready-to-distribute local package (examples, rules, plugins, and skill):
291
+
292
+ ```bash
293
+ feynman bootstrap
294
+ feynman bootstrap --out ./feynman-package
295
+ feynman bootstrap --out ./feynman-package --force
296
+ ```
297
+
298
+ This is useful for disconnected/air-gapped installs where you want to copy one
299
+ folder with all `Feynman` assets instead of depending on `npm`.
300
+
301
+ Slash command aliases (inside Claude/Codex):
302
+
303
+ ```text
304
+ /feynman on | off
305
+ /feynman start | stop
306
+ /feynman lite | full | ultra
307
+ /feynman status
308
+ ```
309
+
256
310
  ## Examples
257
311
 
258
- Domain-specific examples showing feynman in practice:
312
+ Run a concrete example in the needed style:
313
+
314
+ ```bash
315
+ feynman examples --name <example-name>
316
+ ```
317
+
318
+ > Tip: all examples are ready-to-run templates in `examples/*.md`, can be copied into prompts or docs, and rendered as a compact ASCII layout with `feynman examples --name ...`.
319
+
320
+ ```text
321
+ [Flow] [Architecture] [API] [Decisions]
322
+ | | | |
323
+ v v v v
324
+ [Action] [System] [Lifecycle] [Reasoning]
325
+ ↓ ↓ ↓ ↓
326
+ [Outcome] [Design] [Change] [Choice]
327
+ ```
328
+
329
+ ## Visual example gallery
330
+
331
+ ### Flow and actioning
332
+
333
+ #### Incident-ready action playbooks
334
+
335
+ - [Activity sequence](examples/activity-sequence.md) — incident action plans with rollback gates
336
+ ```
337
+ [Incident] --> [Triage] --> [Contain] --> [Mitigate] --> [Review]
338
+ | no |
339
+ v |
340
+ [Rollback] <----+
341
+ ```
342
+ - [Incident response](examples/incident-response.md) — triage and containment sequence
343
+ ```
344
+ [Detect] --> [Classify] --> [Isolate] --> [Communicate]
345
+ |
346
+ +--> [Recover]
347
+ ```
348
+ - [Bug isolation](examples/bug-isolation.md) — stateful diagnostic flow with priorities
349
+ ```
350
+ ▲ high
351
+ high-likelihood
352
+ ▼ low
353
+ narrow scope
354
+ documentation
355
+ ```
356
+ - [Release readiness](examples/release-readiness.md) — staged launch gates and recovery triggers
357
+ ```
358
+ [Build] --> [QA] --> [Dark launch] --> [General]
359
+ | no | yes
360
+ v v
361
+ [Rollback] [Monitor]
362
+ ```
363
+
364
+ ### Architecture and design
365
+
366
+ - [Architecture review](examples/architecture-review.md) — auth system decomposition
367
+ ```
368
+ Auth
369
+ ├── Service
370
+ │ ├── Redis rate limits
371
+ │ └── Postgres users
372
+ └── Observability
373
+ └── Events
374
+ ```
375
+ - [C4 platform design](examples/c4-platform-diagramming.md) — context → container → component
376
+ ```
377
+ [User] --> [Web] --> [API] --> [DB]
378
+ ```
379
+ - [Context splitting](examples/context-splitting.md) — decomposing complex initiatives
380
+ ```
381
+ Initiative
382
+ ├── Domain A
383
+ ├── Domain B
384
+ └── Domain C
385
+ ```
386
+ - [Database schema](examples/db-schema.md) — entity model as structured tree
387
+ ```
388
+ Report
389
+ ├── Metadata
390
+ ├── Sections
391
+ └── History
392
+ ```
393
+
394
+ ### API and migration
395
+
396
+ - [API flow](examples/api-flow.md) — request lifecycle with branch diagnostics
397
+ ```
398
+ [Client] --> [Auth] --> [Service] --> [DB]
399
+ | yes |
400
+ +-->[Cache] ---+
401
+ ```
402
+ - [Deploy pipeline](examples/deploy-pipeline.md) — CI/CD action chain
403
+ ```
404
+ [Source] --> [Build] --> [Test] --> [Canary] --> [Scale]
405
+ | |
406
+ v +--> [Rollback]
407
+ ```
408
+ - [Service migration](examples/service-migration.md) — cutover with risk controls
409
+ ```
410
+ [Old service] --> [Dual write] --> [Read compare] --> [Cut over]
411
+ | mismatch
412
+ v
413
+ [Stop migration]
414
+ ```
415
+
416
+ ### Decisions and methods
417
+
418
+ - [Feature planning](examples/feature-planning.md) — decision matrix + phased rollout
419
+ ```
420
+ [Need] --> [Plan] --> [Run experiment] --> [Scale]
421
+ | |
422
+ +--> [Kill-switch]
423
+ ```
424
+ - [Algorithm walkthrough](examples/algorithm-explain.md) — rate-limiter logic as explainable sequence
425
+ ```
426
+ [Need decision?] --> [Compute score] --> [Allow / Deny]
427
+ ```
428
+ - [Code review](examples/code-review.md) — issue prioritization and evidence matrix
429
+ ```
430
+ ▲ must-fix [security]
431
+ ▲ medium [performance]
432
+ ▼ low [docs]
433
+ ```
434
+
435
+ ### One-command pack test
436
+
437
+ ```bash
438
+ feynman examples --name activity-sequence && \
439
+ feynman examples --name incident-response && \
440
+ feynman examples --name c4-platform-diagramming
441
+ ```
259
442
 
260
- - [Architecture review](examples/architecture-review.md) auth service topology
261
- - [API flow](examples/api-flow.md) — POST /api/login request lifecycle
262
- - [Database schema](examples/db-schema.md) e-commerce entity model
263
- - [Algorithm walkthrough](examples/algorithm-explain.md) — token-bucket rate limiter
264
- - [Deploy pipeline](examples/deploy-pipeline.md) — monorepo CI/CD
265
- - [Code review](examples/code-review.md) — priority + comparison diagrams
443
+ ## Visual gallery (before after)
444
+
445
+ If you want to quickly see how diagram-first responses evolve, this is the core pattern:
446
+
447
+ Without feynman:
448
+
449
+ `We need to choose between shipping fast with a managed API, keeping control in-house, or a hybrid path while managing risk and cost.`
450
+
451
+ With feynman:
452
+
453
+ ```
454
+ [Is SLA strict?] --> [Yes] --> [Prefer managed service]
455
+ | | |
456
+ | v v
457
+ | [Contract + vendor risk] --> [Is rollback cheap?]
458
+ | |
459
+ v +--> [Yes] --> [Adopt + guardrails]
460
+ [Can we build fast?] +--> [No] --> [Hybrid path]
461
+ |
462
+ no ------ +------- yes
463
+ | |
464
+ v v
465
+ [Build in house] [Run controlled managed pilot]
466
+ ```
467
+
468
+ Same brief question, different clarity level.
469
+
470
+ ```
471
+ criterion | build in-house | managed API | hybrid
472
+ ---------------|----------------|-------------|----------------
473
+ launch speed | slow | fast | medium
474
+ vendor lock-in | low | high | medium
475
+ compliance | high control | partner SLA | custom controls
476
+ cost | low initial | medium | medium-high
477
+ ```
478
+
479
+ Use this gallery style if you want `feynman` examples to look “production-clean”
480
+ from day one.
266
481
 
267
482
  ## How it works
268
483
 
@@ -289,7 +504,10 @@ the model on every message.
289
504
  Every push runs tests on Node 18 and 20 across Ubuntu and macOS. The release
290
505
  lane also lints public docs, smoke-tests the packed npm tarball, builds a
291
506
  `dist/*.tgz` artifact, and can publish to npm from a GitHub Release when
292
- `NPM_TOKEN` is configured.
507
+ `NPM_TOKEN` is configured. If the token is absent and the package version is
508
+ already published, the workflow updates release notes and exits successfully;
509
+ for a new publish, it fails with a clear message so token-less publication
510
+ cannot silently pass.
293
511
 
294
512
  ```bash
295
513
  npm run ci
@@ -297,6 +515,24 @@ npm run changelog
297
515
  npm run build
298
516
  ```
299
517
 
518
+ ### GitHub release path
519
+
520
+ 1. Tag and release from GitHub (or run workflow_dispatch with `dry_run=false`).
521
+ 2. Ensure repository secret `NPM_TOKEN` is set (only needed for first publish
522
+ of a new version).
523
+ 3. Keep version/tag aligned: release tag must equal `package.json` with `v`
524
+ prefix (enforced by workflow).
525
+ 4. Create release notes generated from `CHANGELOG.md` and verify package
526
+ availability after publish.
527
+ 5. Mark PRs for auto-merge with labels `auto-merge` and `status:ready` and
528
+ keep required review approvals in place.
529
+
530
+ Set or rotate `NPM_TOKEN` with:
531
+
532
+ ```bash
533
+ gh secret set NPM_TOKEN -r apolenkov/feynman
534
+ ```
535
+
300
536
  State is stored at `~/.claude/.feynman/state.json`. First run bootstraps
301
537
  automatically. See [docs/architecture.md](docs/architecture.md) for internals.
302
538
 
package/SECURITY.md CHANGED
@@ -29,3 +29,14 @@ feynman is a local hook package. The main security-sensitive surfaces are:
29
29
  - state files under `~/.claude/.feynman/` and `~/.codex/.feynman/`
30
30
 
31
31
  The package has zero runtime npm dependencies.
32
+
33
+ ## Release Security Checklist
34
+
35
+ Before publishing a new npm version:
36
+
37
+ - CI required checks must pass on Node 18 and 20 across Ubuntu and macOS.
38
+ - `npm run audit` must pass at `moderate` severity or higher.
39
+ - GitHub release tag must match `package.json` version with a `v` prefix.
40
+ - GitHub Actions secret `NPM_TOKEN` must be present for first publish of a new version.
41
+ - npm provenance is enabled in the release workflow.
42
+ - Registry smoke verification must pass after publish (`npm view`, install from npm, `feynman doctor --target both`).