Commit f4117b8
committed
chore: namespace-cleanup docstring sweep + git push regex hardening
Combines two in-flight workstreams into one commit.
## Docstring namespace sweep (parallel agent)
Follow-up to the CLI namespace cleanup in 78fbdf7. Updates
doc comments, blog posts, recipes, and the regenerated site to
reflect current command names (e.g. `ctx pause` → `ctx hook pause`,
`ctx resume` → `ctx hook resume`, `ctx message` → `ctx hook message`).
Also refreshes the Copilot CLI integration skills added in
edaac81 (PR #63) to match the new namespace.
Scope: ~450 files across docs/, site/, internal/cli, internal/write,
internal/config, .github/, integration skill templates, and .claude/
skill SKILL.md files.
## Git push regex hardening (this session)
The `block-dangerous-command` hook's `MidGitPush` regex only matched
`git push` mid-command after `;`, `&&`, or `||`. This session
accidentally bypassed it with `git -C <path> push` — the permissions
deny list `Bash(git push *)` only matches prefix `git push`, so
`git -C <path> push` also slipped through.
Replace `MidGitPush` with a broader `GitPush` that covers:
- Bare `git push` at command start
- All separator and subshell entry points (`;`, `&&`, `||`, `|`, `&`,
`(`, `$(`, backtick, newline)
- Env-var and command-wrapper prefixes (`GIT_DIR=/x git push`,
`time git push`, `nice git push`)
- Any flag shape between `git` and `push` (`-C path`, `-c key=val`,
`--git-dir=/path`, `--no-pager`, `--bare`, `-p`, `-P`)
- Tail anchor that distinguishes subcommand from ref names
(`push-to-remote`, `push_branch`) via `[^a-zA-Z0-9._/-]|$`
Documented trade-offs: accepted false positives on `git log push`
and `git commit -m push` (push as literal arg); known blind spots
for `eval` / `sh -c` quoting and shell aliases.
Adds `internal/config/regex/cmd_test.go` with 42 table-driven cases
covering all entry points, flag shapes, prefixes, negative cases
(other subcommands, ref-name continuations), and the accepted
false-positive classes.
Renames the Go symbol `MidGitPush` → `GitPush` to accurately
reflect scope; keeps legacy variant string `mid-git-push` and text
key `block.mid-git-push` (user-facing message is already generic:
"git push requires explicit user approval").
Spec: specs/git-push-regex-hardening.md
Spec: specs/cli-namespace-cleanup.md
Signed-off-by: Jose Alekhinne <jose@parlakisik.com>1 parent edaac81 commit f4117b8
493 files changed
Lines changed: 23827 additions & 16958 deletions
File tree
- .claude/skills/_ctx-backup
- .context
- .github
- docs
- blog
- cli
- home
- operations
- recipes
- reference
- security
- thesis
- examples/demo
- hack
- internal
- assets
- claude/skills
- ctx-pause
- ctx-resume
- ctx-worktree
- commands
- text
- integrations
- copilot-cli
- skills
- ctx-agent
- ctx-architecture
- ctx-archive
- ctx-blog-changelog
- ctx-blog
- ctx-brainstorm
- ctx-commit
- ctx-consolidate
- ctx-doctor
- ctx-drift
- ctx-implement
- ctx-journal-enrich-all
- ctx-journal-enrich
- ctx-loop
- ctx-next
- ctx-pad
- ctx-pause
- ctx-prompt-audit
- ctx-recall
- ctx-reflect
- ctx-remember
- ctx-remind
- ctx-resume
- ctx-skill-audit
- ctx-spec
- ctx-status
- ctx-worktree
- ctx-wrap-up
- copilot
- read
- agent
- claude
- lookup
- tpl
- bootstrap
- cli
- add
- cmd/root
- core/insert
- agent
- cmd/root
- core
- budget
- score
- change/core/detect
- config/core/profile
- connection/core/render
- decision
- cmd/reindex
- doctor
- core/check
- drift/core
- fix
- out
- event
- hub/core/server
- initialize
- core
- claude_check
- merge
- plugin
- project
- journal
- cmd
- importer
- obsidian
- site
- core
- collapse
- frontmatter
- generate
- index
- lock
- moc
- normalize
- obsidian
- parse
- reduce
- schema
- section
- slug
- source
- format
- turn
- wikilink
- learning
- cmd/reindex
- mcp
- memory/cmd
- status
- sync
- message
- cmd
- edit
- list
- reset
- root
- show
- notify
- cmd
- setup
- test
- pad
- cmd/edit
- core
- parse
- store
- tag
- pause
- cmd/root
- permission
- remind
- resume
- cmd/root
- setup/core
- cline
- copilot_cli
- copilot
- cursor
- kiro
- site
- cmd/feed
- core/scan
- sync
- core
- validate
- system
- cmd
- block_dangerous_command
- check_context_size
- check_persistence
- core
- archive
- drift
- health
- journal
- knowledge
- message
- nudge
- session
- stats
- task
- cmd/complete
- watch/core
- apply
- config
- copilot
- embed
- cmd
- flag
- text
- event
- hook
- http
- marker
- regex
- stats
- sysinfo
- token
- vscode
- warn
- why
- context
- load
- summary
- crypto
- drift
- entity
- entry
- err
- backup
- crypto
- fs
- hub
- journal
- memory
- skill
- steering
- trigger
- format
- hub
- index
- journal
- parser
- schema
- state
- log/event
- mcp
- handler
- proto
- server
- def/tool
- dispatch/poll
- route
- prompt
- tool
- memory
- notify
- parse
- rc
- skill
- steering
- sysinfo
- task
- tidy
- trace
- trigger
- validate
- wrap
- write
- complete
- drift
- initialize
- message
- notify
- prune
- resource
- session
- steering
- vscode
- site
- blog
- 2026-01-27-building-ctx-using-ctx
- 2026-02-01-ctx-v0.2.0-the-archaeology-release
- 2026-02-01-refactoring-with-intent
- 2026-02-03-the-attention-budget
- 2026-02-04-skills-that-fight-the-platform
- 2026-02-05-you-cant-import-expertise
- 2026-02-07-the-anatomy-of-a-skill-that-works
- 2026-02-08-not-everything-is-a-skill
- 2026-02-09-defense-in-depth-securing-ai-agents
- 2026-02-12-how-deep-is-too-deep
- 2026-02-14-irc-as-context
- 2026-02-14-parallel-agents-with-worktrees
- 2026-02-15-ctx-v0.3.0-the-discipline-release
- 2026-02-15-eight-ways-a-hook-can-talk
- 2026-02-15-why-zensical
- 2026-02-16-ctx-v0.6.0-the-integration-release
- 2026-02-17-code-is-cheap-judgment-is-not
- 2026-02-17-context-as-infrastructure
- 2026-02-17-parallel-agents-merge-debt-and-the-myth-of-overnight-progress
- 2026-02-17-the-3-1-ratio
- 2026-02-17-when-a-system-starts-explaining-itself
- 2026-02-25-the-homework-problem
- 2026-02-28-the-last-question
- 2026-03-04-agent-memory-is-infrastructure
- 2026-03-23-ctx-v0.8.0-the-architecture-release
- 2026-03-23-we-broke-the-3-1-rule
- 2026-04-02-code-structure-as-an-agent-interface
- 2026-04-06-the-watermelon-rind-anti-pattern
- cli
- backup
- bootstrap
- change
- completion
- config
- connection
- connect
- context
- doctor
- event
- guide
- hook
- hub
- init-status
- journal
- loop
- mcp
- memory
- message
- notify
- pad
- pause
- prune
- remind
- resume
- serve
- setup
- site
- skill
- steering
- sysinfo
- system
- trace
- trigger
- usage
- watch
- why
- home
- about
- common-workflows
- community
- configuration
- context-files
- contributing
- faq
- first-session
- getting-started
- hub
- is-ctx-right
- joining-a-project
- keeping-ai-honest
- prompting-guide
- repeated-mistakes
- steering
- triggers
- operations
- autonomous-loop
- hub-failure-modes
- hub
- integrations
- migration
- release
- upgrading
- recipes
- architecture-deep-dive
- autonomous-loops
- building-skills
- claude-code-permissions
- configuration-profiles
- context-health
- customizing-hook-messages
- design-before-coding
- external-context
- guide-your-agent
- hook-output-patterns
- hook-sequence-diagrams
- hub-cluster
- hub-getting-started
- hub-multi-machine
- hub-overview
- hub-personal
- hub-team
- import-plans
- knowledge-capture
- memory-bridge
- multi-tool-setup
- multilingual-sessions
- parallel-worktrees
- permission-snapshots
- publishing
- scratchpad-sync
- scratchpad-with-claude
- session-archaeology
- session-ceremonies
- session-changes
- session-lifecycle
- session-pause
- session-reminders
- state-maintenance
- steering
- system-hooks-audit
- task-management
- triggers
- troubleshooting
- webhook-notifications
- when-to-use-agent-teams
- reference
- audit-conventions
- comparison
- design-invariants
- scratchpad
- session-journal
- skills
- versions
- security
- agent-security
- hub
- reporting
- thesis
- specs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
125 | 170 | | |
126 | 171 | | |
127 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
118 | 173 | | |
119 | 174 | | |
120 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2076 | 2076 | | |
2077 | 2077 | | |
2078 | 2078 | | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
309 | 317 | | |
310 | 318 | | |
311 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
| 554 | + | |
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
0 commit comments