Migrating Developer Coding Context Across AI Coding Tools: A Practical Guide to Instructions, Rules, and Memory

    Accounts can be reopened and quotas can be repurchased, but the one thing developers usually cannot take with them is a year of accumulated working style inside the terminal: global instructions, project rules, and long-term memory that must stay in effect across sessions. This article treats context migration as an engineering problem rather than a vendor-ban discussion. It explains why environment signals turn into migration triggers, how to classify instructions, rules, and memory by semantics instead of directory names, where incompatibilities typically appear (scope, priority, trigger conditions, memory freshness, and secret boundaries), and how to run a reviewable migration: inventory, normalize, map, redact, merge, replay-verify, and retain versioned snapshots. You will also find the design tradeoffs that most often break a migration, plus team habits that keep the primary copy of your context in your own hands.

    Accounts can be reopened and quotas can be repurchased. What developers truly cannot take away is the working style accumulated in the terminal over a year: global instructions, project rules, and long-term memory that still needs to apply across sessions. In recent years, AI coding tools have started writing these materials directly into the context of every request. Efficiency went up, and so did lock-in. Once a risk-control false positive hits, a regional policy changes, or an endpoint is switched, the person is still there and the project is still there, but the assistant behaves as if it has amnesia.

    This article does not discuss the ban details of any single product. It narrows the problem down to something that can be engineered: how to move instructions, rules, and memory from one implementation to another, and how to verify the result after the move.

    Why environment signals suddenly become migration triggers

    To detect abuse, resale, and anomalous calls, AI coding tools often read the local environment: time zone, regional settings, endpoint address, client version, and so on. If these signals are used only for security auditing and are written to queryable logs, developers at least know how they were judged. More troublesome are silent experiments: the decision never reaches a log, yet a seemingly unrelated field in the system prompt is rewritten, such as a date format, a separator, or an invisible character. Model behavior shifts accordingly, and on the user side all you can sense is “the answer changed on the same day,” with no way to reproduce it.

    Such experiments usually have three characteristics. First, the observation surface is very wide: local configuration is treated as part of identity. Second, the feedback loop is very narrow: anomaly reports go without explanation for a long time. Third, rollback is fast, but account actions already taken are not restored automatically. For an individual, this means a few days of interrupted work; for an enterprise account pool, it means a group of people losing project context at the same time.

    So migration should not wait for a ban notice. As soon as context has become productive capacity, it should be treated like source code by default: it needs backups, versioning, and a portable format.

    Classify the three asset types before choosing tools

    Different products use different names for “memory,” so before migrating you must classify by semantics, not by directory name.

    Global instructions describe the working style you always want the assistant to follow: language, answer structure, prohibited actions, commit message style. They change slowly and have a broad impact, which makes them suitable for centralized management.

    Project rules describe local constraints for a specific repository: tech stack, directory boundaries, test commands, modules that must not be modified, interface compatibility requirements. They should travel with the repository rather than live only in a hidden directory on one machine.

    Long-term memory holds facts and preferences that persist across sessions: past architectural tradeoffs, conclusions from production incidents, team terminology, conventions never written into documentation. It gets dirty most easily, and it most easily keeps feeding outdated conclusions to the model.

    Chat history, plugins, and skill packs are often covered by a vendor’s “one-click import,” because they are highly structured. The three categories above usually end up in private files, databases, or prompt templates, with different field names, different hierarchies, and different precedence. Hard-pointing A’s memory directory at B’s read path looks convenient, but in practice it makes unparsable fragments look empty, or promotes project rules into global rules. Path routing cannot solve semantic incompatibility.

    Incompatibilities usually appear in five places

    1. Scope. One side uses three layers (global, project, session); the other has only user-level and repository-level. During migration you must declare the scope of every item explicitly instead of guessing from where the file sits.

    2. Priority. Later writes override earlier ones, project overrides global, system prompt overrides user prompt: the rules differ per product. When merging, keep the original precedence as text, not just the final concatenated result. Otherwise, the next time someone edits a rule, nobody can tell which layer should change.

    3. Trigger conditions. Some rules apply only under a specific language, directory, or command. Dropping the condition turns a local prohibition into a global one, and the assistant will refuse reasonable operations in unrelated tasks.

    4. Memory freshness. Fact-type memory should carry a date and a source; preference-type memory should carry its applicable range. Without a timestamp, “we don’t use that approach” will block a correct technical choice six months later.

    5. Secret boundaries. Tokens, internal addresses, customer data, and undisclosed vulnerabilities should not enter a syncable memory store. A migration tool that copies everything by default carries more risk than one that misses something.

    A reviewable migration workflow

    Do not browse hidden directories and paste by hand. Manual copying is slow, and it cannot prove that “nothing was missed and no projects got crossed.” Follow this order instead.

    Inventory. Read-only scan of instruction, rule, and memory files on the machine and in repositories, producing a list: path, scope, last update time, estimated item count, and whether secret-like patterns are present. This step rewrites no source file.

    Normalize. Turn every item into a neutral record, for example: identifier, type (instruction/rule/memory), scope, body, condition, priority, last update time, source path. Keep the body faithful to the original meaning; do not “optimize the prompt for you” at this stage. Optimization and migration are two different things, and mixing them makes acceptance impossible.

    Map. Write an adapter layer for the target assistant: which fields go into its global instructions, which are written to rule files inside the repository, and which go into a memory store it recognizes. The adapter only converts formats; it does not invent interfaces the target product does not have. If the target supports only plain-text rules, express conditions and priority as explicit sentences in the rule body instead of pretending there is a native condition engine.

    Redact. Use pattern matching to flag possible keys, certificates, connection strings, and personal data; remove them by default or replace them with placeholders, and have a human confirm exceptions. Exceptions belong on a separate list and do not go into ordinary backups.

    Merge. When multiple rules on the same topic conflict, do not automatically let the new override the old. Output conflict pairs: both original texts, the suggested item to keep, and the reasoning. A human confirms, then the target files are generated. Outdated memory can be marked as archived so it does not enter the default context and is retrieved only when needed.

    Replay verification. Prepare a fixed set of tasks: modify a small function, add a test, explain a directory constraint, ask about a past decision. Have the assistant perform or answer them before and after migration, comparing only whether it respects the key constraints, not whether the wording matches. Also run negative checks: project rules that should not apply have not leaked into other repositories. Missing items usually show up as the assistant suddenly using a command the team has deprecated; wrong items show up as internal paths referenced in a public example repository.

    Retention. Version the inventory, the normalized records, the conflict resolutions, and snapshots of the target files together. Put them in a controlled directory in the repository, or in object storage with a retention policy and access control. If the team already uses object storage and the permission system on Baidu AI Cloud, treat migration snapshots as ordinary backup objects; there is no need to build a separate platform for this. The snapshots themselves must not contain secrets that were removed.

    A sample neutral record is not bound to any product:

    1. id: rule-042
    2. type: project-rule
    3. scope: repo
    4. priority: project-over-global
    5. applies_when: path starts with src/api
    6. body: Response fields for external consumers are additive only, never renamed; breaking changes must update the contract doc first.
    7. updated_at: 2026-03-01
    8. source: <local-rule-file>

    If the target side has no structured rules, render it as a titled block of text, keeping the scope and condition in the title. That way it can be reconstructed next time instead of becoming one long, unsplittable prompt.

    Design tradeoffs that most often break a migration

    Full fidelity beats a smart summary. A summary rewrites the boundaries of a constraint: “do not modify production configuration directly” can be compressed into “be careful.” Save the original text during migration and leave summarization to a future retrieval index.

    Isolate by project, not by person. When one person works across several repositories, personal directories mix multiple rule sets. Split by repository identifier before importing so that project A’s release prohibition does not end up in project B.

    Be idempotent. Importing the same snapshot repeatedly should produce the same result: no duplicated rules, no memory copied into two entries. Update by stable identifier rather than appending every time.

    Stay rollback-capable. On the target side, write to a new version directory or a new config name first, switch the default read location only after replay passes, and point back to the old version on failure. Never overwrite the single configuration file in place.

    Keep the human-machine split clear. The program handles discovery, conversion, conflict detection, and running the checklist; the human handles conflict resolution and secret exceptions. Treating “let the model figure it out” as a migration step means handing your acceptance criteria to a non-reproducible generation result.

    Everyday team habits

    Put instructions and rules that are still in effect into the repository as much as possible, and review them along with code. Hidden directories serve only as a local cache. That way the primary copy is already in version control when you switch tools.

    Prune long-term memory regularly. Each iteration, delete entries that have been written into documentation and correct conclusions that have been overturned. The smaller the memory store, the more reliable the migration, and the less likely prompts are polluted by outdated facts.

    Keep the lowest reasonable assumption about vendor environment experiments: the client may read time zone and endpoint information, and that information does not necessarily appear in logs you can see. This is not a request for users to disguise their environment; it is a request that teams not keep irreplaceable knowledge only in the private storage of a closed-source client. Policies can change; the primary copy of the context should be in your own hands.

    When an account or endpoint change happens, the recovery order should be: confirm permissions and data scope, restore global instructions, restore rules per repository, and finally restore memory on demand. Restoring chat history first is usually the least useful step, because chat is a process while rules and memory are the constraints.

    Summary

    The hard part of cross-tool migration is not copying a few files. It is preserving scope, conditions, priority, and freshness, and making them effective again in a form the other product can understand. Once inventory, normalization, redaction, conflict merging, and fixed-task replay become habits, a ban, a model switch, or an endpoint change is just a checklist-driven switch rather than retelling a year of working style from scratch.