@iservu-inc/adf-cli 0.17.5 → 0.18.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.
Files changed (39) hide show
  1. package/.project/chats/current/SESSION-STATUS.md +29 -27
  2. package/.project/docs/ROADMAP.md +74 -64
  3. package/CHANGELOG.md +78 -0
  4. package/README.md +63 -27
  5. package/bin/adf.js +54 -0
  6. package/lib/analysis/dynamic-pipeline.js +26 -0
  7. package/lib/analysis/knowledge-graph.js +66 -0
  8. package/lib/commands/deploy.js +35 -0
  9. package/lib/commands/harness.js +345 -0
  10. package/lib/commands/init.js +133 -9
  11. package/lib/frameworks/interviewer.js +130 -0
  12. package/lib/frameworks/progress-tracker.js +30 -1
  13. package/lib/frameworks/session-manager.js +76 -0
  14. package/lib/harness/context-window-manager.js +255 -0
  15. package/lib/harness/event-logger.js +115 -0
  16. package/lib/harness/feature-manifest.js +175 -0
  17. package/lib/harness/headless-adapter.js +184 -0
  18. package/lib/harness/milestone-tracker.js +183 -0
  19. package/lib/harness/protocol.js +503 -0
  20. package/lib/harness/provider-bridge.js +226 -0
  21. package/lib/harness/run-manager.js +267 -0
  22. package/lib/utils/project-detector.js +5 -1
  23. package/lib/utils/tool-detector.js +167 -0
  24. package/lib/utils/tool-feature-registry.js +82 -13
  25. package/lib/utils/tool-recommender.js +325 -0
  26. package/package.json +1 -1
  27. package/tests/harness-backward-compat.test.js +251 -0
  28. package/tests/harness-context-window.test.js +310 -0
  29. package/tests/harness-event-logger.test.js +148 -0
  30. package/tests/harness-feature-manifest.test.js +124 -0
  31. package/tests/harness-headless-adapter.test.js +196 -0
  32. package/tests/harness-integration.test.js +207 -0
  33. package/tests/harness-milestone-tracker.test.js +158 -0
  34. package/tests/harness-protocol.test.js +341 -0
  35. package/tests/harness-provider-bridge.test.js +180 -0
  36. package/tests/harness-provider-switch.test.js +204 -0
  37. package/tests/harness-run-manager.test.js +131 -0
  38. package/tests/tool-detector.test.js +152 -0
  39. package/tests/tool-recommender.test.js +218 -0
@@ -1,39 +1,41 @@
1
1
  # ADF CLI - Current Session Status
2
2
 
3
- **Date:** 2026-01-13
4
- **Status:** ✅ Active - v0.14.6 Published
5
- **Latest Version:** v0.14.6
6
- **Phase:** Phase 6 Complete - Modernization & Stability
3
+ **Date:** 2026-02-23
4
+ **Status:** ✅ Active - v0.18.0 Publishing
5
+ **Latest Version:** v0.18.0
6
+ **Phase:** Phase 7 Complete - Harness Engineering Protocol
7
7
  **Assistant:** Bob (established 2025-10-05)
8
8
 
9
9
  ---
10
10
 
11
11
  ## Recent Completion
12
12
 
13
- **Session:** Phase 6 Documentation & Stability Fixes
14
- **Completed:** 2026-01-13
15
- **Status:** ✅ v0.14.6 Published to npm
13
+ **Session:** Phase 7 - Harness Engineering Protocol
14
+ **Completed:** 2026-02-23
15
+ **Status:** ✅ v0.18.0 Publishing to npm
16
16
  **Branch:** development
17
17
  **Major Achievements:**
18
- - Dynamic AI model discovery for all providers.
19
- - Migration to `@google/genai` (v1.35.0).
20
- - Self-healing configuration validation.
21
- - Agent-Native repository standard (`AGENTS.md` + `.context/`).
22
- - Removal of deprecated models (Gemini 1.5, GPT-3.5).
18
+ - Harness Engineering Protocol with 7 core data structures
19
+ - Multi-provider session handoff (Anthropic, OpenAI, Google Gemini)
20
+ - Headless/CI automation mode with JSON-driven input
21
+ - 9 new modules, 11 test files, 107 new tests (556 total)
22
+ - Zero regressions, fully opt-in via `--harness` flag
23
23
 
24
24
  ---
25
25
 
26
26
  ## Current State
27
27
 
28
28
  ### Published Version
29
- - **Package:** `@iservu-inc/adf-cli@0.14.6`
30
- - **Status:** ✅ Live on npm
29
+ - **Package:** `@iservu-inc/adf-cli@0.18.0`
30
+ - **Status:** ✅ Publishing to npm
31
31
  - **Branch:** development
32
32
  - **Major Features:**
33
- - **Dynamic Model Discovery** - Real-time API fetching for AI models.
34
- - **Learning Analytics Dashboard** - 10+ metrics with multi-format export.
35
- - **Pattern Decay Algorithm** - Exponential decay for inactive patterns.
36
- - **Agent-Native Manifest** - Standardized documentation for AI agents.
33
+ - **Harness Protocol** - Long-running sessions across context windows
34
+ - **Cross-Provider Handoff** - Start with Claude, resume with GPT or Gemini
35
+ - **Headless Mode** - CI/CD pipeline automation
36
+ - **Structured Events** - JSONL event logging for audit trails
37
+ - **Feature Manifest** - Passes-only mutation tracking
38
+ - **Milestone Tracking** - Question block to milestone mapping
37
39
 
38
40
  ### npm Registry
39
41
  ```bash
@@ -41,23 +43,23 @@ npm install -g @iservu-inc/adf-cli@latest
41
43
  ```
42
44
 
43
45
  ### Recent Version History
44
- - **v0.14.6** (2026-01-12) - Cleanup of deprecated models & help text polish.
45
- - **v0.14.5** (2026-01-12) - Reconfiguration loop & hang fixes.
46
- - **v0.14.3** (2026-01-12) - Self-healing config & unified Google SDK.
47
- - **v0.11.0** (2025-11-04) - Learning Analytics Dashboard (Phase 6.2)
48
- - **v0.10.0** (2025-10-27) - Pattern Decay Algorithm (Phase 6.1)
46
+ - **v0.18.0** (2026-02-23) - Harness Engineering Protocol (Phase 7)
47
+ - **v0.17.5** (2025-12-23) - A2A protocol, template sync
48
+ - **v0.17.1** (2025-12-23) - Question consolidation
49
+ - **v0.17.0** (2025-12-23) - A2A protocol integration
50
+ - **v0.16.0** (2026-01-21) - Custom artifact import, rules exchange
49
51
 
50
52
  ---
51
53
 
52
54
  ## Next Phase Options
53
55
 
54
- ### Phase 7: AI-Enhanced Filtering
56
+ ### Phase 8: AI-Enhanced Filtering
55
57
  - AI-powered relevance scoring (beyond rules)
56
58
  - Dynamic question generation
57
59
  - Custom follow-ups for project types
58
60
  - AI-assisted pattern detection
59
61
 
60
- ### Phase 8: Community & Ecosystem
62
+ ### Phase 9: Community & Ecosystem
61
63
  - Plugin system for custom frameworks
62
64
  - Shareable interview templates
63
65
  - Community question database
@@ -65,5 +67,5 @@ npm install -g @iservu-inc/adf-cli@latest
65
67
 
66
68
  ---
67
69
 
68
- **Last Updated:** 2026-01-13 (by Bob)
69
- **Status:** Phase 6 Complete - Ready for Phase 7 Planning 🚀
70
+ **Last Updated:** 2026-02-23 (by Bob)
71
+ **Status:** Phase 7 Complete - Ready for Phase 8 Planning
@@ -1,8 +1,8 @@
1
1
  # ADF CLI - Development Roadmap
2
2
 
3
- **Last Updated:** 2026-01-21
4
- **Current Version:** v0.16.0
5
- **Status:** Phase 6.2 Complete, Phase 7 Active
3
+ **Last Updated:** 2026-02-23
4
+ **Current Version:** v0.18.0
5
+ **Status:** Phase 7 Complete, Phase 8 Planning
6
6
 
7
7
  ---
8
8
 
@@ -351,14 +351,61 @@ Create the definitive AI-driven requirements gathering tool that transforms vagu
351
351
 
352
352
  ---
353
353
 
354
+ ### ✅ Phase 7: Harness Engineering Protocol (v0.18.0)
355
+ **Released:** 2026-02-23
356
+ **Status:** Complete
357
+
358
+ **Delivered:**
359
+ - Common harness protocol synthesizing patterns from OpenAI Codex, Anthropic Claude Code, and Google Gemini
360
+ - 7 core data structures: HarnessRun, ContextWindow, HandoffPackage, Milestone, Event, FeatureManifest, ProviderCapability
361
+ - Multi-provider support with capability registry (Anthropic 200K/1M, OpenAI 400K, Google 1M)
362
+ - Cross-provider session handoff (start with Claude, resume with GPT or Gemini)
363
+ - Headless/CI automation mode with JSON-driven input
364
+ - 9 new modules, 11 test files, 107 new tests (556 total passing)
365
+ - Zero regressions, fully opt-in via `--harness` flag
366
+
367
+ **New Commands:**
368
+ - `adf init --harness` / `--headless` / `--run-id <id>`
369
+ - `adf harness start|resume|status|handoff|events|manifest`
370
+
371
+ **New Modules:**
372
+ - `lib/harness/protocol.js` - Schema classes with validation
373
+ - `lib/harness/event-logger.js` - JSONL append-only event log
374
+ - `lib/harness/run-manager.js` - Run lifecycle management
375
+ - `lib/harness/milestone-tracker.js` - Question block → milestone mapping
376
+ - `lib/harness/feature-manifest.js` - Passes-only feature tracking
377
+ - `lib/harness/context-window-manager.js` - Window lifecycle and handoff
378
+ - `lib/harness/provider-bridge.js` - Multi-provider capability wrapper
379
+ - `lib/harness/headless-adapter.js` - CI/automation JSON input
380
+ - `lib/commands/harness.js` - CLI command handlers
381
+
382
+ **Modified Modules:**
383
+ - `knowledge-graph.js` - toHandoffFormat/fromHandoffFormat
384
+ - `dynamic-pipeline.js` - serializeForHandoff/deserializeFromHandoff
385
+ - `progress-tracker.js` - Event emission integration
386
+ - `session-manager.js` - getCurrentSession/forkSession
387
+ - `interviewer.js` - setHarness/consumeHandoff/startHeadless
388
+ - `init.js` - Harness flag handling
389
+ - `bin/adf.js` - Harness command group
390
+
391
+ **Impact:**
392
+ - ✅ Long-running AI sessions across multiple context windows
393
+ - ✅ Provider-agnostic handoff packages
394
+ - ✅ Structured event logging for audit trails
395
+ - ✅ Milestone-based progress tracking
396
+ - ✅ Headless mode for CI/CD pipelines
397
+ - ✅ Full backward compatibility (opt-in only)
398
+
399
+ ---
400
+
354
401
  ## Active Development
355
402
 
356
- ### 🔄 Phase 7: AI-Enhanced Filtering & Automation
357
- **Target Version:** v0.16.0
403
+ ### 🔄 Phase 8: AI-Enhanced Filtering & Automation
404
+ **Target Version:** v0.19.0
358
405
  **Priority:** Medium
359
406
  **Estimated Effort:** 3-4 weeks
360
407
  **Status:** Planning
361
- **Dependencies:** Phase 6 complete
408
+ **Dependencies:** Phase 7 complete
362
409
 
363
410
  #### Goals
364
411
  Use AI to go beyond rule-based filtering for even more intelligent question selection.
@@ -369,67 +416,29 @@ Use AI to go beyond rule-based filtering for even more intelligent question sele
369
416
  **Problem:** Rule-based scoring may miss nuanced relevance.
370
417
  **Solution:** Use LLM to evaluate question relevance to project.
371
418
 
372
- **Implementation:**
373
- - Send project context + question to AI
374
- - Get relevance score (0-100) with reasoning
375
- - Combine with rule-based score
376
- - Confidence-based suggestions
377
-
378
- **User Benefit:** More accurate relevance determination
379
-
380
419
  ##### 2. Dynamic Question Generation
381
420
  **Problem:** Fixed question set may not cover all scenarios.
382
421
  **Solution:** Generate questions based on project context.
383
422
 
384
- **Implementation:**
385
- - Analyze project deeply with AI
386
- - Generate custom questions for gaps
387
- - Adaptive interview paths
388
- - Framework-specific question sets
389
-
390
- **User Benefit:** Perfectly tailored interviews
391
-
392
423
  ##### 3. Custom Follow-Ups for Project Types
393
424
  **Problem:** Generic follow-ups don't fit all project types.
394
425
  **Solution:** Generate context-aware follow-up questions.
395
426
 
396
- **Implementation:**
397
- - Project-type-specific follow-up templates
398
- - AI-generated follow-ups based on context
399
- - Intelligent question chains
400
- - Deep-dive capabilities
401
-
402
- **User Benefit:** More thorough requirements gathering
403
-
404
427
  ##### 4. AI-Assisted Pattern Detection
405
428
  **Problem:** Rule-based pattern detection may miss subtle patterns.
406
429
  **Solution:** Use AI to find patterns in skip/answer history.
407
430
 
408
- **Implementation:**
409
- - Semantic similarity clustering
410
- - Natural language pattern descriptions
411
- - Anomaly detection
412
- - Confidence scoring improvements
413
-
414
- **User Benefit:** Better pattern recognition
415
-
416
431
  #### Success Criteria
417
432
  - AI scoring improves relevance accuracy by >15%
418
433
  - Dynamic questions fill gaps in 90% of interviews
419
434
  - Custom follow-ups rated higher quality by users
420
435
  - AI pattern detection finds 20% more patterns
421
436
 
422
- #### Technical Challenges
423
- - AI API costs (need caching/batching)
424
- - Latency (can't slow down interview)
425
- - Quality control on generated questions
426
- - Balancing AI vs rules
427
-
428
437
  ---
429
438
 
430
439
  ## Future Vision
431
440
 
432
- ### 🔮 Phase 8: Community & Ecosystem (Long-term)
441
+ ### 🔮 Phase 9: Community & Ecosystem (Long-term)
433
442
  **Target Version:** v1.0.0
434
443
  **Priority:** Low
435
444
  **Estimated Effort:** 8-12 weeks
@@ -529,6 +538,7 @@ Build a community-driven ecosystem around ADF CLI with plugins, templates, and s
529
538
  - ✅ **Learning Analytics** - User visibility and trust (COMPLETE v0.15.0)
530
539
  - ✅ **Export/Import Rules** - Team collaboration (COMPLETE v0.16.0)
531
540
  - ✅ **Custom Artifact Import** - Zero-friction onboarding (COMPLETE v0.16.0)
541
+ - ✅ **Harness Engineering Protocol** - Long-running sessions (COMPLETE v0.18.0)
532
542
 
533
543
  ### Medium Priority (Do Soon)
534
544
  - **AI-Powered Relevance** - Improve accuracy
@@ -544,30 +554,25 @@ Build a community-driven ecosystem around ADF CLI with plugins, templates, and s
544
554
 
545
555
  ## Version Planning
546
556
 
547
- ### v0.16.0 - Current Release ✅
548
- - Custom artifact import (`adf import`)
549
- - Learning rules export/import
550
- - Team collaboration features
551
- - Released: 2026-01-21
557
+ ### v0.18.0 - Current Release ✅
558
+ - Harness Engineering Protocol
559
+ - Multi-provider session handoff
560
+ - Headless/CI automation mode
561
+ - 9 new modules, 107 new tests
562
+ - Released: 2026-02-23
552
563
 
553
- ### v0.15.1 - Previous Release ✅
554
- - Interview UI improvements
555
- - AI response reliability fixes
556
- - Context review feature
557
- - Released: 2026-01-13
564
+ ### v0.17.5 - Previous Release ✅
565
+ - A2A protocol integration
566
+ - Template sync from AgentDevFramework
567
+ - Question consolidation
568
+ - Released: 2025-12-23
558
569
 
559
- ### v0.17.0 - AI Enhancement (Next)
570
+ ### v0.19.0 - AI Enhancement (Next)
560
571
  - AI-powered relevance scoring
561
572
  - Dynamic question generation
562
573
  - Custom follow-ups
563
574
  - Estimated: 3-4 weeks
564
575
 
565
- ### v0.13.0 - AI Pattern Detection
566
- - AI-assisted pattern detection
567
- - Semantic clustering
568
- - Natural language descriptions
569
- - Estimated: 2 weeks
570
-
571
576
  ### v1.0.0-rc - Pre-Release Polish
572
577
  - Bug fixes and optimizations
573
578
  - Performance improvements
@@ -665,6 +670,11 @@ Build a community-driven ecosystem around ADF CLI with plugins, templates, and s
665
670
 
666
671
  ## Changelog
667
672
 
673
+ ### 2026-02-23
674
+ - Phase 7 complete (v0.18.0) - Harness Engineering Protocol
675
+ - 9 new harness modules with 107 tests (556 total)
676
+ - Multi-provider handoff, headless mode, structured event logging
677
+
668
678
  ### 2026-01-13
669
679
  - Phase 6 marked complete (v0.15.0)
670
680
  - Pattern Decay system implemented
@@ -681,6 +691,6 @@ Build a community-driven ecosystem around ADF CLI with plugins, templates, and s
681
691
 
682
692
  ---
683
693
 
684
- **Ready for:** Phase 6 implementation
685
- **Current Focus:** Advanced learning features (pattern decay, analytics, export/import)
694
+ **Ready for:** Phase 8 planning
695
+ **Current Focus:** AI-enhanced filtering and automation
686
696
  **Long-term Vision:** Community-driven ecosystem at v1.0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,84 @@ All notable changes to `@iservu-inc/adf-cli` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.18.0] - 2026-02-23
9
+
10
+ ### 🚀 Major Feature - Harness Engineering Protocol
11
+
12
+ **Minor Release:** Introduces the Harness Engineering Protocol - a comprehensive system for managing long-running AI agent sessions across multiple context windows, providers, and execution modes. Synthesizes patterns from OpenAI Codex, Anthropic Claude Code, and Google Gemini into a unified, provider-agnostic protocol.
13
+
14
+ #### Added
15
+
16
+ **Harness Protocol Core (7 Data Structures):**
17
+ - ✨ **HarnessRun** - Top-level session container with lifecycle management (initializing, running, paused, completed, failed)
18
+ - ✨ **ContextWindow** - Bounded work unit with sequence chaining and token tracking
19
+ - ✨ **HandoffPackage** - Provider-agnostic cross-window state transfer (the key innovation)
20
+ - ✨ **Milestone** - Question block checkpoint tracking with acceptance criteria
21
+ - ✨ **Event** - Structured JSONL log entries (12 event types for audit trails)
22
+ - ✨ **FeatureManifest** - Deliverables list with passes-only mutation pattern
23
+ - ✨ **ProviderCapability** - Per-model metadata registry for multi-provider support
24
+
25
+ **Multi-Provider Support:**
26
+ - ✨ **Provider Bridge** - Wraps AIClient with capability-aware instrumentation
27
+ - ✨ **Anthropic** - Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 (200K standard, 1M beta)
28
+ - ✨ **OpenAI** - GPT-5.2, GPT-5.2 Pro, GPT-5.2 Codex, GPT-5 Mini (up to 400K)
29
+ - ✨ **Google Gemini** - Gemini 3.1 Pro, 3 Pro, 3 Flash, 2.5 Pro (1M context)
30
+ - ✨ **Cross-Provider Handoff** - Start a session with Claude, resume with GPT or Gemini seamlessly
31
+
32
+ **New CLI Commands:**
33
+ - ✨ **`adf harness start`** - Start a new harness run with workflow and goal configuration
34
+ - ✨ **`adf harness resume`** - Resume a paused run, consuming the latest handoff package
35
+ - ✨ **`adf harness status`** - Show current run status, milestones, and context window info
36
+ - ✨ **`adf harness handoff`** - Generate or consume a handoff package for cross-window continuity
37
+ - ✨ **`adf harness events`** - View structured event log with filtering and statistics
38
+ - ✨ **`adf harness manifest`** - View feature manifest and progress tracking
39
+
40
+ **New Init Flags:**
41
+ - ✨ **`adf init --harness`** - Enable harness protocol during initialization
42
+ - ✨ **`adf init --headless`** - Run in headless mode for CI/automation
43
+ - ✨ **`adf init --run-id <id>`** - Resume an existing harness run
44
+
45
+ **Headless/CI Mode:**
46
+ - ✨ **HeadlessAdapter** - Replaces inquirer prompts with JSON-driven input
47
+ - ✨ **Mapped Answers** - Provide answers by question ID
48
+ - ✨ **Ordered Answers** - Provide answers in sequence
49
+ - ✨ **Default Answers** - Dynamic defaults via function callbacks
50
+
51
+ **Enhanced Existing Modules:**
52
+ - 🔧 **KnowledgeGraph** - New `toHandoffFormat()` / `fromHandoffFormat()` for portable state transfer
53
+ - 🔧 **DynamicPipeline** - New `serializeForHandoff()` / `deserializeFromHandoff()` for pipeline state
54
+ - 🔧 **ProgressTracker** - Event emission integration with optional EventLogger
55
+ - 🔧 **SessionManager** - New `getCurrentSession()` with harness pointer, `forkSession()` for branching
56
+ - 🔧 **Interviewer** - New `setHarness()`, `consumeHandoff()`, `startHeadless()`, SIGINT handoff generation
57
+
58
+ #### Technical Details
59
+
60
+ **New Files (9 modules + 11 test files):**
61
+ - `lib/harness/protocol.js` - Schema classes with validation and serialization
62
+ - `lib/harness/event-logger.js` - JSONL append/query engine
63
+ - `lib/harness/run-manager.js` - Run lifecycle with `current-run.json` pointer
64
+ - `lib/harness/milestone-tracker.js` - Question block to milestone mapping
65
+ - `lib/harness/feature-manifest.js` - Feature extraction from markdown outputs
66
+ - `lib/harness/context-window-manager.js` - Window lifecycle and handoff generation
67
+ - `lib/harness/provider-bridge.js` - PROVIDER_CAPABILITIES registry and instrumented calls
68
+ - `lib/harness/headless-adapter.js` - CI/automation JSON input adapter
69
+ - `lib/commands/harness.js` - CLI command handlers
70
+
71
+ **Testing:**
72
+ - 107 new tests across 11 test files
73
+ - 556 total tests passing across 47 test suites
74
+ - Coverage: 77.6% statements, 62% branches, 73.8% functions, 79.2% lines
75
+ - Zero regressions to existing functionality
76
+ - Integration tests: full lifecycle, backward compatibility, cross-provider handoff
77
+
78
+ **Backward Compatibility:**
79
+ - All harness features are opt-in via `--harness` flag
80
+ - No `harness/` directory created without explicit activation
81
+ - Existing sessions, progress tracking, and learning system work identically
82
+ - No new required dependencies
83
+
84
+ ---
85
+
8
86
  ## [0.16.0] - 2026-01-21
9
87
 
10
88
  ### 🚀 Major Feature - Custom Artifact Import & Learning Rules Exchange
package/README.md CHANGED
@@ -60,6 +60,21 @@ adf init --tool windsurf
60
60
  adf init --rapid --tool cursor
61
61
  ```
62
62
 
63
+ #### Harness Mode (Long-Running Sessions)
64
+
65
+ Enable the harness protocol for multi-context-window sessions:
66
+
67
+ ```bash
68
+ # Start with harness protocol
69
+ adf init --harness
70
+
71
+ # Headless mode for CI/automation
72
+ adf init --harness --headless
73
+
74
+ # Resume an existing harness run
75
+ adf init --run-id run_abc123
76
+ ```
77
+
63
78
  ### Configure ADF Settings
64
79
 
65
80
  Configure ADF settings like AI provider, AI analysis settings, learning system, and more:
@@ -132,6 +147,38 @@ Or update directly:
132
147
  npm update -g @iservu-inc/adf-cli
133
148
  ```
134
149
 
150
+ ### Manage Long-Running Sessions (Harness)
151
+
152
+ The harness protocol enables long-running AI sessions across multiple context windows with cross-provider handoff:
153
+
154
+ ```bash
155
+ # Start a new harness run
156
+ adf harness start --workflow balanced
157
+
158
+ # Check current run status
159
+ adf harness status
160
+
161
+ # Resume a paused run
162
+ adf harness resume
163
+
164
+ # Generate a handoff package for context window transfer
165
+ adf harness handoff
166
+
167
+ # View structured event log
168
+ adf harness events --stats
169
+
170
+ # View feature manifest and progress
171
+ adf harness manifest
172
+ ```
173
+
174
+ **Key Features:**
175
+ - **Cross-Provider Handoff** - Start with Claude, resume with GPT or Gemini
176
+ - **Structured Event Logging** - JSONL audit trail with 12 event types
177
+ - **Milestone Tracking** - Question blocks mapped to trackable milestones
178
+ - **Feature Manifest** - Passes-only mutation for deliverable tracking
179
+ - **Headless Mode** - JSON-driven input for CI/CD automation
180
+ - **Provider Capability Registry** - Auto-adapts to provider context limits (200K-1M tokens)
181
+
135
182
  ### Version
136
183
 
137
184
  Check installed version:
@@ -194,6 +241,7 @@ The AI provider enhances your workflow by:
194
241
  - **Intelligent Follow-Up Questions** - Automatically generated based on your responses
195
242
  - **Context-Aware Guidance** - Tailored suggestions for your project type
196
243
  - **Skip Functionality** - Type "skip" anytime to move forward
244
+ - **Harness Protocol** - Long-running sessions across multiple context windows with cross-provider handoff
197
245
 
198
246
  ### Changing Providers
199
247
 
@@ -369,6 +417,9 @@ your-project/
369
417
  │ ├── context.json # Your workflow configuration
370
418
  │ ├── sessions/ # Requirements gathering sessions
371
419
  │ ├── learning/ # Learning system data (skip history, patterns, rules)
420
+ │ ├── harness/ # Harness protocol data (when --harness enabled)
421
+ │ │ ├── current-run.json # Active run pointer
422
+ │ │ └── runs/ # Run data, context windows, events
372
423
  │ ├── scripts/ # Helper scripts
373
424
  │ └── shared/ # Templates, agents, and resources
374
425
  │ ├── agents/ # Agent definition files
@@ -498,35 +549,20 @@ When we release updates to the framework:
498
549
 
499
550
  See [CHANGELOG.md](./CHANGELOG.md) for detailed version history.
500
551
 
501
- **Latest:** v0.14.0 (2026-01-12)
502
- - **Project Context Synthesis & Extended Tool Support (v0.14.0)** - Minor release
503
- - ✨ **Adaptive Project Augmentation** - Synthesizes existing .adf, Agent-Native (BMAD), and OpenSpec project files into unified context.
504
- - ✨ **AI-Driven Gap Analysis** - Automatically identifies knowledge gaps and generates targeted questionnaire to fill them.
505
- - ✨ **Extended Tool Support** - Native generators for Kiro, Trae, and Codex CLI.
506
- - ✨ **Tool Audit Registry** - New `adf tools audit` command to monitor integration features across all 12+ supported tools.
507
-
508
- **Previous Releases:**
509
- - **v0.13.0 (2026-01-03)** - OpenCode Multi-Agent Integration
510
- - Complete OpenCode generator rewrite with multi-provider, multi-agent support.
511
- - Optimal model assignment and MCP server integration.
512
- - **v0.12.10 (2025-12-23)** - Critical Bug Fixes (v0.12.10) - Patch release
513
- - Fixed EISDIR deployment error for directory-based tools
514
- - Improved rate limit error detection for Gemini models
515
- - Added free tier model recommendations for Google Gemini
516
- - Clear messaging for quota vs availability issues
552
+ **Latest:** v0.18.0 (2026-02-23)
553
+ - **Harness Engineering Protocol (v0.18.0)** - Minor release
554
+ - ✨ **Long-Running Sessions** - Manage AI sessions across multiple context windows with structured handoff
555
+ - ✨ **Cross-Provider Handoff** - Start a session with Claude, resume with GPT-5.2 or Gemini 3.1 Pro
556
+ - ✨ **Headless/CI Mode** - JSON-driven automation for CI/CD pipelines
557
+ - ✨ **Structured Event Logging** - JSONL audit trail with 12 event types
558
+ - ✨ **Provider Capability Registry** - Auto-adapts to Anthropic (200K/1M), OpenAI (400K), Google (1M)
559
+ - ✨ **New Commands** - `adf harness start|resume|status|handoff|events|manifest`
517
560
 
518
561
  **Previous Releases:**
519
- - **v0.12.9 (2025-12-23)** - Multi-Tool Expansion & AI Provider Robustness
520
- - Added 4 new CLI tools: OpenCode, Gemini CLI, DeepAgent, verified Zed support
521
- - Comprehensive AI provider improvements with model verification
522
- - Fixed Google Gemini API integration and expanded Anthropic models (3 → 11)
523
- - Enhanced help system with detailed documentation
524
- - OpenAI/OpenRouter parameter compatibility for GPT-5 and o-series models
525
- - **v0.12.0 (2025-12-22)** - ANDF Standard Implementation
526
- - Complete AGENTS.md standard compliance with YAML frontmatter
527
- - .context/ directory support with architecture and glossary generation
528
- - Zed Editor and Google Antigravity full generator support
529
- - MCP integration and agent configuration
562
+ - **v0.17.5 (2025-12-23)** - A2A protocol integration, template sync, question consolidation
563
+ - **v0.16.0 (2026-01-21)** - Custom artifact import, learning rules exchange
564
+ - **v0.15.0 (2026-01-13)** - Advanced Learning Analytics Dashboard
565
+ - **v0.14.0 (2026-01-12)** - Project Context Synthesis & Extended Tool Support
530
566
 
531
567
  - **v0.10.0 (2025-10-27)** - Pattern Decay Algorithm
532
568
  - Time-based exponential decay for inactive patterns
package/bin/adf.js CHANGED
@@ -23,6 +23,14 @@ const configCommand = require('../lib/commands/config');
23
23
  const guideCommand = require('../lib/commands/guide');
24
24
  const toolsCommand = require('../lib/commands/tools');
25
25
  const importCommand = require('../lib/commands/import');
26
+ const {
27
+ harnessStart,
28
+ harnessResume,
29
+ harnessStatus,
30
+ harnessHandoff,
31
+ harnessEvents,
32
+ harnessManifest
33
+ } = require('../lib/commands/harness');
26
34
 
27
35
  const program = new Command();
28
36
 
@@ -115,6 +123,9 @@ program
115
123
  .option('--balanced', 'Skip questions, use Level 2 (Balanced (OpenSpec))')
116
124
  .option('--comprehensive', 'Skip questions, use Level 3 (Comprehensive (Agent-Native))')
117
125
  .option('--tool <tool>', 'Specify deployment tool (windsurf, cursor, etc.)')
126
+ .option('--harness', 'Enable harness engineering protocol for long-running sessions')
127
+ .option('--headless', 'Run in headless mode (CI/automation, requires --harness)')
128
+ .option('--run-id <id>', 'Resume a specific harness run by ID')
118
129
  .addHelpText('after', `
119
130
  ${chalk.cyan.bold('Description:')}
120
131
  Start an interactive AI-guided interview to gather project requirements.
@@ -176,6 +187,7 @@ program
176
187
  .command('deploy [tool]')
177
188
  .description('Deploy framework to specified tool')
178
189
  .option('-l, --list', 'List available deployment tools')
190
+ .option('-r, --recommend', 'Show tool recommendations based on project analysis')
179
191
  .addHelpText('after', `
180
192
  ${chalk.cyan.bold('Description:')}
181
193
  Deploy ADF framework outputs to your AI coding assistant or IDE.
@@ -578,6 +590,48 @@ tools
578
590
  .description('Audit all supported tools and features')
579
591
  .action(toolsCommand);
580
592
 
593
+ // adf harness
594
+ const harness = program.command('harness');
595
+ harness.description('Manage long-running harness sessions across context windows');
596
+
597
+ harness
598
+ .command('start')
599
+ .description('Start a new harness run')
600
+ .option('-w, --workflow <workflow>', 'Workflow level (rapid, balanced, comprehensive)', 'balanced')
601
+ .option('--headless', 'Run in headless mode for CI/automation')
602
+ .option('--goals <goals>', 'Comma-separated list of run goals')
603
+ .action(harnessStart);
604
+
605
+ harness
606
+ .command('resume')
607
+ .description('Resume a paused harness run')
608
+ .option('--run-id <id>', 'Specific run ID to resume')
609
+ .action(harnessResume);
610
+
611
+ harness
612
+ .command('status')
613
+ .description('Show current harness run status')
614
+ .option('-a, --all', 'Show all runs')
615
+ .action(harnessStatus);
616
+
617
+ harness
618
+ .command('handoff')
619
+ .description('Generate or consume a handoff package')
620
+ .option('--consume', 'Consume the latest handoff package')
621
+ .action(harnessHandoff);
622
+
623
+ harness
624
+ .command('events')
625
+ .description('View harness event log')
626
+ .option('--stats', 'Show event statistics')
627
+ .option('--tail <count>', 'Show last N events', '20')
628
+ .action(harnessEvents);
629
+
630
+ harness
631
+ .command('manifest')
632
+ .description('View feature manifest and progress')
633
+ .action(harnessManifest);
634
+
581
635
  // Handle unknown commands
582
636
  program.on('command:*', () => {
583
637
  console.error(chalk.red(`\nInvalid command: ${program.args.join(' ')}`));
@@ -257,6 +257,32 @@ class DynamicPipeline {
257
257
  isEnabled() {
258
258
  return this.options.enabled;
259
259
  }
260
+
261
+ /**
262
+ * Serialize pipeline state for handoff
263
+ */
264
+ serializeForHandoff() {
265
+ return {
266
+ knowledgeGraph: this.knowledgeGraph.toHandoffFormat(),
267
+ stats: { ...this.stats },
268
+ options: { ...this.options }
269
+ };
270
+ }
271
+
272
+ /**
273
+ * Restore pipeline state from handoff data
274
+ */
275
+ deserializeFromHandoff(data) {
276
+ if (!data) return;
277
+
278
+ if (data.knowledgeGraph) {
279
+ this.knowledgeGraph.fromHandoffFormat(data.knowledgeGraph);
280
+ }
281
+
282
+ if (data.stats) {
283
+ this.stats = { ...this.stats, ...data.stats };
284
+ }
285
+ }
260
286
  }
261
287
 
262
288
  module.exports = DynamicPipeline;