@elvis1513/auto-coding-skill 5.0.0 → 5.0.1
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 +13 -9
- package/cli/assets/managed-install.json +8 -4
- package/cli/assets/skill/SKILL.md +5 -3
- package/cli/assets/skill/data/templates/ENVIRONMENT.md +28 -24
- package/cli/assets/skill/data/templates/PROJECT.md +30 -0
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +8 -7
- package/cli/src/index.js +37 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# auto-coding-skill
|
|
2
2
|
|
|
3
3
|
`auto-coding-skill` 5.x provides detailed general engineering guidance plus a
|
|
4
|
-
small
|
|
4
|
+
small documentation layout. It is not a workflow engine.
|
|
5
5
|
|
|
6
6
|
It does not require a Gate, classification, task lifecycle, worktree, Reviewer,
|
|
7
7
|
test route, design record, Jenkins check, or deployment check.
|
|
@@ -18,6 +18,7 @@ documentation layout:
|
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
20
|
docs/ENVIRONMENT.md
|
|
21
|
+
docs/PROJECT.md
|
|
21
22
|
docs/architecture/
|
|
22
23
|
docs/design/
|
|
23
24
|
docs/interfaces/
|
|
@@ -25,14 +26,17 @@ docs/deployment/
|
|
|
25
26
|
docs/product/
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
`docs/ENVIRONMENT.md` is managed shared context and is refreshed on each
|
|
30
|
+
`init`/`sync`. It records common endpoints, ports, and local credential variable
|
|
31
|
+
names. `docs/PROJECT.md` is project-owned and never overwritten; use it for
|
|
32
|
+
project-specific configuration. Keep actual passwords only in the local,
|
|
33
|
+
untracked credential source referenced by the environment document.
|
|
34
|
+
|
|
35
|
+
Only `AGENTS.md` and `docs/ENVIRONMENT.md` are refreshed by later `init` or
|
|
36
|
+
`sync` runs. Project documents are created only when missing and are never
|
|
37
|
+
overwritten. Documentation is optional: record durable facts only when the user
|
|
38
|
+
asks or when they will help future work. Do not create a document for every task,
|
|
39
|
+
review, test, or commit.
|
|
36
40
|
|
|
37
41
|
## Commands
|
|
38
42
|
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 2,
|
|
3
|
-
"skill_version": "5.0.
|
|
3
|
+
"skill_version": "5.0.1",
|
|
4
4
|
"asset_files": [
|
|
5
5
|
{
|
|
6
6
|
"path": "SKILL.md",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "7747fb2619f6a7f7eb1ad0a0fbcc0e09d1bc084681ab9eb61489ba894615ab0c"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"path": "data/templates/ENVIRONMENT.md",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "d60f87e9511781b8d497aaad0ed9fedac9510b59d97090b0b3e7d6ce26a224c6"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"path": "data/templates/PROJECT.md",
|
|
15
|
+
"sha256": "f7cc608d30e3c1ad30ce79310cfcf8d2149d109090e44d93b242fa9a073a19c3"
|
|
12
16
|
},
|
|
13
17
|
{
|
|
14
18
|
"path": "data/templates/architecture/.gitkeep",
|
|
@@ -16,7 +20,7 @@
|
|
|
16
20
|
},
|
|
17
21
|
{
|
|
18
22
|
"path": "data/templates/bridges/AGENTS.md",
|
|
19
|
-
"sha256": "
|
|
23
|
+
"sha256": "4e45ae0ac5a08ba363339e3872ba7d39beb40dfe036cd9247a3536d60031d767"
|
|
20
24
|
},
|
|
21
25
|
{
|
|
22
26
|
"path": "data/templates/deployment/.gitkeep",
|
|
@@ -8,7 +8,8 @@ description: General project guidance and a lightweight documentation layout. It
|
|
|
8
8
|
Read `AGENTS.md`, then use the project documentation only when it helps the
|
|
9
9
|
current request:
|
|
10
10
|
|
|
11
|
-
- `docs/ENVIRONMENT.md` for
|
|
11
|
+
- `docs/ENVIRONMENT.md` for shared access endpoints, ports, and local credential references.
|
|
12
|
+
- `docs/PROJECT.md` for project-specific runtime facts and configuration.
|
|
12
13
|
- `docs/product/` for durable product context and decisions.
|
|
13
14
|
- `docs/architecture/`, `docs/design/`, `docs/interfaces/`, and
|
|
14
15
|
`docs/deployment/` for existing topic-specific knowledge.
|
|
@@ -21,5 +22,6 @@ contract, decision, test strategy, or operating procedure would otherwise be
|
|
|
21
22
|
lost. Choose the relevant existing folder; do not create routine task records,
|
|
22
23
|
review records, or duplicate summaries.
|
|
23
24
|
|
|
24
|
-
`autocoding init`
|
|
25
|
-
topic directories
|
|
25
|
+
`autocoding init` refreshes `AGENTS.md` and `docs/ENVIRONMENT.md`. It creates
|
|
26
|
+
`docs/PROJECT.md` and topic directories only when missing, and never overwrites
|
|
27
|
+
project-owned documentation.
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- auto-coding-skill:managed-environment -->
|
|
2
|
+
# Shared Development Environment
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
This managed document is refreshed by `autocoding init` and `autocoding sync`.
|
|
5
|
+
It contains only common endpoints, ports, and credential variable references.
|
|
6
|
+
Actual credentials stay in the local, untracked file
|
|
7
|
+
`~/.config/auto-coding-skill/credentials.env`.
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## Shared services
|
|
9
10
|
|
|
10
|
-
|
|
|
11
|
-
| --- | --- | --- |
|
|
12
|
-
| Repository root | | |
|
|
13
|
-
| Runtime/toolchain | | |
|
|
14
|
-
| Main services | | |
|
|
15
|
-
| Start command | | |
|
|
16
|
-
|
|
17
|
-
## Environments and access
|
|
18
|
-
|
|
19
|
-
| Environment | System / URL | Username | Password | Notes |
|
|
11
|
+
| Service | URL / host | Port | Credential variables | Notes |
|
|
20
12
|
| --- | --- | --- | --- | --- |
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
13
|
+
| GitLab web | `http://192.168.20.7:8929` | 8929 | `GITLAB_USERNAME`, `GITLAB_PASSWORD` | Source and merge-request UI |
|
|
14
|
+
| GitLab SSH | `192.168.20.7` | 2224 | SSH key / agent | Git remote transport |
|
|
15
|
+
| Nexus | `http://192.168.20.7:8081` | 8081 | `NEXUS_USERNAME`, `NEXUS_PASSWORD` | Package and image repository |
|
|
16
|
+
| Jenkins | `http://192.168.20.7:8080` | 8080 | `JENKINS_USERNAME`, `JENKINS_PASSWORD` | Build and delivery UI |
|
|
17
|
+
| Shared backend access | See `docs/PROJECT.md` | project-specific | `BACKEND_USERNAME`, `BACKEND_PASSWORD` | Common credentials; endpoint belongs to the project |
|
|
18
|
+
|
|
19
|
+
## Local credential source
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Create or update `~/.config/auto-coding-skill/credentials.env` locally. It must
|
|
22
|
+
never be copied into a repository, chat transcript, build log, or deployment
|
|
23
|
+
artifact.
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
```dotenv
|
|
26
|
+
GITLAB_USERNAME=
|
|
27
|
+
GITLAB_PASSWORD=
|
|
28
|
+
NEXUS_USERNAME=
|
|
29
|
+
NEXUS_PASSWORD=
|
|
30
|
+
JENKINS_USERNAME=
|
|
31
|
+
JENKINS_PASSWORD=
|
|
32
|
+
BACKEND_USERNAME=
|
|
33
|
+
BACKEND_PASSWORD=
|
|
34
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Project Configuration
|
|
2
|
+
|
|
3
|
+
> This document belongs to the project. `autocoding init` and `autocoding sync`
|
|
4
|
+
> create it only when missing and never overwrite it.
|
|
5
|
+
|
|
6
|
+
Record only durable, project-specific information that helps later development
|
|
7
|
+
or diagnosis. Do not put plaintext passwords, tokens, private keys, or other
|
|
8
|
+
credentials here; use the local credential source named in `ENVIRONMENT.md`.
|
|
9
|
+
|
|
10
|
+
## Project services and ports
|
|
11
|
+
|
|
12
|
+
- Application endpoints:
|
|
13
|
+
- Internal services:
|
|
14
|
+
- Runtime and dependency versions:
|
|
15
|
+
|
|
16
|
+
## Shared-access overrides
|
|
17
|
+
|
|
18
|
+
- Backend host or URL:
|
|
19
|
+
- Required credential variable names:
|
|
20
|
+
- Access constraints:
|
|
21
|
+
|
|
22
|
+
## Runtime and operations
|
|
23
|
+
|
|
24
|
+
- Local start and diagnostic entry points:
|
|
25
|
+
- Deployment topology:
|
|
26
|
+
- Logs and metrics:
|
|
27
|
+
|
|
28
|
+
## Constraints and durable decisions
|
|
29
|
+
|
|
30
|
+
-
|
|
@@ -28,7 +28,8 @@ answer a technical question. State clearly what was and was not verified.
|
|
|
28
28
|
|
|
29
29
|
Read relevant project documentation before relying on project context:
|
|
30
30
|
|
|
31
|
-
- `docs/ENVIRONMENT.md`:
|
|
31
|
+
- `docs/ENVIRONMENT.md`: shared GitLab, Nexus, Jenkins, and backend endpoint/port references. Managed and refreshed by the Skill.
|
|
32
|
+
- `docs/PROJECT.md`: project-specific runtime facts, access overrides, and constraints. Project-owned and never overwritten by the Skill.
|
|
32
33
|
- `docs/product/`: durable product context, boundaries, and decisions.
|
|
33
34
|
- `docs/architecture/`: architecture and ADRs.
|
|
34
35
|
- `docs/design/`: durable design notes that help future implementation.
|
|
@@ -43,11 +44,11 @@ of creating parallel summaries.
|
|
|
43
44
|
|
|
44
45
|
## Environment and credentials
|
|
45
46
|
|
|
46
|
-
`docs/ENVIRONMENT.md` is
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
`docs/ENVIRONMENT.md` is shared managed context: it names endpoint ports and
|
|
48
|
+
credential variables, but never contains plaintext credentials. Store actual
|
|
49
|
+
shared credentials in the local, untracked credential source named there. Put
|
|
50
|
+
project-specific configuration in `docs/PROJECT.md`; it is preserved across
|
|
51
|
+
Skill upgrades. Never invent credentials, copy them into chat output, or expose
|
|
52
|
+
them in logs.
|
|
52
53
|
|
|
53
54
|
<!-- auto-coding-skill:managed-agents:end -->
|
package/cli/src/index.js
CHANGED
|
@@ -9,14 +9,18 @@ const assetsRoot = path.join(packageRoot, "cli", "assets");
|
|
|
9
9
|
const assetSkill = path.join(assetsRoot, "skill");
|
|
10
10
|
const assetAgents = path.join(assetSkill, "data", "templates", "bridges", "AGENTS.md");
|
|
11
11
|
const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
|
|
12
|
-
const
|
|
12
|
+
const managedDocs = [
|
|
13
13
|
["ENVIRONMENT.md", "docs/ENVIRONMENT.md"],
|
|
14
|
+
];
|
|
15
|
+
const projectDocs = [
|
|
16
|
+
["PROJECT.md", "docs/PROJECT.md"],
|
|
14
17
|
["architecture/.gitkeep", "docs/architecture/.gitkeep"],
|
|
15
18
|
["design/.gitkeep", "docs/design/.gitkeep"],
|
|
16
19
|
["interfaces/.gitkeep", "docs/interfaces/.gitkeep"],
|
|
17
20
|
["deployment/.gitkeep", "docs/deployment/.gitkeep"],
|
|
18
21
|
["product/.gitkeep", "docs/product/.gitkeep"],
|
|
19
22
|
];
|
|
23
|
+
const bootstrapDocs = [...managedDocs, ...projectDocs];
|
|
20
24
|
|
|
21
25
|
function fail(message) { console.error(`\n[autocoding] ERROR: ${message}\n`); process.exit(1); }
|
|
22
26
|
function exists(file) { try { fs.accessSync(file); return true; } catch { return false; } }
|
|
@@ -88,6 +92,25 @@ function retireExactLegacyFiles(project) {
|
|
|
88
92
|
return retired;
|
|
89
93
|
}
|
|
90
94
|
|
|
95
|
+
function isManaged(previous, relative) {
|
|
96
|
+
return Array.isArray(previous?.entries) && previous.entries.some(entry => entry?.path === relative && entry?.ownership === "managed");
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function migrateLegacyEnvironment(project) {
|
|
100
|
+
const previous = readManifest(project);
|
|
101
|
+
const environment = path.join(project, "docs", "ENVIRONMENT.md");
|
|
102
|
+
const projectConfig = path.join(project, "docs", "PROJECT.md");
|
|
103
|
+
if (!exists(environment) || exists(projectConfig) || isManaged(previous, "docs/ENVIRONMENT.md")) return false;
|
|
104
|
+
const legacy = fs.readFileSync(environment, "utf8")
|
|
105
|
+
.replace(/\n?## Migrated access configuration\n\n```yaml\n[\s\S]*?\n```\n?/g, "\n")
|
|
106
|
+
.trim();
|
|
107
|
+
if (!legacy) return false;
|
|
108
|
+
const template = fs.readFileSync(path.join(assetSkill, "data", "templates", "PROJECT.md"), "utf8").trimEnd();
|
|
109
|
+
mkdirFor(projectConfig);
|
|
110
|
+
fs.writeFileSync(projectConfig, `${template}\n\n## Migrated pre-5.0.1 environment context\n\n${legacy}\n`);
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
91
114
|
function buildManifest(project) {
|
|
92
115
|
const entries = [];
|
|
93
116
|
const installedSkill = path.join(project, ".agents", "skills", "auto-coding-skill");
|
|
@@ -97,12 +120,15 @@ function buildManifest(project) {
|
|
|
97
120
|
}
|
|
98
121
|
const agentsTarget = path.join(project, "AGENTS.md");
|
|
99
122
|
entries.push({ path: "AGENTS.md", sha256: sha256(agentsTarget), ownership: "managed" });
|
|
123
|
+
const environmentTarget = path.join(project, "docs", "ENVIRONMENT.md");
|
|
124
|
+
entries.push({ path: "docs/ENVIRONMENT.md", sha256: sha256(environmentTarget), ownership: "managed" });
|
|
100
125
|
return {
|
|
101
|
-
schema_version:
|
|
126
|
+
schema_version: 3,
|
|
102
127
|
skill_version: pkg.version,
|
|
103
128
|
entries,
|
|
104
|
-
|
|
105
|
-
|
|
129
|
+
managed_documents: managedDocs.map(([, target]) => target),
|
|
130
|
+
project_documents: projectDocs.map(([, target]) => target),
|
|
131
|
+
note: "AGENTS.md and docs/ENVIRONMENT.md are refreshed by init/sync. Project documents are bootstrap-only and are never overwritten.",
|
|
106
132
|
};
|
|
107
133
|
}
|
|
108
134
|
|
|
@@ -114,8 +140,13 @@ function init(project) {
|
|
|
114
140
|
fs.rmSync(installedSkill, { recursive: true, force: true });
|
|
115
141
|
copyTree(assetSkill, installedSkill);
|
|
116
142
|
copyFile(assetAgents, path.join(root, "AGENTS.md"));
|
|
143
|
+
const migratedEnvironment = migrateLegacyEnvironment(root);
|
|
117
144
|
const created = [];
|
|
118
|
-
for (const [assetRelative, targetRelative] of
|
|
145
|
+
for (const [assetRelative, targetRelative] of managedDocs) {
|
|
146
|
+
const source = path.join(assetSkill, "data", "templates", assetRelative);
|
|
147
|
+
copyFile(source, path.join(root, targetRelative));
|
|
148
|
+
}
|
|
149
|
+
for (const [assetRelative, targetRelative] of projectDocs) {
|
|
119
150
|
const source = path.join(assetSkill, "data", "templates", assetRelative);
|
|
120
151
|
const target = path.join(root, targetRelative);
|
|
121
152
|
if (!exists(target)) {
|
|
@@ -127,7 +158,7 @@ function init(project) {
|
|
|
127
158
|
const manifestPath = path.join(root, ".agents", "managed-install.json");
|
|
128
159
|
mkdirFor(manifestPath);
|
|
129
160
|
fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
130
|
-
return { project: root, version: pkg.version, created, retired, managed: manifest.entries.length };
|
|
161
|
+
return { project: root, version: pkg.version, created, retired, migrated_environment: migratedEnvironment, managed: manifest.entries.length };
|
|
131
162
|
}
|
|
132
163
|
|
|
133
164
|
function status(project) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elvis1513/auto-coding-skill",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "CLI installer for project-owned engineering constitution, environment, and change-record documentation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"prepack": "npm run clean:cache",
|
|
19
19
|
"check:package": "npm run clean:cache && node cli/src/check-package.js",
|
|
20
20
|
"test": "node -c cli/src/index.js && node -c cli/src/sync-assets.js && node -c cli/tests/index.test.js && node cli/tests/index.test.js",
|
|
21
|
-
"test:src": "node -e \"const fs=require('fs'); for (const file of ['src/auto-coding-skill/SKILL.md','src/auto-coding-skill/data/templates/ENVIRONMENT.md','src/auto-coding-skill/data/templates/architecture/.gitkeep','src/auto-coding-skill/data/templates/product/.gitkeep','src/auto-coding-skill/data/templates/bridges/AGENTS.md']) if (!fs.existsSync(file)) throw new Error('missing '+file); console.log('source-doc-assets-ok')\"",
|
|
21
|
+
"test:src": "node -e \"const fs=require('fs'); for (const file of ['src/auto-coding-skill/SKILL.md','src/auto-coding-skill/data/templates/ENVIRONMENT.md','src/auto-coding-skill/data/templates/PROJECT.md','src/auto-coding-skill/data/templates/architecture/.gitkeep','src/auto-coding-skill/data/templates/product/.gitkeep','src/auto-coding-skill/data/templates/bridges/AGENTS.md']) if (!fs.existsSync(file)) throw new Error('missing '+file); console.log('source-doc-assets-ok')\"",
|
|
22
22
|
"check:assets": "node cli/src/sync-assets.js --check",
|
|
23
23
|
"sync-assets": "node cli/src/sync-assets.js",
|
|
24
24
|
"release:check": "npm run check:assets && npm run test:src && npm run test && npm run check:package"
|