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
2 changes: 1 addition & 1 deletion docs/concepts/packs.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ version: 1
packs: [claude]
ignore:
- .claude/settings.json
- docs/guidelines/**
- .agents/guidelines/**
```

- `packs` adds packs. A pack that does not exist in the hub blocks the target with
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ writer App delivers from the default branch.
your-org/engineering-assets the hub: packs/, hub.yml, targets.yml
│ one pull request per repository on every change to a pack
▼
your-org/billing, your-org/sdk-python opted in with .engineering-assets.yml
your-org/billing, your-org/sdk-python opted in, or subscribed by the hub
```

`touchmark setup github`, run from a clone of the hub with an administrator's token,
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/opt-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: 1
packs: [claude] # in addition to what the hub assigns
ignore:
- .claude/settings.json # we keep our own
- docs/guidelines/**
- .agents/guidelines/**
```

Commit it to the default branch. The next `distribute` run opens a sync pull request with
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ current version and receive updates again:

```sh
touchmark apply --hub ~/src/engineering-assets --adopt AGENTS.md
touchmark apply --hub ~/src/engineering-assets --adopt 'docs/guidelines/**'
touchmark apply --hub ~/src/engineering-assets --adopt '.agents/guidelines/**'
```

`--adopt` takes a glob and repeats. `ignore` in the opt-in file is stronger: an ignored
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/opt-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: 1
packs: [claude] # in addition to what the hub assigns
ignore:
- .claude/settings.json # this repository keeps its own
- docs/guidelines/**
- .agents/guidelines/**
```

- `enabled: false` opts the repository out, whatever `targets.yml` says: it is skipped
Expand Down
10 changes: 5 additions & 5 deletions internal/config/providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func TestOptInHash(t *testing.T) {
const (
empty = "sha256:30e55501db0d69e2eacd8c683b38f517a65230d7627732f2b4aaedaf2f63604c" // "touchmark-optin/v1\nversion 1\n"
claude = "sha256:baad60f2cace5239242fc31de906495bdfd4e21a8629223087b177a9ec6a1a69" // + "pack 6:claude\n"
documented = "sha256:878b7d2c14501ddfe4da33ea6dc86bf713fcc7c8aa058cac32ef882b2294d343" // + "ignore 21:.claude/settings.json\nignore 18:docs/guidelines/**\n"
documented = "sha256:6d10fe0a880c6cb1c134abc2f3f465e2ad755d81b1a9db34eca9c5e86e80c626" // + "ignore 21:.agents/guidelines/**\nignore 21:.claude/settings.json\n"
two = "sha256:82593c8b5735ffd2640a700d424e7ee4852a70064723380f407f8e6d7955bf63" // "pack 6:agents\npack 6:claude\n"
nl = "sha256:de2595845a1b2ac3af43a40dc997f83113d6432c7c776923866bc2f0804f216b" // "ignore 3:a\nb\n"
ab = "sha256:6440ee73aaed31d625fb7536d288db75a82ff5a18d1ae2fc074889cb9c24d623" // "ignore 1:a\nignore 1:b\n"
Expand All @@ -606,7 +606,7 @@ func TestOptInHash(t *testing.T) {
{"legacy", &OptIn{Version: 1, Legacy: true}, empty},
{"empty lists", &OptIn{Version: 1, Packs: []string{}, Ignore: []string{}}, empty},
{"a pack", &OptIn{Packs: []string{"claude"}}, claude},
{"documented example", &OptIn{Version: 1, Packs: []string{"claude"}, Ignore: []string{"docs/guidelines/**", ".claude/settings.json"}}, documented},
{"documented example", &OptIn{Version: 1, Packs: []string{"claude"}, Ignore: []string{".agents/guidelines/**", ".claude/settings.json"}}, documented},
{"sorted and deduplicated", &OptIn{Packs: []string{"claude", "agents", "claude"}}, two},
{"a pattern with a newline", &OptIn{Ignore: []string{"a\nb"}}, nl},
{"two patterns", &OptIn{Ignore: []string{"b", "a", "./a/", " b "}}, ab},
Expand All @@ -621,9 +621,9 @@ func TestOptInHash(t *testing.T) {
// Comments, order, formatting, duplicates and the version key do not
// change the hash of a parsed file.
same := []string{
"version: 1\npacks: [claude]\nignore:\n - .claude/settings.json\n - docs/guidelines/**\n",
"# The team's choice.\nignore: ['./docs/guidelines/**', '.claude/settings.json/', .claude/settings.json]\npacks:\n - claude # reviewed\n - claude\n",
"version: 1\r\nignore: [\"docs\\\\guidelines\\\\**\", \" .claude/settings.json \"]\r\npacks: [claude]\r\n",
"version: 1\npacks: [claude]\nignore:\n - .claude/settings.json\n - .agents/guidelines/**\n",
"# The team's choice.\nignore: ['./.agents/guidelines/**', '.claude/settings.json/', .claude/settings.json]\npacks:\n - claude # reviewed\n - claude\n",
"version: 1\r\nignore: [\".agents\\\\guidelines\\\\**\", \" .claude/settings.json \"]\r\npacks: [claude]\r\n",
}
for _, text := range same {
o, _, err := ParseOptIn([]byte(text))
Expand Down
2 changes: 1 addition & 1 deletion internal/config/testdata/opt-in/valid/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ version: 1
packs: [claude] # in addition to what the hub assigns
ignore:
- .claude/settings.json
- docs/guidelines/**
- .agents/guidelines/**
2 changes: 1 addition & 1 deletion internal/e2e/gitlab/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func TestTemplate(t *testing.T) {
t.Errorf("%s: open merge requests %v, want one on touchmark/%s by %s", p.PathWithNamespace, got, id, rep.Writer)
continue
}
if !e.fileExists(t, p.ID, "touchmark/"+id, "AGENTS.md") || !e.fileExists(t, p.ID, "touchmark/"+id, "docs/guidelines/database.md") {
if !e.fileExists(t, p.ID, "touchmark/"+id, "AGENTS.md") || !e.fileExists(t, p.ID, "touchmark/"+id, ".agents/guidelines/database.md") {
t.Errorf("%s: the sync branch lacks the packs' files", p.PathWithNamespace)
}
}
Expand Down
Loading