* fix: honor non-interactive template defaults and Windows paths Return NOT_FOUND for unknown templates without prompting. Preserve interactive fallback and validate non-interactive overrides. Co-Authored-By: Codex (GPT-6) <noreply@openai.com> * fix: resolve remote template URLs on Windows Windows rejects HTTPS URLs as filesystem paths before Git can clone them. Fall through to supported Git URL validation when the local path probe is invalid. Co-Authored-By: Codex <noreply@openai.com> --------- Co-authored-by: Codex (GPT-6) <noreply@openai.com>
11 KiB
Session State
Last updated: 2026-10-30
Native CI qualification fixes (2026-10-30)
Local native CI exposed three defects: --no-prompt omitted declared defaults,
unknown templates still entered interactive selection, and Windows backslashes
escaped Velocity path variables. Defaults now apply with validated explicit
overrides; unknown templates return NOT_FOUND without reading stdin; path
separators are normalized before interpolation. Interactive fallback remains
covered separately.
Four non-interactive regressions and a Windows-path regression failed before the fixes. On macOS27.2 ARM64/GraalVM21.0.12, full Maven verification, native packaging and verification with the built binary passed235 tests across26 reports with zero failures/errors/skips. Native tests must run after building the binary; the earlier build-before-test arrangement silently skipped10 native E2E cases. Exact-commit Gitea macOS/Windows verification and normal PR review remain pending.
Current Status
Stories #18-25 complete. All qqq template system stories finished except #26 (merge mode). Ready for Story #26 or to start Epic #11 (qbit package management).
Recently Completed
Story #25 - Improve Error Messages (2026-01-04)
Implemented structured error handling with recovery suggestions:
- Created
SuggestionEnginewith Levenshtein distance for fuzzy matching - Created
TemplateErrorwith categories mapped to exit codes - Created
ErrorFormatterfor consistent ANSI-colored output - Added "Did you mean?" suggestions for mistyped template names
- Added
--verboseflag to show stack traces - Added 27 unit tests (13 SuggestionEngine, 6 TemplateError, 8 ErrorFormatter)
- Updated InitCommand and ListCommand to use structured errors
Story #24 - Add Prompt Validation (2026-01-03)
Implemented input validation with retry loop for template prompts:
- Created
PromptValidationrecord for validation rules (pattern, length, range, enum) - Created
PromptValidatorclass with support for required, pattern, length, range, and enum validation - Updated
PromptRunnerto validate input and re-prompt on failure - Added validation for
--varCLI overrides with fallback to interactive prompt - Added
ConsoleUImethods for validation feedback (error checkmark, success checkmark, warning) - Added 20 unit tests for PromptValidator
Manifest schema now supports:
prompts:
- name: packageName
message: "Java package"
required: true
validation:
pattern: "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*$"
message: "Must be a valid Java package name"
Story #23 - Voyage Mock API Integration (2026-01-03)
Implemented TemplateRegistry abstraction for template management:
- Created
TemplateRegistryinterface with list/get/download/refresh methods - Created
TemplateInforecord for template metadata - Created
MockTemplateRegistrywith embedded template data - Created
GitHubTemplateRegistrywrapping existing TemplatesHub - Created
TemplateRegistryFactoryfor registry selection via env var - Refactored
ListCommandto use TemplateRegistry with--refreshflag - Refactored
InitCommandto use TemplateRegistry - Added 13 unit tests for registry classes
- Added native-image reflection config for TemplateInfo
Story #22 - Migrate templates-hub to Velocity (2026-01-03)
Completed migration of new-qqq-application-template:
- Restructured template repo with
template/subdirectory - Converted all Java files to Velocity syntax (
$variable,${variable}) - Fixed pom.xml with literal blocks (
#[[${maven.prop}]]#) for Maven properties - Added native-image reflection config for Velocity runtime classes
- Implemented verbatim file handling for shell scripts (mvnw, gradlew)
- Added Maven property detection to skip validation for
${prop.name}patterns - All changes pushed to both template repo and templates-hub
Story #21 - Template Manifest Schema v2 (2026-01-03)
Updated manifest schema to v2 with backward compatibility:
- Added
schemaVersionfield (Integer) to TemplateManifest and TemplateEntry - Added
minimumQctlVersionfield with version check in InitCommand - Added
requiredfield (Boolean) to Prompt record - Added
phasefield (String) to PostGenHook record - Added
getEffectiveSchemaVersion()helper method (defaults to 1) - Added
isVersionSatisfied()andparseVersion()helpers in InitCommand - Updated TemplateEngineTest constructor calls (9 → 11 params)
Simplified scope (per user agreement):
- Deferred
prompts[].validationto Story #24 - Deferred conditional fields to future story
Story #20 - Directory Transforms (2026-01-03)
Implemented post-render file transforms for template processing:
- Created
Transform.javarecord with type, pattern, replacement fields - Created
TransformExecutor.javafor rename/delete operations using glob patterns - Added
transformsfield toTemplateManifestandTemplatesHub.TemplateEntry - Integrated transform execution in
InitCommand.javaafter rendering - Added 13 tests for TransformExecutor
Simplified scope (per user agreement):
- Only
renameanddeletetransforms (droppedmoveas redundant with path variables) - Glob pattern matching with
${varName}substitution in replacement strings
Manifest schema now supports:
transforms:
- type: rename
pattern: "**/*Template*.java"
replacement: "${appClassName}.java"
- type: delete
pattern: "**/.gitkeep"
Story #19 - Computed Variables (2026-01-04)
Implemented computed variable support for template manifests:
- Added
replace()method toStringTool.javafor string substitution - Created
ComputedVariable.javarecord for manifest definitions - Added
computedfield toTemplateManifestandTemplatesHub.TemplateEntry - Added
evaluateComputed()method toTemplateEngine.java - Updated
InitCommand.javato evaluate computed vars after prompts - Added 16 new tests (9 ComputedVariable + 7 StringTool.replace)
Manifest schema now supports:
computed:
- name: packagePath
expression: "$str.replace($packageName, '.', '/')"
- name: appClassName
expression: "$str.pascal($appName)"
Story #18 - Velocity Engine (2026-01-04)
Implemented Apache Velocity template engine replacing Handlebars:
- Created
StringTool.javawith transformation methods ($str.camel(), etc.) - Created
TemplateRenderException.javafor fail-fast error handling - Refactored
TemplateEngine.javato use VelocityEngine - Added 51 unit tests (15 new + 36 existing)
- Updated native-image reflect-config.json for Velocity classes
Epic #13-17 Story Details (2026-01-04)
Fleshed out all remaining stories for Epics #13-17:
- Epic #13 (qrun Build & Publish): #36-42 - Jib integration, OCI packaging, publishing, labels, digest verification, release channels, rollback
- Epic #14 (qrun Service Operations): #43-49 - Status, logs (SSE streaming), stop, start, restart, deployment history, scale
- Epic #15 (qstudio AI Planning): #50-53 - Code indexing, plan generation (multi-LLM), path policies, plan ledger
- Epic #16 (Authentication & Security): #54-57 - OIDC device flow, service accounts, signature verification (Sigstore/PGP), OS keychain integration
- Epic #17 (Enterprise Features): #58-61 - SSO (SAML/OIDC), RBAC, audit logging, org/team management
Epic #12 Story Details (2026-01-04)
Fleshed out all 9 stories for Epic #12 (qqq - Template System) with:
- User stories and design specs
- Architecture diagrams (current vs target state)
- Files to create/modify tables
- Implementation task checklists
- Acceptance criteria
Stories updated: #18-26 (Velocity, computed vars, transforms, manifest v2, templates migration, Voyage mock, validation, errors, merge mode)
Epic #11 Story Details (2026-01-04)
Fleshed out all 9 stories for Epic #11 (qbit - Package Management) with:
- User stories and design specs
- Command interfaces with examples
- Files to create/modify tables
- Implementation task checklists
- Acceptance criteria
Stories updated: #27-35 (search, add, remove, update, list, SemVer, conflicts, vendor, integrity)
Roadmap & Issue Creation (2026-01-03)
Created comprehensive roadmap and GitHub project structure:
- Roadmap document -
docs/ROADMAP.mdwith user journey focus - Milestones - v0.2.0, v0.3.0, v1.0.0
- Epics - 7 epic issues (#11-#17) with proper labels
- Stories - 44 story issues (#18-#61) linked as sub-issues
- Issue types - Epic for #11-17, Feature for #18-61
- Sub-issues - All stories linked to parent epics
Epic Summary
| Epic | Milestone | Stories |
|---|---|---|
| #11 qbit - Package Management | v0.2.0 | #27-35 (9) |
| #12 qqq - Template System | v0.2.0 | #18-26 (9) |
| #13 qrun - Build & Publish | v0.3.0 | #36-42 (7) |
| #14 qrun - Service Operations | v0.3.0 | #43-49 (7) |
| #15 qstudio - AI Planning | v1.0.0 | #50-53 (4) |
| #16 Authentication & Security | v1.0.0 | #54-57 (4) |
| #17 Enterprise Features | v1.0.0 | #58-61 (4) |
Key Design Decisions
- Template engine: Apache Velocity (not Handlebars) for QQQ consistency
- Voyage integration: Mock APIs for now, real integration when ready
- User journey focus: Roadmap organized by concrete use cases
Current Branch State
- Branch:
develop - Clean: Yes (no uncommitted changes)
Next Steps / TODO
v0.2.0 - Create & Manage (Priority)
Epic #12 - qqq Template System (in progress):
#18 - Replace Handlebars with Apache VelocityDONE#19 - Add computed variables supportDONE#20 - Implement directory transformsDONE#21 - Update template manifest schema v2DONE#22 - Migrate templates-hub to VelocityDONE#23 - Integrate template listing with Voyage mockDONE#24 - Add prompt validationDONE#25 - Improve error messagesDONE- #26 - Implement --merge mode (next)
Epic #11 - qbit Package Management (after qqq):
- #27 - qbit search command
- #28 - qbit add with version constraints
- #29 - qbit remove command
- #30 - qbit update command
- #31 - qbit list command
- #32 - SemVer constraint resolution
- #33 - Dependency conflict detection
- #34 - Vendor directory layout
- #35 - SHA-512 integrity verification
Infrastructure
- GitHub project: https://github.com/orgs/QRun-IO/projects/12
How to Continue
When starting a new session, say "continue from last session" and Claude will:
- Read this file for context
- Check git status for any pending work
- Review GitHub project for current sprint
Key Files
| File | Purpose |
|---|---|
CLAUDE.md |
Project overview and build commands |
docs/ROADMAP.md |
User journey roadmap |
docs/internal/session-state.md |
This file - session continuity |
.github/workflows/build.yml |
CI/CD pipeline |