@jeancodogno/specforce-kit 0.1.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/.geminiignore +15 -0
- package/.github/workflows/ci.yml +100 -0
- package/.github/workflows/release.yml +51 -0
- package/.golangci.yml +21 -0
- package/.goreleaser.yaml +43 -0
- package/.rgignore +13 -0
- package/.specforce/config.yaml +32 -0
- package/.specforce/docs/.gitkeep +0 -0
- package/.specforce/docs/architecture.md +98 -0
- package/.specforce/docs/engineering.md +80 -0
- package/.specforce/docs/governance.md +30 -0
- package/.specforce/docs/memorial.md +44 -0
- package/.specforce/docs/principles.md +31 -0
- package/.specforce/docs/security.md +31 -0
- package/.specforce/docs/ui-ux.md +129 -0
- package/.specforce/specs/.gitkeep +0 -0
- package/AGENTS.md +36 -0
- package/CONTRIBUTING.md +81 -0
- package/LICENSE +21 -0
- package/Makefile +49 -0
- package/README.md +144 -0
- package/assets/logo-header.png +0 -0
- package/assets/logo.png +0 -0
- package/docs/artifacts.md +41 -0
- package/docs/cli.md +73 -0
- package/docs/configuration.md +50 -0
- package/docs/getting-started.md +110 -0
- package/docs/supported-tools.md +14 -0
- package/go.mod +35 -0
- package/go.sum +61 -0
- package/index.js +0 -0
- package/package.json +26 -0
- package/src/cmd/specforce/main.go +23 -0
- package/src/cmd/specforce/main_test.go +7 -0
- package/src/internal/agent/artifacts/constitution/architecture.yaml +70 -0
- package/src/internal/agent/artifacts/constitution/engineering.yaml +52 -0
- package/src/internal/agent/artifacts/constitution/governance.yaml +41 -0
- package/src/internal/agent/artifacts/constitution/memorial.yaml +55 -0
- package/src/internal/agent/artifacts/constitution/principles.yaml +54 -0
- package/src/internal/agent/artifacts/constitution/security.yaml +47 -0
- package/src/internal/agent/artifacts/constitution/ui-ux.yaml +158 -0
- package/src/internal/agent/artifacts/spec/design.yaml +50 -0
- package/src/internal/agent/artifacts/spec/requirements.yaml +48 -0
- package/src/internal/agent/artifacts/spec/tasks.yaml +55 -0
- package/src/internal/agent/compatibility_test.go +120 -0
- package/src/internal/agent/cwd_test.go +9 -0
- package/src/internal/agent/embed.go +19 -0
- package/src/internal/agent/integration_test.go +138 -0
- package/src/internal/agent/kit/agents/product-analyst.yaml +31 -0
- package/src/internal/agent/kit/agents/technical-developer.yaml +28 -0
- package/src/internal/agent/kit/agents/technical-project-planner.yaml +30 -0
- package/src/internal/agent/kit/agents/technical-qa-engineer.yaml +36 -0
- package/src/internal/agent/kit/agents/technical-solution-architect.yaml +32 -0
- package/src/internal/agent/kit/commands/archive.yaml +25 -0
- package/src/internal/agent/kit/commands/constitution.yaml +132 -0
- package/src/internal/agent/kit/commands/implement.yaml +96 -0
- package/src/internal/agent/kit/commands/spec.yaml +94 -0
- package/src/internal/agent/kit/instructions/archive.md +68 -0
- package/src/internal/agent/kit/kit.yaml +111 -0
- package/src/internal/agent/kit/skills/opportunity-framing/SKILL.yaml +56 -0
- package/src/internal/agent/kit/skills/pragmatic-product-owner/SKILL.yaml +58 -0
- package/src/internal/agent/kit/skills/pragmatic-product-owner/references/spec-artifacts.yaml +38 -0
- package/src/internal/agent/kit/skills/spec-clarification-interview/SKILL.yaml +52 -0
- package/src/internal/agent/kit/skills/task-atomic-decomposition/SKILL.yaml +137 -0
- package/src/internal/agent/kit/skills/task-atomic-decomposition/references/roadmap-patterns.yaml +103 -0
- package/src/internal/agent/kit_manifests_test.go +58 -0
- package/src/internal/agent/manifest.go +15 -0
- package/src/internal/agent/registry.go +69 -0
- package/src/internal/agent/registry_test.go +51 -0
- package/src/internal/agent/translator.go +334 -0
- package/src/internal/agent/translator_test.go +734 -0
- package/src/internal/cli/archive.go +91 -0
- package/src/internal/cli/archive_test.go +67 -0
- package/src/internal/cli/cli.go +259 -0
- package/src/internal/cli/cli_test.go +130 -0
- package/src/internal/cli/cobra/archive.go +26 -0
- package/src/internal/cli/cobra/console.go +21 -0
- package/src/internal/cli/cobra/constitution.go +44 -0
- package/src/internal/cli/cobra/dummy_test.go +7 -0
- package/src/internal/cli/cobra/implementation.go +50 -0
- package/src/internal/cli/cobra/init.go +23 -0
- package/src/internal/cli/cobra/install.go +21 -0
- package/src/internal/cli/cobra/root.go +47 -0
- package/src/internal/cli/cobra/spec.go +91 -0
- package/src/internal/cli/console.go +48 -0
- package/src/internal/cli/constitution.go +190 -0
- package/src/internal/cli/constitution_test.go +50 -0
- package/src/internal/cli/implementation.go +153 -0
- package/src/internal/cli/implementation_test.go +165 -0
- package/src/internal/cli/spec.go +369 -0
- package/src/internal/cli/spec_test.go +85 -0
- package/src/internal/constitution/registry.go +139 -0
- package/src/internal/constitution/registry_test.go +97 -0
- package/src/internal/constitution/status.go +70 -0
- package/src/internal/constitution/status_test.go +160 -0
- package/src/internal/core/blueprint.go +49 -0
- package/src/internal/core/blueprint_test.go +58 -0
- package/src/internal/core/config.go +124 -0
- package/src/internal/core/config_test.go +145 -0
- package/src/internal/core/constants.go +13 -0
- package/src/internal/core/errors.go +31 -0
- package/src/internal/core/errors_test.go +48 -0
- package/src/internal/core/hooks.go +89 -0
- package/src/internal/core/hooks_test.go +51 -0
- package/src/internal/core/kit.go +15 -0
- package/src/internal/core/kit_test.go +65 -0
- package/src/internal/core/path.go +115 -0
- package/src/internal/core/path_test.go +101 -0
- package/src/internal/core/ui.go +19 -0
- package/src/internal/installer/dependencies.go +23 -0
- package/src/internal/installer/install.go +89 -0
- package/src/internal/installer/installer.go +45 -0
- package/src/internal/installer/installer_test.go +96 -0
- package/src/internal/project/agents_md.go +108 -0
- package/src/internal/project/agents_md_test.go +101 -0
- package/src/internal/project/bootstrapper.go +64 -0
- package/src/internal/project/bootstrapper_test.go +89 -0
- package/src/internal/project/detector.go +35 -0
- package/src/internal/project/detector_test.go +96 -0
- package/src/internal/project/refresh_integration_test.go +86 -0
- package/src/internal/project/service.go +93 -0
- package/src/internal/project/service_test.go +135 -0
- package/src/internal/spec/archive.go +49 -0
- package/src/internal/spec/archive_test.go +55 -0
- package/src/internal/spec/discovery.go +53 -0
- package/src/internal/spec/discovery_test.go +60 -0
- package/src/internal/spec/implementation.go +296 -0
- package/src/internal/spec/implementation_test.go +253 -0
- package/src/internal/spec/registry.go +142 -0
- package/src/internal/spec/registry_test.go +105 -0
- package/src/internal/spec/scanner.go +219 -0
- package/src/internal/spec/scanner_test.go +243 -0
- package/src/internal/spec/service.go +157 -0
- package/src/internal/spec/service_test.go +238 -0
- package/src/internal/spec/status.go +94 -0
- package/src/internal/spec/status_test.go +146 -0
- package/src/internal/spec/tasks.go +103 -0
- package/src/internal/spec/tasks_test.go +137 -0
- package/src/internal/tui/components.go +132 -0
- package/src/internal/tui/console.go +247 -0
- package/src/internal/tui/console_test.go +19 -0
- package/src/internal/tui/constitution.go +36 -0
- package/src/internal/tui/constitution_test.go +32 -0
- package/src/internal/tui/implementation.go +151 -0
- package/src/internal/tui/logo.go +89 -0
- package/src/internal/tui/multiselect.go +199 -0
- package/src/internal/tui/progressbar.go +37 -0
- package/src/internal/tui/progressbar_test.go +30 -0
- package/src/internal/tui/spec.go +35 -0
- package/src/internal/tui/spinner.go +66 -0
- package/src/internal/tui/terminal.go +18 -0
- package/src/internal/tui/theme.go +125 -0
- package/src/internal/tui/ui.go +52 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
package tui
|
|
2
|
+
|
|
3
|
+
import "github.com/charmbracelet/lipgloss"
|
|
4
|
+
|
|
5
|
+
// Ghost in the Machine Palette
|
|
6
|
+
var (
|
|
7
|
+
brandMint = lipgloss.Color("#00FA9A") // Ghost Primary
|
|
8
|
+
brandCyan = lipgloss.Color("#00FFFF") // Ghost Secondary
|
|
9
|
+
brandIce = lipgloss.Color("#E0FFFF") // Ghost Accent
|
|
10
|
+
successGreen = lipgloss.Color("#5FFF87") // Success
|
|
11
|
+
warningYellow = lipgloss.Color("#FFFFAF") // Warning
|
|
12
|
+
errorRed = lipgloss.Color("#FF5F5F") // Error
|
|
13
|
+
mutedGrey = lipgloss.Color("#444444") // Standard UI Border
|
|
14
|
+
textGrey = lipgloss.Color("#808080") // Secondary Text / Metadata
|
|
15
|
+
textWhite = lipgloss.Color("#FFFFFF") // Primary Text
|
|
16
|
+
black = lipgloss.Color("#000000") // Canvas
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
// UI Refinement Colors (Alias for roles)
|
|
20
|
+
var (
|
|
21
|
+
finishedGreen = successGreen
|
|
22
|
+
inProgressOrange = warningYellow
|
|
23
|
+
mutedDarkGrey = textGrey
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
// Base Styles
|
|
27
|
+
var (
|
|
28
|
+
HeaderStyle = lipgloss.NewStyle().
|
|
29
|
+
Foreground(brandMint).
|
|
30
|
+
Bold(true)
|
|
31
|
+
|
|
32
|
+
SubtitleStyle = lipgloss.NewStyle().
|
|
33
|
+
Foreground(brandIce)
|
|
34
|
+
|
|
35
|
+
BodyStyle = lipgloss.NewStyle().
|
|
36
|
+
Foreground(textWhite)
|
|
37
|
+
|
|
38
|
+
DimmedStyle = lipgloss.NewStyle().
|
|
39
|
+
Foreground(mutedDarkGrey)
|
|
40
|
+
|
|
41
|
+
FinishedStyle = lipgloss.NewStyle().
|
|
42
|
+
Foreground(finishedGreen)
|
|
43
|
+
|
|
44
|
+
InProgressStyle = lipgloss.NewStyle().
|
|
45
|
+
Foreground(inProgressOrange)
|
|
46
|
+
|
|
47
|
+
MutedStyle = lipgloss.NewStyle().
|
|
48
|
+
Foreground(mutedDarkGrey)
|
|
49
|
+
|
|
50
|
+
SuccessStyle = lipgloss.NewStyle().
|
|
51
|
+
Foreground(successGreen)
|
|
52
|
+
|
|
53
|
+
WarningStyle = lipgloss.NewStyle().
|
|
54
|
+
Foreground(warningYellow)
|
|
55
|
+
|
|
56
|
+
ErrorStyle = lipgloss.NewStyle().
|
|
57
|
+
Foreground(errorRed)
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
// Badge Styles
|
|
61
|
+
var (
|
|
62
|
+
SuccessBadgeStyle = lipgloss.NewStyle().
|
|
63
|
+
Foreground(black).
|
|
64
|
+
Background(successGreen).
|
|
65
|
+
Padding(0, 1).
|
|
66
|
+
Bold(true)
|
|
67
|
+
|
|
68
|
+
WarningBadgeStyle = lipgloss.NewStyle().
|
|
69
|
+
Foreground(black).
|
|
70
|
+
Background(warningYellow).
|
|
71
|
+
Padding(0, 1).
|
|
72
|
+
Bold(true)
|
|
73
|
+
|
|
74
|
+
ErrorBadgeStyle = lipgloss.NewStyle().
|
|
75
|
+
Foreground(textWhite).
|
|
76
|
+
Background(errorRed).
|
|
77
|
+
Padding(0, 1).
|
|
78
|
+
Bold(true)
|
|
79
|
+
|
|
80
|
+
// Clean Separator Border (replacing thick borders)
|
|
81
|
+
CleanBorder = lipgloss.Border{
|
|
82
|
+
Top: "-",
|
|
83
|
+
Bottom: "-",
|
|
84
|
+
Left: "|",
|
|
85
|
+
Right: "|",
|
|
86
|
+
TopLeft: "+",
|
|
87
|
+
TopRight: "+",
|
|
88
|
+
BottomLeft: "+",
|
|
89
|
+
BottomRight: "+",
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Completion and Sub-task Styles
|
|
93
|
+
CompletionBoxStyle = lipgloss.NewStyle().
|
|
94
|
+
Border(CleanBorder).
|
|
95
|
+
BorderForeground(mutedGrey).
|
|
96
|
+
Padding(1, 4).
|
|
97
|
+
Margin(1, 0)
|
|
98
|
+
|
|
99
|
+
SubTaskStyle = lipgloss.NewStyle().
|
|
100
|
+
Foreground(textGrey).
|
|
101
|
+
PaddingLeft(2)
|
|
102
|
+
|
|
103
|
+
// Console specific styles
|
|
104
|
+
PaneBorderStyle = lipgloss.NewStyle().
|
|
105
|
+
Border(CleanBorder).
|
|
106
|
+
BorderForeground(mutedGrey).
|
|
107
|
+
Padding(1)
|
|
108
|
+
|
|
109
|
+
CategoryHeaderStyle = lipgloss.NewStyle().
|
|
110
|
+
Foreground(brandCyan).
|
|
111
|
+
Bold(true).
|
|
112
|
+
Underline(true).
|
|
113
|
+
MarginBottom(1)
|
|
114
|
+
|
|
115
|
+
SelectedItemStyle = lipgloss.NewStyle().
|
|
116
|
+
Foreground(brandCyan).
|
|
117
|
+
Bold(true)
|
|
118
|
+
|
|
119
|
+
UnselectedItemStyle = lipgloss.NewStyle().
|
|
120
|
+
Foreground(textWhite)
|
|
121
|
+
|
|
122
|
+
SelectionMarkerStyle = lipgloss.NewStyle().
|
|
123
|
+
Foreground(brandCyan).
|
|
124
|
+
Bold(true)
|
|
125
|
+
)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
package tui
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"fmt"
|
|
5
|
+
"github.com/jeancodogno/specforce-kit/src/internal/core"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
type terminalUI struct {
|
|
9
|
+
spinner *NeonSpinner
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
func NewUI() core.UI {
|
|
13
|
+
return &terminalUI{}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
func (u *terminalUI) Log(message string) {
|
|
17
|
+
fmt.Println(BodyStyle.Render(message))
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
func (u *terminalUI) Warn(message string) {
|
|
21
|
+
fmt.Print(RenderBadge("warning", message))
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func (u *terminalUI) Error(message string) {
|
|
25
|
+
fmt.Print(RenderBadge("error", message))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
func (u *terminalUI) Success(message string) {
|
|
29
|
+
fmt.Print(RenderBadge("success", message))
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
func (u *terminalUI) SubTask(message string) {
|
|
33
|
+
LogSubTask(message)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
func (u *terminalUI) StartSpinner(message string) {
|
|
37
|
+
if u.spinner == nil {
|
|
38
|
+
s := NewNeonSpinner(message)
|
|
39
|
+
u.spinner = &s
|
|
40
|
+
}
|
|
41
|
+
fmt.Print(u.spinner.View())
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
func (u *terminalUI) StopSpinner() {
|
|
45
|
+
// For now, our spinner implementation is simple and just prints once in View().
|
|
46
|
+
// A more complex spinner would need to be updated.
|
|
47
|
+
u.spinner = nil
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
func (u *terminalUI) Confirm(question string) bool {
|
|
51
|
+
return Confirm(question)
|
|
52
|
+
}
|