@harness-engineering/cli 1.4.0 → 1.6.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/dist/agents/personas/architecture-enforcer.yaml +1 -0
- package/dist/agents/personas/code-reviewer.yaml +43 -0
- package/dist/agents/personas/codebase-health-analyst.yaml +32 -0
- package/dist/agents/personas/documentation-maintainer.yaml +2 -0
- package/dist/agents/personas/entropy-cleaner.yaml +3 -0
- package/dist/agents/personas/graph-maintainer.yaml +27 -0
- package/dist/agents/personas/parallel-coordinator.yaml +29 -0
- package/dist/agents/personas/performance-guardian.yaml +26 -0
- package/dist/agents/personas/security-reviewer.yaml +35 -0
- package/dist/agents/personas/task-executor.yaml +41 -0
- package/dist/agents/skills/README.md +8 -0
- package/dist/agents/skills/claude-code/add-harness-component/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/align-documentation/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +8 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +494 -0
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +52 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +25 -0
- package/dist/agents/skills/claude-code/harness-debugging/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +150 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +41 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +135 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +44 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +139 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/skill.yaml +44 -0
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +20 -6
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +154 -0
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/skill.yaml +49 -0
- package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/harness-parallel-agents/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +231 -0
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +47 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +236 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/skill.yaml +47 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +33 -2
- package/dist/agents/skills/claude-code/harness-refactoring/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +657 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/skill.yaml +57 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +206 -0
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +50 -0
- package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +102 -0
- package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +41 -0
- package/dist/agents/skills/claude-code/harness-state-management/SKILL.md +22 -8
- package/dist/agents/skills/claude-code/harness-tdd/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +131 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/skill.yaml +44 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +9 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +494 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +150 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +41 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +135 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +44 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +139 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/skill.yaml +44 -0
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +154 -0
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +231 -0
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +236 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +657 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/skill.yaml +57 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +102 -0
- package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +41 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +131 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/skill.yaml +44 -0
- package/dist/agents/skills/tests/platform-parity.test.ts +131 -0
- package/dist/agents/skills/tests/schema.ts +2 -0
- package/dist/bin/harness.js +2 -2
- package/dist/{chunk-EFZOLZFB.js → chunk-ACMDUQJG.js} +4 -2
- package/dist/{chunk-C3J2HW4Y.js → chunk-O6NEKDYP.js} +2002 -487
- package/dist/{create-skill-4GKJZB5R.js → create-skill-NZDLMMR6.js} +1 -1
- package/dist/index.d.ts +265 -143
- package/dist/index.js +30 -4
- package/package.json +3 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
name: Code Reviewer
|
|
3
|
+
description: Full-lifecycle code review with harness methodology
|
|
4
|
+
role: >
|
|
5
|
+
Perform AI-powered code review incorporating harness validation,
|
|
6
|
+
architectural analysis, and project-specific calibration.
|
|
7
|
+
Produces structured Strengths/Issues/Assessment output.
|
|
8
|
+
skills:
|
|
9
|
+
- harness-code-review
|
|
10
|
+
steps:
|
|
11
|
+
- command: validate
|
|
12
|
+
when: always
|
|
13
|
+
- command: check-deps
|
|
14
|
+
when: always
|
|
15
|
+
- command: check-docs
|
|
16
|
+
when: on_pr
|
|
17
|
+
- command: check-perf
|
|
18
|
+
when: on_pr
|
|
19
|
+
- skill: harness-code-review
|
|
20
|
+
when: on_pr
|
|
21
|
+
output: auto
|
|
22
|
+
- skill: harness-code-review
|
|
23
|
+
when: manual
|
|
24
|
+
output: auto
|
|
25
|
+
triggers:
|
|
26
|
+
- event: on_pr
|
|
27
|
+
conditions:
|
|
28
|
+
paths:
|
|
29
|
+
- "src/**"
|
|
30
|
+
- "packages/**"
|
|
31
|
+
- event: on_commit
|
|
32
|
+
conditions:
|
|
33
|
+
branches:
|
|
34
|
+
- main
|
|
35
|
+
- develop
|
|
36
|
+
config:
|
|
37
|
+
severity: error
|
|
38
|
+
autoFix: false
|
|
39
|
+
timeout: 600000
|
|
40
|
+
outputs:
|
|
41
|
+
agents-md: true
|
|
42
|
+
ci-workflow: true
|
|
43
|
+
runtime-config: true
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: Codebase Health Analyst
|
|
3
|
+
description: Proactively identifies structural problems, coupling risks, and architectural drift
|
|
4
|
+
role: Run health checks, detect hotspots, analyze impact, surface risks before they become incidents
|
|
5
|
+
skills:
|
|
6
|
+
- harness-hotspot-detector
|
|
7
|
+
- harness-dependency-health
|
|
8
|
+
- harness-impact-analysis
|
|
9
|
+
- cleanup-dead-code
|
|
10
|
+
- harness-perf
|
|
11
|
+
- harness-security-scan
|
|
12
|
+
commands:
|
|
13
|
+
- graph status
|
|
14
|
+
- check-deps
|
|
15
|
+
- check-perf
|
|
16
|
+
- check-security
|
|
17
|
+
triggers:
|
|
18
|
+
- event: scheduled
|
|
19
|
+
cron: "0 6 * * 1"
|
|
20
|
+
- event: on_pr
|
|
21
|
+
conditions:
|
|
22
|
+
min_files: 10
|
|
23
|
+
- event: manual
|
|
24
|
+
config:
|
|
25
|
+
severity: warning
|
|
26
|
+
autoFix: false
|
|
27
|
+
timeout: 600000
|
|
28
|
+
securitySeverity: warning
|
|
29
|
+
outputs:
|
|
30
|
+
agents-md: false
|
|
31
|
+
ci-workflow: true
|
|
32
|
+
runtime-config: true
|
|
@@ -5,9 +5,11 @@ role: Detect documentation drift, validate doc coverage, align docs with code ch
|
|
|
5
5
|
skills:
|
|
6
6
|
- detect-doc-drift
|
|
7
7
|
- align-documentation
|
|
8
|
+
- harness-knowledge-mapper
|
|
8
9
|
commands:
|
|
9
10
|
- check-docs
|
|
10
11
|
- validate
|
|
12
|
+
- scan
|
|
11
13
|
triggers:
|
|
12
14
|
- event: on_pr
|
|
13
15
|
conditions:
|
|
@@ -5,9 +5,12 @@ role: Run scheduled cleanup, detect documentation drift, fix pattern violations
|
|
|
5
5
|
skills:
|
|
6
6
|
- cleanup-dead-code
|
|
7
7
|
- detect-doc-drift
|
|
8
|
+
- harness-hotspot-detector
|
|
9
|
+
- harness-impact-analysis
|
|
8
10
|
commands:
|
|
9
11
|
- cleanup
|
|
10
12
|
- fix-drift
|
|
13
|
+
- scan
|
|
11
14
|
triggers:
|
|
12
15
|
- event: scheduled
|
|
13
16
|
cron: "0 6 * * 1"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: Graph Maintainer
|
|
3
|
+
description: Keeps the knowledge graph fresh, monitors connector health, and ensures data quality
|
|
4
|
+
role: Re-scan codebase, sync external connectors, detect graph anomalies, maintain graph freshness
|
|
5
|
+
skills:
|
|
6
|
+
- harness-dependency-health
|
|
7
|
+
- harness-knowledge-mapper
|
|
8
|
+
- validate-context-engineering
|
|
9
|
+
commands:
|
|
10
|
+
- scan
|
|
11
|
+
- ingest
|
|
12
|
+
- graph status
|
|
13
|
+
triggers:
|
|
14
|
+
- event: scheduled
|
|
15
|
+
cron: "0 4 * * *"
|
|
16
|
+
- event: on_commit
|
|
17
|
+
conditions:
|
|
18
|
+
branches: ["main"]
|
|
19
|
+
- event: manual
|
|
20
|
+
config:
|
|
21
|
+
severity: warning
|
|
22
|
+
autoFix: false
|
|
23
|
+
timeout: 600000
|
|
24
|
+
outputs:
|
|
25
|
+
agents-md: false
|
|
26
|
+
ci-workflow: true
|
|
27
|
+
runtime-config: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
name: Parallel Coordinator
|
|
3
|
+
description: Dispatches independent work across isolated Task Executor instances
|
|
4
|
+
role: >
|
|
5
|
+
Verify task independence, create focused agent briefs, dispatch
|
|
6
|
+
Task Executor instances in isolated worktrees, integrate results,
|
|
7
|
+
and run full validation after all agents complete.
|
|
8
|
+
skills:
|
|
9
|
+
- harness-parallel-agents
|
|
10
|
+
steps:
|
|
11
|
+
- command: validate
|
|
12
|
+
when: always
|
|
13
|
+
- skill: harness-parallel-agents
|
|
14
|
+
when: manual
|
|
15
|
+
output: inline
|
|
16
|
+
triggers:
|
|
17
|
+
- event: on_pr
|
|
18
|
+
conditions:
|
|
19
|
+
paths:
|
|
20
|
+
- "src/**"
|
|
21
|
+
- "packages/**"
|
|
22
|
+
config:
|
|
23
|
+
severity: error
|
|
24
|
+
autoFix: false
|
|
25
|
+
timeout: 1800000
|
|
26
|
+
outputs:
|
|
27
|
+
agents-md: true
|
|
28
|
+
ci-workflow: true
|
|
29
|
+
runtime-config: true
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: Performance Guardian
|
|
3
|
+
description: Enforces performance budgets and detects regressions
|
|
4
|
+
role: Run structural complexity checks, coupling analysis, benchmark regression detection, and size budget enforcement on PRs and scheduled runs
|
|
5
|
+
skills:
|
|
6
|
+
- harness-perf
|
|
7
|
+
- harness-tdd
|
|
8
|
+
commands:
|
|
9
|
+
- check-perf
|
|
10
|
+
- perf
|
|
11
|
+
triggers:
|
|
12
|
+
- event: on_pr
|
|
13
|
+
conditions:
|
|
14
|
+
paths:
|
|
15
|
+
- "src/**"
|
|
16
|
+
- "packages/**"
|
|
17
|
+
- event: scheduled
|
|
18
|
+
cron: "0 6 * * 1"
|
|
19
|
+
config:
|
|
20
|
+
severity: error
|
|
21
|
+
autoFix: false
|
|
22
|
+
timeout: 300000
|
|
23
|
+
outputs:
|
|
24
|
+
agents-md: true
|
|
25
|
+
ci-workflow: true
|
|
26
|
+
runtime-config: true
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
name: Security Reviewer
|
|
3
|
+
description: Security-focused code reviewer with OWASP/CWE expertise
|
|
4
|
+
role: >
|
|
5
|
+
Identifies security vulnerabilities, enforces secure coding patterns,
|
|
6
|
+
and produces structured findings with CWE references and remediation guidance.
|
|
7
|
+
skills:
|
|
8
|
+
- harness-security-review
|
|
9
|
+
- harness-code-review
|
|
10
|
+
steps:
|
|
11
|
+
- command: validate
|
|
12
|
+
when: always
|
|
13
|
+
- command: check-deps
|
|
14
|
+
when: always
|
|
15
|
+
- skill: harness-security-review
|
|
16
|
+
when: on_pr
|
|
17
|
+
output: auto
|
|
18
|
+
- skill: harness-security-review
|
|
19
|
+
when: manual
|
|
20
|
+
output: auto
|
|
21
|
+
triggers:
|
|
22
|
+
- event: on_pr
|
|
23
|
+
conditions:
|
|
24
|
+
paths:
|
|
25
|
+
- "src/**"
|
|
26
|
+
- "packages/**"
|
|
27
|
+
- event: manual
|
|
28
|
+
config:
|
|
29
|
+
severity: error
|
|
30
|
+
autoFix: false
|
|
31
|
+
timeout: 120000
|
|
32
|
+
outputs:
|
|
33
|
+
agents-md: true
|
|
34
|
+
ci-workflow: true
|
|
35
|
+
runtime-config: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
name: Task Executor
|
|
3
|
+
description: Executes approved plans with state tracking, TDD, and verification
|
|
4
|
+
role: >
|
|
5
|
+
Execute implementation plans task-by-task using harness methodology.
|
|
6
|
+
Maintains persistent state, follows TDD rhythm, runs verification
|
|
7
|
+
after each task, and respects checkpoint protocol.
|
|
8
|
+
skills:
|
|
9
|
+
- harness-execution
|
|
10
|
+
steps:
|
|
11
|
+
- command: validate
|
|
12
|
+
when: always
|
|
13
|
+
- command: check-deps
|
|
14
|
+
when: always
|
|
15
|
+
- command: scan
|
|
16
|
+
when: manual
|
|
17
|
+
- skill: harness-execution
|
|
18
|
+
when: on_plan_approved
|
|
19
|
+
output: auto
|
|
20
|
+
- skill: harness-execution
|
|
21
|
+
when: manual
|
|
22
|
+
output: auto
|
|
23
|
+
triggers:
|
|
24
|
+
- event: on_pr
|
|
25
|
+
conditions:
|
|
26
|
+
paths:
|
|
27
|
+
- "src/**"
|
|
28
|
+
- "packages/**"
|
|
29
|
+
- event: on_commit
|
|
30
|
+
conditions:
|
|
31
|
+
branches:
|
|
32
|
+
- main
|
|
33
|
+
- develop
|
|
34
|
+
config:
|
|
35
|
+
severity: error
|
|
36
|
+
autoFix: false
|
|
37
|
+
timeout: 900000
|
|
38
|
+
outputs:
|
|
39
|
+
agents-md: true
|
|
40
|
+
ci-workflow: true
|
|
41
|
+
runtime-config: true
|
|
@@ -37,6 +37,14 @@ agents/skills/
|
|
|
37
37
|
- `initialize-harness-project` - Scaffold new project
|
|
38
38
|
- `add-harness-component` - Add components
|
|
39
39
|
|
|
40
|
+
### Graph Integration Levels
|
|
41
|
+
|
|
42
|
+
**Graph-Transformed** (7 skills): harness-code-review, validate-context-engineering, detect-doc-drift, cleanup-dead-code, harness-parallel-agents, enforce-architecture, harness-onboarding
|
|
43
|
+
|
|
44
|
+
**Graph-Enhanced** (5 skills): harness-execution, harness-planning, harness-architecture-advisor, harness-refactoring, align-documentation
|
|
45
|
+
|
|
46
|
+
**Graph-Enabled** (5 new skills): harness-impact-analysis, harness-dependency-health, harness-hotspot-detector, harness-test-advisor, harness-knowledge-mapper
|
|
47
|
+
|
|
40
48
|
## Usage
|
|
41
49
|
|
|
42
50
|
### Claude Code
|
|
@@ -73,6 +73,16 @@
|
|
|
73
73
|
|
|
74
74
|
2. **Run `harness check-deps`** to verify no dependency violations were introduced. The new component's imports must respect layer boundaries.
|
|
75
75
|
|
|
76
|
+
### Graph Refresh
|
|
77
|
+
|
|
78
|
+
If a knowledge graph exists at `.harness/graph/`, refresh it after code changes to keep graph queries accurate:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
harness scan [path]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Skipping this step means subsequent graph queries (impact analysis, dependency health, test advisor) may return stale results.
|
|
85
|
+
|
|
76
86
|
3. **If validation fails,** fix the issues before committing. Common causes:
|
|
77
87
|
- New layer not properly registered in `harness.yaml`
|
|
78
88
|
- Component placed in wrong directory for its declared layer
|
|
@@ -31,6 +31,15 @@
|
|
|
31
31
|
|
|
32
32
|
3. **Run `harness check-docs`** to identify any documentation that already has broken references due to the changes.
|
|
33
33
|
|
|
34
|
+
### Graph-Enhanced Context (when available)
|
|
35
|
+
|
|
36
|
+
When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate context:
|
|
37
|
+
|
|
38
|
+
- `query_graph` — find `documents` edges pointing to nodes changed in this diff
|
|
39
|
+
- `get_impact` — auto-suggest which docs need updating after code changes
|
|
40
|
+
|
|
41
|
+
Replaces manual doc-to-code correlation. Fall back to file-based commands if no graph is available.
|
|
42
|
+
|
|
34
43
|
### Phase 2: Map — Connect Code Changes to Documentation
|
|
35
44
|
|
|
36
45
|
For each changed file, identify all documentation that references it:
|
|
@@ -84,6 +93,16 @@ For each affected documentation location:
|
|
|
84
93
|
|
|
85
94
|
4. **Run `harness fix-drift`** to catch any remaining simple drift issues that manual review missed.
|
|
86
95
|
|
|
96
|
+
### Graph Refresh
|
|
97
|
+
|
|
98
|
+
If a knowledge graph exists at `.harness/graph/`, refresh it after code changes to keep graph queries accurate:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
harness scan [path]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Skipping this step means subsequent graph queries (impact analysis, dependency health, test advisor) may return stale results.
|
|
105
|
+
|
|
87
106
|
5. **Commit the documentation update.** Use a commit message that references the original change: "docs: update AGENTS.md for notification service refactoring" or "docs: sync API docs after auth module rename."
|
|
88
107
|
|
|
89
108
|
## What to Update
|
|
@@ -28,6 +28,15 @@
|
|
|
28
28
|
|
|
29
29
|
3. **Review the report summary.** Note the total count and distribution. A few dead exports are normal; dozens suggest accumulated entropy from incomplete refactorings.
|
|
30
30
|
|
|
31
|
+
### Graph-Enhanced Context (when available)
|
|
32
|
+
|
|
33
|
+
When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate dead code detection:
|
|
34
|
+
|
|
35
|
+
- `query_graph` — perform graph reachability analysis from entry point nodes to identify truly unreachable code
|
|
36
|
+
- `get_relationships` — distinguish dynamic imports from genuinely unused code by checking edge types
|
|
37
|
+
|
|
38
|
+
Graph reachability reduces false positives compared to static analysis alone, since it traces the full transitive import graph including re-exports. Fall back to file-based commands if no graph is available.
|
|
39
|
+
|
|
31
40
|
### Phase 2: Categorize — Safe vs. Needs Review
|
|
32
41
|
|
|
33
42
|
**Safe to auto-fix (remove without further analysis):**
|
|
@@ -63,6 +72,16 @@ For each item categorized as safe:
|
|
|
63
72
|
|
|
64
73
|
### Phase 4: Report Remaining Items
|
|
65
74
|
|
|
75
|
+
### Graph Refresh
|
|
76
|
+
|
|
77
|
+
If a knowledge graph exists at `.harness/graph/`, refresh it after code changes to keep graph queries accurate:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
harness scan [path]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Dead code removal changes graph topology — skipping this step means subsequent graph queries (impact analysis, dependency health, test advisor) may return stale results.
|
|
84
|
+
|
|
66
85
|
For items that need human review, report:
|
|
67
86
|
|
|
68
87
|
1. **What it is** — file path, export name, what it does
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
|
|
23
23
|
3. **Optionally, run `git diff` against a baseline** (last release, last sprint, etc.) to identify which code files changed. This helps prioritize — docs for recently changed files are most likely to be drifted.
|
|
24
24
|
|
|
25
|
+
### Graph-Enhanced Context (when available)
|
|
26
|
+
|
|
27
|
+
When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate drift detection:
|
|
28
|
+
|
|
29
|
+
- `query_graph` — find `documents` edges where the target code node has changed since the doc node was last updated
|
|
30
|
+
|
|
31
|
+
When a graph is available, drift is simply stale edges: doc-to-code edges where the code side has been modified more recently than the doc side. This replaces regex pattern matching and catches semantic drift that text search misses. Fall back to file-based commands if no graph is available.
|
|
32
|
+
|
|
25
33
|
### Phase 2: Identify — Classify Drift Types
|
|
26
34
|
|
|
27
35
|
Categorize each finding into one of these drift types:
|
|
@@ -28,6 +28,15 @@
|
|
|
28
28
|
- Same-layer imports may or may not be allowed depending on project config
|
|
29
29
|
- Cross-cutting concerns (logging, config) have their own rules
|
|
30
30
|
|
|
31
|
+
### Graph-Enhanced Context (when available)
|
|
32
|
+
|
|
33
|
+
When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate violation detection:
|
|
34
|
+
|
|
35
|
+
- `query_graph` — traverse `imports` edges against layer constraint nodes to find all violations in a single query
|
|
36
|
+
- `get_relationships` — find all code dependent on a violation target to show the full scope of impact
|
|
37
|
+
|
|
38
|
+
Graph queries show the complete violation scope (not just the first occurrence per file) and reveal transitive violations that single-file analysis misses. Fall back to file-based commands if no graph is available.
|
|
39
|
+
|
|
31
40
|
### Phase 2: Run Dependency Checks
|
|
32
41
|
|
|
33
42
|
1. **Run `harness check-deps`** to analyze all import statements against the constraint model. Capture the full JSON output.
|
|
@@ -104,6 +104,15 @@ Look for existing issues that may affect the decision:
|
|
|
104
104
|
Store analysis in: .harness/architecture/<topic>/analysis.md
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
### Graph-Enhanced Context (when available)
|
|
108
|
+
|
|
109
|
+
When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate context:
|
|
110
|
+
|
|
111
|
+
- `query_graph` — discover how similar features are structured in the codebase
|
|
112
|
+
- `search_similar` — find analogous patterns and implementations
|
|
113
|
+
|
|
114
|
+
Replaces manual Glob/Grep exploration with graph pattern discovery. Fall back to file-based commands if no graph is available.
|
|
115
|
+
|
|
107
116
|
---
|
|
108
117
|
|
|
109
118
|
### Phase 3: PROPOSE — Present Options with Trade-Offs
|