원클릭으로
backend-worker
Builds Go backend features including schemas, APIs, engines, CLI commands, and tests
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Builds Go backend features including schemas, APIs, engines, CLI commands, and tests
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | backend-worker |
| description | Builds Go backend features including schemas, APIs, engines, CLI commands, and tests |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use for features involving:
Read the feature description, preconditions, expectedBehavior, and verificationSteps carefully. Read mission.md and .factory/library/ for architectural context.
Read the existing code in the relevant package to understand:
Before writing implementation code:
internal/contract/contract_test.go)t.Helper(), t.TempDir(), t.Setenv() for isolationhttptest.NewServer or httptest.NewRecordergo test ./internal/<package> -run TestName -count=1If the feature arrives with pre-implemented staged changes from a prior interrupted run, treat strict red-phase ordering as best-effort: add/adjust regression tests first where practical, then run focused + full validators and clearly document this deviation in handoff.
Test coverage requirements:
Follow these conventions from the codebase:
Struct design:
Validate() methodsApplyDefaults() or Default() functionsAPI handlers:
if r.Method != http.MethodGet { ... })strings.TrimSpace, strings.ToLowerError handling:
fmt.Errorf("resolve contract for %s: %w", agentID, err)errors.Is/errors.As for branchingConfig integration:
internal/config/config.goDefault() functionApplyDefaults() logic for zero-value fallbackCLI commands:
cmd/openclawssy/main.goos.Args dispatch matching existing style*runtime.Enginego test ./internal/<package> -run TestName -count=1 -vgo vet ./... — must pass with no warningsgofmt -l $(find . -name '*.go' -not -path './vendor/*') — no files should be listedgo build -o ./bin/openclawssy ./cmd/openclawssy — must compilecurl to manually verify endpoint behavior against the running servergo test ./...For API endpoints:
./bin/openclawssy servecurl to test each endpoint behaviorinteractiveChecks entryFor CLI commands:
go build -o ./bin/openclawssy ./cmd/openclawssyinteractiveChecks entryIf mission guidance explicitly allows non-interactive/manual-skip validation for the current feature, provide equivalent evidence-backed checks (targeted automated command/API probes plus logs/artifacts) and document the substitution in interactiveChecks.
{
"salientSummary": "Implemented AgentContract schema and resolution engine in internal/contract/. Added GET /api/admin/agents/{id}/resolved endpoint. Resolution merges global config → agent profile → subagent overrides with field-level source tracking. All 14 tests pass; verified via curl that resolved contract returns complete state with correct inheritance.",
"whatWasImplemented": "internal/contract/contract.go (AgentContract struct with 9 policy sections), internal/contract/resolver.go (resolution engine merging 3 layers with source annotations), internal/contract/resolver_test.go (14 table-driven tests), handler registration in internal/channels/dashboard/handler.go for GET /api/admin/agents/{id}/resolved.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "go test ./internal/contract -v -count=1", "exitCode": 0, "observation": "14 tests passed, including inheritance, override, and fallback cases" },
{ "command": "go vet ./...", "exitCode": 0, "observation": "No warnings" },
{ "command": "go build -o ./bin/openclawssy ./cmd/openclawssy", "exitCode": 0, "observation": "Build successful" },
{ "command": "go test ./...", "exitCode": 0, "observation": "All package tests pass" }
],
"interactiveChecks": [
{ "action": "curl -H 'Authorization: Bearer change-me' http://localhost:8081/api/admin/agents/default/resolved | jq .", "observed": "200 OK, complete contract with all 9 policy sections, each field has 'source' annotation" },
{ "action": "curl http://localhost:8081/api/admin/agents/nonexistent/resolved", "observed": "404 with {\"error\": \"agent not found\"}" },
{ "action": "curl http://localhost:8081/api/admin/agents/default/resolved | jq '.model_policy.source'", "observed": "\"global\" — confirming inheritance from global config" }
]
},
"tests": {
"added": [
{
"file": "internal/contract/resolver_test.go",
"cases": [
{ "name": "TestResolve_GlobalDefaults", "verifies": "Agent with no overrides gets all global defaults" },
{ "name": "TestResolve_ProfileOverride", "verifies": "Agent profile values override global defaults" },
{ "name": "TestResolve_SubagentInheritance", "verifies": "Subagent inherits from parent agent with additional restrictions" },
{ "name": "TestResolve_ZeroValueFallback", "verifies": "Zero-value fields fall back to parent level" },
{ "name": "TestResolve_SourceTracking", "verifies": "Each field's inheritance source is correctly annotated" }
]
}
]
},
"discoveredIssues": []
}