@ggdna/dna-index 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) ggsuite
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # dna_index
2
+
3
+ The DNA layer that gives every repo an `index.jsonc` describing itself.
4
+
5
+ ## Guides
6
+
7
+ - `dna/doc/guides/index-guide.md` — when to create the index, how to use
8
+ it for planning, and when to update it
9
+
10
+ ## Templates
11
+
12
+ - `dna/doc/templates/index-template.jsonc` — name, summary, domain and
13
+ interfaces of a repo, with a comment explaining each field
14
+
15
+ ## Skills
16
+
17
+ - `/index` — compares the index against the code that is actually there
18
+ and reports entries that no longer exist
19
+
20
+ ## Layers
21
+
22
+ Orthogonal: this layer carries only its own topic and is combined with
23
+ other layers by the consuming repo.
24
+
25
+ ## Variables
26
+
27
+ - `dnaCopyrightHolder` — the name in the license header of every file
28
+
29
+ ## Usage
30
+
31
+ Declare it as a dev-dependency and initialize once:
32
+
33
+ ```bash
34
+ pnpm add -D @ggdna/dna-index # TypeScript projects
35
+ dart pub add dev:dna_index # Dart projects
36
+ helix init
37
+ ```
38
+
39
+ The placed test instantiates and verifies the DNA on every test run.
40
+
41
+ ## Development
42
+
43
+ The `dna/` folder is hand-authored source and is never generated. The repo
44
+ instantiates its own DNA — run `dart test` after changes; commit first, a
45
+ file the DNA would overwrite must not carry uncommitted work.
package/dna/_dna.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ // This package is a DNA layer: dna/ is hand-authored source and is the
3
+ // last layer of its own instantiation.
4
+ "version": 1,
5
+
6
+ // No parent DNA. This layer is orthogonal: it carries only its own topic
7
+ // and is combined with dna_base and other layers by the consumer.
8
+ "layers": []
9
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "version": 1,
3
+ "layers": [
4
+ {
5
+ "name": "base",
6
+ "package": "helix",
7
+ "ecosystem": null,
8
+ "resolvedVersion": "1.0.0",
9
+ "via": null,
10
+ "hash": "0x705e486e88a93125"
11
+ },
12
+ {
13
+ "name": "self",
14
+ "package": null,
15
+ "ecosystem": null,
16
+ "resolvedVersion": null,
17
+ "via": null,
18
+ "hash": "0x1d92b0add37a1ac7"
19
+ }
20
+ ],
21
+ "claude": {
22
+ "claudeMdInclude": null
23
+ },
24
+ "baseVersion": "1.0.0",
25
+ "baseHash": "0x705e486e88a93125",
26
+ "instances": [
27
+ {
28
+ "path": ".claude/skills/index/SKILL.md",
29
+ "hash": "0xc47429e51622cd7b"
30
+ },
31
+ {
32
+ "path": "doc/guides/index-guide.md",
33
+ "hash": "0xc684cc8895b98403"
34
+ },
35
+ {
36
+ "path": "doc/hello_world.md",
37
+ "hash": "0x0903f7fc5224f6f1"
38
+ },
39
+ {
40
+ "path": "doc/templates/index-template.jsonc",
41
+ "hash": "0x16c3a8d50c72ed6d"
42
+ }
43
+ ]
44
+ }
package/dna/_vars.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "dnaCopyrightHolder": "ggsuite"
3
+ }
@@ -0,0 +1,29 @@
1
+ <!--
2
+ @license
3
+ Copyright (c) dnaCopyrightHolder
4
+
5
+ Use of this source code is governed by terms that can be
6
+ found in the LICENSE file in the root of this package.
7
+ -->
8
+
9
+ # Index Guide
10
+
11
+ ## Create an index.jsonc
12
+
13
+ - If not present:
14
+ - Copy `doc/templates/index-template.jsonc` to `index.jsonc`
15
+ - Keep the fields of the template, add none of your own
16
+ - Keep the comments: they say what belongs in each field
17
+
18
+ ## Use index.jsonc for planning
19
+
20
+ - Read the index file before planning a ticket
21
+ - If needed, also read the index files of all ocean repos
22
+ - Then decide which repos you need for your ticket
23
+
24
+ ## Update index.jsonc before each publish
25
+
26
+ - Update the index file before publishing each ticket
27
+ - Write as short and token-saving as possible
28
+ - Use keywords instead of sentences
29
+ - Update changed files or interfaces
@@ -0,0 +1,26 @@
1
+ // @license
2
+ // Copyright (c) dnaCopyrightHolder
3
+ //
4
+ // Use of this source code is governed by terms that can be
5
+ // found in the LICENSE file in the root of this package.
6
+
7
+ {
8
+ // The package name, as declared in pubspec.yaml / package.json.
9
+ "name": "<pkg>",
10
+
11
+ // 1-2 sentence summary about this repo.
12
+ "summary": "",
13
+
14
+ // 1-3 bullet points: the problem space.
15
+ "domain": [],
16
+
17
+ // The repos this one depends on and the repos depending on it.
18
+ // Keep the reason or the API behind each entry, not just the name.
19
+ "interfaces": {
20
+ // "<repo-a>": "why / API"
21
+ "uses": {},
22
+
23
+ // "<repo-b>": "why / API"
24
+ "usedBy": {}
25
+ }
26
+ }
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: index
3
+ description: Creates or updates the repository index.jsonc from the index guide and template. Use when the user says "/index" or asks for the repo overview.
4
+ ---
5
+
6
+ <!--
7
+ @license
8
+ Copyright (c) dnaCopyrightHolder
9
+
10
+ Use of this source code is governed by terms that can be
11
+ found in the LICENSE file in the root of this package.
12
+ -->
13
+
14
+ # Index
15
+
16
+ Read `doc/guides/index-guide.md` and `doc/templates/index-template.jsonc`
17
+ and follow them.
18
+
19
+ ## 1. Check whether the index is current
20
+
21
+ Report a missing `index.jsonc`.
22
+
23
+ Compare the described domain, goal and interfaces against the code that
24
+ is actually there — public entry points, exported classes, commands.
25
+
26
+ Report every entry that no longer exists and every interface that is
27
+ missing.
28
+
29
+ ## 2. Update
30
+
31
+ Write the index, then show the diff before committing.
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@ggdna/dna-index",
3
+ "version": "0.1.0",
4
+ "description": "DNA layer: the index.md guide and template describing each repo",
5
+ "keywords": [
6
+ "dna",
7
+ "helix",
8
+ "conventions",
9
+ "scaffolding"
10
+ ],
11
+ "homepage": "https://github.com/ggdna/dna_index",
12
+ "bugs": "https://github.com/ggdna/dna_index/issues",
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/ggdna/dna_index.git"
17
+ },
18
+ "type": "module",
19
+ "files": [
20
+ "dna",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "engines": {
25
+ "node": ">=22"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "scripts": {
31
+ "test:dart": "dart test",
32
+ "test": "pnpm run test:dart",
33
+ "prepublishOnly": "pnpm run test",
34
+ "format": "prettier --write .",
35
+ "format:check": "prettier --check ."
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^26.2.0",
39
+ "prettier": "^3.9.6"
40
+ }
41
+ }