agentleFS
DariuszDuszaDariuszDusza/agentic-workflow-foundry/.agents/skills/workspace-import/SKILL.md

workspace-import

Skill1 starsChanged 27 days agoApache-2.0View on GitHub

Use when changing the ignore rules that decide what may enter history (any .gitignore, a new credential or packaging class, a question about what git add would stage), or when copying another project tree into this repository. Keeps packaging, credentials and customer data out of a history that cannot forget.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Assert both directions: After any ignore-file edit, the assertions must say what must be ignored and the neighbouring file that must stay …

    line 25
  2. Very specific:

    Use / for a pattern meant to match at any depth.

    line 29
  3. Distinctive:

    Never commit intending to clean up afterwards: the cleanup cannot reach history.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workspace import, and the ignore rules that make it safe

Required context

  1. .agents/guardrails/repo-hygiene.md: what may enter history, and why.
  2. .agents/guardrails/imports.md: the import procedure.
  3. .agents/guardrails/git-safety.md: version identity and tags.
  4. .agents/rules/gitignore-anchoring.md: applies with every ignore file.
  5. .agents/rules/areas-manifest.md: an imported tree becomes a declared area.

The facts behind every rule here

A commit object keeps what it is given, and git rm does not remove a file from history. An imported project typically carries far more packaging than content (dependency directories, build output, caches, uploaded media), and often a credential file or two. Getting the ignore rules wrong once is permanent unless history is rewritten, which is its own escalation.

The ignore rules: the everyday case

  • Assert both directions. After any ignore-file edit, the assertions must say what must be ignored and the neighbouring file that must stay tracked. A rule without an assertion is a rule nobody will notice breaking (docs/decisions/0005-every-gate-has-an-assertion-suite.md).
  • Anchoring: a slash anywhere but the end anchors the pattern to its own file's directory. Use **/ for a pattern meant to match at any depth.
  • Negations need the parent included. Git cannot re-include a file whose parent directory is excluded; exclude the directory's contents, then negate the keeper.
  • New credential classes go in the root ignore file, never only a sub-project's.
  • Do not rely on a personal global excludes file. It does not travel to another machine, a container or CI.
  • tools/preflight-init.sh is read-only: it reports what git add would stage and refuses on credential shapes. Gigabytes in its report means an exclude failed.

An import: the rare case

Escalate first. An import is high-risk. Confirm with the operator in the current conversation before starting; an approval never carries forward from a previous import.

The order, never reordered:

  1. Ignore-rule assertions green before anything is copied.
  2. Copy with an explicit exclude list (for example rsync with excludes). Never a bare recursive copy of everything. Keep the imported tree's own ignore files: they are additional layers.
  3. tools/preflight-init.sh: the staged size should match the content you expect, not the packaging. Gigabytes means an exclude failed: fix the rules and re-run.
  4. Assertions again, then tools/check-areas.sh.
  5. Declare the area in .agents/areas.json, add its node to knowledge-graph/workspace.jsonld, commit.

Never commit intending to clean up afterwards: the cleanup cannot reach history.

Tags are repository-global. A git describe --match glob searches the whole repository. An imported product's tags can outrank another product's release and silently become its version. Namespace tags per product, and never create a tag as a side effect of an import.

Hand off. An imported tree may carry its own agent guidance. It stays authoritative inside that tree; this repository's guidance points at it rather than restating it.

Verify

tools/preflight-init.sh      # what would be staged; refuses on credential shapes
tools/check-secrets.sh
tools/check-areas.sh
make test-gates              # includes the preflight tool's own suite

Reviewer: repo-hygiene-reviewer; security-data-reviewer when credentials are involved.

Escalate when

  • Any import, before it starts.
  • Anything already committed needs removing from history.
  • A tag would be created, moved or deleted.
  • The preflight report is far larger than the content you meant to add.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.