codexkit 1.0.3 → 1.0.5
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/.codex/.template-manifest.json +19 -18
- package/.codex/.version +1 -1
- package/.codex/agents/scout.toml +42 -1
- package/.codex/config.toml +24 -5
- package/.codex/mcp/README.md +28 -1
- package/.codex/mcp/context7.toml.example +22 -7
- package/.codex/mcp/exa.toml.example +33 -7
- package/.codex/memory/_templates/project.md +8 -0
- package/.codex/memory/_templates/session-context.md +8 -0
- package/.codex/memory/_templates/state.md +10 -0
- package/.codex/memory/_templates/tech-stack.md +9 -0
- package/.codex/memory/_templates/user.md +6 -0
- package/.codex/prompts/resume.md +6 -0
- package/.codex/prompts/search.md +78 -0
- package/.codex/scripts/audit_memory_hygiene.sh +65 -0
- package/.codex/scripts/build_startup_brief.sh +15 -0
- package/.codex/skills/compaction/SKILL.md +76 -125
- package/.codex/skills/context-management/SKILL.md +65 -55
- package/.codex/skills/session-management/SKILL.md +12 -5
- package/.template-manifest.json +19 -18
- package/CHANGELOG.md +26 -0
- package/README.md +2 -1
- package/bin/codexkit +3 -3
- package/bin/codexkit.js +87 -0
- package/install/install-global.sh +93 -52
- package/install/install-project.sh +211 -117
- package/install/validate.sh +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.4",
|
|
3
3
|
"generator": "codexkit",
|
|
4
4
|
"files": {
|
|
5
5
|
"templates/global/AGENTS.override.md": "11039408f8776171820ce34165b5da6d52a703d26a938fb773e231a159eefe2c",
|
|
6
6
|
"templates/global/.codex-config-template.toml": "aa3490d544eded2ab1eff3eee89823884d1d0085c502eceb604d89408a94848d",
|
|
7
7
|
"templates/project/.codex-config-template.toml": "dc8ded8af4deaf39155d5fdddeabf0763af5293f24e3477ec871d59fd8530e80",
|
|
8
8
|
"templates/project/AGENTS.md.template": "acb5ea31fd561ddbbc79c6baf6de98b990bbac693ba6d836406d270a1f27a981",
|
|
9
|
-
".codex/config.toml": "
|
|
9
|
+
".codex/config.toml": "2079664ff35b0b5b05187c1fa5e6b4fdb0b8df24fff5e69ab9297956459d1b16",
|
|
10
10
|
".codex/.env.example": "1827612829279fad025404b763ea214412bd5cd53474ad315909a8c275f12b84",
|
|
11
|
-
".codex/.version": "
|
|
11
|
+
".codex/.version": "d1b77b88f4b9f675a900e4143ac768a21218623cfe1703ca43162388c3271bd6",
|
|
12
12
|
".codex/agents/builder.toml": "b4e887e5ad5202337b0fda9815588db0eec2deee8fdfbdb8dad6bf2df6bf3d30",
|
|
13
13
|
".codex/agents/debugger.toml": "e67fdaee1807c2d8c40b2752737d6e1f535a0c52d863cc76eb9c8059f292bc13",
|
|
14
14
|
".codex/agents/general.toml": "274489e5d726ee11fc5d9ec43d44c4b7bc1ac22b435ad536af8818c6d430d46c",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
".codex/agents/refactorer.toml": "0de4d73931352edbef9dcff4bfd6ad4fb61ff10ba5fcf330d724e5f4193fdd67",
|
|
18
18
|
".codex/agents/reviewer.toml": "8634aac733cbf2e9c8d5ad81fc22a17c239156c1d78edb15e94b6f63488c1177",
|
|
19
19
|
".codex/agents/runner.toml": "cb3baca8eb358ace7c4b63f39ec6de0833b6e46655ccf816b0a553ec25faa677",
|
|
20
|
-
".codex/agents/scout.toml": "
|
|
20
|
+
".codex/agents/scout.toml": "ff411e1a10f9ff99cdc92e345be92e5bfa674f6d9dd03ca03dab7d5b31895252",
|
|
21
21
|
".codex/agents/shipper.toml": "940c3ffd2c467e11def4c4d87bae4c5244deee42bc48009cabbf1a07009eac4b",
|
|
22
22
|
".codex/agents/vision.toml": "430a3b9ae1f8d2322791b2683ea7cf1ca5dad353f00f2b6c2c09fd8bfe9acbe4",
|
|
23
23
|
".codex/prompts/compound.md": "2f3f713031c6a2591cf257a47f8909874ff0f94cf7a6663eeb8fe30fc1ae2a2e",
|
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
".codex/prompts/plan.md": "f47aeb00d01167d5fee372115043fbfcac86216d59987ec16f67e7058aad6c42",
|
|
32
32
|
".codex/prompts/pr.md": "0866ed92ac74447ce01c955f49b00f055c5a244f80bd12a5f679f3860b776212",
|
|
33
33
|
".codex/prompts/research.md": "0ab8c8652d789ffc62a13ef6f7d533f63db77d8292dfaba4888a13a8eddb9d23",
|
|
34
|
-
".codex/prompts/resume.md": "
|
|
34
|
+
".codex/prompts/resume.md": "02b286294fcd2c58a2e3c0a77995eefc9c76319dbbc54e35fc1208f06c7fca99",
|
|
35
35
|
".codex/prompts/review-codebase.md": "07f6ea450c02f820871edb2c5432d364dfa8e87bd662f13ba305ccb2cc25a5de",
|
|
36
|
+
".codex/prompts/search.md": "f648fbfa84e16654981e262fb233a1e23b2525790f0698da5bc2bbc8aea60ad0",
|
|
36
37
|
".codex/prompts/ship.md": "bf0eee8272c2ffab78574aef940be07e7dcf4129b7aa9d1368d850be16cde099",
|
|
37
38
|
".codex/prompts/start.md": "4abc1166ae6657070ec3162610504e8e4ba19df595e4552fe30bae70561999e3",
|
|
38
39
|
".codex/prompts/status.md": "c742f0b64b08f59fceb3eb90e1693a81de421c2311eb553f85793faed19e1bca",
|
|
@@ -323,12 +324,12 @@
|
|
|
323
324
|
".codex/skills/cloudflare/references/zaraz/README.md": "c1fd43e131dd57576c84b10c4bc12b92d17ce8a837d042c0ed0e9ec5ab2fd256",
|
|
324
325
|
".codex/skills/code-navigation/SKILL.md": "bd35077d9afd8becb5f0813e9ced5c214daf6e5aad3926270091cb731fe58e28",
|
|
325
326
|
".codex/skills/code-review/SKILL.md": "3f7d6b61adbe4eb68bc6907721d1ad7d74c474a6eb0a6784ea0163945d272cad",
|
|
326
|
-
".codex/skills/compaction/SKILL.md": "
|
|
327
|
+
".codex/skills/compaction/SKILL.md": "d85f33180d26148d500ef6501e421513bec349f9078d4a5a47f70341088a2a01",
|
|
327
328
|
".codex/skills/condition-based-waiting/SKILL.md": "cf3c747488745c6e51e62bbf1e84b3cb868aac05ff3f8c245e65aa9ab4a0c5a8",
|
|
328
329
|
".codex/skills/condition-based-waiting/example.ts": "e35f816255c50db93421c8b5f165a6efbc3baa0856ce66a44edc7b34c0bd3608",
|
|
329
330
|
".codex/skills/context-engineering/SKILL.md": "1dcd750d778aebbf11f5ac09ace26b5ebd69f4d7e68994f53c22464a74e430b5",
|
|
330
331
|
".codex/skills/context-initialization/SKILL.md": "5fbf8502303789fffba37f62fa274f9e7fece31935859d5c9f0be3bfd3b14764",
|
|
331
|
-
".codex/skills/context-management/SKILL.md": "
|
|
332
|
+
".codex/skills/context-management/SKILL.md": "e6e39288a95776860126c1b65a8b4143046858455960b9b1b19f055de6d24fb8",
|
|
332
333
|
".codex/skills/core-data-expert/SKILL.md": "f8db3769edd501b86795d3ea43dd32060060dd1ab9f905055fea9301f07009a6",
|
|
333
334
|
".codex/skills/core-data-expert/references/batch-operations.md": "96ab160c97b15b661de854bd24a2e5e3a9b8ec05a51009f5fe98ad887e52e0e7",
|
|
334
335
|
".codex/skills/core-data-expert/references/cloudkit-integration.md": "550039d328a43519a2fb50ce3d8d8572a2ab8253991aa919ec33b849b60b56a8",
|
|
@@ -455,7 +456,7 @@
|
|
|
455
456
|
".codex/skills/root-cause-tracing/SKILL.md": "ff1002204c1ec1b1de54a77886edb0cd7c7d1d97a2b571a861818b2a466bba85",
|
|
456
457
|
".codex/skills/root-cause-tracing/find-polluter.sh": "6462747eae9b175ac145b78bcfaeab755654a75e32637f08eb633f065a9e1d7c",
|
|
457
458
|
".codex/skills/safe-implementation/SKILL.md": "fd92709e320b3ccbaa76fe5259424439ab769a67e8d72830f780fde8210ce2da",
|
|
458
|
-
".codex/skills/session-management/SKILL.md": "
|
|
459
|
+
".codex/skills/session-management/SKILL.md": "53532fa06e003a7dfd62afa0b8b7d4f1c8ac0967b35f1d5bd8734668417d276b",
|
|
459
460
|
".codex/skills/sharing-skills/SKILL.md": "c662da5bd3907b987121854efddd90a266db902d1662e62b4e6054e3f03d07dd",
|
|
460
461
|
".codex/skills/skill-creator/SKILL.md": "c574e634e616905287338f6cad0359ef471a6f241cd888cabcebfa1710d2a71d",
|
|
461
462
|
".codex/skills/source-code-research/SKILL.md": "0ec5a37e92c81505de40e37c190f1d64c870e8c5e75636ea76901f1d05fc265f",
|
|
@@ -585,10 +586,10 @@
|
|
|
585
586
|
".codex/hooks/stop.sh": "7008c4a7a6fba302b0f589c65370b0bf8444a2c7b2114117521b9ea09041cfc3",
|
|
586
587
|
".codex/scripts/append_worklog.sh": "44b7d6f00f4be6aec77081c7c74d9891cb12b6096f29204903ae544991172591",
|
|
587
588
|
".codex/scripts/apply_worklog_archive.sh": "416958f91d760a09183235c2d7a67faa0a006351652bf743da7045273129c49c",
|
|
588
|
-
".codex/scripts/audit_memory_hygiene.sh": "
|
|
589
|
+
".codex/scripts/audit_memory_hygiene.sh": "9739a42d176db2002d81f0626c3458eda2004a4fdeeefe2c0b2797d10cb240b1",
|
|
589
590
|
".codex/scripts/build_memory_index.sh": "247ecaed52d305dcf6651f137c8e762e7b4661781af16df8a296b3da19ad96b8",
|
|
590
591
|
".codex/scripts/build_prior_related_work.sh": "08d226f318eb4859529f774b9e03daaee4c70d17e814422cddb6f1c1efd52313",
|
|
591
|
-
".codex/scripts/build_startup_brief.sh": "
|
|
592
|
+
".codex/scripts/build_startup_brief.sh": "7130ae1c5a56c79f66c6450a558f3f6b9642ed34df8696b2fde82d1d287caddf",
|
|
592
593
|
".codex/scripts/close_bead.sh": "90944f59945a440280b958924858e1bb515e60bbc36805e26387da77ef657022",
|
|
593
594
|
".codex/scripts/detect_changed_files.sh": "10633eda525c32ac0a1410239117f8ede5d23ae7faba4108b3f3e9096ffed366",
|
|
594
595
|
".codex/scripts/ensure_beads.sh": "9f69036f7fdb332f2089b4a58afdc55d982612cc004d98628bfd0b311f74e078",
|
|
@@ -599,10 +600,10 @@
|
|
|
599
600
|
".codex/scripts/sync_bead_context.sh": "6b8d6908cffbbf8fdbf5bf548e09788d504daddce092bd7112eee695882a64a7",
|
|
600
601
|
".codex/scripts/validate_memory_docs.sh": "a0a2b184db21dae92c88a0ea837be8bcaf7a47150392034d3110842f266c4afc",
|
|
601
602
|
".codex/scripts/verify_bead.sh": "16571365aa54f300ec2554573f13bd74c37b22bfc54e1c09d5b55553855a0add",
|
|
602
|
-
".codex/mcp/README.md": "
|
|
603
|
+
".codex/mcp/README.md": "e03cb3c5cd228692c5f573b1ead8e2b0f2effda361ec43721617029d561f3083",
|
|
603
604
|
".codex/mcp/basic-memory.toml.example": "b40ef19861a8f29d3d78d7b166474cc4d44e79362bf5fc81942754609ff4ee3c",
|
|
604
|
-
".codex/mcp/context7.toml.example": "
|
|
605
|
-
".codex/mcp/exa.toml.example": "
|
|
605
|
+
".codex/mcp/context7.toml.example": "658967017443c6c9d6b181694767c3f97180c2febdc050cc3747de2b3ae2b761",
|
|
606
|
+
".codex/mcp/exa.toml.example": "bc746ddc0fc9e88cbaa14d8b6cff1b3d3a5e04e587722b7a82d79d18a6cd21d4",
|
|
606
607
|
".codex/mcp/memory-bridge.toml.example": "3689f1b04410463c2e648e437e16c30901a7b1c5e165255e03b3552c9a4b03e8",
|
|
607
608
|
".codex/mcp/memory.toml.example": "3c5575ebd822729023220c7a6c7f7a6a7e0ac9e43edbf7e0665d4e06938fb8e7",
|
|
608
609
|
".codex/mcp/ref.toml.example": "a7a5d84b04f9d7a35282e91eb45111a0d7ddb185cdc8326461a8306d9b5d802b",
|
|
@@ -621,15 +622,15 @@
|
|
|
621
622
|
".codex/memory/_templates/gotcha.md": "bf06bb72050dd71afb543d9ac9480f35ac240100fe8221ae855cf286dc94c0a7",
|
|
622
623
|
".codex/memory/_templates/handoff.md": "1d83137e655733453a2895b8a2f6cb29238eeff26ed276250164ebeecdd5e204",
|
|
623
624
|
".codex/memory/_templates/prd.md": "11f80e3af46896c7980bef37088381350e5cbc90e2f22399c50ed9dcab3f2bc1",
|
|
624
|
-
".codex/memory/_templates/project.md": "
|
|
625
|
+
".codex/memory/_templates/project.md": "21e720af0d9bbe600f6707ca6bdc88af75e4d134563b825680738d9aa2d2499e",
|
|
625
626
|
".codex/memory/_templates/proposal.md": "5ad769245bd83279bbd70fc37976b23c08190d2a4b416eb46cb696b22d437e19",
|
|
626
627
|
".codex/memory/_templates/research.md": "6966290f90233087979cca5c49c075216c817b9c63c0ae444fea0f4b667ed016",
|
|
627
628
|
".codex/memory/_templates/roadmap.md": "6945f7fa459554d7195104bc1e8f1debdd3c5d37f869e63ae2a60ecb37065045",
|
|
628
|
-
".codex/memory/_templates/session-context.md": "
|
|
629
|
-
".codex/memory/_templates/state.md": "
|
|
629
|
+
".codex/memory/_templates/session-context.md": "fb39fb199be3323d1417982ecdfd7eb758a5a3ef06662eab5df10696d6c3eba5",
|
|
630
|
+
".codex/memory/_templates/state.md": "98286fa2aa00e216dc29dcc7fe7d9da1401cb33d36af5a482f88e8188bcc788c",
|
|
630
631
|
".codex/memory/_templates/tasks.md": "54119ce84fd0aa6ecd0148355f33808c061147da774475c94bf7e47bb18f73dd",
|
|
631
|
-
".codex/memory/_templates/tech-stack.md": "
|
|
632
|
-
".codex/memory/_templates/user.md": "
|
|
632
|
+
".codex/memory/_templates/tech-stack.md": "38c0e2255360cc777295bcb89202510f3e0ee0927d7a23422ca55b33a6ef9448",
|
|
633
|
+
".codex/memory/_templates/user.md": "d12ba5cdc382dbeeda5128a0b0ffe81993fbebfd882edaa46e6778cf7088cf73",
|
|
633
634
|
".codex/memory/project/gotchas.md": "05ce128ced24deffbb51a8b7167000c4e4816c4e3275a98f439fddb0e95c2bd6",
|
|
634
635
|
".codex/memory/project/project.md": "94a76028472946ba9782534de4920e9a77cfdf0f4daa063a97569660ccc06e21",
|
|
635
636
|
".codex/memory/project/roadmap.md": "6027b3bd3eaeed02b16a59037e760200ce8505f3007375faf2543b4b58bcee6e",
|
package/.codex/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.4
|
package/.codex/agents/scout.toml
CHANGED
|
@@ -50,7 +50,7 @@ Before starting research, check which tools are available and adapt your strateg
|
|
|
50
50
|
| grepsearch | GitHub real-world code examples | Built-in | Always available |
|
|
51
51
|
|
|
52
52
|
> **All three external MCPs are primary.** For best results, use them together in parallel:
|
|
53
|
-
> - **exa** — broadest: web search (`
|
|
53
|
+
> - **exa** — broadest: web search (`web_search_exa`) + code context (`get_code_context_exa`)
|
|
54
54
|
> - **ref** — broadest docs: searches docs, private repos, and PDFs (has credit system)
|
|
55
55
|
> - **context7** — deepest library API: precise function signatures, code examples, version-specific docs
|
|
56
56
|
>
|
|
@@ -58,6 +58,47 @@ Before starting research, check which tools are available and adapt your strateg
|
|
|
58
58
|
> research output. Fallback only applies when a tool is **unavailable** (not configured,
|
|
59
59
|
> out of credits, or timing out) — not because it's less important.
|
|
60
60
|
|
|
61
|
+
### Context7 Workflow (Two-Step)
|
|
62
|
+
|
|
63
|
+
Context7 requires a two-step lookup:
|
|
64
|
+
|
|
65
|
+
1. **resolve-library-id**: Search for library → get Context7 library ID
|
|
66
|
+
- Input: `libraryName` (e.g. "next.js") + `query` (what you need)
|
|
67
|
+
- Pick best match by: name similarity > trust score > snippet count
|
|
68
|
+
- Max 3 calls per question
|
|
69
|
+
|
|
70
|
+
2. **query-docs**: Fetch docs/code using library ID from step 1
|
|
71
|
+
- Input: `libraryId` (e.g. "/vercel/next.js") + `query` (specific question)
|
|
72
|
+
- Be specific: "How to set up JWT auth in Express.js" > "auth"
|
|
73
|
+
- Include language + framework + version in queries
|
|
74
|
+
- Max 3 calls per question
|
|
75
|
+
|
|
76
|
+
### Exa Tool Selection
|
|
77
|
+
|
|
78
|
+
Choose the right Exa tool for each task:
|
|
79
|
+
|
|
80
|
+
| Task | Tool | Notes |
|
|
81
|
+
|-------------------------------|-------------------------|-------------------------------------|
|
|
82
|
+
| General web research | `web_search_exa` | News, trends, current info |
|
|
83
|
+
| Code examples & API usage | `get_code_context_exa` | GitHub, StackOverflow, official docs |
|
|
84
|
+
| Read specific URL content | `crawling_exa` | Full page content extraction |
|
|
85
|
+
| Complex multi-source question | `deep_search_exa` | Query expansion + synthesis |
|
|
86
|
+
|
|
87
|
+
Tips:
|
|
88
|
+
- Use `numResults=5-8` for focused queries, `10+` for broad exploration
|
|
89
|
+
- Include current year in queries for recent info
|
|
90
|
+
- `get_code_context_exa` is best for "how do I use X library" questions
|
|
91
|
+
- `crawling_exa` is best when you already have a URL to read
|
|
92
|
+
|
|
93
|
+
### Ref Tool Selection
|
|
94
|
+
|
|
95
|
+
| Tool | Purpose |
|
|
96
|
+
|----------------------------|------------------------------------------------|
|
|
97
|
+
| `ref_search_documentation` | Search public docs, private repos, PDFs |
|
|
98
|
+
| `ref_read_url` | Read content of a URL from search results |
|
|
99
|
+
|
|
100
|
+
Include `ref_src=private` in query to search user's private docs.
|
|
101
|
+
|
|
61
102
|
### Fallback Chain (when a tool is unavailable)
|
|
62
103
|
|
|
63
104
|
Only used when a tool is not configured or fails. Under normal operation, all three run together.
|
package/.codex/config.toml
CHANGED
|
@@ -144,8 +144,27 @@ persistence = "save-all"
|
|
|
144
144
|
# multi_agent — enabled by default since Codex v0.115.0; explicit flag no longer required.
|
|
145
145
|
# Uncomment only if you need to disable subagents:
|
|
146
146
|
# multi_agent = false
|
|
147
|
-
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
147
|
+
|
|
148
|
+
# ─── Memories ──────────────────────────────────────────────────────
|
|
149
|
+
#
|
|
150
|
+
# Codex CLI has a native memories subsystem (MemoriesToml) that manages
|
|
151
|
+
# persistent conversation context and summarization across sessions.
|
|
152
|
+
#
|
|
153
|
+
# Status: Available in Codex CLI but still maturing. Codexkit treats it as
|
|
154
|
+
# opt-in. Repo-visible docs (.codex/context/ and .codex/memory/) remain
|
|
155
|
+
# the canonical source of truth for project knowledge.
|
|
156
|
+
#
|
|
157
|
+
# To enable native Codex memories:
|
|
158
|
+
# [features]
|
|
159
|
+
# memories = true
|
|
160
|
+
#
|
|
161
|
+
# To configure the memories subsystem (when supported by your Codex version):
|
|
162
|
+
# [memories]
|
|
163
|
+
# # max_history_tokens = 4096
|
|
164
|
+
# # summarization_enabled = true
|
|
165
|
+
#
|
|
166
|
+
# Guidance:
|
|
167
|
+
# - Enable only after verifying your Codex version supports [memories] config
|
|
168
|
+
# - Do not treat native memories as a replacement for .codex/context/ or .codex/memory/
|
|
169
|
+
# - Keep repo-visible docs as the canonical source of truth
|
|
170
|
+
# - Native memories complement file-based context; they do not replace it
|
package/.codex/mcp/README.md
CHANGED
|
@@ -37,6 +37,13 @@ From the target project, create `.codex/.env` from `.codex/.env.example` and lau
|
|
|
37
37
|
|
|
38
38
|
**Primary** for precise library API lookups — function signatures, code examples, version-specific docs. Deepest coverage for known libraries.
|
|
39
39
|
|
|
40
|
+
**Two-step workflow:**
|
|
41
|
+
|
|
42
|
+
1. `resolve-library-id` — search for library by name → get Context7 library ID
|
|
43
|
+
2. `query-docs` — fetch docs/code examples using the library ID from step 1
|
|
44
|
+
|
|
45
|
+
Best practices: include language + framework in queries, be specific, max 3 calls per tool per question.
|
|
46
|
+
|
|
40
47
|
**STDIO (recommended)** — free for basic use, no API key required:
|
|
41
48
|
|
|
42
49
|
```toml
|
|
@@ -77,7 +84,19 @@ Get your key at [ref.tools](https://ref.tools) → Dashboard.
|
|
|
77
84
|
|
|
78
85
|
### Exa — Web search & code context (Primary)
|
|
79
86
|
|
|
80
|
-
**Primary** for web research and code context. Most versatile tool
|
|
87
|
+
**Primary** for web research and code context. Most versatile tool.
|
|
88
|
+
|
|
89
|
+
**Default tools**: `web_search_exa` (general web search), `get_code_context_exa` (code from GitHub/StackOverflow/docs)
|
|
90
|
+
|
|
91
|
+
**Optional tools** (enable via `?tools=` URL parameter): `crawling_exa` (read full page content), `deep_search_exa` (multi-source synthesis), `company_research_exa`, `linkedin_search_exa`
|
|
92
|
+
|
|
93
|
+
Tool selection:
|
|
94
|
+
- `web_search_exa` → general queries, news, trends
|
|
95
|
+
- `get_code_context_exa` → programming questions, API usage, library examples
|
|
96
|
+
- `crawling_exa` → when you have a specific URL to read
|
|
97
|
+
- `deep_search_exa` → complex questions needing multi-source answers
|
|
98
|
+
|
|
99
|
+
**Default config** (minimal, fastest):
|
|
81
100
|
|
|
82
101
|
```toml
|
|
83
102
|
[mcp_servers.exa]
|
|
@@ -85,6 +104,14 @@ url = "https://mcp.exa.ai/mcp"
|
|
|
85
104
|
bearer_token_env_var = "EXA_API_KEY"
|
|
86
105
|
```
|
|
87
106
|
|
|
107
|
+
**Research config** (for scout agent, adds page crawling + deep search):
|
|
108
|
+
|
|
109
|
+
```toml
|
|
110
|
+
[mcp_servers.exa]
|
|
111
|
+
url = "https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa,crawling_exa,deep_search_exa"
|
|
112
|
+
bearer_token_env_var = "EXA_API_KEY"
|
|
113
|
+
```
|
|
114
|
+
|
|
88
115
|
Get your key at [exa.ai](https://exa.ai) → Dashboard.
|
|
89
116
|
|
|
90
117
|
### Optional: Basic Memory — real long-term memory
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
# Context7 — Library documentation
|
|
2
|
-
# Provides: resolve-library-id,
|
|
1
|
+
# Context7 — Library documentation and code examples
|
|
2
|
+
# Provides: resolve-library-id, query-docs
|
|
3
3
|
# Free for basic use (rate-limited). API key for higher limits: https://context7.com/dashboard
|
|
4
4
|
#
|
|
5
|
+
# ─── Workflow ───────────────────────────────────────────────────────────
|
|
6
|
+
# Context7 uses a TWO-STEP workflow:
|
|
7
|
+
#
|
|
8
|
+
# Step 1: resolve-library-id → search for library, get Context7 library ID
|
|
9
|
+
# Input: libraryName + query (what you need help with)
|
|
10
|
+
# Output: library ID (e.g. /vercel/next.js), name, snippet count, trust score
|
|
11
|
+
#
|
|
12
|
+
# Step 2: query-docs → fetch documentation and code examples
|
|
13
|
+
# Input: libraryId (from step 1) + query (specific question)
|
|
14
|
+
# Output: relevant code snippets + documentation text
|
|
15
|
+
#
|
|
16
|
+
# Best practices:
|
|
17
|
+
# - Always include language + framework in queries (e.g. "React useState hook examples")
|
|
18
|
+
# - Be specific: "How to set up JWT auth in Express.js" > "auth"
|
|
19
|
+
# - Select libraries by: name match > trust score > snippet count > benchmark score
|
|
20
|
+
# - Max 3 resolve-library-id calls per question; use best result if not found
|
|
21
|
+
# - Max 3 query-docs calls per question; combine results if needed
|
|
22
|
+
#
|
|
23
|
+
# ─── Setup Options ──────────────────────────────────────────────────────
|
|
24
|
+
#
|
|
5
25
|
# Option A — STDIO (recommended, no API key required for basic use):
|
|
6
26
|
# codex mcp add context7 -- npx -y @upstash/context7-mcp
|
|
7
27
|
#
|
|
8
28
|
# Option B — STDIO with API key (higher rate limits):
|
|
9
|
-
# Add to ~/.codex/config.toml:
|
|
10
|
-
#
|
|
11
29
|
# [mcp_servers.context7]
|
|
12
30
|
# command = "npx"
|
|
13
31
|
# args = ["-y", "@upstash/context7-mcp"]
|
|
@@ -16,9 +34,6 @@
|
|
|
16
34
|
# CONTEXT7_API_KEY = "your-key-here"
|
|
17
35
|
#
|
|
18
36
|
# Option C — HTTP remote (alternative transport):
|
|
19
|
-
# Keep the key in your shell or .codex/.env, then launch Codex with:
|
|
20
|
-
# codexkit run
|
|
21
|
-
#
|
|
22
37
|
# [mcp_servers.context7]
|
|
23
38
|
# url = "https://mcp.context7.com/mcp"
|
|
24
39
|
# env_http_headers = { "CONTEXT7_API_KEY" = "CONTEXT7_API_KEY" }
|
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
# Exa — Web search and
|
|
2
|
-
# Default tools: exa_web_search_exa, exa_get_code_context_exa
|
|
1
|
+
# Exa — Web search, code context, and deep research
|
|
3
2
|
# Requires: EXA_API_KEY (get from https://exa.ai → Dashboard)
|
|
4
3
|
#
|
|
5
|
-
#
|
|
6
|
-
# deep_search_exa, crawling_exa, company_research_exa,
|
|
7
|
-
# linkedin_search_exa, deep_researcher_start, deep_researcher_check
|
|
4
|
+
# ─── Available Tools ────────────────────────────────────────────────────
|
|
8
5
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
6
|
+
# Default (always enabled):
|
|
7
|
+
# web_search_exa — General web search with clean content extraction
|
|
8
|
+
# get_code_context_exa — Code snippets from GitHub, StackOverflow, official docs
|
|
9
|
+
#
|
|
10
|
+
# Optional (enable via ?tools= URL parameter):
|
|
11
|
+
# crawling_exa — Read full page content from a specific URL
|
|
12
|
+
# deep_search_exa — Query expansion + synthesized multi-source answers
|
|
13
|
+
# company_research_exa — Company profile lookup (funding, headcount, tech stack)
|
|
14
|
+
# linkedin_search_exa — LinkedIn profile search
|
|
15
|
+
# deep_researcher_start — Start async deep research job
|
|
16
|
+
# deep_researcher_check — Check deep research job status and results
|
|
17
|
+
#
|
|
18
|
+
# ─── Recommended Configurations ─────────────────────────────────────────
|
|
19
|
+
#
|
|
20
|
+
# Minimal (daily development — fastest, lowest cost):
|
|
21
|
+
# url = "https://mcp.exa.ai/mcp"
|
|
22
|
+
#
|
|
23
|
+
# Research (scout agent — adds page crawling and deep search):
|
|
24
|
+
# url = "https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa,crawling_exa,deep_search_exa"
|
|
25
|
+
#
|
|
26
|
+
# Full (all tools enabled):
|
|
27
|
+
# url = "https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa,crawling_exa,deep_search_exa,company_research_exa,linkedin_search_exa"
|
|
28
|
+
#
|
|
29
|
+
# ─── Best Practices ─────────────────────────────────────────────────────
|
|
30
|
+
#
|
|
31
|
+
# - web_search_exa: general queries, news, trends, current info
|
|
32
|
+
# - get_code_context_exa: programming questions, API usage, library examples
|
|
33
|
+
# - crawling_exa: when you have a specific URL and need full page content
|
|
34
|
+
# - deep_search_exa: complex questions needing multi-source synthesis
|
|
35
|
+
# - Use numResults=5-8 for focused queries, 10+ for broad exploration
|
|
36
|
+
# - Include year in search queries for current info (e.g. "React 19 features 2026")
|
|
11
37
|
#
|
|
12
38
|
# Keep the key in your shell or .codex/.env, then launch Codex with:
|
|
13
39
|
# codexkit run
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Vision
|
|
4
4
|
|
|
5
|
+
- Describe the long-term purpose of this project.
|
|
6
|
+
|
|
5
7
|
## Goals
|
|
6
8
|
|
|
9
|
+
- List near-term and durable goals here.
|
|
10
|
+
|
|
7
11
|
## Success Criteria
|
|
8
12
|
|
|
13
|
+
- Define what "done" or "successful" looks like.
|
|
14
|
+
|
|
9
15
|
## Context Notes
|
|
16
|
+
|
|
17
|
+
- Add any additional project context or constraints here.
|
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Status
|
|
4
4
|
|
|
5
|
+
- Record the current milestone and operating state here.
|
|
6
|
+
|
|
5
7
|
## Recent Completed Work
|
|
6
8
|
|
|
9
|
+
- Summarize recently completed work here.
|
|
10
|
+
|
|
7
11
|
## Active Decisions
|
|
8
12
|
|
|
13
|
+
- Capture decisions currently steering implementation here.
|
|
14
|
+
|
|
9
15
|
## Blockers
|
|
10
16
|
|
|
17
|
+
- Record active blockers here. Remove when resolved.
|
|
18
|
+
|
|
11
19
|
## Next Actions
|
|
20
|
+
|
|
21
|
+
- Record the next durable actions here. Keep to 3-5 items.
|
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Languages
|
|
4
4
|
|
|
5
|
+
- Add primary implementation languages here.
|
|
6
|
+
|
|
5
7
|
## Runtime
|
|
6
8
|
|
|
9
|
+
- Add runtime and framework notes here.
|
|
10
|
+
|
|
7
11
|
## Tooling
|
|
8
12
|
|
|
13
|
+
- Add build tools, formatters, and other tooling here.
|
|
14
|
+
|
|
9
15
|
## Verification Commands
|
|
16
|
+
|
|
17
|
+
- Add the main verification commands for this project here.
|
|
18
|
+
- Example: `npm run typecheck`, `npm run lint`, `npm test`
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Preferences
|
|
4
4
|
|
|
5
|
+
- Add collaboration preferences for this project's user here.
|
|
6
|
+
|
|
5
7
|
## Workflow
|
|
6
8
|
|
|
9
|
+
- Add workflow preferences or operating preferences here.
|
|
10
|
+
|
|
7
11
|
## Communication Notes
|
|
12
|
+
|
|
13
|
+
- Record communication style or response format preferences here.
|
package/.codex/prompts/resume.md
CHANGED
|
@@ -8,6 +8,12 @@ agent: build
|
|
|
8
8
|
|
|
9
9
|
Pick up where a previous session left off. Recover context, verify state, continue.
|
|
10
10
|
|
|
11
|
+
> **Two resume paths:**
|
|
12
|
+
> - **Thread-based**: `codex resume` restores a previous Codex session transcript (best for short interruptions within the same thread).
|
|
13
|
+
> - **File-based**: This prompt recovers context from repo-visible files (best for cross-session continuity, different machines, or when thread history is unavailable).
|
|
14
|
+
>
|
|
15
|
+
> Use `codex resume` when you want the exact conversation back. Use this prompt when you need structured context recovery from durable project files.
|
|
16
|
+
|
|
11
17
|
## Load Skills
|
|
12
18
|
|
|
13
19
|
- `$beads`
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Search project memory and context for prior decisions, patterns, and knowledge
|
|
3
|
+
argument-hint: "<query> [--limit <n>] [--decisions-only]"
|
|
4
|
+
agent: explore
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Search: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
Search durable project memory and context docs for relevant prior knowledge.
|
|
10
|
+
|
|
11
|
+
## Load Skills
|
|
12
|
+
|
|
13
|
+
- `$memory-system` — memory file structure and update protocol
|
|
14
|
+
|
|
15
|
+
## Phase 1: Parse Query
|
|
16
|
+
|
|
17
|
+
| Argument | Default | Description |
|
|
18
|
+
| ----------------- | ------- | ---------------------------------------- |
|
|
19
|
+
| `<query>` | required | Search terms (natural language or keywords) |
|
|
20
|
+
| `--limit <n>` | 5 | Max results to return |
|
|
21
|
+
| `--decisions-only`| false | Restrict to decision-log entries only |
|
|
22
|
+
|
|
23
|
+
## Phase 2: Run Search
|
|
24
|
+
|
|
25
|
+
Execute the local memory search:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
bash .codex/scripts/memory_search.sh $ARGUMENTS
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If the derived index does not exist, it will be built automatically on first run.
|
|
32
|
+
|
|
33
|
+
## Phase 3: Present Results
|
|
34
|
+
|
|
35
|
+
For each result:
|
|
36
|
+
|
|
37
|
+
1. Show the source file path and heading
|
|
38
|
+
2. Show the relevance score and match reasons
|
|
39
|
+
3. Show the snippet (first 180 characters)
|
|
40
|
+
|
|
41
|
+
If results reference decision-log entries, highlight them separately under "Related Decisions".
|
|
42
|
+
|
|
43
|
+
## Phase 4: Offer Next Steps
|
|
44
|
+
|
|
45
|
+
Based on results, suggest:
|
|
46
|
+
|
|
47
|
+
- Read the full source file for more context
|
|
48
|
+
- Update stale entries if information has changed
|
|
49
|
+
- Create new memory entries if the query topic has no coverage
|
|
50
|
+
|
|
51
|
+
## Output
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
Search: <query>
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
|
|
57
|
+
Results: <n> matches
|
|
58
|
+
|
|
59
|
+
1. [score=<n>] <path>
|
|
60
|
+
Heading: <heading>
|
|
61
|
+
Snippet: <text>
|
|
62
|
+
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
Related Decisions:
|
|
66
|
+
1. <decision heading> — <snippet>
|
|
67
|
+
|
|
68
|
+
Suggestions:
|
|
69
|
+
- <next step>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Related Commands
|
|
73
|
+
|
|
74
|
+
| Need | Command |
|
|
75
|
+
| ----------------- | -------------------------- |
|
|
76
|
+
| Full audit | `bash .codex/scripts/audit_memory_hygiene.sh` |
|
|
77
|
+
| Resume session | `/prompts:resume` |
|
|
78
|
+
| Project status | `/prompts:status` |
|
|
@@ -3,9 +3,17 @@ set -euo pipefail
|
|
|
3
3
|
|
|
4
4
|
# Script: audit_memory_hygiene
|
|
5
5
|
# Audits context/memory health without mutating repository files.
|
|
6
|
+
# Use --auto-fix to auto-generate worklog archive drafts when budget is exceeded.
|
|
6
7
|
|
|
7
8
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
8
9
|
|
|
10
|
+
AUTO_FIX=false
|
|
11
|
+
for arg in "$@"; do
|
|
12
|
+
case "$arg" in
|
|
13
|
+
--auto-fix) AUTO_FIX=true ;;
|
|
14
|
+
esac
|
|
15
|
+
done
|
|
16
|
+
|
|
9
17
|
WORKLOG="$SCRIPT_DIR/context/worklog.md"
|
|
10
18
|
DECISION_LOG="$SCRIPT_DIR/context/decision-log.md"
|
|
11
19
|
SESSION_CONTEXT="$SCRIPT_DIR/context/session-context.md"
|
|
@@ -94,9 +102,66 @@ echo "Counts:"
|
|
|
94
102
|
printf "INFO %-28s %s\n" "worklog entries" "$worklog_entries"
|
|
95
103
|
printf "INFO %-28s %s\n" "decision-log entries" "$decision_count"
|
|
96
104
|
|
|
105
|
+
echo
|
|
106
|
+
echo "Token budget (context docs, target <4000 tokens):"
|
|
107
|
+
CONTEXT_DIR="$SCRIPT_DIR/context"
|
|
108
|
+
total_tokens=0
|
|
109
|
+
# Only count top-level .md files; context/archive/ is intentionally excluded by the non-recursive glob.
|
|
110
|
+
if [[ -d "$CONTEXT_DIR" ]]; then
|
|
111
|
+
for ctx_file in "$CONTEXT_DIR"/*.md; do
|
|
112
|
+
[[ -f "$ctx_file" ]] || continue
|
|
113
|
+
word_count=$(wc -w < "$ctx_file" 2>/dev/null | tr -d ' ')
|
|
114
|
+
est_tokens=$(( (word_count * 13 + 9) / 10 ))
|
|
115
|
+
total_tokens=$((total_tokens + est_tokens))
|
|
116
|
+
done
|
|
117
|
+
fi
|
|
118
|
+
if [[ "$total_tokens" -le 4000 ]]; then
|
|
119
|
+
printf "OK %-28s ~%s tokens (budget: 4000)\n" "context/ total" "$total_tokens"
|
|
120
|
+
else
|
|
121
|
+
printf "WARN %-28s ~%s tokens (budget: 4000)\n" "context/ total" "$total_tokens"
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
echo
|
|
125
|
+
echo "Staleness checks:"
|
|
126
|
+
STALE_DAYS=30
|
|
127
|
+
now_epoch=$(date +%s)
|
|
128
|
+
for stale_file in "$SESSION_CONTEXT" "$STATE_FILE"; do
|
|
129
|
+
if [[ -f "$stale_file" ]]; then
|
|
130
|
+
file_label="${stale_file#$SCRIPT_DIR/}"
|
|
131
|
+
file_mtime=$(stat -f '%m' "$stale_file" 2>/dev/null || stat -c '%Y' "$stale_file" 2>/dev/null || echo "0")
|
|
132
|
+
age_days=$(( (now_epoch - file_mtime) / 86400 ))
|
|
133
|
+
if [[ "$age_days" -ge "$STALE_DAYS" ]]; then
|
|
134
|
+
printf "WARN %-28s %s days old (threshold: %s)\n" "$file_label" "$age_days" "$STALE_DAYS"
|
|
135
|
+
else
|
|
136
|
+
printf "OK %-28s %s days old\n" "$file_label" "$age_days"
|
|
137
|
+
fi
|
|
138
|
+
fi
|
|
139
|
+
done
|
|
140
|
+
|
|
97
141
|
echo
|
|
98
142
|
echo "Recommended next actions:"
|
|
99
143
|
echo "- Run .codex/scripts/prepare_worklog_archive.sh <archive-path> if worklog needs pruning."
|
|
100
144
|
echo "- After reviewing both drafts, run .codex/scripts/apply_worklog_archive.sh <archive-draft> <retained-draft> to update worklog.md and save an archive copy."
|
|
101
145
|
echo "- Trim duplicate next-action bullets so session-context.md stays the precise restart cue."
|
|
102
146
|
echo "- Keep only still-relevant durable decisions in decision-log.md."
|
|
147
|
+
echo "- Review stale files (>$STALE_DAYS days) and update or clear outdated content."
|
|
148
|
+
|
|
149
|
+
# Auto-fix: generate worklog archive drafts if budget is exceeded
|
|
150
|
+
if $AUTO_FIX; then
|
|
151
|
+
worklog_lines=$(wc -l < "$WORKLOG" 2>/dev/null | tr -d ' ')
|
|
152
|
+
worklog_lines="${worklog_lines:-0}"
|
|
153
|
+
if [[ "$worklog_lines" -gt 200 ]]; then
|
|
154
|
+
archive_draft="/tmp/codexkit-worklog-archive-draft.md"
|
|
155
|
+
retained_draft="/tmp/codexkit-worklog-retained-draft.md"
|
|
156
|
+
echo
|
|
157
|
+
echo "Auto-fix: worklog exceeds 200 lines ($worklog_lines). Generating archive drafts..."
|
|
158
|
+
"$SCRIPT_DIR/scripts/prepare_worklog_archive.sh" "$archive_draft" 20 --retained-output "$retained_draft"
|
|
159
|
+
echo " Archive draft: $archive_draft"
|
|
160
|
+
echo " Retained draft: $retained_draft"
|
|
161
|
+
echo " Review both, then run:"
|
|
162
|
+
echo " bash .codex/scripts/apply_worklog_archive.sh $archive_draft $retained_draft"
|
|
163
|
+
else
|
|
164
|
+
echo
|
|
165
|
+
echo "Auto-fix: worklog is within budget ($worklog_lines/200 lines). No action needed."
|
|
166
|
+
fi
|
|
167
|
+
fi
|
|
@@ -2,9 +2,24 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
# Script: build_startup_brief
|
|
4
4
|
# Generates session startup context and prints to stdout.
|
|
5
|
+
# Also rebuilds the derived memory index if source files have changed.
|
|
5
6
|
|
|
6
7
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
8
|
|
|
9
|
+
# Rebuild derived memory index if source files are newer
|
|
10
|
+
INDEX_DB="$SCRIPT_DIR/memory/.index/memory-index.db"
|
|
11
|
+
if [[ -f "$SCRIPT_DIR/scripts/build_memory_index.sh" ]]; then
|
|
12
|
+
SOURCE_CHANGED=false
|
|
13
|
+
if [[ ! -f "$INDEX_DB" ]]; then
|
|
14
|
+
SOURCE_CHANGED=true
|
|
15
|
+
elif find "$SCRIPT_DIR/context" "$SCRIPT_DIR/memory/project" "$SCRIPT_DIR/memory/research" -type f -name '*.md' -newer "$INDEX_DB" -print -quit 2>/dev/null | grep -q .; then
|
|
16
|
+
SOURCE_CHANGED=true
|
|
17
|
+
fi
|
|
18
|
+
if $SOURCE_CHANGED; then
|
|
19
|
+
"$SCRIPT_DIR/scripts/build_memory_index.sh" >/dev/null 2>&1 || true
|
|
20
|
+
fi
|
|
21
|
+
fi
|
|
22
|
+
|
|
8
23
|
echo "━━━ Startup Brief ━━━"
|
|
9
24
|
|
|
10
25
|
# Current git branch and status
|