@dzhechkov/skills-feature-adr 1.3.2 → 1.3.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.
- package/bin/cli.js +0 -0
- package/package.json +2 -2
- package/src/cli.js +7 -1
- package/src/commands/init.js +5 -2
- package/src/commands/update.js +12 -5
- package/templates/.claude/commands/feature-adr.md +18 -6
- package/templates/.claude/rules/reward-learning.md +10 -1
- package/templates/.claude/skills/feature-adr/SKILL.md +1 -1
- package/templates/.claude/skills/feature-adr/modules/00-complexity-router.md +7 -3
- package/templates/.claude/skills/feature-adr/references/complexity-matrix.md +11 -6
- package/templates/lib/memory-protocol.md +4 -0
- package/templates/lib/reward-tracker.md +4 -0
package/bin/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzhechkov/skills-feature-adr",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Adaptive Feature Development skill pack for Claude Code — 11-step pipeline with Complexity Router (S/M/L/XL), ADR-driven architecture, 15 agentic-qe skills, multi-agent fleet QE. Supports --full-qe, --full-qe-extended, --with-learning, and --knowledge-extractor modes.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|
package/src/cli.js
CHANGED
|
@@ -97,8 +97,14 @@ function parseArgs(argv) {
|
|
|
97
97
|
command = 'version';
|
|
98
98
|
break;
|
|
99
99
|
default:
|
|
100
|
-
if (
|
|
100
|
+
if (arg.startsWith('-')) {
|
|
101
|
+
error(`Unknown option: ${arg}`);
|
|
102
|
+
process.exit(1);
|
|
103
|
+
} else if (command === null) {
|
|
101
104
|
command = arg;
|
|
105
|
+
} else {
|
|
106
|
+
error(`Unexpected argument: ${arg}`);
|
|
107
|
+
process.exit(1);
|
|
102
108
|
}
|
|
103
109
|
break;
|
|
104
110
|
}
|
package/src/commands/init.js
CHANGED
|
@@ -56,13 +56,16 @@ function installComponent(key, comp, templatesDir, targetDir) {
|
|
|
56
56
|
|
|
57
57
|
const filterFn = getComponentFilter(comp);
|
|
58
58
|
|
|
59
|
+
// Track files from the TEMPLATE source, never a scan of the destination — otherwise
|
|
60
|
+
// user-created files inside a component dir get adopted into the manifest and a later
|
|
61
|
+
// `remove` deletes them (finding #8). The filtered/plain copy still writes to dest.
|
|
59
62
|
if (filterFn) {
|
|
60
63
|
copyDirFiltered(src, dest, filterFn);
|
|
61
|
-
return getRelativePathsFiltered(
|
|
64
|
+
return getRelativePathsFiltered(src, filterFn).map((rel) => path.join(comp.src, rel));
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
copyDirRecursive(src, dest);
|
|
65
|
-
return getRelativePaths(
|
|
68
|
+
return getRelativePaths(src).map((rel) => path.join(comp.src, rel));
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
// Resolve which optional component keys to install based on flags
|
package/src/commands/update.js
CHANGED
|
@@ -8,7 +8,7 @@ const {
|
|
|
8
8
|
copyDirRecursive, copyDirFiltered, fileExists, readJSON,
|
|
9
9
|
ensureDir, getRelativePaths, getRelativePathsFiltered, diffFiles,
|
|
10
10
|
readManifest, writeManifest, getTemplatesDir,
|
|
11
|
-
COMPONENTS, MANIFEST_FILE, getComponentFilter,
|
|
11
|
+
COMPONENTS, OPTIONAL_COMPONENTS, MANIFEST_FILE, getComponentFilter,
|
|
12
12
|
} = require('../utils');
|
|
13
13
|
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
@@ -55,7 +55,11 @@ async function run(options) {
|
|
|
55
55
|
const filesToCopy = [];
|
|
56
56
|
|
|
57
57
|
for (const key of installedKeys) {
|
|
58
|
-
|
|
58
|
+
// Optional components (--with-learning / --knowledge-extractor) live in
|
|
59
|
+
// OPTIONAL_COMPONENTS, not COMPONENTS \u2014 looking only in COMPONENTS treated them
|
|
60
|
+
// as "Unknown component" and dropped their files from the manifest on every
|
|
61
|
+
// update (finding #7). Resolve from both registries.
|
|
62
|
+
const comp = COMPONENTS[key] || OPTIONAL_COMPONENTS[key];
|
|
59
63
|
if (!comp) {
|
|
60
64
|
warn(`Unknown component "${key}" in manifest \u2014 skipping.`);
|
|
61
65
|
continue;
|
|
@@ -131,16 +135,19 @@ async function run(options) {
|
|
|
131
135
|
// ── e) Update manifest ────────────────────────────────────────────────
|
|
132
136
|
const allFiles = [];
|
|
133
137
|
for (const key of installedKeys) {
|
|
134
|
-
const comp = COMPONENTS[key];
|
|
138
|
+
const comp = COMPONENTS[key] || OPTIONAL_COMPONENTS[key];
|
|
135
139
|
if (!comp) continue;
|
|
136
140
|
|
|
141
|
+
const srcPath = path.join(templatesDir, comp.src);
|
|
137
142
|
const destPath = path.join(targetDir, comp.src);
|
|
138
143
|
const filterFn = getComponentFilter(comp);
|
|
139
144
|
|
|
145
|
+
// Record from the TEMPLATE source, not a dest scan, so user files aren't adopted.
|
|
146
|
+
const scanBase = fileExists(srcPath) ? srcPath : destPath;
|
|
140
147
|
if (fileExists(destPath)) {
|
|
141
148
|
const paths = filterFn
|
|
142
|
-
? getRelativePathsFiltered(
|
|
143
|
-
: getRelativePaths(
|
|
149
|
+
? getRelativePathsFiltered(scanBase, filterFn)
|
|
150
|
+
: getRelativePaths(scanBase);
|
|
144
151
|
allFiles.push(...paths.map((rel) => path.join(comp.src, rel)));
|
|
145
152
|
}
|
|
146
153
|
}
|
|
@@ -27,12 +27,14 @@ $ARGUMENTS
|
|
|
27
27
|
- Определи `{ACTIVE_STEPS}` и `{TIME_BUDGET}`
|
|
28
28
|
- Покажи Checkpoint 0 и **жди подтверждения tier**
|
|
29
29
|
|
|
30
|
-
4. **Steps 1-
|
|
31
|
-
- Для каждого шага из `{ACTIVE_STEPS}
|
|
30
|
+
4. **Steps 1-9 — Execute Active Steps:**
|
|
31
|
+
- Для каждого шага из `{ACTIVE_STEPS}` (включая Step 3.5 для M+ и Step 9 для L/XL):
|
|
32
32
|
- Прочитай `modules/{step}.md`
|
|
33
33
|
- Выполни протокол шага
|
|
34
34
|
- Создай артефакты в `features/<slug>/`
|
|
35
35
|
- Покажи Checkpoint N
|
|
36
|
+
- **Step 3.5 (QCSD Ideation Swarm)** обязателен для M/L/XL — спавнит 3-9 параллельных агентов и выдаёт GO/CONDITIONAL/NO-GO verdict
|
|
37
|
+
- **Step 9 (Fleet QE Assessment)** обязателен для L/XL — 4 параллельных агента (traceability ‖ risk ‖ integration ‖ regression)
|
|
36
38
|
|
|
37
39
|
5. **Финализация:**
|
|
38
40
|
- Создай `features/<slug>/README.md` с summary
|
|
@@ -48,17 +50,22 @@ features/<feature-slug>/
|
|
|
48
50
|
└── 07_code_changes/ ← для манифеста изменений
|
|
49
51
|
```
|
|
50
52
|
|
|
53
|
+
Дополнительные артефакты создаются по мере выполнения шагов:
|
|
54
|
+
`03.5_ideation_report.md` (M+, Step 3.5) и `09_fleet_qe_assessment.md` (L/XL, Step 9).
|
|
55
|
+
|
|
51
56
|
Slug: kebab-case из описания фичи (латиница, max 40 символов).
|
|
52
57
|
|
|
53
58
|
## Параллелизация (Agent Swarm)
|
|
54
59
|
|
|
55
60
|
Для L/XL тiers:
|
|
56
61
|
- Steps 2+3 запускай параллельно (2 агента, sonnet + opus)
|
|
57
|
-
-
|
|
62
|
+
- Step 3.5: 3-9 параллельных агентов (QCSD swarm — core + conditional)
|
|
63
|
+
- Steps 4+5 можно параллельно если Step 3.5 уже завершён
|
|
58
64
|
- Step 7: N параллельных агентов (по одному на модуль)
|
|
59
|
-
- Step 8: 3 параллельных агента (
|
|
65
|
+
- Step 8: 3 параллельных агента (Linus ‖ Security ‖ Ramsay reviewer — brutal-honesty панель)
|
|
66
|
+
- Step 9: 4 параллельных агента (traceability ‖ risk ‖ integration ‖ regression); 4-7 с `--full-qe-extended`
|
|
60
67
|
|
|
61
|
-
Для S/M: всё последовательно, параллелизация не
|
|
68
|
+
Для S/M: всё последовательно, параллелизация не нужна (Step 3.5 для M спавнит 3 core агента).
|
|
62
69
|
|
|
63
70
|
## Model Routing
|
|
64
71
|
|
|
@@ -68,17 +75,19 @@ Slug: kebab-case из описания фичи (латиница, max 40 сим
|
|
|
68
75
|
| 1 Requirements | sonnet |
|
|
69
76
|
| 2 Research | sonnet |
|
|
70
77
|
| 3 ADR | opus |
|
|
78
|
+
| 3.5 QCSD Ideation Swarm | sonnet |
|
|
71
79
|
| 4 DDD | opus |
|
|
72
80
|
| 5 Architecture | opus |
|
|
73
81
|
| 6 Impl Plan | sonnet |
|
|
74
82
|
| 7 Code | opus |
|
|
75
83
|
| 8 QE | sonnet |
|
|
84
|
+
| 9 Fleet QE Assessment | sonnet |
|
|
76
85
|
|
|
77
86
|
## Checkpoint формат
|
|
78
87
|
|
|
79
88
|
```
|
|
80
89
|
═══════════════════════════════════════════════════════
|
|
81
|
-
⏸️ STEP N
|
|
90
|
+
⏸️ STEP N: [Step Name] Complete
|
|
82
91
|
<promise>[PROMISE_TAG]</promise>
|
|
83
92
|
Tier: {COMPLEXITY_TIER} | Active Steps: {ACTIVE_STEPS}
|
|
84
93
|
|
|
@@ -96,5 +105,8 @@ Artifacts: [list] ✅
|
|
|
96
105
|
- **НИКОГДА** не пропускай Step 0 (Router) — всегда классифицируй сначала
|
|
97
106
|
- **НИКОГДА** не начинай Step 7 (Code) без Step 6 (Plan)
|
|
98
107
|
- **НИКОГДА** не пропускай Step 8 (QE) — тестирование обязательно
|
|
108
|
+
- **НИКОГДА** не пропускай Step 3.5 (QCSD Ideation Swarm) для M/L/XL — quality assessment обязателен (BLOCK)
|
|
109
|
+
- **НИКОГДА** не игнорируй NO-GO verdict из Step 3.5 — требуется доработка (BLOCK)
|
|
110
|
+
- **НИКОГДА** не пропускай Step 9 (Fleet QE) для L/XL — fleet assessment обязателен (BLOCK)
|
|
99
111
|
- **ВСЕГДА** жди подтверждения пользователя на Checkpoint перед переходом
|
|
100
112
|
- **ВСЕ артефакты** создаются в `features/<slug>/`, не в корне проекта
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Reward Learning Rules
|
|
2
2
|
|
|
3
|
+
> **Scope:** This is the **shared Keysarium learning layer**, installed by `--with-learning`.
|
|
4
|
+
> It governs the Keysarium pipeline (Phases 0-5 with Casarium promise tags), NOT the
|
|
5
|
+
> feature-adr pipeline. The feature-adr pipeline emits its own `FEATURE_ADR_*` promise
|
|
6
|
+
> tags at Steps 0-9 and does not wire `memory_query()`/`memory_store()` into its steps.
|
|
7
|
+
> Install this only if you also run the Keysarium pipeline; if `@dzhechkov/keysarium`
|
|
8
|
+
> is present it already ships this layer and `--with-learning` is unnecessary.
|
|
9
|
+
> The `.claude/rules/feedback-loops.md` referenced below ships with `@dzhechkov/keysarium`,
|
|
10
|
+
> not with this package.
|
|
11
|
+
|
|
3
12
|
## Purpose
|
|
4
13
|
|
|
5
14
|
Govern how the Keysarium pipeline integrates with the Reward-Calibrated Learning System. These rules define when and how to call `memory_query()` and `memory_store()`, how reward scores are assigned, and how historical patterns influence phase execution.
|
|
@@ -82,7 +91,7 @@ If a promise is `_INCOMPLETE`, the reward should be 0.3 or lower.
|
|
|
82
91
|
|
|
83
92
|
## Integration with Feedback Loops
|
|
84
93
|
|
|
85
|
-
This system adds a new feedback loop to the Variable Registry (see `.claude/rules/feedback-loops.md`):
|
|
94
|
+
This system adds a new feedback loop to the Variable Registry (see `.claude/rules/feedback-loops.md`, shipped with `@dzhechkov/keysarium` — not bundled in this package):
|
|
86
95
|
|
|
87
96
|
### Loop 7: Memory -> All Phases
|
|
88
97
|
|
|
@@ -399,7 +399,7 @@ npx @dzhechkov/skills-feature-adr init --with-learning --knowledge-extractor
|
|
|
399
399
|
| Flag | Installs | Purpose |
|
|
400
400
|
|------|----------|---------|
|
|
401
401
|
| (none) | Core skill + command + rules + shard | Feature development pipeline |
|
|
402
|
-
| `--with-learning` | + `lib/memory-protocol.md`, `lib/reward-tracker.md`, `.claude/rules/reward-learning.md` |
|
|
402
|
+
| `--with-learning` | + `lib/memory-protocol.md`, `lib/reward-tracker.md`, `.claude/rules/reward-learning.md` | Installs the shared **Keysarium learning layer** (Phases 0-5, `.keysarium/memory/`). The feature-adr pipeline itself does not yet wire `memory_query`/`memory_store` into its Steps 0-9 — this layer applies only if you also run the Keysarium pipeline. |
|
|
403
403
|
| `--knowledge-extractor` | + `.claude/skills/knowledge-extractor/`, `.claude/commands/harvest.md` | Extract reusable patterns after feature completion |
|
|
404
404
|
|
|
405
405
|
> **Note:** If `@dzhechkov/keysarium` is already installed, these flags are not needed — keysarium includes all learning and extraction capabilities.
|
|
@@ -57,12 +57,16 @@ Load `references/complexity-matrix.md` for the full matrix. Summary:
|
|
|
57
57
|
| 0 Complexity Router | ✓ | ✓ | ✓ | ✓ |
|
|
58
58
|
| 1 Requirements | ✓ light | ✓ | ✓ | ✓ |
|
|
59
59
|
| 2 Research | - | - | ✓ | ✓ |
|
|
60
|
-
| 3 ADR | - | ✓ (1 ADR) | ✓ (N ADRs) | ✓ (N ADRs) |
|
|
60
|
+
| 3 ADR + Shift-Left | - | ✓ (1 ADR) | ✓ (N ADRs) | ✓ (N ADRs) |
|
|
61
|
+
| 3.5 QCSD Ideation Swarm | - | ✓ | ✓ | ✓ |
|
|
61
62
|
| 4 DDD | - | - | ✓ | ✓ |
|
|
62
63
|
| 5 Architecture | - | ✓ light | ✓ | ✓ |
|
|
63
64
|
| 6 Implementation Plan | ✓ inline | ✓ | ✓ | ✓ |
|
|
64
65
|
| 7 Code | ✓ | ✓ | ✓ | ✓ |
|
|
65
|
-
| 8 QE | ✓ smoke | ✓ | ✓ | ✓ full |
|
|
66
|
+
| 8 QE + Brutal Honesty | ✓ smoke | ✓ | ✓ | ✓ full |
|
|
67
|
+
| 9 Fleet QE Assessment | - | - | ✓ | ✓ |
|
|
68
|
+
|
|
69
|
+
> Steps 3.5 (M+) and 9 (L/XL) are mandatory — skipping them is a BLOCK per the shard Anti-Patterns.
|
|
66
70
|
|
|
67
71
|
### 5. Calculate Time Budget
|
|
68
72
|
|
|
@@ -92,7 +96,7 @@ Create artifact: `features/<slug>/00_complexity_assessment.md`
|
|
|
92
96
|
|
|
93
97
|
```
|
|
94
98
|
═══════════════════════════════════════════════════════
|
|
95
|
-
⏸️ STEP 0
|
|
99
|
+
⏸️ STEP 0: Complexity Router Complete
|
|
96
100
|
<promise>FEATURE_ADR_ROUTED</promise>
|
|
97
101
|
Tier: {COMPLEXITY_TIER} | Active Steps: {ACTIVE_STEPS}
|
|
98
102
|
|
|
@@ -79,39 +79,44 @@ Skipped: 2, 3, 4, 5
|
|
|
79
79
|
### Tier M (Score 9-13)
|
|
80
80
|
|
|
81
81
|
```
|
|
82
|
-
Active: 0 → 1 → 3(1 ADR) → 5(light) → 6 → 7 → 8
|
|
83
|
-
Skipped: 2, 4
|
|
82
|
+
Active: 0 → 1 → 3(1 ADR) → 3.5 → 5(light) → 6 → 7 → 8
|
|
83
|
+
Skipped: 2, 4, 9
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
**Step adaptations:**
|
|
87
87
|
- Step 3: Single ADR for the main architectural decision
|
|
88
|
+
- Step 3.5: QCSD ideation swarm — 3 core agents + GO/CONDITIONAL/NO-GO verdict (mandatory for M+ — skipping is a BLOCK)
|
|
88
89
|
- Step 5: Component diagram only, no full C4
|
|
89
90
|
|
|
90
91
|
### Tier L (Score 14-19)
|
|
91
92
|
|
|
92
93
|
```
|
|
93
|
-
Active: 0 → 1 → [2 ‖ 3] → [4 ‖ 5] → 6 → 7 → 8
|
|
94
|
-
Parallel groups: (2,3) and (4,5)
|
|
94
|
+
Active: 0 → 1 → [2 ‖ 3] → 3.5 → [4 ‖ 5] → 6 → 7 → 8 → 9
|
|
95
|
+
Parallel groups: (2,3) and (4,5); Step 3.5 runs after Step 3, Step 9 after Step 8
|
|
95
96
|
```
|
|
96
97
|
|
|
97
98
|
**Step adaptations:**
|
|
98
99
|
- Step 2: Research analogues in codebase and external patterns
|
|
99
100
|
- Step 3: Multiple ADRs for each significant decision
|
|
101
|
+
- Step 3.5: QCSD ideation swarm — 3-9 parallel agents + GO/CONDITIONAL/NO-GO verdict (mandatory for M+ — skipping is a BLOCK)
|
|
100
102
|
- Step 4: Bounded contexts + ubiquitous language
|
|
101
103
|
- Step 5: Full C4 (Context + Container + Component)
|
|
102
104
|
- Step 8: Unit + integration tests + code review
|
|
105
|
+
- Step 9: Fleet QE assessment — 4 parallel agents (traceability ‖ risk ‖ integration ‖ regression) (mandatory for L/XL — skipping is a BLOCK)
|
|
103
106
|
|
|
104
107
|
### Tier XL (Score 20-24)
|
|
105
108
|
|
|
106
109
|
```
|
|
107
|
-
Active: 0 → 1 → [2 ‖ 3] → [4 ‖ 5] → 6 → 7(parallel) → 8(full)
|
|
108
|
-
Parallel groups: (2,3), (4,5), (7 per module)
|
|
110
|
+
Active: 0 → 1 → [2 ‖ 3] → 3.5 → [4 ‖ 5] → 6 → 7(parallel) → 8(full) → 9
|
|
111
|
+
Parallel groups: (2,3), (4,5 — after 3.5), (7 per module)
|
|
109
112
|
```
|
|
110
113
|
|
|
111
114
|
**Step adaptations:**
|
|
112
115
|
- All steps at full depth
|
|
116
|
+
- Step 3.5: QCSD ideation swarm — 3-9 parallel agents + GO/CONDITIONAL/NO-GO verdict (mandatory for M+ — skipping is a BLOCK)
|
|
113
117
|
- Step 7: Multiple parallel agents, one per module/domain
|
|
114
118
|
- Step 8: Full QE — unit + integration + e2e + performance + security review
|
|
119
|
+
- Step 9: Fleet QE assessment — 4 parallel agents (4-7 with `--full-qe-extended`) (mandatory for L/XL — skipping is a BLOCK)
|
|
115
120
|
|
|
116
121
|
---
|
|
117
122
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Memory Protocol -- Reward-Calibrated Learning
|
|
2
2
|
|
|
3
|
+
> **Scope:** Shared **Keysarium learning layer** (installed by `--with-learning`). Governs the
|
|
4
|
+
> Keysarium pipeline (Phases 0-5, `.keysarium/memory/`), NOT the feature-adr pipeline. Install
|
|
5
|
+
> only if you also run Keysarium; `@dzhechkov/keysarium` already ships this layer.
|
|
6
|
+
|
|
3
7
|
Core protocol for persistent memory in the Keysarium pipeline. Provides `memory_query()` before tasks and `memory_store()` after tasks.
|
|
4
8
|
|
|
5
9
|
**Protocol version: 1.1** — adds 2-tier index, record lifecycle (HOT/WARM/COLD/PURGE), and brain container manifest.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Reward Tracker -- Analytics & Pattern Detection
|
|
2
2
|
|
|
3
|
+
> **Scope:** Shared **Keysarium learning layer** (installed by `--with-learning`). Operates on
|
|
4
|
+
> Keysarium reward records (`.keysarium/memory/`), NOT the feature-adr pipeline. Install only if
|
|
5
|
+
> you also run Keysarium; `@dzhechkov/keysarium` already ships this layer.
|
|
6
|
+
|
|
3
7
|
Computes aggregate statistics and detects domain patterns from accumulated reward records. Used by `/learning-stats` and by `memory_query()` for pattern enrichment.
|
|
4
8
|
|
|
5
9
|
## Overview
|