You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.sources/ currently holds 16 git submodules, 10 of them release-pinned. During the migration this was the right call: one person, no approvals, and everything an agent needed to verify a claim was on disk. In maintenance mode the cost profile has inverted. Every pinned repo is a recurring bump PR that needs review, and most of those repos contribute nothing to the built site.
This issue proposes a three-tier model and records what has to change in AGENTS.md as a result.
What actually depends on each submodule
Submodule
Role
Verdict
motoko
Synced pages under docs/languages/motoko/and 52 build-time <motokoExamples> file includes
Keep
internetidentity
scripts/sync-ii-spec.mjs writes references/internet-identity-spec.md and verifiable-credentials-spec.md
Keep
examples
Build-time snippet= extraction (plugins/remark-snippet.mjs). One page today, more planned
Keep
icskills
16 of the 17 symlinks in .agents/skills/ point here
Keep
dotskills
.agents/skills/technical-documentation points here
Keep
icp-cli
Agent verification of CLI flags
Convert
icp-cli-recipes
Agent verification of recipe config
Convert
icp-cli-templates
Agent verification of template layout
Convert
icp-js-sdk-docs
Agent verification of JS SDK APIs
Convert
motoko-core
Agent verification of mo:core APIs
Convert
cdk-rs
Agent verification of ic-cdk APIs
Convert
candid
Agent verification of the Candid spec
Convert
response-verification
Agent verification of certification crates
Convert
chain-fusion-signer
Agent verification
Convert
papi
Agent verification
Convert
ic-pub-key
Agent verification
Convert
So 5 stay, 11 convert. Note that icskills and dotskills are load-bearing rather than reference material: .agents/skills/ is a directory of symlinks into them, and AGENTS.md requires loading those skills before content work. (If we would rather install skills from skills.internetcomputer.org than vendor them, that is a separate discussion and would drop the count to 3.)
Also worth noting: .sources/examples is 265 MB and is a build dependency of exactly one page right now (guides/backends/https-outcalls.mdx, 6 snippets from 2 examples). Keeping it is a bet that <CodeExample> gets used more widely, which is the plan.
Proposed model
Tier 1: vendored content (submodule).motoko, internetidentity, examples, icskills, dotskills. Their bytes reach the built site or the agent workflow, so they stay on disk and keep their bump procedure.
Tier 2: vendored verification files (fetch, not submodule). For several repos, "verify against upstream" means reading one or two specific files. icp-cli is the clearest case: the rule is "verify every flag against .sources/icp-cli/docs/reference/cli.md", which is a single file out of a 5 MB repo. A sync job can fetch just those files at a pinned release into a small cache directory and record the version. This preserves the offline-verifiable property that the no-guessing rule depends on, at a fraction of the maintenance cost.
Tier 3: release watch only. Everything else. No vendoring: a pin file plus a weekly workflow that diffs upstream through the GitHub API and opens an issue when a new release lands, following the pattern already running in dfinity/icskills (.github/workflows/sync-upstream.yml plus scripts/sync-upstream-check.sh, which writes the diff into the issue body). We already run a narrower version of this here in sync-motoko.yml and sync-ii-spec.yml.
The trigger should be releases that require a content or version bump on the docs site, not every upstream commit. icp-cli-recipes is the motivating example: it is pinned to a June commit that predates the @dfinity/static-site recipe entirely, while upstream has shipped static-site-v0.3.3 and asset-canister-v2.3.0 since. A release watch would have caught that; a submodule that nobody bumps did not.
Required AGENTS.md changes
Source material table (line ~215): split into the three tiers, with the fetch command for tier 2 and the watch-issue workflow for tier 3.
"Always read from .sources/" rule: reword so it still forbids guessing and training-data recall, but points at the tier-2 cache for the repos that no longer have a submodule.
CLI docs slug rule (line ~174): currently says the slug is 1.1, derived from "the major.minor of the pinned icp-cli release". With icp-cli moving to tier 2 or 3 there is no pinned release to derive it from, so the rule should key off the live docs-site root instead. The links themselves are already being moved to 1.3 in docs: bump icp-cli docs links to the 1.3 version slug #354.
.agents/submodule-bumping.md: reduce to the five tier-1 repos and add the tier-2 refresh and tier-3 watch procedures.
Drop the stale reference to docs/guides/tools/migrating-from-dfx.md, which no longer exists in docs/.
Open questions
Tier 2 storage: a committed cache directory (reviewable diffs, slight repo growth) or fetch-on-demand by the agent (no repo growth, needs network and gives no diff to review)? I lean committed, because a diff in a bump PR is how a reviewer notices that a flag changed.
Do we want the skills vendored at all, or installed from skills.internetcomputer.org?
.sources/icp-cli is still pinned to v1.1.0 while v1.3.0 is out. Bumping it needs the CLI-verification pass in .agents/submodule-bumping.md. Do that once more before converting it to tier 2/3, or convert first and do the verification pass against the fetched file?
Context
.sources/currently holds 16 git submodules, 10 of them release-pinned. During the migration this was the right call: one person, no approvals, and everything an agent needed to verify a claim was on disk. In maintenance mode the cost profile has inverted. Every pinned repo is a recurring bump PR that needs review, and most of those repos contribute nothing to the built site.This issue proposes a three-tier model and records what has to change in
AGENTS.mdas a result.What actually depends on each submodule
motokodocs/languages/motoko/and 52 build-time<motokoExamples>file includesinternetidentityscripts/sync-ii-spec.mjswritesreferences/internet-identity-spec.mdandverifiable-credentials-spec.mdexamplessnippet=extraction (plugins/remark-snippet.mjs). One page today, more plannedicskills.agents/skills/point heredotskills.agents/skills/technical-documentationpoints hereicp-cliicp-cli-recipesicp-cli-templatesicp-js-sdk-docsmotoko-coremo:coreAPIscdk-rsic-cdkAPIscandidresponse-verificationchain-fusion-signerpapiic-pub-keySo 5 stay, 11 convert. Note that
icskillsanddotskillsare load-bearing rather than reference material:.agents/skills/is a directory of symlinks into them, andAGENTS.mdrequires loading those skills before content work. (If we would rather install skills fromskills.internetcomputer.orgthan vendor them, that is a separate discussion and would drop the count to 3.)Also worth noting:
.sources/examplesis 265 MB and is a build dependency of exactly one page right now (guides/backends/https-outcalls.mdx, 6 snippets from 2 examples). Keeping it is a bet that<CodeExample>gets used more widely, which is the plan.Proposed model
Tier 1: vendored content (submodule).
motoko,internetidentity,examples,icskills,dotskills. Their bytes reach the built site or the agent workflow, so they stay on disk and keep their bump procedure.Tier 2: vendored verification files (fetch, not submodule). For several repos, "verify against upstream" means reading one or two specific files.
icp-cliis the clearest case: the rule is "verify every flag against.sources/icp-cli/docs/reference/cli.md", which is a single file out of a 5 MB repo. A sync job can fetch just those files at a pinned release into a small cache directory and record the version. This preserves the offline-verifiable property that the no-guessing rule depends on, at a fraction of the maintenance cost.Tier 3: release watch only. Everything else. No vendoring: a pin file plus a weekly workflow that diffs upstream through the GitHub API and opens an issue when a new release lands, following the pattern already running in
dfinity/icskills(.github/workflows/sync-upstream.ymlplusscripts/sync-upstream-check.sh, which writes the diff into the issue body). We already run a narrower version of this here insync-motoko.ymlandsync-ii-spec.yml.The trigger should be releases that require a content or version bump on the docs site, not every upstream commit.
icp-cli-recipesis the motivating example: it is pinned to a June commit that predates the@dfinity/static-siterecipe entirely, while upstream has shippedstatic-site-v0.3.3andasset-canister-v2.3.0since. A release watch would have caught that; a submodule that nobody bumps did not.Required
AGENTS.mdchanges.sources/" rule: reword so it still forbids guessing and training-data recall, but points at the tier-2 cache for the repos that no longer have a submodule.1.1, derived from "themajor.minorof the pinned icp-cli release". Withicp-climoving to tier 2 or 3 there is no pinned release to derive it from, so the rule should key off the live docs-site root instead. The links themselves are already being moved to1.3in docs: bump icp-cli docs links to the 1.3 version slug #354..agents/submodule-bumping.md: reduce to the five tier-1 repos and add the tier-2 refresh and tier-3 watch procedures.docs/guides/tools/migrating-from-dfx.md, which no longer exists indocs/.Open questions
skills.internetcomputer.org?.sources/icp-cliis still pinned to v1.1.0 while v1.3.0 is out. Bumping it needs the CLI-verification pass in.agents/submodule-bumping.md. Do that once more before converting it to tier 2/3, or convert first and do the verification pass against the fetched file?Related
1.3slug. TheAGENTS.mdslug rule is deliberately left out of that PR and is item 3 above.