Skip to content

Add multi-module codebase with CI pipeline#1

Merged
initializ-mk merged 14 commits intomainfrom
develop
Feb 22, 2026
Merged

Add multi-module codebase with CI pipeline#1
initializ-mk merged 14 commits intomainfrom
develop

Conversation

@initializ-mk
Copy link
Contributor

@initializ-mk initializ-mk commented Feb 22, 2026

Summary

  • Adds the full Forge multi-module Go workspace: forge-core (embeddable library), forge-cli (CLI frontend), and forge-plugins (channel adapters)
  • Includes CI/CD workflows (test, lint, build matrix, release), Makefile, goreleaser config
  • Rewrites docs/architecture.md to reflect the current multi-module structure and Forge's identity as a portable runtime for secure AI agents
  • Updates README with comprehensive documentation

Test plan

  • CI passes: go vet, gofmt, golangci-lint v2.10.1, go test -race
  • Cross-platform build matrix (linux/darwin/windows, amd64/arm64) succeeds
  • Integration tests pass with --tags=integration
  • docs/architecture.md contains no internal/ or pkg/ references

Migrates from monolithic internal/ layout to three Go workspace modules:
- forge-core: embeddable library (compiler, runtime, LLM providers, tools, security)
- forge-cli: CLI frontend (commands, build pipeline, container builders, templates)
- forge-plugins: channel plugins (Slack, Telegram, markdown)

Includes updated README, architecture docs, CI/CD workflows, and build tooling.
All go commands (vet, test, build) were using ./... which doesn't work
from the workspace root. Updated to use explicit module-qualified paths
(./forge-core/... ./forge-cli/... ./forge-plugins/...) and fixed the
build target from ./cmd/forge to ./forge-cli/cmd/forge.
The v1.64.8 release was built with Go 1.24 and cannot lint Go 1.25 code.
Upgrade to golangci-lint-action v7 with version v2, which is built with
Go 1.25.
Fix formatting across 44 files in forge-core, forge-cli, and forge-plugins.
The action requires a full semver version, not just 'v2'.
golangci-lint defaults to ./... which fails in a Go workspace root.
Pass module-qualified paths explicitly via the args parameter.
- errcheck: check return values for os.MkdirAll, os.Chdir, os.Setenv,
  io.Copy, fmt.Fprintf, json.Unmarshal, Close, Write, WalkDir
- staticcheck: lowercase error strings, remove trailing punctuation,
  replace if-else chain with tagged switch
- ineffassign: remove dead reassignment in markdown_test.go
- unused: remove unused appCommit var and stubRun function
The channel plugin packages live in forge-plugins/channels/, not
forge-cli/channels/.
- errcheck: f.Close, resp.Body.Close, fmt.Fprintf, os.MkdirAll, os.WriteFile
- staticcheck: lowercase error strings for Gemini, Ollama, Perplexity
- Update loop_test.go assertion to match lowercased error message
Handle return values for os.WriteFile, f.Close, resp.Body.Close across
framework_adapter_stage_test, skills.go, openai.go, and telegram.go.
Blanket fix for defer resp.Body.Close() and bare os.WriteFile in tests
across all three modules. No more errcheck violations remain.
nolint comments on multi-line calls don't suppress the linter on the
opening line; use _ = prefix instead.
go build from the workspace root can't resolve ./forge-cli/cmd/forge
as a package path. Build from within the module directory instead.
The bare 'forge' pattern also matched forge-cli/cmd/forge/, preventing
the main package from being committed. Prefix with / to anchor to root.
@initializ-mk initializ-mk merged commit 448d748 into main Feb 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant