Skip to content

draft#71

Closed
josealekhine wants to merge 18 commits intofeature/guardsfrom
main
Closed

draft#71
josealekhine wants to merge 18 commits intofeature/guardsfrom
main

Conversation

@josealekhine
Copy link
Copy Markdown
Member

No description provided.

dependabot Bot and others added 18 commits April 13, 2026 02:28
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Port all 40 Claude skills to Copilot CLI format with proper YAML
frontmatter (tools array instead of allowed-tools string). Includes
lifecycle hook scripts (bash + PowerShell), agent instructions, and
hook configuration.

Contents:
- 40 skill SKILL.md files under integrations/copilot-cli/skills/
- 8 hook scripts (session-start/end, pre/post-tool-use × bash/ps1)
- INSTRUCTIONS.md agent bootstrap instructions
- ctx-hooks.json lifecycle hook configuration
- Updated embed.go to include integrations assets
- Parity spec document (specs/copilot-feature-parity-kit.md)

Signed-off-by: ersan bilik <ersanbilik@gmail.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ersan bilik <ersanbilik@gmail.com>
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>
…y-rebased

Feat/copilot cli skill parity rebased
….org/x/tools-0.44.0

deps: Bump golang.org/x/tools from 0.43.0 to 0.44.0
…ftprops/action-gh-release-3

deps: Bump softprops/action-gh-release from 2 to 3
Rewrites every doc.go in the project to meet the quality floor
established in decision 2026-04-14: behavior-grounded content,
25-100 body lines, no lazy template patterns.

Changes:
- 493 stub doc.go files enriched with behavior descriptions,
  design rationale, and algorithm details
- Removed Related Packages sections from all 610 files (drift
  liability outweighs benefit given IDE and GitNexus tooling)
- Eliminated all lazy template patterns (Key exports, See source
  files, Part of subsystem)
- Fixed compliance test issues: gofmt formatting, literal .md
  in config/file/doc.go, subcommand drift in cli-level doc.go
- Copilot CLI skills and context assets synced via make build

Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Spec: specs/docgo-quality-floor.md
Enrich all 610 doc.go files to meet quality floor
mark_journal, mark_wrapped_up, pause, and resume could create
partial state (logs, markers) in non-ctx projects when the plugin
was installed globally. Add the same early-return guard already
present in check_resource and check_backup_age. bootstrap is left
unguarded intentionally — its job is to report context directory
status.

Spec: specs/hook-guard-uninitialized.md
Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Runbooks in hack/ were buried where humans don't look — no agent
has ever autonomously executed them since the project's inception.
Move all 3 existing runbooks to the docs site for discoverability
and create 5 new runbooks from the TASKS.md backlog:

Moved: codebase-audit, docs-semantic-audit, sanitize-permissions
New:   release-checklist, breaking-migration, hub-deployment,
       new-contributor, plugin-release

Update cross-references in recipes, skills (Claude + Copilot),
contributing guide, operations index, release page, architecture,
nav config, and rebuild site.

Spec: specs/runbook-migration-to-docs.md
Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Move hack/agents/architecture-explorer.md to a proper runbook at
docs/operations/runbooks/architecture-exploration.md. Preserves
the full agent prompt while adding human-facing narrative (when,
why, how, tips). Supersedes the speculative ctx explore CLI
command — a runbook is the right weight for this workflow.

Spec: specs/runbook-migration-to-docs.md
Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Fix detect-ai-typography.sh to work on macOS (BSD grep lacks -P;
add runtime detection with literal UTF-8 fallback). Then replace
~1960 AI typography artifacts (em-dashes, en-dashes, smart quotes,
space-padded double hyphens) across docs/ and internal/ with
contextually appropriate ASCII punctuation: colons for definitions,
semicolons for joined clauses, commas for soft pauses, parentheses
for asides, periods for separate thoughts.

Also: remove hack/agents/ (migrated to docs runbooks), add spec
for ctx backup deprecation planning, record deprecation decision,
update TASKS.md with deprecation task and skip superseded tasks,
clean up quarantine/deadcode.

Spec: specs/ai-typography-cleanup.md
Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Replaces directory walk-up with explicit declaration via CTX_DIR
(canonical-basename and absolute-path enforced). The anchor now
arrives through ctx activate / ctx deactivate shell hooks plus
per-tool channels; non-exempt commands refuse to run without it.
ContextChild and the implicit walk-up paths are removed; over
twenty command entry points migrated through rc.RequireContextDir.

Highlights:

- New cli/activate, cli/deactivate, system/check-anchor-drift
  commands plus the shell-emit primitives in config/shell and
  write/activate.
- rc.ContextDir and state.Dir tightened to (string, error) with
  ErrDirNotDeclared. Callers now gate on err, eliminating the
  filepath.Join("", rel) trap that wrote state files into CWD.
- testutil/testctx package introduced. Declare wires CTX_DIR and
  HOME for hermetic tests, eliminating cross-package races on
  ~/.claude/settings.json under parallel go test ./...
- Test isolation: fourteen test files now declare CTX_DIR and
  HOME so a developer shell with CTX_DIR exported no longer
  pollutes test runs. cli_test.go's withCtxEnv helper replaced
  with a single t.Setenv at the top of TestBinaryIntegration.
- Block-dangerous-command subtree retired in favor of the
  block-dangerous-commands plural canonical naming.
- examples/demo/ removed (superseded by docs runbooks).
- .context/ updated end-to-end: agent playbook, conventions,
  decisions, learnings, glossary, architecture, plus four new
  steering files.

Spec: specs/single-source-context-anchor.md
Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Signed-off-by: Jose Alekhinne <jose@ctx.ist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants