@ggdna/dna-gg 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,11 +32,6 @@ All skills of this layer are prefixed with `gg-`:
32
32
  - `/gg-publish` — releases the ticket
33
33
  - `/gg-cleanup` — removes what the ticket left behind
34
34
 
35
- ## Configuration
36
-
37
- - `dna/dot-github/workflows/quick_check.yaml` — the quick check pipeline
38
- every pull request has to pass
39
-
40
35
  ## Scripts
41
36
 
42
37
  - `dna/scripts/delete-feature-branch.js` — the one script this layer calls
package/dna/_dna.json CHANGED
@@ -5,12 +5,13 @@
5
5
 
6
6
  // The parent DNAs. dna_install brings the install overview this layer
7
7
  // extends with the gg install guides, dna_index the index conventions
8
- // every gg repo follows. Parents first, this layer wins.
8
+ // every gg repo follows, dna_github the GitHub repo setup and the quick
9
+ // check workflow. Parents first, this layer wins.
9
10
  //
10
11
  // dna_scripts is deliberately not a parent: this layer calls exactly one
11
12
  // of its scripts — `delete-feature-branch.js` from the /gg-cleanup skill —
12
13
  // and carries its own copy of it under dna/scripts/ instead. A consumer
13
14
  // that wants the full script set lists dna_scripts itself; the copies
14
15
  // here are byte-identical, so having both layers changes nothing.
15
- "layers": ["dna_install", "dna_index"]
16
+ "layers": ["dna_install", "dna_index", "dna_github"]
16
17
  }
@@ -25,13 +25,21 @@
25
25
  "via": null,
26
26
  "hash": "0x1d92b0add37a1ac7"
27
27
  },
28
+ {
29
+ "name": "dna-github",
30
+ "package": "@ggdna/dna-github",
31
+ "ecosystem": "node",
32
+ "resolvedVersion": "0.0.2",
33
+ "via": null,
34
+ "hash": "0xae24c13573219f91"
35
+ },
28
36
  {
29
37
  "name": "self",
30
38
  "package": null,
31
39
  "ecosystem": null,
32
40
  "resolvedVersion": null,
33
41
  "via": null,
34
- "hash": "0x80c6dc9dbb7e23c3"
42
+ "hash": "0xc0e2cebcfa39b9d7"
35
43
  }
36
44
  ],
37
45
  "claude": {
@@ -47,11 +55,11 @@
47
55
  },
48
56
  {
49
57
  "path": ".claude/skills/gg-commit/SKILL.md",
50
- "hash": "0xd2e82c49f737093b"
58
+ "hash": "0xdb7a268397facfc4"
51
59
  },
52
60
  {
53
61
  "path": ".claude/skills/gg-publish/SKILL.md",
54
- "hash": "0xaa7d82e9b407f561"
62
+ "hash": "0x61626e5e2425d9ab"
55
63
  },
56
64
  {
57
65
  "path": ".claude/skills/gg-push/SKILL.md",
@@ -59,7 +67,7 @@
59
67
  },
60
68
  {
61
69
  "path": ".claude/skills/gg-ticket/SKILL.md",
62
- "hash": "0x06f83f4f73c9fb42"
70
+ "hash": "0xe2e320fd71159027"
63
71
  },
64
72
  {
65
73
  "path": ".claude/skills/gg/SKILL.md",
@@ -87,7 +95,7 @@
87
95
  },
88
96
  {
89
97
  "path": "doc/guides/for-ai/ai-dev-guide.md",
90
- "hash": "0xbbaf82081767678b"
98
+ "hash": "0xa7d0d75d19ccfb0f"
91
99
  },
92
100
  {
93
101
  "path": "doc/guides/index-guide.md",
@@ -144,6 +152,14 @@
144
152
  {
145
153
  "path": "doc/templates/index-template.jsonc",
146
154
  "hash": "0x16c3a8d50c72ed6d"
155
+ },
156
+ {
157
+ "path": "guides/setup-github-guide.md",
158
+ "hash": "0x8681f11bbfaa0c00"
159
+ },
160
+ {
161
+ "path": "scripts/setup-github-repo.js",
162
+ "hash": "0xc05910cfe214fe3a"
147
163
  }
148
164
  ]
149
165
  }
@@ -62,8 +62,16 @@ repositories. The ticket then carries no plan of its own.
62
62
 
63
63
  ## Add git repositories
64
64
 
65
- Look at the `index.jsonc` of each repo in .ocean and decide which repos need to
66
- be added to the ticket.
65
+ Ask the user how the repos are chosen, as a single question with two
66
+ options: automatically or manually.
67
+
68
+ Manually: ask in a second single input field which repos the ticket needs,
69
+ e.g. `repo1 repo2`. Check each name against the repos in .ocean and ask
70
+ again for names that do not exist there. The entered list is the
71
+ confirmation; add the repos as shown below.
72
+
73
+ Automatically: look at the `index.jsonc` of each repo in .ocean and decide
74
+ which repos need to be added to the ticket.
67
75
  Make a plan for how you roughly want to implement the ticket.
68
76
  If certain parts of the implementation belong to a domain that does not yet
69
77
  exist in the .ocean folder, consider creating a new repository.
@@ -106,6 +114,42 @@ ticket.
106
114
  - Plan only: skip this step. The following steps then apply to the project
107
115
  management repo only.
108
116
 
117
+ ## Keep the publish config up to date
118
+
119
+ Each repo of the ticket has a file `.gg/publish_config.json`. gg offers its
120
+ values as defaults: `gg do commit` pre-fills the commit message editor with
121
+ `nextCommitMessage`, `gg do publish` pre-selects `versionIncrement` and
122
+ pre-fills the merge message with `mergeMessage`. git ignores the file.
123
+
124
+ Whenever you change code in a repo, update `nextCommitMessage` of that repo
125
+ so it describes everything that is not committed yet, not only your last
126
+ step. Create the file if it does not exist. Change only the keys you mean
127
+ to change and keep the rest — `commits` is written by gg, never by hand.
128
+
129
+ ```json
130
+ {
131
+ "publishConfig": {
132
+ "nextCommitMessage": {
133
+ "firstLine": "Let the user pick the ticket repos",
134
+ "details": ["Ask whether repos are chosen automatically or manually"]
135
+ },
136
+ "mergeMessage": "Let the user pick the ticket repos manually",
137
+ "versionIncrement": "minor"
138
+ }
139
+ }
140
+ ```
141
+
142
+ - `firstLine`: imperative, at most 60 characters
143
+ - `details`: optional, one entry per line
144
+ - `mergeMessage`: the pull request title and the merge commit message of
145
+ the repo
146
+ - `versionIncrement`: `patch`, `minor` or `major`, matching what the
147
+ ticket changes in the repo
148
+
149
+ Set `mergeMessage` and `versionIncrement` as soon as the change of the repo
150
+ is clear, and adjust them when it changes. Only `gg do commit` in the
151
+ ticket folder reads `nextCommitMessage`; `gg one do commit` does not.
152
+
109
153
  ## Commit
110
154
 
111
155
  ```bash
@@ -144,7 +188,8 @@ Afterwards load the review-light skill and execute it.
144
188
 
145
189
  - Create a blog post for the current ticket
146
190
  - Update the index.jsonc and README.md
147
- - Create the configuration for gg do publish
191
+ - Check `mergeMessage` and `versionIncrement` in `.gg/publish_config.json`
192
+ of each repo — `gg do publish` offers them as defaults
148
193
  - If the ticket was only planned, publish the project management repo only
149
194
 
150
195
  Ask the user to run the following command **manually**:
@@ -22,7 +22,13 @@ whenever you are inside a repo.
22
22
 
23
23
  Look at `git status` and `git diff` in the repos of the ticket. Propose one
24
24
  imperative one-liner that says what the step does, not which files changed.
25
- Let the user confirm it.
25
+ Start from `nextCommitMessage` in `.gg/publish_config.json` of each repo and
26
+ update it there if it no longer matches the diff (see the development
27
+ guide). Let the user confirm it.
28
+
29
+ If the user runs `gg do commit` in the ticket folder without `-m`, the
30
+ editor already shows each repo's `nextCommitMessage` — `-m` overrides it
31
+ with one message for all repos.
26
32
 
27
33
  ## 3. Commit
28
34
 
@@ -15,12 +15,15 @@ creates and pushes the version tags. It is interactive — the user runs it.
15
15
 
16
16
  ## 2. Configure the publish
17
17
 
18
- ```bash
19
- gg do configure-publish
20
- ```
18
+ Write per repo into `.gg/publish_config.json` (see the development guide):
19
+
20
+ - `mergeMessage` — the pull request title and merge commit message
21
+ - `versionIncrement` — `patch`, `minor` or `major`, matching what the
22
+ ticket changed
21
23
 
22
- Check per repo that the version bump matches what the ticket changed and
23
- that `CHANGELOG.md` reads well.
24
+ `gg do publish` pre-fills the merge message and pre-selects the version
25
+ increment with these values. Never run `gg do configure-publish` yourself,
26
+ it is interactive. Check that `CHANGELOG.md` reads well.
24
27
 
25
28
  ## 3. Let the user publish
26
29
 
@@ -52,10 +52,19 @@ Call it the "project management repo" whenever you write to the user, never
52
52
 
53
53
  ## 4. Choose the code repos
54
54
 
55
- Read the `index.md` of the candidate repos in `.ocean`. Tell the user which
56
- repos the ticket needs and what you roughly want to change in each one. If a
57
- part belongs to a domain that has no repo yet, say so and ask whether to
58
- create one. A ticket that is only planned may need no code repo at all.
55
+ Ask the user how the code repos are chosen, as a single question with two
56
+ options:
57
+
58
+ - **automatically** — Claude finds the repos. Read the `index.md` of the
59
+ candidate repos in `.ocean`. Tell the user which repos the ticket needs
60
+ and what you roughly want to change in each one. If a part belongs to a
61
+ domain that has no repo yet, say so and ask whether to create one.
62
+ - **manually** — the user names the repos. Ask in a second single input
63
+ field which repos the ticket needs, e.g. `repo1 repo2`. Check each name
64
+ against the repos in `.ocean` and ask again for names that do not exist
65
+ there. The entered list is the confirmation.
66
+
67
+ A ticket that is only planned may need no code repo at all.
59
68
 
60
69
  After the confirmation:
61
70
 
@@ -81,6 +90,6 @@ repo alone.
81
90
 
82
91
  ## Important
83
92
 
84
- - Never add repos without confirmation. Rather too few than too many — more
85
- can be added later.
93
+ - Never add repos without confirmation — a manually entered list counts as
94
+ one. Rather too few than too many — more can be added later.
86
95
  - Do not start the implementation unasked.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggdna/dna-gg",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "description": "DNA layer: gg CLI workflow guides, repo setup scripts and CI check",
5
5
  "keywords": [
6
6
  "dna",
@@ -28,12 +28,13 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
+ "@ggdna/dna-github": "^0.0.2",
31
32
  "@ggdna/dna-index": "^0.1.2",
32
33
  "@ggdna/dna-install": "^0.1.2"
33
34
  },
34
35
  "devDependencies": {
35
- "@types/node": "^26.6.2",
36
- "prettier": "^3.9.8"
36
+ "@types/node": "^26.6.4",
37
+ "prettier": "^3.9.9"
37
38
  },
38
39
  "scripts": {
39
40
  "test:dart": "dart test",
@@ -1,20 +0,0 @@
1
- # Runs the gg quick check on every push and pull request against main.
2
-
3
- name: Tests
4
-
5
- on:
6
- push:
7
- branches: ['main']
8
- pull_request:
9
- branches: ['main']
10
-
11
- jobs:
12
- build:
13
- name: dnaGitQuickCheckPipelineName
14
- runs-on: ubuntu-latest
15
-
16
- steps:
17
- - uses: actions/checkout@v5
18
-
19
- # Uses the Node.js preinstalled on the runner image.
20
- - run: npx @tssuite/ggwsm one did commit