@elvis1513/auto-coding-skill 5.0.1 → 5.0.3

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema_version": 2,
3
- "skill_version": "5.0.1",
3
+ "skill_version": "5.0.3",
4
4
  "asset_files": [
5
5
  {
6
6
  "path": "SKILL.md",
@@ -8,11 +8,11 @@
8
8
  },
9
9
  {
10
10
  "path": "data/templates/ENVIRONMENT.md",
11
- "sha256": "d60f87e9511781b8d497aaad0ed9fedac9510b59d97090b0b3e7d6ce26a224c6"
11
+ "sha256": "daf360b44b2bb68315a201de2f82eaf2fce8e6f1e58ceefe91190c6f8916c125"
12
12
  },
13
13
  {
14
14
  "path": "data/templates/PROJECT.md",
15
- "sha256": "f7cc608d30e3c1ad30ce79310cfcf8d2149d109090e44d93b242fa9a073a19c3"
15
+ "sha256": "9e6bb774677b5d752453c09f0c22771b3075fc81969e564ee7c12bdc1310b143"
16
16
  },
17
17
  {
18
18
  "path": "data/templates/architecture/.gitkeep",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  {
22
22
  "path": "data/templates/bridges/AGENTS.md",
23
- "sha256": "4e45ae0ac5a08ba363339e3872ba7d39beb40dfe036cd9247a3536d60031d767"
23
+ "sha256": "e46deaf34d30690a0f242a2e4c668edc9b213099cb8c37310c90400f6ba5d6d8"
24
24
  },
25
25
  {
26
26
  "path": "data/templates/deployment/.gitkeep",
@@ -2,33 +2,21 @@
2
2
  # Shared Development Environment
3
3
 
4
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`.
5
+ It contains only common endpoints, ports, and credential lookup guidance.
8
6
 
9
7
  ## Shared services
10
8
 
11
- | Service | URL / host | Port | Credential variables | Notes |
9
+ | Service | URL / host | Port | Credential lookup | Notes |
12
10
  | --- | --- | --- | --- | --- |
13
- | GitLab web | `http://192.168.20.7:8929` | 8929 | `GITLAB_USERNAME`, `GITLAB_PASSWORD` | Source and merge-request UI |
11
+ | GitLab web | `http://192.168.20.7:8929` | 8929 | Local shared credential source | Source and merge-request UI |
14
12
  | 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 |
13
+ | Nexus | `http://192.168.20.7:8081` | 8081 | Local shared credential source | Package and image repository |
14
+ | Jenkins | `http://192.168.20.7:8080` | 8080 | Local shared credential source | Build and delivery UI |
15
+ | Shared backend access | See `docs/PROJECT.md` | project-specific | Local project credential source | Endpoint belongs to the project |
18
16
 
19
- ## Local credential source
17
+ ## Credential lookup
20
18
 
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.
24
-
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
- ```
19
+ Actual usernames and passwords are not stored in this document or any tracked
20
+ project documentation. Read them only from the local, untracked credential source
21
+ referenced by `docs/PROJECT.md`. Do not copy credentials into a repository, chat
22
+ transcript, build log, or deployment artifact.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Record only durable, project-specific information that helps later development
7
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`.
8
+ credentials here; use the local credential source reference below.
9
9
 
10
10
  ## Project services and ports
11
11
 
@@ -16,6 +16,7 @@ credentials here; use the local credential source named in `ENVIRONMENT.md`.
16
16
  ## Shared-access overrides
17
17
 
18
18
  - Backend host or URL:
19
+ - Local credential source path:
19
20
  - Required credential variable names:
20
21
  - Access constraints:
21
22
 
@@ -45,10 +45,10 @@ of creating parallel summaries.
45
45
  ## Environment and credentials
46
46
 
47
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.
48
+ credential lookup guidance, but never contains plaintext credentials. Project
49
+ specific configuration belongs in `docs/PROJECT.md`; it may name the local,
50
+ untracked credential source and required variable names, but never stores the
51
+ values. It is preserved across Skill upgrades. Never invent credentials, copy
52
+ them into chat output, or expose them in logs.
53
53
 
54
54
  <!-- auto-coding-skill:managed-agents:end -->
package/cli/src/index.js CHANGED
@@ -96,14 +96,58 @@ function isManaged(previous, relative) {
96
96
  return Array.isArray(previous?.entries) && previous.entries.some(entry => entry?.path === relative && entry?.ownership === "managed");
97
97
  }
98
98
 
99
+ function stripLegacyAccessConfiguration(text) {
100
+ return text.replace(/\n?## Migrated access configuration\s*\n```yaml\n[\s\S]*?\n```\s*/g, "\n").trim();
101
+ }
102
+
103
+ function stripCredentialMaterial(text) {
104
+ const lines = stripLegacyAccessConfiguration(text).split(/\r?\n/);
105
+ const output = [];
106
+ let noted = false;
107
+ const note = () => {
108
+ if (!noted) output.push("> Credential values are local-only; see the credential source reference below.");
109
+ noted = true;
110
+ };
111
+ for (let index = 0; index < lines.length; index += 1) {
112
+ const line = lines[index];
113
+ if (/^\|.*\b(password|token|secret|credential|private[ _-]?key)\b/i.test(line)) {
114
+ while (index < lines.length && /^\|/.test(lines[index])) index += 1;
115
+ index -= 1;
116
+ note();
117
+ continue;
118
+ }
119
+ if (/^```/.test(line)) {
120
+ const block = [line];
121
+ while (index + 1 < lines.length) {
122
+ index += 1;
123
+ block.push(lines[index]);
124
+ if (/^```/.test(lines[index])) break;
125
+ }
126
+ if (block.some(item => /\b(password|token|secret|private[ _-]?key)\b\s*[:=]/i.test(item))) note();
127
+ else output.push(...block);
128
+ continue;
129
+ }
130
+ if (/\b(password|token|secret|private[ _-]?key)\b.*(?:[:=]|\|)/i.test(line)) {
131
+ note();
132
+ continue;
133
+ }
134
+ output.push(line);
135
+ }
136
+ return output.join("\n").replace(/\n{3,}/g, "\n\n").trim();
137
+ }
138
+
99
139
  function migrateLegacyEnvironment(project) {
100
140
  const previous = readManifest(project);
101
141
  const environment = path.join(project, "docs", "ENVIRONMENT.md");
102
142
  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();
143
+ if (exists(projectConfig)) {
144
+ const existing = fs.readFileSync(projectConfig, "utf8");
145
+ const cleaned = stripCredentialMaterial(existing);
146
+ if (cleaned !== existing.trim()) fs.writeFileSync(projectConfig, `${cleaned}\n`);
147
+ return false;
148
+ }
149
+ if (!exists(environment) || isManaged(previous, "docs/ENVIRONMENT.md")) return false;
150
+ const legacy = stripCredentialMaterial(fs.readFileSync(environment, "utf8"));
107
151
  if (!legacy) return false;
108
152
  const template = fs.readFileSync(path.join(assetSkill, "data", "templates", "PROJECT.md"), "utf8").trimEnd();
109
153
  mkdirFor(projectConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvis1513/auto-coding-skill",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "CLI installer for project-owned engineering constitution, environment, and change-record documentation.",
5
5
  "type": "module",
6
6
  "bin": {