{"id":50541746,"url":"https://github.com/haru0416-dev/autopoietic-os","last_synced_at":"2026-06-03T20:30:51.063Z","repository":{"id":356873604,"uuid":"1234072845","full_name":"haru0416-dev/autopoietic-os","owner":"haru0416-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-10T06:45:04.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T08:37:47.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haru0416-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-09T18:01:36.000Z","updated_at":"2026-05-10T06:45:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/haru0416-dev/autopoietic-os","commit_stats":null,"previous_names":["haru0416-dev/autopoietic-os"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/haru0416-dev/autopoietic-os","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haru0416-dev%2Fautopoietic-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haru0416-dev%2Fautopoietic-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haru0416-dev%2Fautopoietic-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haru0416-dev%2Fautopoietic-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haru0416-dev","download_url":"https://codeload.github.com/haru0416-dev/autopoietic-os/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haru0416-dev%2Fautopoietic-os/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33878990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-03T20:30:50.685Z","updated_at":"2026-06-03T20:30:51.052Z","avatar_url":"https://github.com/haru0416-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autopoietic OS\n\nAutopoietic OS is an experimental NixOS seed for treating the system configuration as a genome: AI proposes mutations as Nix patches, verifier loops test them, and accepted generations become an evolutionary lineage.\n\nThe long-term target is a complete, minimal NixOS-based distribution that can be distributed as an ISO image, not merely a set of tools installed on an existing machine. Existing NixOS components are reused when they fit; when they are too large or imprecise, they are distilled or replaced with purpose-built organs.\n\nThis repository currently implements the first development slice:\n\n- a flake-based NixOS seed;\n- Home Manager integration;\n- core NixOS modules for identity, memory, observation, agent runtime, and mutation running;\n- Rust workspace CLIs, including `os-introspect`, `mutation-journal`, and `mutation-runner`;\n- schemas and phase design documents;\n- a boot-verified observe-only ISO baseline with VM checks;\n- a P1 offline mutation verifier for draft patch proposals;\n- a P2 VM-tested promotion gate for verified mutations;\n- an initial P3 install-plan entrypoint that links promoted mutations to generation lineage records without running a live install;\n- an initial P4 organ registry and read-only decay/suggestion review path.\n\n## Initial contract\n\nThe first milestone is not autonomous mutation. It is self-observation: the OS should be able to read itself as Nix structure and produce machine-readable state for later patch synthesis.\n\nThe current repository state is the **initial P4 organ registry and decay review**: mutation proposals can be verified in an isolated worktree, replayed into an isolated promotion worktree for NixOS VM checks, converted into a dry-run install plan and generation lineage record, and reviewed as explicit organs without live mutation or automatic deletion. The P0 ISO baseline remains boot-verified with test-instrumented detailed checks and production BIOS/UEFI black-box boot checks. See [`docs/phases.md`](docs/phases.md), [ADR 0012](docs/adr/0012-p0-iso-verification-boundary.md), [ADR 0013](docs/adr/0013-p1-offline-mutation-verifier-boundary.md), [ADR 0015](docs/adr/0015-p2-vm-tested-mutation-promotion-boundary.md), [ADR 0014](docs/adr/0014-p3-install-workflow-and-generation-lineage-boundary.md), and [ADR 0017](docs/adr/0017-p4-organ-registry-and-decay-review-boundary.md).\n\n## Quick start\n\n```bash\nnix develop\nos-introspect --root . --output memory/self-state.json\nmutation-journal append --goal \"bootstrap self-observation\" --status accepted --phase scaffold\nmutation-runner verify --proposal path/to/proposal.json --evidence-bundle memory/evidence/p1.json\nmutation-runner promote --proposal path/to/proposal.json --parent-genome git:\u003crevision\u003e --evidence-bundle memory/evidence/p2.json\nmutation-runner install-plan --mutation-id mut-example --target-root /mnt/autopoietic --parent-generation gen-parent --resulting-generation gen-child --evidence-bundle memory/evidence/p3-plan.json\nmutation-runner install-verify --plan path/to/install-plan.json --evidence-bundle memory/evidence/p3-verify.json\nmutation-journal organ add --name mutation-journal --type cli --source crates/mutation-journal --purpose \"append Autopoietic OS memory records\" --decay-status active\nmutation-journal organ review --path memory/organs.jsonl --evidence-bundle memory/evidence/p4-review.json\nmutation-journal organ suggest --registry memory/organs.jsonl --promotions memory/mutation-promotions.jsonl --generations memory/generations.jsonl --evidence-bundle memory/evidence/p4-suggest.json\n```\n\nFor authored mutations, prefer `proposal.json` plus a sibling `patch.diff`; inline JSON patch strings are supported mainly for small tests and compatibility.\nPromotion reads P1 verification evidence from `memory/mutation-results.jsonl` by default and appends P2 promotion evidence to `memory/mutation-promotions.jsonl`.\nInstall planning reads P2 promotion evidence and P1 verification evidence from `memory/` journals by default. It prints a dry-run install-plan object with `lineage_status: planned` and a seed manifest unless `--record` is passed; it does not run `nixos-install` or mutate a target root. Install verification reads an install plan and checks listed seed-file hashes without writing to the target root.\n\n## ISO smoke test\n\nBuild and boot-test the Autopoietic ISO configuration with the NixOS VM test driver:\n\n```bash\nnix build .#checks.x86_64-linux.iso-boot-basic --no-link --print-out-paths\nnix build .#checks.x86_64-linux.iso-observe-only --no-link --print-out-paths\nnix build .#checks.x86_64-linux.iso-tools --no-link --print-out-paths\nnix build .#checks.x86_64-linux.iso-uefi-boot --no-link --print-out-paths\nnix build .#checks.x86_64-linux.iso-production-boot-console --no-link --print-out-paths\nnix build .#checks.x86_64-linux.iso-production-uefi-boot-console --no-link --print-out-paths\n```\n\nIn an uncommitted worktree, use the explicit path form so Nix sees untracked files:\n\n```bash\nnix build path:/home/haru/OS#checks.x86_64-linux.iso-boot-basic --no-link --print-out-paths\nnix build path:/home/haru/OS#checks.x86_64-linux.iso-observe-only --no-link --print-out-paths\nnix build path:/home/haru/OS#checks.x86_64-linux.iso-tools --no-link --print-out-paths\nnix build path:/home/haru/OS#checks.x86_64-linux.iso-uefi-boot --no-link --print-out-paths\nnix build path:/home/haru/OS#checks.x86_64-linux.iso-production-boot-console --no-link --print-out-paths\nnix build path:/home/haru/OS#checks.x86_64-linux.iso-production-uefi-boot-console --no-link --print-out-paths\n```\n\n`checks.x86_64-linux.iso-boot` is kept as an alias for the basic BIOS boot check.\n\n## CI\n\nGitHub Actions workflows are split into fast Rust/schema/Nix package checks and KVM-backed VM checks. See [`docs/ci.md`](docs/ci.md).\n\n## Layout\n\n```text\nhosts/       host-level NixOS configurations\nmodules/     core modules and future organs\nhome/        Home Manager configuration\ncrates/      Rust workspace for core CLIs and libraries\nmemory/      schemas plus JSONL ledgers\nmutations/   pending, accepted, failed, and reverted patches\ntests/       VM and organ checks\ndocs/        manifesto, ontology, protocols, anti-goals\n```\n\n## Architecture decisions\n\nDesign decisions are recorded as ADRs under [`docs/adr/`](docs/adr/README.md). Start there before extending the implementation; the ADRs define the boundaries between Nix mutation, side effects, Rust tooling, observation, and verifier feedback.\n\n## Safety model\n\nNix generations only roll back declarative system configuration. Anything outside that boundary, such as file writes or external API calls, must be recorded in the effect ledger with reversibility and compensation metadata.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharu0416-dev%2Fautopoietic-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharu0416-dev%2Fautopoietic-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharu0416-dev%2Fautopoietic-os/lists"}