@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.
Files changed (153) hide show
  1. package/.geminiignore +15 -0
  2. package/.github/workflows/ci.yml +100 -0
  3. package/.github/workflows/release.yml +51 -0
  4. package/.golangci.yml +21 -0
  5. package/.goreleaser.yaml +43 -0
  6. package/.rgignore +13 -0
  7. package/.specforce/config.yaml +32 -0
  8. package/.specforce/docs/.gitkeep +0 -0
  9. package/.specforce/docs/architecture.md +98 -0
  10. package/.specforce/docs/engineering.md +80 -0
  11. package/.specforce/docs/governance.md +30 -0
  12. package/.specforce/docs/memorial.md +44 -0
  13. package/.specforce/docs/principles.md +31 -0
  14. package/.specforce/docs/security.md +31 -0
  15. package/.specforce/docs/ui-ux.md +129 -0
  16. package/.specforce/specs/.gitkeep +0 -0
  17. package/AGENTS.md +36 -0
  18. package/CONTRIBUTING.md +81 -0
  19. package/LICENSE +21 -0
  20. package/Makefile +49 -0
  21. package/README.md +144 -0
  22. package/assets/logo-header.png +0 -0
  23. package/assets/logo.png +0 -0
  24. package/docs/artifacts.md +41 -0
  25. package/docs/cli.md +73 -0
  26. package/docs/configuration.md +50 -0
  27. package/docs/getting-started.md +110 -0
  28. package/docs/supported-tools.md +14 -0
  29. package/go.mod +35 -0
  30. package/go.sum +61 -0
  31. package/index.js +0 -0
  32. package/package.json +26 -0
  33. package/src/cmd/specforce/main.go +23 -0
  34. package/src/cmd/specforce/main_test.go +7 -0
  35. package/src/internal/agent/artifacts/constitution/architecture.yaml +70 -0
  36. package/src/internal/agent/artifacts/constitution/engineering.yaml +52 -0
  37. package/src/internal/agent/artifacts/constitution/governance.yaml +41 -0
  38. package/src/internal/agent/artifacts/constitution/memorial.yaml +55 -0
  39. package/src/internal/agent/artifacts/constitution/principles.yaml +54 -0
  40. package/src/internal/agent/artifacts/constitution/security.yaml +47 -0
  41. package/src/internal/agent/artifacts/constitution/ui-ux.yaml +158 -0
  42. package/src/internal/agent/artifacts/spec/design.yaml +50 -0
  43. package/src/internal/agent/artifacts/spec/requirements.yaml +48 -0
  44. package/src/internal/agent/artifacts/spec/tasks.yaml +55 -0
  45. package/src/internal/agent/compatibility_test.go +120 -0
  46. package/src/internal/agent/cwd_test.go +9 -0
  47. package/src/internal/agent/embed.go +19 -0
  48. package/src/internal/agent/integration_test.go +138 -0
  49. package/src/internal/agent/kit/agents/product-analyst.yaml +31 -0
  50. package/src/internal/agent/kit/agents/technical-developer.yaml +28 -0
  51. package/src/internal/agent/kit/agents/technical-project-planner.yaml +30 -0
  52. package/src/internal/agent/kit/agents/technical-qa-engineer.yaml +36 -0
  53. package/src/internal/agent/kit/agents/technical-solution-architect.yaml +32 -0
  54. package/src/internal/agent/kit/commands/archive.yaml +25 -0
  55. package/src/internal/agent/kit/commands/constitution.yaml +132 -0
  56. package/src/internal/agent/kit/commands/implement.yaml +96 -0
  57. package/src/internal/agent/kit/commands/spec.yaml +94 -0
  58. package/src/internal/agent/kit/instructions/archive.md +68 -0
  59. package/src/internal/agent/kit/kit.yaml +111 -0
  60. package/src/internal/agent/kit/skills/opportunity-framing/SKILL.yaml +56 -0
  61. package/src/internal/agent/kit/skills/pragmatic-product-owner/SKILL.yaml +58 -0
  62. package/src/internal/agent/kit/skills/pragmatic-product-owner/references/spec-artifacts.yaml +38 -0
  63. package/src/internal/agent/kit/skills/spec-clarification-interview/SKILL.yaml +52 -0
  64. package/src/internal/agent/kit/skills/task-atomic-decomposition/SKILL.yaml +137 -0
  65. package/src/internal/agent/kit/skills/task-atomic-decomposition/references/roadmap-patterns.yaml +103 -0
  66. package/src/internal/agent/kit_manifests_test.go +58 -0
  67. package/src/internal/agent/manifest.go +15 -0
  68. package/src/internal/agent/registry.go +69 -0
  69. package/src/internal/agent/registry_test.go +51 -0
  70. package/src/internal/agent/translator.go +334 -0
  71. package/src/internal/agent/translator_test.go +734 -0
  72. package/src/internal/cli/archive.go +91 -0
  73. package/src/internal/cli/archive_test.go +67 -0
  74. package/src/internal/cli/cli.go +259 -0
  75. package/src/internal/cli/cli_test.go +130 -0
  76. package/src/internal/cli/cobra/archive.go +26 -0
  77. package/src/internal/cli/cobra/console.go +21 -0
  78. package/src/internal/cli/cobra/constitution.go +44 -0
  79. package/src/internal/cli/cobra/dummy_test.go +7 -0
  80. package/src/internal/cli/cobra/implementation.go +50 -0
  81. package/src/internal/cli/cobra/init.go +23 -0
  82. package/src/internal/cli/cobra/install.go +21 -0
  83. package/src/internal/cli/cobra/root.go +47 -0
  84. package/src/internal/cli/cobra/spec.go +91 -0
  85. package/src/internal/cli/console.go +48 -0
  86. package/src/internal/cli/constitution.go +190 -0
  87. package/src/internal/cli/constitution_test.go +50 -0
  88. package/src/internal/cli/implementation.go +153 -0
  89. package/src/internal/cli/implementation_test.go +165 -0
  90. package/src/internal/cli/spec.go +369 -0
  91. package/src/internal/cli/spec_test.go +85 -0
  92. package/src/internal/constitution/registry.go +139 -0
  93. package/src/internal/constitution/registry_test.go +97 -0
  94. package/src/internal/constitution/status.go +70 -0
  95. package/src/internal/constitution/status_test.go +160 -0
  96. package/src/internal/core/blueprint.go +49 -0
  97. package/src/internal/core/blueprint_test.go +58 -0
  98. package/src/internal/core/config.go +124 -0
  99. package/src/internal/core/config_test.go +145 -0
  100. package/src/internal/core/constants.go +13 -0
  101. package/src/internal/core/errors.go +31 -0
  102. package/src/internal/core/errors_test.go +48 -0
  103. package/src/internal/core/hooks.go +89 -0
  104. package/src/internal/core/hooks_test.go +51 -0
  105. package/src/internal/core/kit.go +15 -0
  106. package/src/internal/core/kit_test.go +65 -0
  107. package/src/internal/core/path.go +115 -0
  108. package/src/internal/core/path_test.go +101 -0
  109. package/src/internal/core/ui.go +19 -0
  110. package/src/internal/installer/dependencies.go +23 -0
  111. package/src/internal/installer/install.go +89 -0
  112. package/src/internal/installer/installer.go +45 -0
  113. package/src/internal/installer/installer_test.go +96 -0
  114. package/src/internal/project/agents_md.go +108 -0
  115. package/src/internal/project/agents_md_test.go +101 -0
  116. package/src/internal/project/bootstrapper.go +64 -0
  117. package/src/internal/project/bootstrapper_test.go +89 -0
  118. package/src/internal/project/detector.go +35 -0
  119. package/src/internal/project/detector_test.go +96 -0
  120. package/src/internal/project/refresh_integration_test.go +86 -0
  121. package/src/internal/project/service.go +93 -0
  122. package/src/internal/project/service_test.go +135 -0
  123. package/src/internal/spec/archive.go +49 -0
  124. package/src/internal/spec/archive_test.go +55 -0
  125. package/src/internal/spec/discovery.go +53 -0
  126. package/src/internal/spec/discovery_test.go +60 -0
  127. package/src/internal/spec/implementation.go +296 -0
  128. package/src/internal/spec/implementation_test.go +253 -0
  129. package/src/internal/spec/registry.go +142 -0
  130. package/src/internal/spec/registry_test.go +105 -0
  131. package/src/internal/spec/scanner.go +219 -0
  132. package/src/internal/spec/scanner_test.go +243 -0
  133. package/src/internal/spec/service.go +157 -0
  134. package/src/internal/spec/service_test.go +238 -0
  135. package/src/internal/spec/status.go +94 -0
  136. package/src/internal/spec/status_test.go +146 -0
  137. package/src/internal/spec/tasks.go +103 -0
  138. package/src/internal/spec/tasks_test.go +137 -0
  139. package/src/internal/tui/components.go +132 -0
  140. package/src/internal/tui/console.go +247 -0
  141. package/src/internal/tui/console_test.go +19 -0
  142. package/src/internal/tui/constitution.go +36 -0
  143. package/src/internal/tui/constitution_test.go +32 -0
  144. package/src/internal/tui/implementation.go +151 -0
  145. package/src/internal/tui/logo.go +89 -0
  146. package/src/internal/tui/multiselect.go +199 -0
  147. package/src/internal/tui/progressbar.go +37 -0
  148. package/src/internal/tui/progressbar_test.go +30 -0
  149. package/src/internal/tui/spec.go +35 -0
  150. package/src/internal/tui/spinner.go +66 -0
  151. package/src/internal/tui/terminal.go +18 -0
  152. package/src/internal/tui/theme.go +125 -0
  153. 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
+ }