agileflow 2.76.0 → 2.78.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 +3 -3
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +185 -13
- package/scripts/agileflow-statusline.sh +266 -27
- package/scripts/agileflow-welcome.js +160 -52
- package/scripts/auto-self-improve.js +63 -20
- package/scripts/check-update.js +1 -4
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/get-env.js +15 -7
- package/scripts/lib/frontmatter-parser.js +4 -1
- package/scripts/obtain-context.js +59 -48
- package/scripts/ralph-loop.js +25 -13
- package/scripts/validate-expertise.sh +19 -15
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +361 -36
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/list.js +3 -1
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/commands/uninstall.js +4 -5
- package/tools/cli/commands/update.js +11 -3
- package/tools/cli/lib/content-injector.js +6 -1
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Skill Learnings
|
|
2
|
+
|
|
3
|
+
This directory contains learnings files for self-improving skills. Each skill can have a corresponding `.yaml` file that stores user preferences and corrections learned over time.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Just like agents have `expertise.yaml` files that accumulate codebase knowledge, skills have learnings files that accumulate **user preferences**.
|
|
8
|
+
|
|
9
|
+
| Component | Agents | Skills |
|
|
10
|
+
|-----------|--------|--------|
|
|
11
|
+
| **What they learn** | Codebase knowledge | User preferences |
|
|
12
|
+
| **Learning file** | `expertise.yaml` | `learnings.yaml` |
|
|
13
|
+
| **Example learning** | "sessions table uses UUID primary keys" | "User prefers conventional commits" |
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
1. **On skill invocation**: Skill reads its learnings file (if exists)
|
|
18
|
+
2. **Apply preferences**: Skill output follows learned preferences
|
|
19
|
+
3. **On correction**: Skill extracts signal and updates learnings file
|
|
20
|
+
4. **Persist**: Changes saved for next session
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
24
|
+
│ Skill Execution Flow │
|
|
25
|
+
├─────────────────────────────────────────────────────────────┤
|
|
26
|
+
│ │
|
|
27
|
+
│ 1. Read _learnings/{skill}.yaml │
|
|
28
|
+
│ 2. Execute skill with learned preferences │
|
|
29
|
+
│ 3. User provides output │
|
|
30
|
+
│ 4. If correction detected: │
|
|
31
|
+
│ - Extract signal (what was wrong) │
|
|
32
|
+
│ - Determine confidence (high/medium/low) │
|
|
33
|
+
│ - Update learnings file │
|
|
34
|
+
│ 5. Continue with corrected output │
|
|
35
|
+
│ │
|
|
36
|
+
└─────────────────────────────────────────────────────────────┘
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## File Naming
|
|
40
|
+
|
|
41
|
+
Learnings files are named after their skill:
|
|
42
|
+
|
|
43
|
+
| Skill | Learnings File |
|
|
44
|
+
|-------|----------------|
|
|
45
|
+
| `commit-message-formatter` | `commit.yaml` |
|
|
46
|
+
| `agileflow-story-writer` | `story-writer.yaml` |
|
|
47
|
+
| `code-review` | `code-review.yaml` |
|
|
48
|
+
|
|
49
|
+
## Schema
|
|
50
|
+
|
|
51
|
+
See `_template.yaml` for the full schema. Key sections:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
skill: commit-message-formatter
|
|
55
|
+
version: 1
|
|
56
|
+
last_updated: 2026-01-06
|
|
57
|
+
|
|
58
|
+
preferences:
|
|
59
|
+
- signal: "User said 'no AI attribution'"
|
|
60
|
+
learning: "Never add AI footers"
|
|
61
|
+
confidence: high
|
|
62
|
+
captured: 2026-01-06
|
|
63
|
+
|
|
64
|
+
conventions:
|
|
65
|
+
- "Use imperative mood"
|
|
66
|
+
- "Keep subject under 50 chars"
|
|
67
|
+
|
|
68
|
+
anti_patterns:
|
|
69
|
+
- "Don't add emojis"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Confidence Levels
|
|
73
|
+
|
|
74
|
+
| Level | Trigger | Example |
|
|
75
|
+
|-------|---------|---------|
|
|
76
|
+
| **high** | Explicit correction ("never do X", "always do Y") | "Never include AI footers" |
|
|
77
|
+
| **medium** | Approval or pattern that worked | "User approved conventional commit format" |
|
|
78
|
+
| **low** | Observation to review | "User seemed to prefer shorter messages" |
|
|
79
|
+
|
|
80
|
+
## Version Control
|
|
81
|
+
|
|
82
|
+
Learnings files are version-controlled in git. This allows:
|
|
83
|
+
- **History**: See how preferences evolved over time
|
|
84
|
+
- **Rollback**: Revert if learning was incorrect
|
|
85
|
+
- **Sharing**: Team can share learned preferences
|
|
86
|
+
|
|
87
|
+
## Related
|
|
88
|
+
|
|
89
|
+
- [Agent Expert System](../../agents/experts/README.md) - Same pattern for agents
|
|
90
|
+
- [20260106-self-improving-skills-claude-code.md](../../../../../../../docs/10-research/20260106-self-improving-skills-claude-code.md) - Research
|
|
91
|
+
- [20251216-agent-experts-self-improving-agents.md](../../../../../../../docs/10-research/20251216-agent-experts-self-improving-agents.md) - Original pattern
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Skill Learnings Template
|
|
2
|
+
# Copy this file and rename to match your skill (e.g., commit.yaml)
|
|
3
|
+
#
|
|
4
|
+
# This file stores learned user preferences for a skill.
|
|
5
|
+
# It mirrors the expertise.yaml pattern used by agent experts.
|
|
6
|
+
|
|
7
|
+
# Skill identifier (matches the skill filename without extension)
|
|
8
|
+
skill: skill-name
|
|
9
|
+
|
|
10
|
+
# Schema version for migrations
|
|
11
|
+
version: 1
|
|
12
|
+
|
|
13
|
+
# Last time this file was updated
|
|
14
|
+
last_updated: 2026-01-06T00:00:00.000Z
|
|
15
|
+
|
|
16
|
+
# =============================================================================
|
|
17
|
+
# PREFERENCES
|
|
18
|
+
# =============================================================================
|
|
19
|
+
# Explicit preferences learned from user corrections.
|
|
20
|
+
# Each entry captures: what triggered the learning, what was learned, and confidence.
|
|
21
|
+
|
|
22
|
+
preferences:
|
|
23
|
+
# Example: High confidence from explicit correction
|
|
24
|
+
# - signal: "User said 'no AI attribution in commits'"
|
|
25
|
+
# learning: "Never add AI footers or Co-Authored-By lines"
|
|
26
|
+
# confidence: high
|
|
27
|
+
# captured: 2026-01-06T10:30:00.000Z
|
|
28
|
+
|
|
29
|
+
# Example: Medium confidence from approval
|
|
30
|
+
# - signal: "User approved 'feat(api): add user endpoint'"
|
|
31
|
+
# learning: "Use conventional commits with scope in parentheses"
|
|
32
|
+
# confidence: medium
|
|
33
|
+
# captured: 2026-01-06T11:00:00.000Z
|
|
34
|
+
|
|
35
|
+
# Example: Low confidence from observation
|
|
36
|
+
# - signal: "User shortened message from 60 to 45 chars"
|
|
37
|
+
# learning: "User may prefer shorter commit messages"
|
|
38
|
+
# confidence: low
|
|
39
|
+
# captured: 2026-01-06T11:30:00.000Z
|
|
40
|
+
|
|
41
|
+
# =============================================================================
|
|
42
|
+
# CONVENTIONS
|
|
43
|
+
# =============================================================================
|
|
44
|
+
# Established patterns this skill should always follow.
|
|
45
|
+
# These are high-confidence learnings that have been validated.
|
|
46
|
+
|
|
47
|
+
conventions:
|
|
48
|
+
# - "Use imperative mood in commit subject"
|
|
49
|
+
# - "Keep subject line under 50 characters"
|
|
50
|
+
# - "Separate subject from body with blank line"
|
|
51
|
+
|
|
52
|
+
# =============================================================================
|
|
53
|
+
# ANTI-PATTERNS
|
|
54
|
+
# =============================================================================
|
|
55
|
+
# Things this skill should never do.
|
|
56
|
+
# These are typically from explicit "never do X" corrections.
|
|
57
|
+
|
|
58
|
+
anti_patterns:
|
|
59
|
+
# - "Don't add emojis unless user explicitly requests"
|
|
60
|
+
# - "Don't use past tense in commit messages"
|
|
61
|
+
# - "Don't include issue numbers without prefix"
|
|
62
|
+
|
|
63
|
+
# =============================================================================
|
|
64
|
+
# CONTEXT
|
|
65
|
+
# =============================================================================
|
|
66
|
+
# Project-specific context the skill has learned.
|
|
67
|
+
# This helps the skill understand the environment it's operating in.
|
|
68
|
+
|
|
69
|
+
context:
|
|
70
|
+
# project_type: nodejs
|
|
71
|
+
# primary_language: typescript
|
|
72
|
+
# framework: next.js
|
|
73
|
+
# style_guide: conventional-commits
|
|
74
|
+
|
|
75
|
+
# =============================================================================
|
|
76
|
+
# EXAMPLES
|
|
77
|
+
# =============================================================================
|
|
78
|
+
# Good examples the skill has learned from.
|
|
79
|
+
# Can be referenced when generating new output.
|
|
80
|
+
|
|
81
|
+
examples:
|
|
82
|
+
# good:
|
|
83
|
+
# - "feat(auth): add OAuth2 login flow"
|
|
84
|
+
# - "fix(api): handle null response from external service"
|
|
85
|
+
#
|
|
86
|
+
# bad:
|
|
87
|
+
# - "Added stuff" # Too vague
|
|
88
|
+
# - "fixed bug" # No scope, past tense
|
|
89
|
+
|
|
90
|
+
# =============================================================================
|
|
91
|
+
# METADATA
|
|
92
|
+
# =============================================================================
|
|
93
|
+
# Tracking information for the learnings file.
|
|
94
|
+
|
|
95
|
+
metadata:
|
|
96
|
+
# Total number of corrections captured
|
|
97
|
+
corrections_count: 0
|
|
98
|
+
|
|
99
|
+
# Total number of approvals captured
|
|
100
|
+
approvals_count: 0
|
|
101
|
+
|
|
102
|
+
# When the file was first created
|
|
103
|
+
created: 2026-01-06T00:00:00.000Z
|
|
104
|
+
|
|
105
|
+
# Sessions that contributed to learnings
|
|
106
|
+
sessions: []
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Learnings for commit-message-formatter skill
|
|
2
|
+
# This file accumulates user preferences for commit message generation.
|
|
3
|
+
|
|
4
|
+
skill: commit-message-formatter
|
|
5
|
+
version: 1
|
|
6
|
+
last_updated: 2026-01-06T00:00:00.000Z
|
|
7
|
+
|
|
8
|
+
# =============================================================================
|
|
9
|
+
# PREFERENCES
|
|
10
|
+
# =============================================================================
|
|
11
|
+
preferences:
|
|
12
|
+
# From CLAUDE.md project settings
|
|
13
|
+
- signal: "Project CLAUDE.md specifies no AI attribution"
|
|
14
|
+
learning: "Never add AI footers, Co-Authored-By, or robot emojis to commits"
|
|
15
|
+
confidence: high
|
|
16
|
+
captured: 2026-01-06T00:00:00.000Z
|
|
17
|
+
|
|
18
|
+
# =============================================================================
|
|
19
|
+
# CONVENTIONS
|
|
20
|
+
# =============================================================================
|
|
21
|
+
conventions:
|
|
22
|
+
- "Use conventional commits format (feat/fix/chore/docs/refactor/test/style)"
|
|
23
|
+
- "Include scope in parentheses when applicable"
|
|
24
|
+
- "Use imperative mood in subject line"
|
|
25
|
+
- "Keep subject under 50 characters"
|
|
26
|
+
- "Separate subject from body with blank line"
|
|
27
|
+
- "Wrap body at 72 characters"
|
|
28
|
+
|
|
29
|
+
# =============================================================================
|
|
30
|
+
# ANTI-PATTERNS
|
|
31
|
+
# =============================================================================
|
|
32
|
+
anti_patterns:
|
|
33
|
+
- "Don't add AI attribution (footers, Co-Authored-By, emojis)"
|
|
34
|
+
- "Don't use past tense (use 'add' not 'added')"
|
|
35
|
+
- "Don't use vague messages ('fix stuff', 'update code')"
|
|
36
|
+
- "Don't include emojis unless explicitly requested"
|
|
37
|
+
|
|
38
|
+
# =============================================================================
|
|
39
|
+
# CONTEXT
|
|
40
|
+
# =============================================================================
|
|
41
|
+
context:
|
|
42
|
+
style_guide: conventional-commits
|
|
43
|
+
attribution: none
|
|
44
|
+
|
|
45
|
+
# =============================================================================
|
|
46
|
+
# EXAMPLES
|
|
47
|
+
# =============================================================================
|
|
48
|
+
examples:
|
|
49
|
+
good:
|
|
50
|
+
- "feat(auth): add OAuth2 login flow"
|
|
51
|
+
- "fix(api): handle null response from external service"
|
|
52
|
+
- "chore: update dependencies to latest versions"
|
|
53
|
+
- "docs: add API endpoint documentation"
|
|
54
|
+
- "refactor(db): extract query builder to separate module"
|
|
55
|
+
|
|
56
|
+
bad:
|
|
57
|
+
- "Added stuff"
|
|
58
|
+
- "fixed bug"
|
|
59
|
+
- "WIP"
|
|
60
|
+
- "feat: add feature 🚀"
|
|
61
|
+
|
|
62
|
+
# =============================================================================
|
|
63
|
+
# METADATA
|
|
64
|
+
# =============================================================================
|
|
65
|
+
metadata:
|
|
66
|
+
corrections_count: 0
|
|
67
|
+
approvals_count: 0
|
|
68
|
+
created: 2026-01-06T00:00:00.000Z
|
|
69
|
+
sessions: []
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# AgileFlow Damage Control - Security Rules
|
|
2
|
+
# Protects your codebase from destructive agent commands
|
|
3
|
+
#
|
|
4
|
+
# Configuration: /agileflow:configure → Damage Control
|
|
5
|
+
# Documentation: See research/20260106-claude-code-damage-control-hooks.md
|
|
6
|
+
#
|
|
7
|
+
# Schema Version: 1.0.0
|
|
8
|
+
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
|
|
11
|
+
# =====================================================
|
|
12
|
+
# BLOCKED BASH COMMANDS - Always blocked (exit code 2)
|
|
13
|
+
# =====================================================
|
|
14
|
+
# Regex patterns matched against the full bash command
|
|
15
|
+
# These commands are considered too dangerous to ever run
|
|
16
|
+
|
|
17
|
+
bashToolPatterns:
|
|
18
|
+
# ─── File System Destruction ───
|
|
19
|
+
- pattern: '\brm\s+(-[rRf]+\s+)*/'
|
|
20
|
+
reason: "rm with absolute path - could delete system files"
|
|
21
|
+
|
|
22
|
+
- pattern: '\brm\s+-[rRf]*\s+\.\.'
|
|
23
|
+
reason: "rm with parent directory - could escape project"
|
|
24
|
+
|
|
25
|
+
- pattern: '\brm\s+-rf\s+'
|
|
26
|
+
reason: "Recursive force delete - extremely dangerous"
|
|
27
|
+
|
|
28
|
+
- pattern: '\brmdir\s+(-p\s+)*/'
|
|
29
|
+
reason: "rmdir with absolute path"
|
|
30
|
+
|
|
31
|
+
# ─── Git Destructive Operations ───
|
|
32
|
+
- pattern: '\bgit\s+push\s+.*--force'
|
|
33
|
+
reason: "Force push can destroy remote history"
|
|
34
|
+
|
|
35
|
+
- pattern: '\bgit\s+push\s+.*-f\b'
|
|
36
|
+
reason: "Force push can destroy remote history"
|
|
37
|
+
|
|
38
|
+
- pattern: '\bgit\s+reset\s+--hard'
|
|
39
|
+
reason: "Hard reset discards uncommitted changes"
|
|
40
|
+
|
|
41
|
+
- pattern: '\bgit\s+clean\s+-fd'
|
|
42
|
+
reason: "Git clean with force deletes untracked files"
|
|
43
|
+
|
|
44
|
+
- pattern: '\bgit\s+branch\s+-D'
|
|
45
|
+
reason: "Force delete branch without merge check"
|
|
46
|
+
|
|
47
|
+
# ─── Database Destructive Operations ───
|
|
48
|
+
- pattern: 'DROP\s+(TABLE|DATABASE|INDEX|VIEW|SCHEMA)'
|
|
49
|
+
reason: "DROP commands are destructive"
|
|
50
|
+
flags: "i"
|
|
51
|
+
|
|
52
|
+
- pattern: 'TRUNCATE\s+TABLE'
|
|
53
|
+
reason: "TRUNCATE removes all data without logging"
|
|
54
|
+
flags: "i"
|
|
55
|
+
|
|
56
|
+
- pattern: 'DELETE\s+FROM\s+\w+\s*;'
|
|
57
|
+
reason: "DELETE without WHERE clause deletes all rows"
|
|
58
|
+
flags: "i"
|
|
59
|
+
|
|
60
|
+
# ─── System Modification ───
|
|
61
|
+
- pattern: '\bsudo\s+'
|
|
62
|
+
reason: "Sudo commands require manual execution"
|
|
63
|
+
|
|
64
|
+
- pattern: '\bchmod\s+777'
|
|
65
|
+
reason: "World-writable permissions are dangerous"
|
|
66
|
+
|
|
67
|
+
- pattern: '\bchown\s+-R'
|
|
68
|
+
reason: "Recursive ownership change"
|
|
69
|
+
|
|
70
|
+
- pattern: '\bchmod\s+-R'
|
|
71
|
+
reason: "Recursive permission change"
|
|
72
|
+
|
|
73
|
+
# ─── Disk Operations ───
|
|
74
|
+
- pattern: '\bdd\s+if='
|
|
75
|
+
reason: "dd can overwrite disks"
|
|
76
|
+
|
|
77
|
+
- pattern: '\bmkfs\.'
|
|
78
|
+
reason: "Filesystem creation"
|
|
79
|
+
|
|
80
|
+
- pattern: '\bfdisk\b'
|
|
81
|
+
reason: "Disk partitioning"
|
|
82
|
+
|
|
83
|
+
# ─── Process Control ───
|
|
84
|
+
- pattern: '\bkill\s+-9'
|
|
85
|
+
reason: "Force kill processes"
|
|
86
|
+
|
|
87
|
+
- pattern: '\bkillall\b'
|
|
88
|
+
reason: "Kill all matching processes"
|
|
89
|
+
|
|
90
|
+
- pattern: '\bpkill\s+-9'
|
|
91
|
+
reason: "Force kill by pattern"
|
|
92
|
+
|
|
93
|
+
# ─── Network/System ───
|
|
94
|
+
- pattern: '\biptables\s+'
|
|
95
|
+
reason: "Firewall modification"
|
|
96
|
+
|
|
97
|
+
- pattern: '\bsystemctl\s+(stop|disable|mask)'
|
|
98
|
+
reason: "System service modification"
|
|
99
|
+
|
|
100
|
+
# ─── Credential Exposure ───
|
|
101
|
+
- pattern: '\bcat\s+.*\.pem'
|
|
102
|
+
reason: "Displaying private keys"
|
|
103
|
+
|
|
104
|
+
- pattern: '\bcat\s+.*id_rsa'
|
|
105
|
+
reason: "Displaying SSH private keys"
|
|
106
|
+
|
|
107
|
+
# =====================================================
|
|
108
|
+
# ASK PATTERNS - Require user confirmation
|
|
109
|
+
# =====================================================
|
|
110
|
+
# Risky but sometimes valid - ask first before executing
|
|
111
|
+
|
|
112
|
+
askPatterns:
|
|
113
|
+
- pattern: 'DELETE\s+FROM\s+\w+\s+WHERE'
|
|
114
|
+
reason: "Deleting specific records - please confirm"
|
|
115
|
+
flags: "i"
|
|
116
|
+
|
|
117
|
+
- pattern: '\bnpm\s+publish'
|
|
118
|
+
reason: "Publishing to npm - please confirm"
|
|
119
|
+
|
|
120
|
+
- pattern: '\bgit\s+push\s+origin\s+(main|master)'
|
|
121
|
+
reason: "Pushing to main branch - please confirm"
|
|
122
|
+
|
|
123
|
+
- pattern: '\brm\s+-[rRf]*\s+node_modules'
|
|
124
|
+
reason: "Removing node_modules - please confirm"
|
|
125
|
+
|
|
126
|
+
- pattern: '\baws\s+.*delete'
|
|
127
|
+
reason: "AWS delete operation - please confirm"
|
|
128
|
+
flags: "i"
|
|
129
|
+
|
|
130
|
+
- pattern: '\bgcloud\s+.*delete'
|
|
131
|
+
reason: "GCloud delete operation - please confirm"
|
|
132
|
+
flags: "i"
|
|
133
|
+
|
|
134
|
+
- pattern: '\baz\s+.*delete'
|
|
135
|
+
reason: "Azure delete operation - please confirm"
|
|
136
|
+
flags: "i"
|
|
137
|
+
|
|
138
|
+
- pattern: '\bnpx\s+.*--force'
|
|
139
|
+
reason: "Force npx operation - please confirm"
|
|
140
|
+
|
|
141
|
+
- pattern: 'UPDATE\s+\w+\s+SET.*WHERE'
|
|
142
|
+
reason: "Database update - please confirm"
|
|
143
|
+
flags: "i"
|
|
144
|
+
|
|
145
|
+
# =====================================================
|
|
146
|
+
# PATH PROTECTION - File/directory access controls
|
|
147
|
+
# =====================================================
|
|
148
|
+
|
|
149
|
+
# Zero access - cannot read, write, edit, or delete
|
|
150
|
+
# These paths are completely off-limits
|
|
151
|
+
zeroAccessPaths:
|
|
152
|
+
- "~/.ssh/"
|
|
153
|
+
- "~/.aws/"
|
|
154
|
+
- "~/.gnupg/"
|
|
155
|
+
- "~/.config/gh/"
|
|
156
|
+
- ".env.production"
|
|
157
|
+
- ".env.local"
|
|
158
|
+
- ".env.secrets"
|
|
159
|
+
- "credentials.json"
|
|
160
|
+
- "secrets.yaml"
|
|
161
|
+
- "secrets.json"
|
|
162
|
+
- "*.pem"
|
|
163
|
+
- "*.key"
|
|
164
|
+
- "id_rsa"
|
|
165
|
+
- "id_ed25519"
|
|
166
|
+
|
|
167
|
+
# Read-only - can read but not modify
|
|
168
|
+
# Safe to view, but changes should be manual
|
|
169
|
+
readOnlyPaths:
|
|
170
|
+
- "~/.bashrc"
|
|
171
|
+
- "~/.zshrc"
|
|
172
|
+
- "~/.gitconfig"
|
|
173
|
+
- "/etc/"
|
|
174
|
+
- "package-lock.json"
|
|
175
|
+
- "yarn.lock"
|
|
176
|
+
- "pnpm-lock.yaml"
|
|
177
|
+
|
|
178
|
+
# No delete - can read and modify but not delete
|
|
179
|
+
# Important files that shouldn't be removed
|
|
180
|
+
noDeletePaths:
|
|
181
|
+
- ".claude/"
|
|
182
|
+
- ".agileflow/"
|
|
183
|
+
- "docs/09-agents/status.json"
|
|
184
|
+
- ".git/"
|
|
185
|
+
- "CLAUDE.md"
|
|
186
|
+
- "README.md"
|
|
187
|
+
- "package.json"
|
|
188
|
+
- "tsconfig.json"
|
|
189
|
+
|
|
190
|
+
# =====================================================
|
|
191
|
+
# AGILEFLOW-SPECIFIC PROTECTIONS
|
|
192
|
+
# =====================================================
|
|
193
|
+
# Additional rules specific to AgileFlow projects
|
|
194
|
+
|
|
195
|
+
agileflowProtections:
|
|
196
|
+
- pattern: '\brm\s+.*status\.json'
|
|
197
|
+
reason: "status.json tracks story progress - protected"
|
|
198
|
+
|
|
199
|
+
- pattern: '\brm\s+.*\.claude/'
|
|
200
|
+
reason: "Claude Code configuration - protected"
|
|
201
|
+
|
|
202
|
+
- pattern: '\brm\s+.*\.agileflow/'
|
|
203
|
+
reason: "AgileFlow installation - protected"
|
|
204
|
+
|
|
205
|
+
- pattern: '\brm\s+.*session-state\.json'
|
|
206
|
+
reason: "Session state tracking - protected"
|
|
207
|
+
|
|
208
|
+
- pattern: '\brm\s+.*expertise\.yaml'
|
|
209
|
+
reason: "Agent expertise files - protected"
|
|
210
|
+
|
|
211
|
+
# =====================================================
|
|
212
|
+
# NOTES
|
|
213
|
+
# =====================================================
|
|
214
|
+
#
|
|
215
|
+
# Exit Codes:
|
|
216
|
+
# 0 = Allow command to proceed
|
|
217
|
+
# 2 = Block command (show error message)
|
|
218
|
+
#
|
|
219
|
+
# Ask Pattern JSON Output:
|
|
220
|
+
# { "result": "ask", "message": "Confirm this action?" }
|
|
221
|
+
#
|
|
222
|
+
# Flags:
|
|
223
|
+
# "i" = case-insensitive matching
|
|
224
|
+
#
|
|
225
|
+
# Customization:
|
|
226
|
+
# Add project-specific patterns below this line
|
|
227
|
+
# Run /agileflow:configure → Damage Control to reconfigure
|
|
228
|
+
#
|
|
229
|
+
# =====================================================
|
|
230
|
+
|
|
231
|
+
# ─── Project-Specific Patterns (add yours below) ───
|
|
232
|
+
# customPatterns:
|
|
233
|
+
# - pattern: 'your-pattern-here'
|
|
234
|
+
# reason: "Your reason"
|
|
@@ -23,19 +23,45 @@ Include:
|
|
|
23
23
|
- Key capabilities
|
|
24
24
|
- Expected outcomes
|
|
25
25
|
|
|
26
|
+
## Self-Improving Learnings
|
|
27
|
+
|
|
28
|
+
This skill learns from your corrections and preferences.
|
|
29
|
+
|
|
30
|
+
**On invocation**:
|
|
31
|
+
1. Check if `.agileflow/skills/_learnings/{skill-name}.yaml` exists
|
|
32
|
+
2. If exists, read and apply learned preferences
|
|
33
|
+
3. Follow conventions and avoid anti-patterns from learnings
|
|
34
|
+
|
|
35
|
+
**On correction**:
|
|
36
|
+
1. When user corrects output, extract the signal
|
|
37
|
+
2. Determine confidence level:
|
|
38
|
+
- **high**: Explicit correction ("never do X", "always do Y")
|
|
39
|
+
- **medium**: User approved or pattern worked well
|
|
40
|
+
- **low**: Observation to review later
|
|
41
|
+
3. Update the learnings file with new preference
|
|
42
|
+
|
|
43
|
+
**Learnings file location**: `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
44
|
+
|
|
26
45
|
## Instructions
|
|
27
46
|
|
|
28
47
|
Step-by-step guidance for Claude:
|
|
29
48
|
|
|
30
|
-
1. **
|
|
31
|
-
-
|
|
32
|
-
-
|
|
49
|
+
1. **Load learnings** (if exists):
|
|
50
|
+
- Read `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
51
|
+
- Apply preferences, conventions, and anti-patterns
|
|
52
|
+
- Skip if file doesn't exist (first run)
|
|
33
53
|
|
|
34
|
-
2. **
|
|
35
|
-
-
|
|
36
|
-
-
|
|
54
|
+
2. **Execute skill**:
|
|
55
|
+
- Follow the instructions below with learned preferences applied
|
|
56
|
+
- [Your skill-specific step A]
|
|
57
|
+
- [Your skill-specific step B]
|
|
58
|
+
|
|
59
|
+
3. **If user corrects**:
|
|
60
|
+
- Extract signal from correction
|
|
61
|
+
- Update learnings file
|
|
62
|
+
- Continue with corrected approach
|
|
37
63
|
|
|
38
|
-
|
|
64
|
+
4. **Final step**: Complete the task
|
|
39
65
|
- Detail A
|
|
40
66
|
- Detail B
|
|
41
67
|
|
|
@@ -50,9 +76,11 @@ Describe the expected output or deliverable:
|
|
|
50
76
|
## Quality Checklist
|
|
51
77
|
|
|
52
78
|
Before completing, verify:
|
|
79
|
+
- [ ] Loaded learnings file (if exists)
|
|
80
|
+
- [ ] Applied learned preferences
|
|
53
81
|
- [ ] Requirement 1 met
|
|
54
82
|
- [ ] Requirement 2 met
|
|
55
|
-
- [ ]
|
|
83
|
+
- [ ] If corrected, updated learnings file
|
|
56
84
|
|
|
57
85
|
## Examples
|
|
58
86
|
|
|
@@ -68,8 +96,22 @@ Before completing, verify:
|
|
|
68
96
|
[Example of what Claude should produce]
|
|
69
97
|
```
|
|
70
98
|
|
|
99
|
+
### Example 2: Learning from Correction
|
|
100
|
+
|
|
101
|
+
**User Correction:**
|
|
102
|
+
```
|
|
103
|
+
"Don't include emojis in the output"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Self-Improve Action:**
|
|
107
|
+
1. Extract signal: "User said 'Don't include emojis'"
|
|
108
|
+
2. Learning: "Never include emojis in output"
|
|
109
|
+
3. Confidence: high (explicit correction)
|
|
110
|
+
4. Update `.agileflow/skills/_learnings/{skill-name}.yaml`
|
|
111
|
+
|
|
71
112
|
## Notes
|
|
72
113
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
114
|
+
- Learnings persist across sessions
|
|
115
|
+
- First run has no learnings file - that's OK
|
|
116
|
+
- High-confidence learnings are treated as rules
|
|
117
|
+
- Git tracks learnings evolution over time
|
|
@@ -10,7 +10,9 @@ const fs = require('fs-extra');
|
|
|
10
10
|
const yaml = require('js-yaml');
|
|
11
11
|
const { Installer } = require('../installers/core/installer');
|
|
12
12
|
const { displayLogo, displaySection, success, warning, info } = require('../lib/ui');
|
|
13
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
parseFrontmatter: parseYamlFrontmatter,
|
|
15
|
+
} = require('../../../scripts/lib/frontmatter-parser');
|
|
14
16
|
|
|
15
17
|
const installer = new Installer();
|
|
16
18
|
|