|
| 1 | +# Pipeleek Copilot Agent Modes |
| 2 | + |
| 3 | +This document defines maintainer-oriented execution modes for Copilot work in this repository. |
| 4 | + |
| 5 | +## command-implementation |
| 6 | + |
| 7 | +### When to use |
| 8 | + |
| 9 | +Use when implementing or modifying an existing command and you need the repository-standard command structure. |
| 10 | + |
| 11 | +### Inputs required |
| 12 | + |
| 13 | +- Touched command file paths. |
| 14 | +- Flag-to-config key bindings. |
| 15 | +- Required key list and validator expectations. |
| 16 | +- Parent command registration path and expected CLI behavior. |
| 17 | + |
| 18 | +### Expected outputs |
| 19 | + |
| 20 | +- Command follows `config.NewCommandSetup` and current repository conventions. |
| 21 | +- Required keys validated. |
| 22 | +- Values read via unified config getters. |
| 23 | +- Parent command registration, tests, and docs are updated when applicable. |
| 24 | + |
| 25 | +### Validation checklist |
| 26 | + |
| 27 | +1. Run focused unit tests for touched command packages. |
| 28 | +2. Confirm command is registered in the expected parent tree. |
| 29 | +3. Confirm no direct `cmd.Flags().Get*` reads remain in touched execution paths. |
| 30 | + |
| 31 | +## command-coverage |
| 32 | + |
| 33 | +### When to use |
| 34 | + |
| 35 | +Use for requests that affect "all commands" under a platform. |
| 36 | + |
| 37 | +### Inputs required |
| 38 | + |
| 39 | +- Platform root path under `internal/cmd/<platform>/`. |
| 40 | +- Requested behavior change to apply. |
| 41 | +- Any explicit exclusions from maintainers. |
| 42 | + |
| 43 | +### Expected outputs |
| 44 | + |
| 45 | +- Recursive command tree discovered under `internal/cmd/<platform>/`. |
| 46 | +- Scan and non-scan commands updated, including nested children. |
| 47 | +- No in-scope command directories skipped. |
| 48 | + |
| 49 | +### Validation checklist |
| 50 | + |
| 51 | +1. Spot-check command directories under the target platform. |
| 52 | +2. Verify nested command groups are covered or explicitly marked not applicable. |
| 53 | +3. Run targeted tests for multiple affected command groups. |
| 54 | + |
| 55 | +## docs-sync |
| 56 | + |
| 57 | +### When to use |
| 58 | + |
| 59 | +Use when flags, config keys, or command semantics are updated. |
| 60 | + |
| 61 | +### Inputs required |
| 62 | + |
| 63 | +- Changed command files and affected flags. |
| 64 | +- Changed config keys and inheritance impact. |
| 65 | +- Affected docs sections and examples. |
| 66 | + |
| 67 | +### Expected outputs |
| 68 | + |
| 69 | +- docs/introduction/configuration.md updated if key usage changed. |
| 70 | +- User-facing guides updated where behavior or examples changed. |
| 71 | +- Generated config output expectations reviewed. |
| 72 | + |
| 73 | +### Validation checklist |
| 74 | + |
| 75 | +1. Verify docs examples match command flags and key names. |
| 76 | +2. Verify links and section references resolve. |
| 77 | +3. Confirm stale flag references were removed from touched docs. |
| 78 | + |
| 79 | +## new-command |
| 80 | + |
| 81 | +### When to use |
| 82 | + |
| 83 | +Use when adding a new CLI command or subcommand. |
| 84 | +Apply the `command-implementation` mode as the baseline, then add the creation-specific work in this mode. |
| 85 | + |
| 86 | +### Inputs required |
| 87 | + |
| 88 | +- Target platform and command path under `internal/cmd/<platform>/`. |
| 89 | +- Required flags and config keys. |
| 90 | +- Behavior intent and output expectations. |
| 91 | + |
| 92 | +### Expected outputs |
| 93 | + |
| 94 | +- New command added with Cobra wiring and consistent flag naming. |
| 95 | +- Command uses `config.NewCommandSetup` with bindings, required keys, and validators. |
| 96 | +- Unit tests and e2e tests added or updated for command behavior. |
| 97 | +- Each flag defined on the new command is covered by at least one useful e2e test that asserts behavior. |
| 98 | +- Documentation updated for flags/config keys and usage examples. |
| 99 | + |
| 100 | +### Validation checklist |
| 101 | + |
| 102 | +1. Confirm command is registered in the correct parent command tree. |
| 103 | +2. Confirm config bindings, required keys, and validators are complete. |
| 104 | +3. Confirm unit tests and e2e tests for the new command path pass. |
| 105 | +4. Confirm each flag defined on the new command has at least one behavior-asserting e2e test. |
| 106 | +5. Confirm docs and configuration references are synchronized. |
| 107 | + |
| 108 | +## pr-review-fixes |
| 109 | + |
| 110 | +### When to use |
| 111 | + |
| 112 | +Use when a pull request has review comments that require code changes and thread resolution. |
| 113 | + |
| 114 | +### Inputs required |
| 115 | + |
| 116 | +- Active PR context and changed files. |
| 117 | +- Review comments/threads to address. |
| 118 | +- Any explicit reviewer constraints or requested behavior. |
| 119 | + |
| 120 | +### Expected outputs |
| 121 | + |
| 122 | +- Review feedback converted into concrete code changes. |
| 123 | +- Requested behavior and edge cases addressed in code/tests. |
| 124 | +- Response summary maps each fix to the corresponding review thread. |
| 125 | + |
| 126 | +### Validation checklist |
| 127 | + |
| 128 | +1. Fetch and triage open review comments before editing. |
| 129 | +2. Apply fixes with minimal behavioral regression risk. |
| 130 | +3. Run focused tests for touched areas. |
| 131 | +4. Confirm each addressed thread has a clear resolution note. |
| 132 | + |
| 133 | +## pr-actions-failures-debug |
| 134 | + |
| 135 | +### When to use |
| 136 | + |
| 137 | +Use when PR status checks fail and maintainers need local reproduction, diagnosis, and fixes. |
| 138 | + |
| 139 | +### Inputs required |
| 140 | + |
| 141 | +- Failing workflow/check names and failure logs. |
| 142 | +- PR branch diff context. |
| 143 | +- Local commands needed to reproduce failing jobs. |
| 144 | + |
| 145 | +### Expected outputs |
| 146 | + |
| 147 | +- Root cause identified for each failing check. |
| 148 | +- Local reproduction command(s) documented. |
| 149 | +- Minimal fix set applied and validated locally. |
| 150 | +- Follow-up risk or non-reproducible gaps explicitly noted. |
| 151 | + |
| 152 | +### Validation checklist |
| 153 | + |
| 154 | +1. Extract failing checks and logs before patching. |
| 155 | +2. Reproduce failure locally with the closest equivalent command. |
| 156 | +3. Apply fix and rerun relevant local validation. |
| 157 | +4. Report what passed, what remains unverified, and why. |
0 commit comments