Commit 122ed49
committed
feat(primer): RFC-0004 full implementation with value-based selection
## Added
- Full RFC-0004 primer implementation with value-based section selection
- 4-phase selection algorithm: required β conditional β safety β value-optimized
- Multi-dimensional scoring (safety, efficiency, accuracy, base)
- 37 sections across 6 categories from primer.defaults.json
- New CLI options: --format, --preset, --include, --exclude, --categories
- Introspection: --list-sections, --list-presets, --preview, --explain
- Dynamic sections from cache (constraints, domains, hacks, attempts)
- Project customization via .acp/primer.json
- MCP/shell capability filtering
## Changed
- Primer tier names: survival, essential, operational, informed, complete, expert
- Value-per-token optimization replaces fixed tier system
## Fixed
- acp constraints β acp check in primer.defaults.json (4 locations)
- MCP capability filtering now properly excludes shell-only sections
## Infrastructure
- New src/primer/ module (8 files, ~2000 LOC)
- 20 primer-specific tests
- Updated README.md and cli.md documentation
BREAKING CHANGE: None - backward compatible with existing primer API1 parent 866e44c commit 122ed49
16 files changed
Lines changed: 2403 additions & 434 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
10 | 39 | | |
11 | 40 | | |
12 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | | - | |
| 612 | + | |
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
618 | | - | |
619 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
620 | 621 | | |
621 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
622 | 639 | | |
623 | 640 | | |
624 | | - | |
| 641 | + | |
625 | 642 | | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
631 | 649 | | |
632 | 650 | | |
633 | 651 | | |
634 | 652 | | |
635 | 653 | | |
636 | 654 | | |
637 | 655 | | |
638 | | - | |
639 | | - | |
| 656 | + | |
| 657 | + | |
640 | 658 | | |
641 | | - | |
642 | | - | |
| 659 | + | |
| 660 | + | |
643 | 661 | | |
644 | | - | |
645 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
646 | 667 | | |
647 | | - | |
648 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
649 | 676 | | |
650 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
651 | 686 | | |
652 | 687 | | |
653 | 688 | | |
| |||
- .claude/memory/rfc-finalized-0008.md+176
- .claude/memory/rfc-status-0008.md+55
- .claude/memory/rfc-test-0008.md+125
- CHANGELOG.md+58
- rfcs/README.md+1-1
- rfcs/rfc-0008-acp-type-annotations.md+4-2
- rfcs/rfc-0009-extended-annotation-types.md+5-5
- rfcs/rfc-0013-mcp-server-tool-completeness.md
- rfcs/rfc-0014-windows-service-support.md+872
- schemas/v1/cache.schema.json+101
- spec/chapters/03-cache-format.md+88-4
- spec/chapters/05-annotations.md+504-3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments