بنقرة واحدة
kcc-direct-controller-implementer
// Implement the controller, mappers, and fuzzer for a direct KCC resource, ensuring package isolation and CI compliance. Use this when implementing the main reconciliation logic for a "direct" resource.
// Implement the controller, mappers, and fuzzer for a direct KCC resource, ensuring package isolation and CI compliance. Use this when implementing the main reconciliation logic for a "direct" resource.
Moves a mockgcp service from using locally generated grpc-gateway proto bindings to using reflection with the official Google Cloud Go client library (httptogrpc). Use this when tasked with stopping grpc-gateway generation for a GCP service in mockgcp.
Creates or updates the _identity.go and _reference.go files for a Config Connector resource, ensuring they follow the canonical gcpurls.Template pattern. Use this when you need to make sure the identity and reference is up to date for a KCC resource or when implementing IdentityV2 and refs.Ref for a resource.
Guides the implementation of KRM types and CRD scaffolding for new "direct" resources.
Provides instructions and a tool for analyzing Custom Resource Definition (CRD) changes, including checking for KRM API structural equivalence and backward compatibility.
Checks apis/ subdirectories for missing generate.sh and helps create PRs to add them, following the pattern in
Provides a structured logic for capturing and routing agentic learnings to prevent knowledge pollution.
| name | kcc-direct-controller-implementer |
| description | Implement the controller, mappers, and fuzzer for a direct KCC resource, ensuring package isolation and CI compliance. Use this when implementing the main reconciliation logic for a "direct" resource. |
This skill guides the implementation of the controller, mappers, and fuzzer for direct KCC resources, with a focus on package isolation to prevent symbol collisions and rigorous CI validation.
resource_kind: The KCC Kind.package_path: The isolated package directory (e.g., pkg/controller/direct/vertexai/examplestore/).proto_package: The GCP proto package (e.g., google.cloud.aiplatform.v1).Package Isolation:
You MUST implement all controller-related logic in the provided package_path. This prevents symbol collisions in mapper.generated.go.
Mappers:
Implement/verify mapper.generated.go and manual mappers. Ensure all references use the standard Ref pattern.
Fuzzer:
Implement <resource_lower>_fuzzer.go and register it with fuzztesting.RegisterKRMFuzzer.
f.SpecField(".foo") and f.StatusField(".bar") methods rather than inserting directly into SpecFields/StatusFields sets (e.g. avoid f.SpecFields.Insert...).f.Unimplemented_NotYetTriaged(".baz"), f.Unimplemented_Identity(".id"), or other specific variants) rather than standard inserts into UnimplementedFields sets. This categorizes why we are not handling specific fields.Final Generation & Reporting:
Run make ready-pr from the repository root. This is a critical step that:
pkg/clients/generated.docs/reports/crd_report.md and .csv).make fmt and make vet.
YOU MUST COMMIT ALL RESULTING CHANGES.Validation & Last-Mile Tests: Run the following tests to ensure CI compliance:
dev/ci/presubmits/fuzz-roundtrippersdev/ci/presubmits/tests-e2e-fixtures-directgo test ./pkg/crd/template/...go test ./tests/apichecks/....
TestCRDFieldPresenceInTestsForAlpha fails, you may need to regenerate the exceptions file by running it with WRITE_GOLDEN_OUTPUT=1.Append any controller/reconciliation quirks or API check hurdles to .gemini/journals/<service>.md using the format described in the kcc-agentic-journaler skill.