Apta Innovations Limited · Source Code Acquisition

Preparing your repo for sale.

Once your project is shortlisted, you clean the repository and its git history before we pay, using the free scripts on this page. Then you export the archive yourself, and payment is released on a call once we've verified it.

Start the clean-upSee the checklistDownload the scriptsExport the archiveSubmit your code

How the handover works

  1. 01
    Shortlisted

    We contact you once your project is shortlisted and a price is agreed.

  2. 02
    You clean

    You back up the repo, then clean every branch and tag and force-push them back in place, following the steps below.

  3. 03
    You submit the check

    You submit the form with your name, the check-repo.sh report for the cleaned repo and the .tar.gz archive you exported.

  4. 04
    Handover call

    On a call, we verify the archive you uploaded in the form.

  5. 05
    Payment

    Once the archive passes our checks, payment is released on the call.

Step by step

These steps take your repo from where it is today to a cleaned repository, every branch and tag, ready for export. Enter your GitHub username and repository name and every command below fills them in. Make the backup in step 01 before anything else.

Use this section to generate the exact commands and scripts for your repo, then copy them from here. Don't run things by hand from memory or from another guide: the steps and flags have to match, and doing it differently can mean redoing the work.

You can also paste the full repo URL into either field. On GitLab or Bitbucket, swap github.com for your host after copying.

  1. 01
    Make a full backup first

    Before anything else, copy the whole repository (every branch, tag and pull request ref) to a folder outside your project. The clean-up later overwrites your branches on GitHub, and this copy is the only way back. Keep it until the sale is done, and never push it anywhere: it holds the old history, secrets included.

    mkdir -p ~/sale-backup
    git clone --mirror https://github.com/{github-username}/{repo-name}.git ~/sale-backup/{repo-name}-backup.git
    
    # Or as one file, from your own clone (fetch first so every branch is in it):
    cd path/to/{repo-name} && git fetch --all --tags
    git bundle create ~/sale-backup/{repo-name}.bundle --all
    git bundle verify ~/sale-backup/{repo-name}.bundle

    Checklist: 01

  2. 02
    Install the tools

    You need git, Python 3, git-filter-repo and cloc. On Windows, use Git Bash or WSL.

    # macOS
    brew install git-filter-repo cloc
    
    # Linux
    sudo apt install git-filter-repo cloc     # or: pip install git-filter-repo
    
    # Then download the scripts into one folder
    mkdir sale-tools && cd sale-tools
    curl -O https://xephas.me/code/check-repo.sh
    curl -O https://xephas.me/code/clean-history.sh
    curl -O https://xephas.me/code/secrets.example.txt
  3. 03
    Merge or close open pull requests

    The clean-up rewrites every branch. A pull request that is still open when its branch is rewritten can close itself or show a diff that makes no sense. Merge or close every open one first. Merged and closed pull requests keep their record, reviews and comments.

    # With the GitHub CLI, or open the Pull requests tab
    gh pr list --repo {github-username}/{repo-name} --state open
    https://github.com/{github-username}/{repo-name}/pulls

    Checklist: 02

  4. 04
    Check every branch and tag

    Take a fresh, full copy of what is on GitHub; checking it changes nothing. The report starts with a line per branch and tag, then lists every file and string that needs to go, with counts. The export ships every branch and tag, so every one of them has to pass.

    git clone --mirror https://github.com/{github-username}/{repo-name}.git {repo-name}.git
    bash check-repo.sh {repo-name}.git | tee before.txt

    Checklist: 03 · 04 · 05 · 06 · 08

  5. 05
    Add run_instruction.md and FEATURES.md to every branch

    Write both at the root of your default branch, by hand from the template or with the AI prompts further down this page, review them and commit. Then put the same commit on every other branch: every branch ships, so each branch tip needs them. Push every branch. Do this before you clean, so the files are part of the cleaned history. A new owner must be able to build and run the project from run_instruction.md alone.

    AI prompts for both files
    cd path/to/{repo-name}
    git switch main
    # write run_instruction.md and FEATURES.md, then:
    git add run_instruction.md FEATURES.md
    git commit -m "Add run instructions and feature list"
    git push origin main
    
    # Then on each other branch, one at a time:
    git switch <branch>
    git cherry-pick main        # or: git merge main
    git push origin <branch>

    Checklist: 09

  6. 06
    Rotate secrets, then list them

    Cancel and reissue every API key, token and password the report found, so the old values are dead. Then copy secrets.example.txt to secrets.txt and add one rule per secret or piece of personal data, real value ==> placeholder.

    cp secrets.example.txt secrets.txt
    # edit secrets.txt, one rule per line:
    #   sk_live_51Hxxxx==>YOUR_STRIPE_SECRET_KEY
    #   jane.doe@gmail.com==>user@example.com

    Checklist: 04 · 05

  7. 07
    Dry run

    List the files and folders to remove from every commit: the ones the report flagged. AI tooling, .DS_Store, machine files and home paths are removed automatically. It works on a fresh copy of every branch and tag; a dry run shows what would go and changes nothing.

    DRY_RUN=1 SECRETS_FILE=secrets.txt bash clean-history.sh \
      https://github.com/{github-username}/{repo-name}.git  .env  android/app/build/  '*.jks'  seed-data/

    Checklist: 03 · 06 · 08

  8. 08
    Clean every branch and tag

    Run it again without DRY_RUN. It rewrites every branch and tag in one pass, on a copy named after your repo (your-repo-clean.git), never on your repo. Every commit stays, with its message, author and date; only the commit IDs change. Repeat until it passes.

    SECRETS_FILE=secrets.txt bash clean-history.sh \
      https://github.com/{github-username}/{repo-name}.git  .env  android/app/build/  '*.jks'  seed-data/

    Checklist: 03 · 04 · 05 · 06 · 07 · 08 · 10

  9. 09
    Verify each branch and tag

    clean-history.sh prints a line per branch and tag and re-runs check-repo.sh on the copy. Every branch and tag must show its messages, authors and dates as identical; in the check's table every count must be 0 on every row, and run_instruction.md must be on every branch. Run the check again yourself if you change anything.

    bash check-repo.sh {repo-name}-clean.git | tee after.txt

    Checklist: 03 · 04 · 05 · 06 · 07 · 10

  10. 10
    Force-push every branch and tag in place

    This replaces each branch and tag on GitHub with its cleaned version, and your pull requests stay attached to the repo. clean-history.sh prints one line per branch and tag, each pinned to the commit GitHub holds now, so a push fails instead of overwriting something that changed. Run the first line alone and check it, then the rest. Then delete any backup or pre-clean branches from GitHub, since the export ships every branch. After this, every existing clone is stale: you and every collaborator must re-clone, and a git pull would merge the old history back in.

    You can't undo this on GitHub. Make sure the backup from step 01 exists and opens before you push.

    # What GitHub holds now
    git ls-remote --heads --tags https://github.com/{github-username}/{repo-name}.git
    
    # One line per branch and tag (clean-history.sh prints them all), e.g.:
    git -C {repo-name}-clean.git push --force-with-lease=refs/heads/main:<current-sha> \
      https://github.com/{github-username}/{repo-name}.git refs/heads/main:refs/heads/main
    
    # Delete backup branches from GitHub, if you made any there
    git push https://github.com/{github-username}/{repo-name}.git --delete <backup-branch>

    Checklist: 11

  11. 11
    Check what is on GitHub now, and the pull request refs

    Check a new fresh copy. When it reads RESULT: ready, keep the full report: it goes in the form. GitHub keeps a read-only ref for every pull request (refs/pull/<n>/head). It never rewrites them, you can't delete them, and the export includes them, so they still hold each pull request's files from before the clean-up. Rotating every credential (step 06) makes any secret left there useless. Personal data there isn't fixed by rotation: check-repo.sh reports what those refs hold in section [10], and we decide together on the handover call.

    git clone --mirror https://github.com/{github-username}/{repo-name}.git check.git
    bash check-repo.sh check.git | tee report.txt
    git ls-remote https://github.com/{github-username}/{repo-name}.git 'refs/pull/*' | tee pull-refs.txt

    Checklist: 12 · 13

Before we pay: the checklist

0 of 13 done

Work through every item on your repository: the current files and the git history. Anything ever committed ships with the sale, and deleting a file today doesn't remove it from older commits. check-repo.sh finds every problem below, and clean-history.sh fixes them on a copy. Your ticks are saved in this browser.

  1. A mirror clone or a bundle of every branch, tag and pull request ref, kept in a folder outside the project until the sale is done. Never push it back to GitHub.

    Done in step: 01

  2. Before the rewrite. An open pull request whose branch is rewritten can close itself or show a broken diff. Merged and closed ones keep their record.

    Done in step: 03

    • —CLAUDE.md, AGENTS.md, GEMINI.md
    • —.github/copilot-instructions.md, .cursorrules, .clinerules
    • —.cursor/, .claude/, .aider*, .windsurf*, llm-guides/, .remember/

    Remove only the file, never the whole .github/ folder: it also holds your CI workflows, which we want.

    Done in steps: 04 · 07 · 08 · 09

    Check (in a mirror clone): this must print nothing.

    git rev-list --objects --branches --tags | awk '{print $2}' | grep -iE '(^|/)(CLAUDE\.md|AGENTS\.md|copilot-instructions\.md|\.cursorrules|\.clinerules)|(^|/)\.(cursor|claude|aider|windsurf|remember)/|llm-guides/'
    • —.env files and service-account JSON
    • —Keystores and certificates: .jks, .keystore, .p12, .p8, .pem, private-key blocks
    • —API keys (sk-..., AKIA...), tokens, signing and keystore passwords

    Rotate (cancel and reissue) every key that was ever committed, so the old copy in history, in your backup and in any pull request ref is dead. Firebase client config (AIza... in google-services.json or firebase_options.dart) is a public identifier and may stay. To replace a secret string but keep the file, list it in secrets.txt for clean-history.sh.

    Done in steps: 04 · 06 · 08 · 09

    • —Real names, emails, phone numbers, addresses, ID numbers
    • —Test logins with real passwords
    • —Database dumps and exports, uploaded user files

    Replace it with obvious placeholders such as user@example.com. Personal data can't be rotated like a key, so it must be rewritten out of history. Sample data from third-party docs, like a number in a Stripe README, is fine.

    Done in steps: 04 · 06 · 08 · 09

    • —node_modules/, build/, dist/, .dart_tool/, .next/, .astro/, .firebase/
    • —ios/Pods/, android/app/.cxx/, target/, __pycache__/, .venv/, .DS_Store
    • —Committed .zip, .tgz, .apk or .ipa files

    Dependencies and generated files bloat the history and aren't your code.

    Done in steps: 04 · 07 · 08 · 09

    Find the biggest files ever committed on any branch or tag:

    git rev-list --objects --branches --tags | git cat-file --batch-check='%(objectsize) %(rest)' | sort -rn | head -20
    • —local.properties, Generated.xcconfig, flutter_export_environment.sh, ephemeral/ folders
    • —Symlinks that point outside the repo
    • —Absolute paths like /Users/yourname/ or /home/yourname/

    These only work on your machine and break for anyone else.

    Done in steps: 08 · 09

    Check: this must print 0.

    git log -p --branches --tags | grep -cE '/Users/|/home/'
  3. If the repo was ever a monorepo or shared with another product, remove the other projects' folders from history. Ship only the project you're selling. Also remove stray nested .git folders that aren't the real repo.

    Done in steps: 04 · 07 · 08

    • —Prerequisites with versions (e.g. Flutter 3.24, Node 20)
    • —Credential setup: every placeholder, and where a new owner gets their own value
    • —Build, run and test commands for each part (app, web, API)
    • —A quick start, from a fresh clone to a running app
    • —Troubleshooting for the errors a new developer is likely to hit
    • —FEATURES.md: every implemented feature, grouped by area

    Commit them on every branch before you rewrite history: every branch ships, so each branch tip needs them, and they must sit in the cleaned history. The AI prompts on this page write both from your actual code.

    Done in step: 05

    AI prompts for both files
  4. Rewrite with clean-history.sh (git-filter-repo). Every commit stays with its message, author and date; only the commit IDs change. Don't squash, and don't copy the files into a new repo with one "initial commit".

    Done in steps: 08 · 09

  5. Push every branch and tag back to the same repo with the commands clean-history.sh prints. Then delete any backup or pre-clean branches from GitHub, since the export ships every branch. Tell every collaborator to re-clone: an old clone must not pull or push.

    Done in step: 10

  6. Check a new fresh copy of the whole repo. Paste the full report into the form. It must end with RESULT: ready. Review any warnings: some are fine, such as your own support email.

    Done in step: 11

    git clone --mirror https://github.com/{github-username}/{repo-name}.git check.git
    bash check-repo.sh check.git | tee report.txt
    git ls-remote https://github.com/{github-username}/{repo-name}.git 'refs/pull/*' | tee pull-refs.txt
  7. Your archive is made from the repo as it stands when you export it. Anything pushed after your check isn't checked, and the export ships every branch.

    Done in step: 11

When every box is ticked: you submitthe form: your name, the report and your archive. We then verify the archive you exported on a call, and payment is released once it passes the checks.

The crucial step

Export the archive

Everything above gets the repo ready. The archive is what the sale delivers: one .tar.gz with the full commit history, plus the pull requests with their reviews and comments, which you make yourself with GitHub's Migration API or GitLab's project export. GitHub only exports repositories the caller owns (or an organisation Owner or Migrator), and GitLab needs the Maintainer role or higher. Do it once the checklist is done.

You run the export

GitHub: you own the repository, or it's in an organisation where you are an Owner or have the Migrator role. GitLab: you have the Maintainer role or higher.

You create a token and run three API calls, below in brief. The export packs the whole repository: every branch, tag and pull request ref. Your branches and tags ship clean. The pull request refs ship as they are and may still hold pre-clean files (see below). Pull requests end up inside the archive as pull_requests_*.json. This delivers the full record.

In brief (GitHub)

  1. 01
    Token

    A classic personal access token. Your own account: scopes repo and user. An organisation: repo and admin:org. Copy it straight away.

  2. 02
    Start

    POST to /user/migrations (or /orgs/<YOUR_ORG_NAME>/migrations) and note the "id" in the reply: your MIGRATION_ID.

  3. 03
    Wait

    GET /user/migrations/<MIGRATION_ID> (or /orgs/<YOUR_ORG_NAME>/migrations/<MIGRATION_ID>) until "state" is "exported".

  4. 04
    Download

    GET /user/migrations/<MIGRATION_ID>/archive (or /orgs/<YOUR_ORG_NAME>/migrations/<MIGRATION_ID>/archive) to save the .tar.gz, or use the link GitHub emails you.

A user export works only for repositories your account owns. Collaborator access is rejected (typically 422 Validation Failed). For a repository in an organisation, you must be an Owner of the organisation or have the Migrator role. Otherwise, message us before you go further.

What the archive can still hold: GitHub never rewrites pull request refs (refs/pull/*), and the export includes them, so they keep each pull request's files from before the clean-up. You can't delete them. Rotating every credential (step 06) makes any secret there useless. Personal data there isn't fixed by rotation: send us what check-repo.sh reports in section [10] (step 11), and we decide together on the handover call.

# 1. Start (your account; organisations use /orgs/<YOUR_ORG_NAME>/migrations)
curl -L -X POST -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR_TOKEN>" -H "X-GitHub-Api-Version: 2022-11-28" \
  -d '{"lock_repositories":false, "repositories":["{github-username}/{repo-name}"]}' \
  https://api.github.com/user/migrations

# 2. Repeat until "state" is "exported"
curl -L -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR_TOKEN>" -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/user/migrations/<MIGRATION_ID>

# 3. Download
curl -L -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR_TOKEN>" -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/user/migrations/<MIGRATION_ID>/archive -o {repo-name}.tar.gz
The archive must contain

run_instruction.md travels inside the archive only if it is committed. Write it and commit it on every branch (step 05) before you clean the history and before anyone exports. If you add it afterwards, you redo the clean-up and the export. What it must cover.

The full guide, with screenshots

Includes GitLab, organisation repositories, and how to verify the archive.

What goes, what stays

The sale includes the full git history, so anything that wasever committed ships with it, even if a later commit deleted it. Deleting a file or adding it to .gitignore doesn't remove it from history; only rewriting history does.

Remove from every commit
  • ✕AI tooling: CLAUDE.md, AGENTS.md, .cursor/, .claude/, .github/copilot-instructions.md, .cursorrules, .aider*, llm-guides/
  • ✕Secrets: .env files, keystores, .pem/.p12/.p8 keys, service-account JSON, API keys, signing passwords
  • ✕Personal data: real names, emails, phone numbers, test logins, database dumps, user uploads
  • ✕Build output: node_modules/, build/, dist/, .dart_tool/, .next/, Pods/, .firebase/, .apk, .ipa, .zip
  • ✕Machine files: local.properties, Generated.xcconfig, ephemeral/, .DS_Store, /Users/<name>/ paths
  • ✕Folders that belong to other projects, and symlinks pointing outside the repo
  • ✕Backup or pre-clean branches on GitHub: keep your backup offline instead
Keep
  • ✓The full commit history of every branch and tag: never squash, never re-initialise
  • ✓.github/workflows/: CI is evidence of real practice
  • ✓Tests, docs, README and your .env.example files
  • ✓Firebase client config (google-services.json, firebase_options.dart): public identifiers, not secrets
  • ✓Your own work or support email, and sample data from vendor docs
  • ✓Your pull requests: they stay attached to the repo because you push in place, and the export includes them with reviews and comments

The scripts

Free, plain bash, and readable before you run them. None of them pushes to your repo: clean-history.sh prints the push command for you to run yourself. They run on macOS and Linux, and on Windows through Git Bash or WSL.

check-repo.sh

Read-only audit of every branch and tag and their full history: a line per branch and tag, AI tooling files, secrets, personal data, build output, home-folder paths, run instructions, pull request refs and line count. Its report goes in the form.

clean-history.sh

Rewrites every branch and tag on a copy, never on your repo, keeping every commit with its author and date. It verifies each branch and tag, then prints the force-push commands for you to run.

run_instruction.md template

Fill it in and save it as run_instruction.md at the root of your repo, on every branch: prerequisites, credentials, build/run/test commands, quick start, troubleshooting.

secrets.example.txt

Example rules for replacing secret strings everywhere in your history while keeping the files that held them.

run_instruction prompt

Paste into Claude Code, Cursor, Copilot or any AI coding assistant opened in your repo. It writes run_instruction.md from your actual code.

FEATURES.md prompt

Same, for FEATURES.md: a complete inventory of every implemented feature, grouped by area.

run_instruction.md

A required file at the root of the repo. Write it for a developer who has never seen your project and has none of your accounts, keys or machine setup. It must cover:

Prerequisites

Every tool with the exact version you build with: Node 20, Flutter 3.24, Xcode 16.

Credentials

Every placeholder you added, the file it lives in, and where a new owner gets their own value.

Build, run, test

Exact commands for each part (app, web, API), run from the repo root.

Quick start

The shortest path from a fresh clone to something running, in order.

Troubleshooting

The errors a new developer will hit first, and the fix for each.

Download the template

Write the docs with AI

Open your repo in an AI coding assistant (Claude Code, Cursor, GitHub Copilot or similar) and paste each prompt. It reads your actual code and writes the file, using only versions, commands and features that exist in the repo. Docs written with AI are fine; the code itself must be yours.

run_instruction.md

Reads your manifests, config, scripts and CI, then writes install, credential, build/run/test, quick start and troubleshooting sections with real versions and commands.

Download
You are documenting this repository for a buyer who will take it over. Write a
file named run_instruction.md at the ROOT of the repository.

The reader is an experienced developer who has never seen this project and has
none of my accounts, API keys, cloud projects or machine setup. From this file
alone, they must be able to install, configure, build, run and test every part
of the project.

HOW TO WORK
1. Read the repository before writing anything. Inspect the manifests and
   config files: package.json, pubspec.yaml, build.gradle, Podfile, Cargo.toml,
   go.mod, requirements.txt, pyproject.toml, Dockerfile, docker-compose.yml,
   Makefile, firebase.json, .github/workflows/*, .env.example files, and the
   README. Work out which parts exist (mobile app, web, API, desktop, workers)
   and which folder each lives in.
2. Take versions from the code: engines fields, SDK constraints, lockfiles,
   .nvmrc, .tool-versions, CI workflow setup steps. Never guess a version. If a
   version cannot be found, write "not pinned" and the version CI uses, if any.
3. Take commands from the code: package.json scripts, Makefile targets, CI
   steps. Only write commands that exist. Do not invent scripts.
4. Find every value a new owner must supply: environment variables, API keys,
   Firebase/Google/AWS project ids, OAuth client ids, signing keys, webhook
   secrets. Search for process.env, dotenv, String.fromEnvironment,
   os.environ, BuildConfig, Info.plist keys and config files. Name each one,
   the file(s) it goes in, and where a new owner gets their own value.
5. Never copy a real secret, password, personal email or phone number into the
   file. Use placeholders such as YOUR_STRIPE_SECRET_KEY.

THE FILE MUST HAVE THESE SECTIONS, IN THIS ORDER
1. What this is: one paragraph on what the product does, then a table of
   parts: | Part | Folder | Stack |
2. Prerequisites: a table of | Tool | Version | Install | for every tool
   needed, with exact versions.
3. Credentials and configuration: a table of | Placeholder | File(s) | What it
   is | Where to get your own |, then numbered setup steps. Say which files a
   CLI tool generates (and the command, e.g. flutterfire configure), which are
   edited by hand, and how to confirm the setup worked.
4. Build, run and test: one subsection per part, with exact commands in code
   blocks, run from the repo root (cd into the folder first), including the
   local URL or port each part runs on.
5. Quick start: the shortest numbered path from a fresh clone to something
   running.
6. Deployment: how it is deployed, based on the CI workflows and config files
   that exist. Skip this section if nothing in the repo shows deployment.
7. Troubleshooting: a table of | Symptom | Cause | Fix | with at least five
   real problems a new developer is likely to hit with this stack and this
   setup, such as missing env vars, emulator ports, CocoaPods, code
   generation, or Node or SDK version mismatches.

RULES
- Every claim must be true of this repository. If you are unsure about
  something, check the file. If it cannot be determined, say so plainly
  rather than guess.
- Plain Markdown. No emojis. No marketing language.
- Create or change ONLY run_instruction.md. Do not create any other file.
  In particular, do not create CLAUDE.md, AGENTS.md, GEMINI.md,
  .cursorrules, copilot-instructions.md, or any .claude/, .cursor/ or
  similar folder, and do not edit code.
- Do not commit. I will review the file and commit it myself.
- Never run git commit, push, cherry-pick, merge, force-push or any history
  rewrite on your own. If I ask for help with one, show me the exact command
  and run it only after I say yes to that exact command.

AFTER YOU WRITE IT
The sale ships EVERY branch and tag, so run_instruction.md must be committed at the root
of every branch, before the history clean-up. Once I have reviewed it, give me
the commands (do not run them): commit it on my default branch and push, then,
for each other branch from `git branch -r`, one at a time:
  git switch <branch> && git cherry-pick <default-branch> && git push origin <branch>
Tell me to do this before running clean-history.sh (guide:
https://xephas.me/code/prepare/#steps).

When you are done, list anything you could not determine, so I can fill it in.
FEATURES.md

Goes through every module, route, endpoint and model, then lists every implemented feature, grouped by area, one concrete bullet each.

Download
You are writing a complete feature inventory of this repository for a buyer
who is evaluating it. Write a file named FEATURES.md at the ROOT of the
repository.

HOW TO WORK
1. Read the code, not just the README. Go through every module, screen, route,
   API endpoint, cloud function, database model, background job, integration
   and test folder. Work out which parts exist (mobile app, web, API, desktop,
   workers) and which folder each lives in.
2. List only features that are implemented in the code. A feature that is
   planned, stubbed, behind a TODO, or only described in docs does not count.
   If something is partly built, list it with "(partial)" at the end.
3. Look past the screens for engineering features too: authentication and
   roles, multi-tenancy, offline support, payments and webhooks, caching,
   validation, security rules, server-side checks, data migrations,
   notifications, analytics, localisation, theming, CI/CD, test suites and
   operational scripts.

FORMAT (follow it exactly)
- Start with "# <Product name>: Feature List".
- Then one short paragraph: what the product is, who it is for, and which
  parts and stacks it is built from.
- Then one "## <Feature area>" heading per area, for example "## Job cards",
  "## Payments", "## Authentication and access control", "## Offline and
  connectivity", "## Testing". Order areas from the core product features
  to the supporting engineering ones.
- Under each heading, bullets only. One feature per bullet, one line each,
  specific and concrete. Write "Invoice create, edit, approve and delete" or
  "Server-derived status computed from the checklist, never client-supplied",
  not "Invoice management" or "Robust status handling".
- If the repository has several parts (e.g. app/, web/, api/), keep one
  combined list, and put the part in brackets where it matters:
  "- Stripe webhook signature verification [api]".
- End with a "## Codebase facts" section: parts and folders, main languages
  and frameworks, the test frameworks and roughly how many test files, and
  the CI workflows that exist.

RULES
- Every bullet must be true of this repository. If you are unsure, check the
  code. Never invent features.
- No marketing language, no emojis, no prose paragraphs beyond the intro.
- Never include real secrets, customer names, emails or phone numbers.
- Create or change ONLY FEATURES.md. Do not create any other file. In
  particular, do not create CLAUDE.md, AGENTS.md, GEMINI.md, .cursorrules,
  copilot-instructions.md, or any .claude/, .cursor/ or similar folder, and
  do not edit code.
- Do not commit. I will review the file and commit it myself.
- Never run git commit, push, cherry-pick, merge, force-push or any history
  rewrite on your own. If I ask for help with one, show me the exact command
  and run it only after I say yes to that exact command.

AFTER YOU WRITE IT
The sale ships EVERY branch and tag, so FEATURES.md must be committed at the root
of every branch, before the history clean-up. Once I have reviewed it, give me
the commands (do not run them): commit it on my default branch and push, then,
for each other branch from `git branch -r`, one at a time:
  git switch <branch> && git cherry-pick <default-branch> && git push origin <branch>
Tell me to do this before running clean-history.sh (guide:
https://xephas.me/code/prepare/#steps).

When you are done, tell me how many feature areas and bullets you wrote, and
list anything you were unsure about.
Final step

Submit your code

When every step and checklist item is done and you have exported the archive, submit the form. It opens in a new tab.

What to put in the form

  • Name: your full name
  • check-repo.sh Report: paste the full output for a fresh copy of the repo after the force-push (step 11), ending RESULT: ready
  • Submission File of the Codebase: upload your .tar.gz archive, exported as described on /code/export
Open the submission form(opens in a new tab)

What happens next

  1. 01Book the handover callThen message us to book the handover call. We can't book it without your submission in the form.
  2. 02Handover callOn a call, we verify the archive you uploaded in the form.
  3. 03PaymentOnce the archive passes our checks, payment is released on the call.

Questions

Why clean every branch in place?

The export ships the whole repository: every branch, tag and pull request. That full record is what the sale pays for, so delivering a single branch earns less. Cleaning in place keeps every branch and keeps your pull requests attached to the repo. The backup from step 1 is your safety net.

Will the commit count change?

No. clean-history.sh keeps every commit with its message, author and date; only the commit IDs change. A commit whose only change was a removed file stays, as an empty commit. To drop those instead, run it with PRUNE_EMPTY=1 and tell us the before and after numbers.

Do I lose my pull requests?

No. Pull requests live on GitHub, not in git, and stay attached to the repo because you push in place. Merge or close open ones first (step 3). The export includes them, with reviews and comments.

What are refs/pull/* and why can't I delete them?

GitHub keeps a read-only ref for each pull request's head commit and never rewrites it, and the export includes them. So they still hold each pull request's files from before the clean-up, and only GitHub can delete them. Rotating every credential (step 6) makes any secret there useless. Personal data there isn't fixed by rotation: send us what check-repo.sh reports in section [10] (step 11), and we decide together on the handover call.

What about my collaborators?

After the force-push, every existing clone is stale. Tell them to re-clone, and not to pull or push from an old clone: that would merge the old history back in.

Can I keep working on my project?

Not on this repository between the force-push and the handover call: anything pushed after your check isn't checked. Afterwards, work from a fresh clone.

Something went wrong. How do I undo it?

Your backup from step 1 holds the original history. Message us before you restore anything, so the right branches go back.

When can I remove your access?

Any time after payment. Once the archive is verified on the call, we no longer need the repo.

Can I use AI to write run_instruction.md and FEATURES.md?

Yes. Use the prompts on this page, then check every line against your code. AI-written docs are fine. What we can't accept is a codebase that was entirely AI-generated.

The check flags something that's fine.

Warnings are for you to review, not automatic failures. Some are fine to leave, for example "0758... is our public support line". Message us if you are unsure about one.

Ready, or stuck?

Submit your repo, or send us your check-repo.sh report and we'll tell you what to fix.

Questions? WhatsApp Cephas Brian on 0758 294 212 or email xephas@aptahq.com or projects@aptahq.com