Skip to content

Proposal: visible skillshare/ project directory (#256) - #257

Closed
salmonumbrella wants to merge 1 commit into
runkids:mainfrom
salmonumbrella:proposal/visible-project-dir
Closed

Proposal: visible skillshare/ project directory (#256)#257
salmonumbrella wants to merge 1 commit into
runkids:mainfrom
salmonumbrella:proposal/visible-project-dir

Conversation

@salmonumbrella

Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)

Linked Issue

#256

Summary

This PR adds a feature proposal for recognizing a visible skillshare/ directory as an alternative project marker, alongside the existing .skillshare/.

Project mode is identified solely by .skillshare/config.yaml, and trash/, backups/, logs/ and audit-rules.yaml anchor to that same hidden directory. sources (#153 / #162) made project content relocatable for repositories that want skills reviewed alongside contributor documentation, but the marker and config.yaml stayed hidden — so those repositories end up with a visible skills directory plus a hidden directory whose only job is to hold the config.

The proposal resolves the marker in a fixed order, .skillshare/config.yaml then skillshare/config.yaml. First hit wins, so .skillshare/ stays the default, takes precedence when both exist, and no migration is needed.

Notes

This PR only adds a proposal under proposals/ and does not include implementation changes, per CONTRIBUTING.md.

I did build the change first so the proposal describes real behaviour rather than a guess, and two findings from that are written into the proposal because they are easy to miss:

  • The visible name collides with the global config directory. BaseDir() is <config-home>/skillshare, so a directory named skillshare already means "global config". The two places that infer scope from a config path by directory name (oplog.LogDir / ensureProjectLogGitignore, and isProjectLogConfig) have to exclude the global location by full path instead. Missing this misroutes global operation logs, and TestLogDir_Global passes a fixture path that hides the problem unless it declares a config home.
  • The new package has to be a leaf. internal/audit cannot import internal/config, since configinstallaudit would cycle.

The working branch is salmonumbrella:feat/visible-project-dir if it is useful as a reference — 14 non-test files plus a new internal/projectdir package, with tests for hidden-only, visible-only, both-present and neither-present, plus state-directory and init -p --visible coverage. gofmt, go vet ./... and go build ./... are clean, and the unit packages show no failures beyond the two that already fail on main outside the devcontainer (TestCommitSourceFiles_CommitFailureIsReturned, TestGitRootMismatch). Happy to leave it, drop it, or split it however you prefer — the proposal stands on its own.

Checklist

  • I've read CONTRIBUTING.md
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Project mode is identified only by .skillshare/config.yaml, and trash,
backups, logs and audit-rules.yaml anchor to the same hidden directory.
The sources option made project content relocatable, but repositories
that treat skills as reviewable content still need a hidden directory
whose only job is to hold config.yaml.

Propose recognizing skillshare/config.yaml as a second project marker,
resolved after .skillshare/config.yaml so an existing project never
moves and no migration is needed.

Refs runkids#256

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a79ac35de0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread proposals/256-visible-project-dir.md
@salmonumbrella

Copy link
Copy Markdown
Contributor Author

Converting this to a direct implementation PR: #258.

Everything in this proposal is folded into that PR body — the problem, the resolution order, the two name collisions, and the back-compat guarantees — so this document would only duplicate it. #258 also carries the working code, tests, docs and schema updates.

Issue #256 stays open as the motivation anchor.

Sorry for the shuffle. If you would rather review a proposal document first, per CONTRIBUTING, say the word and I will reopen this one and park the implementation.

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.

1 participant