{"name":"skill:adapt-contract-project","files":[{"path":".imd/reads/skills/adapt-contract-project.md","digest":"0508a68f3fad2cd079615e59d511cd4130db36bdc7649998861419cbbab6762f","content":"This repository is the requester's own project, brought here to launch. Make it launchable through\nthe launch kind's factory with the smallest change that does it. It is not yours to redesign: a reviewer who\nreads the diff should find the launch requirements and nothing else.\n\nRead, in this order: the launch kind's reference (supplied with this task) for what the factory can\ndeploy; the audit of the code as it arrived, if the assignment carries one; then the project itself,\nits README and its tests. An audit finding that reproduces is fixed as part of this work, with a test;\none that does not reproduce is left alone and said so in ADAPTATION.md.\n\nWhat usually has to change:\n- Constructors. The factory deploys every contract in one transaction and makes no initialization\n  calls, so each contract is fully configured in a nonpayable constructor with the argument types the\n  reference lists. An initializer, a proxy or an owner set after deployment becomes constructor\n  arguments; `owner = msg.sender` would hand control to the factory, which cannot use it.\n  At most 16 arguments per contract, since the manifest refuses more: fold fixed values into\n  constants and derive what follows from other arguments. A constructor runs on an empty chain in\n  the launch checks, so it must not call another contract or require an address to have code; check\n  the live contract on first use instead.\n- The token. For a project launch the launch token is a separate fixed-supply ERC-20 at\n  src/LaunchToken.sol, as the reference describes, and the project's contracts take its address as\n  $token. For a custom token launch the project's own ERC-20 is the token: its constructor mints the\n  whole supply to msg.sender, which is the factory, and nothing can mint after launch. For a\n  contracts-only launch there is no launch token: add none, and keep any ERC-20 the project\n  already has only if the brief asks for it.\n- Admin access. Every owner or admin role is a constructor argument filled by $owner (the owner\n  the request named, else the wallet that paid), unless the brief names another owner. Never\n  `msg.sender` (the factory) or `tx.origin` (IMD's launch wallet): IMD never owns or runs a launch's\n  contracts.\n- What the launch forbids: minting after launch, pausing, freezing, blacklisting or seizing holder\n  balances, DELEGATECALL, CALLCODE, SELFDESTRUCT, proxies and upgradeability. Remove the capability;\n  do not leave it behind a flag.\n- A Uniswap v4 hook exposes `getHookPermissions()` returning `Hooks.Permissions`, matching the\n  callbacks it implements: the launch's floor calls it to check the manifest, and the manifest step\n  after you may change only launch.json. Job 2df4193f imported a hook without it and its manifest\n  failed three times on that (2026-10-19).\n- What Slither rejects outright, whatever a comment disables: `selfdestruct`, a `transferFrom`\n  from anyone but `msg.sender`, an unguarded initializer or upgrade, an uninitialized storage\n  pointer, a Yul shift with a constant shifted by a variable (`shr(i, MASK)`; write `MASK >> i`), and\n  `abi.encodePacked` of two dynamic values in a row (use `string.concat` or `abi.encode`). Imported\n  code that trips one cannot launch as written: change those lines, and say so in ADAPTATION.md. Job\n  83f90aa0's pinned source kept `transferFrom(a.owner, ...)` and failed the same check three times\n  (2026-10-21).\n\nKeep the project's layout, configuration and dependencies: foundry.toml, remappings.txt, lib/ and\npackage files are protected in an existing project, and a change to them is rejected. Keep its tests\npassing; a test that encodes behaviour the launch forbids is changed with the behaviour, and says\nwhy. Tests must pass in any order, in parallel, with an empty environment.\n\nWrite ADAPTATION.md at the repository root: each change, the file, and the rule or finding that\nrequired it. The manifest is written by the step after you; do not write launch.json."}]}