docs(primitives): document declared data extraction for remaining kinds - #168
Merged
Merged
Conversation
PR #165 added ExtractInto to every primitive package but documented it in only 11 of the 22 per-kind pages. Add a Data Extraction section to the remaining kinds, matching the structure used by the pages updated in #165: the kind-specific ExtractInto signature with a realistic extraction target, and the WithDataGuard / WithOptionalData read declarations on the builder. Every snippet was compile checked against the primitive packages. Regenerated the plugin skill references with make sync-plugin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhRYyAS9tcQcg6iZXMoVfd
There was a problem hiding this comment.
Pull request overview
This PR expands the primitives documentation to consistently cover the “declared data extraction” API (ExtractInto, WithDataGuard, WithOptionalData) across the remaining per-kind pages, and regenerates the Claude plugin reference copies to match.
Changes:
- Added a new Data Extraction section to 11 previously-missing primitives pages under
docs/primitives/. - Included kind-specific
ExtractIntoexamples plus guidance onWithDataGuard/WithOptionalData, with a couple of targeted cautions (Secret plaintext handling; Job completion gating). - Regenerated the corresponding plugin reference markdown files under
plugin/skills/using-primitives/references/primitives/.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/primitives/configmap.md | Adds Data Extraction section and example for ConfigMap. |
| docs/primitives/cronjob.md | Adds Data Extraction section and example for CronJob. |
| docs/primitives/daemonset.md | Adds Data Extraction section and example for DaemonSet. |
| docs/primitives/deployment.md | Adds Data Extraction section and example for Deployment. |
| docs/primitives/hpa.md | Adds Data Extraction section and example for HPA. |
| docs/primitives/job.md | Adds Data Extraction section, example, and completion-gating caution for Job. |
| docs/primitives/pod.md | Adds Data Extraction section and example for Pod. |
| docs/primitives/pv.md | Adds Data Extraction section and example for PersistentVolume. |
| docs/primitives/replicaset.md | Adds Data Extraction section and example for ReplicaSet. |
| docs/primitives/secret.md | Adds Data Extraction section, example, and plaintext caution for Secret. |
| docs/primitives/statefulset.md | Adds Data Extraction section and example for StatefulSet. |
| plugin/skills/using-primitives/references/primitives/configmap.md | Regenerated plugin reference copy reflecting the ConfigMap docs update. |
| plugin/skills/using-primitives/references/primitives/cronjob.md | Regenerated plugin reference copy reflecting the CronJob docs update. |
| plugin/skills/using-primitives/references/primitives/daemonset.md | Regenerated plugin reference copy reflecting the DaemonSet docs update. |
| plugin/skills/using-primitives/references/primitives/deployment.md | Regenerated plugin reference copy reflecting the Deployment docs update. |
| plugin/skills/using-primitives/references/primitives/hpa.md | Regenerated plugin reference copy reflecting the HPA docs update. |
| plugin/skills/using-primitives/references/primitives/job.md | Regenerated plugin reference copy reflecting the Job docs update. |
| plugin/skills/using-primitives/references/primitives/pod.md | Regenerated plugin reference copy reflecting the Pod docs update. |
| plugin/skills/using-primitives/references/primitives/pv.md | Regenerated plugin reference copy reflecting the PV docs update. |
| plugin/skills/using-primitives/references/primitives/replicaset.md | Regenerated plugin reference copy reflecting the ReplicaSet docs update. |
| plugin/skills/using-primitives/references/primitives/secret.md | Regenerated plugin reference copy reflecting the Secret docs update. |
| plugin/skills/using-primitives/references/primitives/statefulset.md | Regenerated plugin reference copy reflecting the StatefulSet docs update. |
Comment on lines
+199
to
+200
| Guard on the Job's `Completable` status when a later resource must wait for the Job to finish. Data cells carry values | ||
| between resources; they are not a substitute for the completion condition. |
Comment on lines
+199
to
+200
| Guard on the Job's `Completable` status when a later resource must wait for the Job to finish. Data cells carry values | ||
| between resources; they are not a substitute for the completion condition. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The declared data extraction API from #165 (
ExtractInto,WithDataGuard,WithOptionalData) is exported by every primitive package, but only 11 of the 22 per-kind pages underdocs/primitives/documented it. Anyone reading the ConfigMap, Deployment or Secret page had no way to learn the feature exists from the docs alone. This fills the remaining 11 pages using the same section shape the pages updated in #165 already use.Changes
Data Extractionsection to the configmap, cronjob, daemonset, deployment, hpa, job, pod, pv, replicaset, secret and statefulset pages, each covering the kind-specificExtractIntosignature and theWithDataGuard/WithOptionalDataread declarations on the builder.PodIPfor Pod, the boundClaimReffor PersistentVolume, the rollout revision annotation for Deployment,CurrentRevisionfor StatefulSet,NumberReadyfor DaemonSet,LastScheduleTimefor CronJob, the generated credential for Secret, and so on.Completablestatus rather than a data cell.plugin/skills/using-primitives/references/primitives/withmake sync-plugin.Section placement follows
service.md: after the editor and convenience-method content, before the first status or suspension section.Challenges
Getting the examples right meant checking every snippet against the real signatures rather than pattern-matching from the pages that already had the section. Each of the 11 snippets was transcribed verbatim into a temporary test in the module and compiled and run against the primitive packages, which caught the cases needing nil handling (
CronJob.Status.LastScheduleTimeandPersistentVolume.Spec.ClaimRefare pointers) before they reached the docs. The temporary file was removed before committing.Related
Testing
Documentation only, no source changes.
make lint-mdis clean andmake fmt-mdproduced no further changes.make docs-buildpasses in strict mode, which confirms the new../component.md#declared-dataanchors resolve.go test ./...passes. The compile check described above is the main source of confidence in the snippets: every documentedExtractIntocall, cell type andWithDataGuard/WithOptionalDatachain type-checks against the current packages.make sync-pluginregenerated only the 11 expected reference files, with no unrelated drift.🤖 Generated with Claude Code
https://claude.ai/code/session_01PhRYyAS9tcQcg6iZXMoVfd