Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ on:
- "REUSE.toml"
- "Taskfile.yml"
- "egolint/**"
- "foundation/ignore/**"
- "foundation/**"
- "schemas/repository-foundation-*.schema.json"
- "tools/foundation*.py"
- "tests/**"
push:
branches:
Expand All @@ -38,7 +40,9 @@ on:
- "REUSE.toml"
- "Taskfile.yml"
- "egolint/**"
- "foundation/ignore/**"
- "foundation/**"
- "schemas/repository-foundation-*.schema.json"
- "tools/foundation*.py"
- "tests/**"
workflow_dispatch:

Expand Down
14 changes: 12 additions & 2 deletions docs/foundation/INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Generated from `foundation/catalog.json`. Do not edit by hand.

- Contract: `empathy/repository-foundation@1.0.0`
- Contract: `empathy/repository-foundation@1.1.0`
- Canonical owner: `egohygiene/empathy`
- Canonical artifacts: `30`

Expand All @@ -18,7 +18,7 @@
| `.github/workflows/codeql.yml` | security | profile | required | risk-hardened | Static security analysis caller |
| `.github/workflows/dependency-review.yml` | security | profile | required | risk-hardened | Dependency change gate |
| `.github/workflows/megalinter.yml` | quality | profile | required | quality-baseline | Thin repository caller for reusable quality automation |
| `.gitignore` | metadata | required | repository-owned | — | Repository-specific generated and local-state exclusions |
| `.gitignore` | metadata | required | repository-owned | — | Repository-owned exclusions with explicit, scoped baseline composition |
| `.identity/identity.toml` | metadata | profile | repository-owned | product | Consumer-owned product identity input |
| `.mega-linter.yml` | quality | profile | repository-owned | quality-baseline | Repository-selected EgoLint and MegaLinter policy overlay |
| `.release-please-manifest.json` | release | profile | repository-owned | release-automated | Repository release state |
Expand All @@ -39,10 +39,20 @@
| `pyproject.toml` | metadata | profile | repository-owned | language-python | Python project intent |
| `release-please-config.json` | release | profile | repository-owned | release-automated | Repository release strategy |

## Gitignore composition sources

Sources are owned by `egohygiene/empathy`; they are not required consumer paths.

| ID | Profile | Source path | SHA-256 |
| --- | --- | --- | --- |
| `universal` | all declared scopes | `foundation/ignore/universal.gitignore` | `79280ac4f3147ead97a0b21b01f40241238f08fa5d63abe3f81c8b64e7f179f0` |
| `rust-build` | language-rust | `foundation/ignore/rust.gitignore` | `16627c4b93c30be2aa2c977a48ee3157d0a7b8ff44e02008b9085f0bd8d94f96` |

## Generated outputs

| Path | Owner | Canonical input | Checked in |
| --- | --- | --- | --- |
| `docs/ecosystem/CONTEXT.md` | `egohygiene/hygiene` | `catalog/repositories.yaml + catalog/repository-context.json` | `true` |
| `docs/foundation/INVENTORY.md` | `egohygiene/empathy` | `foundation/catalog.json` | `true` |
| `foundation/contracts/empathy.gitignore-plan.json` | `egohygiene/empathy` | `foundation/catalog.json + foundation/empathy.manifest.json + foundation/ignore/*` | `true` |
| `foundation/contracts/empathy.repository-contract.toml` | `egohygiene/empathy` | `foundation/catalog.json + foundation/empathy.manifest.json` | `true` |
27 changes: 21 additions & 6 deletions docs/foundation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,24 @@ profiles.
- `docs/foundation/INVENTORY.md` is the deterministic human-readable
inventory.
- `foundation/contracts/empathy.repository-contract.toml` is the canonical,
offline EgoLint projection.
offline EgoLint presence/ownership projection.
- `foundation/contracts/empathy.gitignore-plan.json` is a deterministic proposal
with source and output hashes, not active-root adoption evidence.

## Gitignore contract under review

The [layered gitignore proposal](gitignore/README.md) records the candidate
universal rules, the existing-rule audit, Git behavior checks, and the first
file-contract review checkpoint. It is the first bounded part of
[issue #82](https://github.com/egohygiene/empathy/issues/82); catalog integration
and adoption remain subsequent work.
The [layered gitignore contract](gitignore/README.md) registers the universal
baseline and a Rust overlay in foundation `1.1.0`. The manifest explicitly
selects project roots, overlays, and repository-owned local additions. Planning
checks source hashes and emits JSON; Holon retains filesystem materialization
ownership. This is part 2 of
[issue #82](https://github.com/egohygiene/empathy/issues/82).
Golden-root migration and Filament adoption remain subsequent work.

The v1 schema filenames retain their major version; catalog/schema versions and
manifest references advance together to `1.1.0`. The resolver requires an exact
version match. Existing `1.0.0` consumers keep their pinned input and resolver
until explicitly upgraded. The selected Holon contract stays at `1.0.0`.

## Composition boundary

Expand All @@ -48,6 +57,8 @@ filesystem mutation engine. Identical catalog and manifest inputs resolve to
byte-identical JSON and EgoLint TOML. Re-resolving the checked-in Empathy
manifest produces no diff. Holon may later consume this released catalog when
planning and materializing repositories; Pace may propose reviewed upgrades.
The EgoLint projection still describes paths, ownership, executable flags, and
markers; its version bump does not introduce ignore-content conformance.

## Validation

Expand All @@ -61,6 +72,10 @@ python3 tools/foundation.py validate-manifest \
--manifest "foundation/empathy.manifest.json"
python3 tools/foundation.py check-inventory \
--output "docs/foundation/INVENTORY.md"
python3 tools/foundation.py check-gitignore-plan \
--manifest "foundation/empathy.manifest.json" \
--source-root "." \
--output "foundation/contracts/empathy.gitignore-plan.json"
python3 tools/foundation.py check-contract \
--manifest "foundation/empathy.manifest.json" \
--source-revision "<40-character-empathy-commit>" \
Expand Down
59 changes: 39 additions & 20 deletions docs/foundation/gitignore/ITERATION-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ before taking the next part. Do not close an issue from a partial PR.

## Repeatable process

<!-- prettier-ignore -->
1. **Inspect:** read live issues/PRs, instructions, architecture, decisions,
contracts, roadmap, and any continuity record. Record the source revision and
existing failures. Reuse an existing issue when its scope matches.
2. **Define:** record purpose, applicability, canonical owner, content model,
1. **Define:** record purpose, applicability, canonical owner, content model,
permitted variation, update behavior, and validation. Choose the smallest
reviewable outcome and identify real prerequisites.
3. **Implement and prove:** change the canonical source and add meaningful
1. **Implement and prove:** change the canonical source and add meaningful
behavioral checks. Include both required behavior and content that must
remain usable. Update affected projections only through their generators.
4. **Review and checkpoint:** inspect the whole diff, run relevant checks, link
1. **Review and checkpoint:** inspect the whole diff, run relevant checks, link
the PR, distinguish new failures from existing ones, and record incomplete
acceptance criteria and the exact next action. Keep the epic ledger current.
5. **Resume after merge:** reread review decisions and live default branches;
1. **Resume after merge:** reread review decisions and live default branches;
confirm what actually landed. Update the checkpoint and continue to the
next bounded part. Adopt in Filament only after the upstream contract is ready.

Expand Down Expand Up @@ -67,9 +68,37 @@ completed CI results. A passing local command or a merged PR does not establish
that those checks passed. The known catalog/workflow pin mismatch remains a
separate failure; this correction does not claim all-green repository CI.

After the correction is reviewed, take profile composition and contract
integration as the next bounded PR. Keep golden-root adoption in a later PR so
the composition model can be reviewed before its migration effects.
[PR #86](https://github.com/egohygiene/empathy/pull/86) merged as
`60a002418304ae379d373dc2d377b5b7cf1e2ceb`. Its completed MegaLinter run passed.
The next inspection verified that merge before starting part 2 from Empathy
`4c87f02849949a5fe04d79f36f65eca4b3c28486`.

## Part 2 checkpoint: composition and contract integration

Foundation `1.1.0` registers the universal baseline and explicitly scoped Rust
build overlay on the existing required, repository-owned `gitignore` artifact.
The manifest chooses project roots and local text. Composition orders selected
overlays, verbatim local additions, and the baseline last in every declared
scope. The Rust fixture proves scoped build exclusion and a reviewed exception
with adjacent output still ignored.

`tools/foundation.py plan-gitignore` emits a JSON proposal with source and content
hashes. `check-gitignore-plan` detects drift. The golden plan is not an assertion
that the active root matches it. Inventory and EgoLint projections are
regenerated; the latter still checks presence/ownership and markers, not ignore
content. Its source revision must point to a real commit containing this
catalog, not the old main revision.

Preservation, updates, rollback, source identity, schema compatibility, and the
unmanaged-nested-file limit are recorded in the [contract](README.md). Filesystem
merging remains Holon's responsibility. This part performs no root migration,
release, Filament adoption, or fleet operation. It contributes to `EMP-Q04`;
the roadmap step and #82 remain incomplete.

Review the explicit scope selection, baseline-last precedence, verbatim local
text model, and source integrity contract in the linked part 2 PR. Record exact
test results and completed CI there, then update #82 and the master epic. Stop
for maintainer review before beginning migration.

## Edges learned in this part

Expand All @@ -88,20 +117,10 @@ the composition model can be reviewed before its migration effects.
- Merging this part accepts a bounded source proposal; it does not prove
materialization, reusable CI conformance, or fleet adoption.

## Next bounded part after review
## Next bounded part after part 2 review

Reverify the merged part 1 PR and its validation correction. Then prepare one
Empathy PR for scoped profile composition and deterministic contract integration:

- Define the artifact identity, composition order, preservation, provenance,
and rollback behavior using the existing foundation catalog/manifest model.
- Give applicable overlays explicit owners, selection conditions, and project
roots. A selected Rust project can ignore its own `/target/` without hiding
source under an unrelated `target/` directory.
- Regenerate affected inventory/EgoLint projections and prove repeatability,
profile scope, and local exceptions in composition fixtures.

A subsequent PR migrates Empathy's active root. Before that change, resolve every
Verify the part 2 merge and its review decisions, then prepare one PR to migrate
Empathy's active root. Before that change, resolve every
remaining audit relocation against actual project roots and keep private-material
protection explicit and tested. Check for newly visible untracked files without
exposing contents. Keep #82 open until its full acceptance criteria are met.
Expand Down
Loading
Loading